functionObjects::specieFlux: New functions to calculate specie fluxes
These functions calculate the specie-flux and write it as a
surfaceScalarField called 'specie<Type>Flux(<specieName>)'. There are
three such functions; specieAdvectiveFlux and specieDiffusiveFlux return
the advective and diffusive parts of the flux, respectively, and
specieFlux returns the total combined flux.
Example of function object specification:
specieFlux
{
type specieFlux; // specieAdvectiveFlux, specieDiffusiveFlux
libs ("libfieldFunctionObjects.so");
field NH3;
}
Or, using the standard configuration:
#includeFunc specieFlux(NH3)
This commit is contained in:
9
tutorials/multicomponentFluid/membrane/Allclean
Executable file
9
tutorials/multicomponentFluid/membrane/Allclean
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase && rm -rf 0/specieFlux* 0/uniform
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
41
tutorials/multicomponentFluid/membrane/system/functions
Normal file
41
tutorials/multicomponentFluid/membrane/system/functions
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Version: dev
|
||||
\\/ M anipulation |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object functions;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#includeFunc specieFlux(O2, schemesField=Yi_h, executeControl=timeStep)
|
||||
|
||||
#includeFunc specieFlux(CH4, schemesField=Yi_h, executeControl=timeStep)
|
||||
|
||||
#includeFunc specieFlux(N2, schemesField=Yi_h, executeControl=timeStep)
|
||||
|
||||
#includeFunc patchIntegrate
|
||||
(
|
||||
name=membraneSleeveSpecieFluxes,
|
||||
patch=membraneSleeve,
|
||||
specieFlux(O2),
|
||||
specieFlux(CH4),
|
||||
specieFlux(N2)
|
||||
)
|
||||
|
||||
#includeFunc patchIntegrate
|
||||
(
|
||||
name=membranePipeSpecieFluxes,
|
||||
patch=membranePipe,
|
||||
specieFlux(O2),
|
||||
specieFlux(CH4),
|
||||
specieFlux(N2)
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user