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/)
-   -   Computing StreamFunction (https://www.cfd-online.com/Forums/openfoam-post-processing/182334-computing-streamfunction.html)

Tempest January 7, 2017 06:17

Computing StreamFunction
 
Dear Foamers,

I am trying to compute streamFunction for a time averaged field -- i.e. phiMean instead of phi.

For any given instant, the streamFunction is working fine, but when I use fieldAverage and calculate time average of phi field for one cycle and generate phiMean, the streamFunction command gives the following error:

Quote:

Reading field phi
zero flux boundary face not found. Using cell as a reference.
..
I have tried to modify streamFunction source code by replacing phi by phiMean everywhere. I have even tried to add the following code before the loop in streamFunction.C

Quote:


volVectorField UMean
(
IOobject
(
"UMean",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
),
mesh
);

surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
linearInterpolate(UMean)&mesh.Sf()
);

phi.write();

The above code reads UMean and write phiMean for it. But this was also fruitless.

I badly need the streamFunction field. Please someone help me out.

Peace!


All times are GMT -4. The time now is 10:31.