CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

OF-extend: area-averaged pressure drop across one patch and one user defined surface

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2018, 15:03
Default OF-extend: area-averaged pressure drop across one patch and one user defined surface
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 7
jgross is on a distinguished road
Hi people,

I am trying to calculate the head of a 2D pump simulation and therefore need to calculate the pressure drop between two surfaces. One of the surfaces is a patch and the other will be a user defined surface, which is some distance from the outlet (see the first figure).

As I said in the title, I am using OF-extend, and therefore libFieldFunctionObjects doesn't seem to be available i.e. surfaceRegion isn't available.

Originally, I had split the casing into two regions, one for the main volute and another for the extension and there was a grid generalised interface (GGI) that connected the two (see the second figure). This meant that calculating the pressure difference was incredibly easy as I could use patchAverage over both of the desired patches. However, this is not a good way to proceed as there is no need for a GGI there, as both regions are stationary.

I could attempt to create an empty patch in the same region so I could perform the calculation the same, however this doesn't seem like the correct way to proceed and indeed might make the results a little less accurate.

I have tried two different methods:

1. Create a faceZone in that region in order to use a swakExpression to calculate it.
This was done by specifying a faceZone (see the third figure) in the following way:
faceSet outlet new boxToFace (0.09 0.11 0)(0.2 0.1 0.002)
setsToZones -noFlipMap
but this faceZone doesn't contain any points
    type faceZone;
    faceLabels      0();
    flipMap         0();
and so the calculation obviously doesn't work.

2. Create a cuttingPlane surface there and get the pressure field on that "surface" (it's actually a line in the case of a 2D simulation).
This was done by defining a function in the controlDict
    // Output the pressure at the inlet and the outlet
        type surfaces;
        functionObjectLibs ("");
        outputControl timeStep;
        outputInterval 100;

        setFormat foamFile;
        surfaceFormat vtk;
        interpolationScheme cellPointFace;

        fields (p);

                  type cuttingPlane;
                  planeType pointAndNormal;
                      basePoint (0.15 0.2 0);
                      normalVector (0 1 0);
                  interpolation true;
The output from this is a number of pressure values along the cuttingPlane. However, I would like the output to be an area-averaged pressure.

Does anyone know an easier way of doing this?

Attached Images
File Type: png Pump.png (53.0 KB, 5 views)
File Type: png PumpOrig.png (46.9 KB, 5 views)
jgross is offline   Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

All times are GMT -4. The time now is 08:34.