Public Types | Public Member Functions | List of all members
timeVaryingMassSorptionFvPatchScalarField Class Reference

This boundary condition provides a first order fixed-value condition for a given scalar field to model time-dependent adsorption-desoprtion processes to be used with the interfaceOxideRate mass model. More...

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

Public Types

enum  ddtSchemeType { tsEuler, tsCrankNicolson, tsBackward }
 

Public Member Functions

 TypeName ("timeVaryingMassSorption")
 
 timeVaryingMassSorptionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 
 timeVaryingMassSorptionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 
 timeVaryingMassSorptionFvPatchScalarField (const timeVaryingMassSorptionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 timeVaryingMassSorptionFvPatchScalarField (const timeVaryingMassSorptionFvPatchScalarField &)
 
virtual tmp< fvPatchScalarFieldclone () const
 
 timeVaryingMassSorptionFvPatchScalarField (const timeVaryingMassSorptionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 
virtual void autoMap (const fvPatchFieldMapper &)
 
virtual void rmap (const fvPatchScalarField &, const labelList &)
 
tmp< scalarFieldsource () const
 
virtual void updateCoeffs ()
 
virtual void write (Ostream &) const
 

Detailed Description

This boundary condition provides a first order fixed-value condition for a given scalar field to model time-dependent adsorption-desoprtion processes to be used with the interfaceOxideRate mass model.

\[ \frac{d c}{d t} = k_{abs} w (c_{int} - c_{p_{w}}) + k_{des} (c_{p_{w}} - c_{int}) \]

\[ w = \max(1 - c_{p_{w}}/max, 0) \]

where

$ c_{int} $ = Concentration at cell
$ c_{p_{w}} $ = Concentration at wall
$ k_{abs} $ = Adsorption rate constant [1/s]
$ k_{des} $ = Desorption rate constant [1/s]
$ w $ = Weight function
$ max $ = Max concentration at wall
Usage
Example of the boundary condition specification:
<patchName>
{
    // Mandatory entries
    type        timeVaryingMassSorption;
    kbas        <scalar>;
    max         <scalar>;

    // Optional entries
    kdes        <scalar>;

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: timeVaryingAdsorption word yes -
kbas Adsorption rate constant scalar yes -
max Maximum concentation at wall scalar yes -
kdes Desorption rate constant scalar no 0

The inherited entries are elaborated in:

Source files

Definition at line 154 of file timeVaryingMassSorptionFvPatchScalarField.H.

Member Enumeration Documentation

◆ ddtSchemeType

Enumerator
tsEuler 
tsCrankNicolson 
tsBackward 

Definition at line 163 of file timeVaryingMassSorptionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ timeVaryingMassSorptionFvPatchScalarField() [1/5]

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

Definition at line 56 of file timeVaryingMassSorptionFvPatchScalarField.C.

Referenced by timeVaryingMassSorptionFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ timeVaryingMassSorptionFvPatchScalarField() [2/5]

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

Definition at line 70 of file timeVaryingMassSorptionFvPatchScalarField.C.

References dict, p, and Foam::Zero.

◆ timeVaryingMassSorptionFvPatchScalarField() [3/5]

Definition at line 97 of file timeVaryingMassSorptionFvPatchScalarField.C.

◆ timeVaryingMassSorptionFvPatchScalarField() [4/5]

Definition at line 113 of file timeVaryingMassSorptionFvPatchScalarField.C.

◆ timeVaryingMassSorptionFvPatchScalarField() [5/5]

Definition at line 126 of file timeVaryingMassSorptionFvPatchScalarField.C.

Member Function Documentation

◆ TypeName()

TypeName ( "timeVaryingMassSorption"  )

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

◆ clone() [2/2]

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

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

Definition at line 141 of file timeVaryingMassSorptionFvPatchScalarField.C.

◆ rmap()

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

Definition at line 150 of file timeVaryingMassSorptionFvPatchScalarField.C.

◆ source()

Foam::tmp< Foam::scalarField > source ( ) const

Definition at line 160 of file timeVaryingMassSorptionFvPatchScalarField.C.

References Foam::cp(), Foam::max(), tmp::New(), Foam::foamVersion::patch, and Foam::Zero.

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ write()

void write ( Ostream os) const
virtual

Definition at line 252 of file timeVaryingMassSorptionFvPatchScalarField.C.

References os(), fvPatchField::write(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().

Here is the call graph for this function:

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