|
[Sponsors] |
[swak4Foam] weightedAverage using execFlowFunctionObject |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 24, 2017, 12:44 |
[swak4Foam] weightedAverage using execFlowFunctionObject
|
#1 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
Hello,
i want to output the weighted average of temperature on a given plane as postProcessing using functionObject (i am using "execFlowFunctionObject -time myTime" to run it as postprocessing). I added these lines to my controlDict: Code:
surfacePlane { type swakExpression; valueType surface; surfaceName testPlane; surface { type plane; basePoint (0.0040125 1.25e-4 0); normalVector (1 0 0); interpolate false; } verbose true; expression "T*area()/sum(area())"; accumulations ( sum ); } Code:
--> FOAM FATAL ERROR: Parser Error for driver SampledSurfaceValueExpressionDriver at "1.1-2" :"field T not existing or of wrong type" "T*area()/sum(area())" ^^ --| i am using openfoam 2.3 Thanks, andrea |
|
May 10, 2017, 05:34 |
|
#2 | |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11 |
Hi,
I am not sure what is actually triggering that error, apart from saying that you might be missing "T" field in your time directory :P, as your functionObject worked out fine for me. I am wondering, is there any reason that you are using this expression Code:
expression "T*area()/sum(area())"; accumulations ( sum ); Code:
expression "T"; accumulations ( weightedAverage ); Ricky Quote:
__________________
If it is easy, then something is fishy! |
||
May 10, 2017, 05:49 |
|
#3 |
Senior Member
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16 |
I have actually tried both expressions and got the same error, and yes T-field is in "myTime" directory. If i run the simulation and perform the calculation during the run it works with no problems....
andrea |
|
May 10, 2017, 06:43 |
|
#4 | |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11 |
Quote:
Code:
execFlowFunctionObject -noFlow -time yourTime
__________________
If it is easy, then something is fishy! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC boundary using values from another boundary | lg88 | OpenFOAM Community Contributions | 9 | July 28, 2017 10:43 |
[swak4Foam] Trouble accessing fields within expressionField | aerogt3 | OpenFOAM Post-Processing | 6 | May 12, 2017 15:02 |
[swak4Foam] Is it possible to append monitored data in a single file? | vasava | OpenFOAM Post-Processing | 0 | February 26, 2016 01:53 |
[swak4Foam] segmentation faults when using the debug switch "ExpressionResult" | Astrodan | OpenFOAM Running, Solving & CFD | 1 | February 21, 2016 16:29 |
[swak4Foam] different values between swakExpression & faceSource areaAverage | Paebin | OpenFOAM Community Contributions | 7 | December 23, 2015 11:29 |