Public Member Functions | List of all members
sorptionWallFunctionFvPatchScalarField Class Reference

The sorptionWallFunction is a wall boundary condition to specify scalar/concentration gradient for turbulent and laminar flows. More...

Inheritance diagram for sorptionWallFunctionFvPatchScalarField:
Inheritance graph
[legend]
Collaboration diagram for sorptionWallFunctionFvPatchScalarField:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("sorptionWallFunction")
 Runtime type information. More...
 
 sorptionWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 sorptionWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 sorptionWallFunctionFvPatchScalarField (const sorptionWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given sorptionWallFunctionFvPatchScalarField onto a new patch. More...
 
 sorptionWallFunctionFvPatchScalarField (const sorptionWallFunctionFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 sorptionWallFunctionFvPatchScalarField (const sorptionWallFunctionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchScalarField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Detailed Description

The sorptionWallFunction is a wall boundary condition to specify scalar/concentration gradient for turbulent and laminar flows.

The governing equation of the boundary condition is:

\[ \nabla C = \frac{C^* - C_p}{\Delta_y} = \frac{F}{a \Delta_y} \]

with

\[ C^* = \frac{C_{surf}}{K} \]

and with the mass-transfer coefficient is calculated for turbulent flows

\[ a = \frac{C_\mu^{0.25} k_p^{0.5}}{y^+_{blended}} \]

or for laminar-flow and molecular-diffusion-only states

\[ a = \frac{D_m}{y_1} \]

where

$ \nabla C $ = Gradient of concentration
$ C^* $ = Wall-adjacent concentration
$ C_p $ = Near-wall cell concentration
$ \Delta_y $ = First-cell centre wall distance
$ F $ = Flux of concentration
$ a $ = Mass-transfer coefficient
$ C_{surf} $ = Wall-surface concentration
$ K $ = Adsorption or absorption/permeation coefficient
$ C_\mu $ = Empirical model coefficient
$ k_p $ = Turbulent kinetic energy in near-wall cell
$ y^+_{blended} $ = Non-dimensional blended near-wall cell height
$ D_m $ = Molecular-diffusion coefficient
$ y_1 $ = First-cell centre wall distance

Required fields:

      x    | Arbitrary scalar field, e.g. species, passive scalars etc.

Reference:

        Standard model for exponential blending (tag:FDC):
            Foat, T., Drodge, J., Charleson, A., Whatmore, B.,
            Pownall, S., Glover, P., ... & Marr, A. (2022).
            Predicting vapour transport from semi-volatile organic
            compounds concealed within permeable packaging.
            International Journal of Heat and Mass Transfer, 183, 122012.
            DOI:10.1016/j.ijheatmasstransfer.2021.122012

        Standard model for stepwise blending (tag:F):
            Foat, T. (2021).
            Modelling vapour transport in indoor environments for
            improved detection of explosives using dogs.
            Doctoral dissertation. University of Southampton.
            URI:http://eprints.soton.ac.uk/id/eprint/456709
Usage
Example of the boundary condition specification:
<patchName>
{
    // Mandatory entries
    type            sorptionWallFunction;
    Sc              <scalar>;
    Sct             <scalar>;
    kAbs            <PatchFunction1<scalar>>;

    // Optional entries
    laminar         <bool>;
    D               <scalar>;
    kName           <word>;
    nuName          <word>;

    // Inherited entries
    Cmu             <scalar>;
    kappa           <scalar>;
    E               <scalar>;
    blending        <word>;
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: sorptionWallFunction word yes -
Sc Schmidt number scalar yes -
Sct Turbulent Schmidt number scalar yes -
kAbs Adsorption or absorption/permeation coefficient PatchFunction1<scalar> yes -
laminar Flag to calculate mass-transfer coefficient under the laminar-flow or molecular-diffusion-only states bool no false
kName Name of operand turbulent kinetic energy field word no k
nuName Name of operand kinematic viscosity field word no nu

The inherited entries are elaborated in:

Source files

Definition at line 271 of file sorptionWallFunctionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ sorptionWallFunctionFvPatchScalarField() [1/5]

sorptionWallFunctionFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 226 of file sorptionWallFunctionFvPatchScalarField.C.

Referenced by sorptionWallFunctionFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ sorptionWallFunctionFvPatchScalarField() [2/5]

sorptionWallFunctionFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 266 of file sorptionWallFunctionFvPatchScalarField.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ sorptionWallFunctionFvPatchScalarField() [3/5]

sorptionWallFunctionFvPatchScalarField ( const sorptionWallFunctionFvPatchScalarField ptf,
const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const fvPatchFieldMapper mapper 
)

Construct by mapping given sorptionWallFunctionFvPatchScalarField onto a new patch.

Definition at line 245 of file sorptionWallFunctionFvPatchScalarField.C.

◆ sorptionWallFunctionFvPatchScalarField() [4/5]

Construct as copy.

Definition at line 310 of file sorptionWallFunctionFvPatchScalarField.C.

◆ sorptionWallFunctionFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 328 of file sorptionWallFunctionFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "sorptionWallFunction"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 390 of file sorptionWallFunctionFvPatchScalarField.H.

References sorptionWallFunctionFvPatchScalarField::sorptionWallFunctionFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [2/2]

virtual tmp<fvPatchScalarField> clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Definition at line 411 of file sorptionWallFunctionFvPatchScalarField.H.

References sorptionWallFunctionFvPatchScalarField::sorptionWallFunctionFvPatchScalarField().

Here is the call graph for this function:

◆ autoMap()

void autoMap ( const fvPatchFieldMapper mapper)
virtual

Map (and resize as needed) from self given a mapping object.

Definition at line 349 of file sorptionWallFunctionFvPatchScalarField.C.

◆ rmap()

void rmap ( const fvPatchScalarField ptf,
const labelList addr 
)
virtual

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 363 of file sorptionWallFunctionFvPatchScalarField.C.

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 380 of file sorptionWallFunctionFvPatchScalarField.C.

References Foam::foamVersion::patch.

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 393 of file sorptionWallFunctionFvPatchScalarField.C.

References os(), fixedGradientFvPatchField< Type >::write(), and fvPatchField< Type >::writeValueEntry().

Here is the call graph for this function:

The documentation for this class was generated from the following files: