CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   --- How to calculate phiMean for each time step --- (https://www.cfd-online.com/Forums/openfoam/83017-how-calculate-phimean-each-time-step.html)

maysmech December 11, 2010 11:13

--- How to calculate phiMean for each time step ---
 
hi to all,:)

I want simulate a problem and i need to set outlets 20% and 80%. as i don't have outlets velocities i set pressure to reach desired flow rates from each outlet by try and error. i do this by k-e and reach to answer. but in Rans and LES i should use averaged flows.
i need phi mean parameter same as uMean and pMean which is defined in controlDict.
How can i tell OF to calculate phiMean for each time step for patches.

Thanks in advance,

CedricVH December 13, 2010 09:30

Add this to your controlDict file:

Code:

functions
(
      mflow1
      {
            type            faceSource;
            functionObjectLibs ("libfieldFunctionObjects.so");
            enabled        true;
            outputControl  timeStep;
            outputInterval  1;
            log            true;
            valueOutput    false;
            source          patch;
            sourceName      outlet1;
            operation      sum;
            fields
            (
                  phi
            );
      }

      mflow2
      {
            type            faceSource;
            functionObjectLibs ("libfieldFunctionObjects.so");
            enabled        true;
            outputControl  timeStep;
            outputInterval  1;
            log            true;
            valueOutput    false;
            source          patch;
            sourceName      outlet2;
            operation      sum;
            fields
            (
                  phi
            );
  }
);


maysmech December 22, 2010 16:15

Thanks for your answer.

I tried it. but i don't have phiMean in time steps folders. what should i do?

maysmech December 28, 2010 04:45

i need phiMean or phi which uses uMean.


All times are GMT -4. The time now is 01:37.