CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   How to find the flux through each cell in a each boundary patch? (https://www.cfd-online.com/Forums/openfoam-pre-processing/123480-how-find-flux-through-each-cell-each-boundary-patch.html)

Hale September 13, 2013 09:52

How to find the flux through each cell in a each boundary patch?
 
Hi,

I need to find the flux through each cell of a boundary at each time step. As far as I know all fluxes through each cell are given in the phi file but how can I find them for a specific boundary patch?

I normally use the following function (which is placed in the controlDict file) to find the sum of the fluxes through all the cells in a boundary at each time step but now I want the actual value for each cell and not the sum. How can I do it?

Code:

functions
{
    inletFlux1
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        outputControl  outputTime;
        log            true;
        valueOutput    false;
        source          patch;
        sourceName      inlet1;
        operation      sum;  // what should I write here to get value for each cell and not the sum?

        fields
        (
            rho phi alpha1
        );
    }
}

Thanks


All times are GMT -4. The time now is 21:56.