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/)
-   -   MassFlow on a choosen surface (https://www.cfd-online.com/Forums/openfoam-post-processing/172967-massflow-choosen-surface.html)

Jo_Plmb June 10, 2016 05:30

MassFlow on a choosen surface
 
Good morming everybody.

I'm a brand new OpenFOAM user (I started a month ago) and I have a little problem.
I am working on the decompression of a cylinder thanks to the sonicFoam solver and now I want to calculate the mass flow average under the modelised hole where air flows, inside the volume.

I have already used a function in the controlDict to calculate the massFlow (phi) but thanks to this method I can only calculate it over a patch
functions
(
massFlow
{
type patchMassFlow;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
outlet
);
factor 1;
outputControl timeStep;
outputInterval 1;
}

I also tried to use a sampleDict to have the average massflow over a line but after running it, I have no results for phi nor rho.

I use this sampleDict :
setFormat raw;

interpolationScheme cellPoint;

fields ( rho phi );

sets
(
line
{
type uniform;
axis z;
start (0 0 1.79);
end (0 0 1.74);
nPoints 100;
}
);

The real constraint is that I have to be able to calculate the mass flow average anywhere in my structure without drawing a patch.

If you have any idea what I have done wrong I'll pleased to read your comments :)

Thanks.


All times are GMT -4. The time now is 15:32.