Skip to content
Permalink
Browse files

functionObjects: Added phaseScalarTransport function

This is like the scalarTrasport function except that the transported
scalar is confined to a single phase of a multiphase simulation. In
addition to the usual specification for the scalarTransport function
(i.e., a field, schemes and solution parameters), the user needs to
specify the phase-flux or a pressure field which can be used to generate
it.

Example usage for interFoam:

    phaseScalarTransport1
    {
        type            phaseScalarTransport;
        libs            ("libsolverFunctionObjects.so");

        field           s.water;
        p               p_rgh;
    }

Example usage for reactingTwoPhaseEulerFoam:

    phaseScalarTransport1
    {
        type            phaseScalarTransport;
        libs            ("libsolverFunctionObjects.so");

        field           s.water;
        alphaPhi        alphaRhoPhi.water;
        rho             thermo:rho.water;
    }

The function will write out both the per-unit-phase field that is solved
for (s.water in the above examples) and also the mixture-total field
(alphaS.water), which is often more convenient for post-processing.
  • Loading branch information...
Will Bainbridge
Will Bainbridge committed Feb 14, 2019
1 parent e9f3811 commit 7b1840c7d3619d5a7e9efaa4de561205476f8b42
@@ -0,0 +1,26 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Solves a transport equation for a scalar field within one phase of a
multiphase simulation.
The name of the scalar field is specified in this file. A field file of
this name will also be required, typically in the 0 directory. Scheme and
solver settings will also be needed. Alternatively, if there is another
field which already has appropriate fvSchemes and fvSolution entries, these
settings can be reused by naming the field as the schemesField.
\*---------------------------------------------------------------------------*/

#includeEtc "caseDicts/postProcessing/solvers/phaseScalarTransport/phaseScalarTransport.cfg"

field s.water;
schemesField s.water;
p p_rgh;

// ************************************************************************* //
@@ -0,0 +1,12 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/

type phaseScalarTransport;
libs ("libsolverFunctionObjects.so");

// ************************************************************************* //
@@ -14,8 +14,7 @@ Description
\*---------------------------------------------------------------------------*/

type scalarTransport;
libs ("libsolverFunctionObjects.so");
#includeEtc "caseDicts/postProcessing/solvers/scalarTransport/scalarTransport.cfg"

field s;
schemesField s;
@@ -1,3 +1,4 @@
scalarTransport/scalarTransport.C
phaseScalarTransport/phaseScalarTransport.C

LIB = $(FOAM_LIBBIN)/libsolverFunctionObjects

0 comments on commit 7b1840c

Please sign in to comment.
You can’t perform that action at this time.