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/)
-   -   run-time post-processing for uniformity index (https://www.cfd-online.com/Forums/openfoam-post-processing/216689-run-time-post-processing-uniformity-index.html)

jcw April 16, 2019 08:18

run-time post-processing for uniformity index
 
Hello!


I would like to start a run-time post-processing: The output should be the 'uniformity index' (UI) with respect to velocity at a certain outlet patch. The problem is: How do I implement at function with is evaluated during simulation run. I use OF4.1 and do not have swak4Foam installed.


Thanks for advise!

clapointe April 16, 2019 13:40

You can create a custom function object and put it in controlDict. It will be compiled and used at runtime. See :

https://github.com/OpenFOAM/OpenFOAM...nctionObject.H.

Caelan

Nealcaffrey March 11, 2021 02:46

Run time / On the fly Uniformity Index implementation
 
Here is a code which you can add in your functions inside controlDict for a user plane or a sampled surface :)

Code:

UniformityIndex_User_Plane1
      {
   
       
            enabled        yes;
            type            surfaceFieldValue;
           
            libs            ("libfieldFunctionObjects.so");
            writeControl    timeStep;
            writeInterval  1;
            log            true;
            writeFields    false;
            regionType      sampledSurface;
            name            User_Plane1 ; 
                sampledSurfaceDict
            {
               
                type        sampledTriSurfaceMesh;
                surface    User_Plane_P1.stl;
                source      cells;  // sample cells or boundaryFaces
                interpolate false;
            }
                    operation      uniformity; //- options: sum, areaIntegrate

          //  weightField    phi;
          //scaleFactor 1.183;
            fields
            (
                U
            );   
    }



All times are GMT -4. The time now is 14:42.