New Post/Thread: OpenFOAM - Obtaining Diffusive Fluxes

CFD Online OpenFOAM Forums openfoam at cfd-online.com
Thu Jun 16 09:29:33 MDT 2011


Hello,

linch has just posted in the OpenFOAM forum of CFD Online Discussion Forums under the title of Obtaining Diffusive Fluxes.

This thread is located at http://www.cfd-online.com/Forums/openfoam/89572-obtaining-diffusive-fluxes.html

Here is the message that has just been posted:
***************
Hello FOAM_Community,
how can I obtain a diffusive mass flux resulting from solving a species equation:

Code:
---------
    fvScalarMatrix xN2Eqn
    (
             fvm::ddt(rho*alpha1, xN2)
           + fvm::div(rhoPhi, xN2)
           - fvm::laplacian(DN2f, xN2)
           ==
             rhoN2Su
    );
    xN2Eqn.solve();
---------
what I need is a surfaceScalarField jN2f.
xN2Eqn.flux() would return the overall flux. fvc::laplacian(DN2f, xN2) would probably return a volScalarField which equals to the cell flux divergence, right? So what I thought about is something like:

Code:
---------
volScalarField jN2 = fvc::laplacian(DN2f, xN2);
surfaceScalarField jN2f = fvc::interpolate(jN2);
---------
Is this way completely wrong? Even if it works, I suspect I don't necessarily get the same fluxes like those, resulting from the solution of the xN2Eqn. I think there must be a better way.

regards,
***************


More information about the OpenFOAM mailing list