CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Mass flow averaged pressure (https://www.cfd-online.com/Forums/openfoam-post-processing/120021-mass-flow-averaged-pressure.html)

kingmaker June 28, 2013 10:01

Mass flow averaged pressure
 
Hello
I am using MRFSimple foam to do simulation of a blower. I want to calculate the mass flow averaged pressure on the outflow patch of the geometry. I have tried doing it using "libfieldFunctionObjects.so" in controlDict like :

weight_avg_p
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log true;
valueOutput true;
source patch;
sourceName wall_inlet;
operation weightedAverage;
weightField phi;

fields
(
p
);


But I get an error saying that the solver has a floating point exception.
Please help me in this regard. If any one has any suggestion on how to calculate the mass flow averaged pressure on a patch it will be very helpful.

Also it says that It cannot find field U when I give U as weightField in the above. :confused:

gschaider June 28, 2013 10:47

Quote:

Originally Posted by kingmaker (Post 436573)
Hello
I am using MRFSimple foam to do simulation of a blower. I want to calculate the mass flow averaged pressure on the outflow patch of the geometry. I have tried doing it using "libfieldFunctionObjects.so" in controlDict like :

weight_avg_p
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log true;
valueOutput true;
source patch;
sourceName wall_inlet;
operation weightedAverage;
weightField phi;

fields
(
p
);


But I get an error saying that the solver has a floating point exception.
Please help me in this regard. If any one has any suggestion on how to calculate the mass flow averaged pressure on a patch it will be very helpful.

Also it says that It cannot find field U when I give U as weightField in the above. :confused:

I your example the patch you average on has "wall" in the name. This does not necessarily mean that phi is 0 there. But it is rather common. And if you divide through a sum of zeros (no matter how many zeros there are) you get a floating point exception


All times are GMT -4. The time now is 11:44.