CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   patch mass flows in 1706 (https://www.cfd-online.com/Forums/openfoam/191396-patch-mass-flows-1706-a.html)

aerogt3 August 9, 2017 08:59

patch mass flows in 1706
 
Hello all,


I am evaluating 1706 compared to previous versions, and one very large annoyance is the persistent difficulty in getting proper mass flows. In the case of faceZone mass flow rates, I can use the fluxSummary function object, but this STILL lacks the "phi flip" functionality of swak4foam and thus gives rubbish values, since faceZones are not oriented.

For patches however, I can't get a flow rate at all. The "flowRatePatch" function from the OpenFOAM.org release is non existent, and fluxSummary works for surfaces, faceZones, and cellZones.

Source:
http://www.openfoam.com/documentatio...y.html#details

Does anyone know, if there a way to get patch mass flows in 1706?

philippose August 9, 2017 12:26

Hi there,
Why not just use swak4Foam?

I personally find the swak4Foam interface to be much more consistent across multiple OpenFOAM versions anyway.

Regards,
Philippose

aerogt3 August 10, 2017 08:53

I will try that as well, haven't tested if it work with 1706. But in general I would like to use the standard distro as much as possible. There have been mass flow calculators in the past, so there's gotta be one in this 1706.

akidess August 10, 2017 09:40

You seem to already know how to sample on a faceZone. You can create a faceZone from you patch via topoSet. Or you directly use a faceSource functionObject:

https://github.com/OpenFOAM/OpenFOAM...e/faceSource.H

aerogt3 August 10, 2017 09:41

Quote:

Originally Posted by akidess (Post 660188)
You seem to already know how to sample on a faceZone. You can create a faceZone from you patch via topoSet. Or you directly use a faceSource functionObject:

https://github.com/OpenFOAM/OpenFOAM...e/faceSource.H

Yes, and in previous versions I used that. But in 1706, I cannot see the faceSource function object or anything that appears to replace it - other than fluxSummary which does not work for patches.

akidess August 10, 2017 11:39

Right. 1706 has surfaceFieldValue.

Code:

surfaceFieldValue1
{
    type            surfaceFieldValue;
    libs            ("libfieldFunctionObjects.so");

    log            true;
    writeControl    writeTime;
    writeFields    true;

    regionType      patch;
    name            YOUR_PATCH;

    operation      sum;
    fields          (phi);
}


aerogt3 August 10, 2017 13:13

So that's where it went! Brilliant, thanks a lot :-)

akidess August 11, 2017 01:56

Which versions did you compare to? AFAIK that's how it's always been and newer CFD-direct versions work differently (since introducing the postProcess tool).


All times are GMT -4. The time now is 07:17.