Loading...
Searching...
No Matches
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...

#include <timeVaryingMassSorptionFvPatchScalarField.H>

Inheritance diagram for timeVaryingMassSorptionFvPatchScalarField:
Collaboration diagram for timeVaryingMassSorptionFvPatchScalarField:

Public Types

enum  ddtSchemeType { tsEuler , tsCrankNicolson , tsBackward }
 Enumeration defining the available ddt schemes. More...

Public Member Functions

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

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

Enumeration defining the available ddt schemes.

Enumerator
tsEuler 
tsCrankNicolson 
tsBackward 

Definition at line 165 of file timeVaryingMassSorptionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ timeVaryingMassSorptionFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 54 of file timeVaryingMassSorptionFvPatchScalarField.C.

References p.

Referenced by timeVaryingMassSorptionFvPatchScalarField(), timeVaryingMassSorptionFvPatchScalarField(), timeVaryingMassSorptionFvPatchScalarField(), and TypeName().

Here is the caller graph for this function:

◆ timeVaryingMassSorptionFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 68 of file timeVaryingMassSorptionFvPatchScalarField.C.

References dict, fvPatchField< Type >::operator=(), p, and Foam::Zero.

Here is the call graph for this function:

◆ timeVaryingMassSorptionFvPatchScalarField() [3/5]

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

Construct by mapping given timeVaryingMassSorptionFvPatchScalarField onto a new patch.

Definition at line 88 of file timeVaryingMassSorptionFvPatchScalarField.C.

References p, and timeVaryingMassSorptionFvPatchScalarField().

Here is the call graph for this function:

◆ timeVaryingMassSorptionFvPatchScalarField() [4/5]

timeVaryingMassSorptionFvPatchScalarField ( const timeVaryingMassSorptionFvPatchScalarField & ptf)

Construct as copy.

Definition at line 104 of file timeVaryingMassSorptionFvPatchScalarField.C.

References timeVaryingMassSorptionFvPatchScalarField().

Here is the call graph for this function:

◆ timeVaryingMassSorptionFvPatchScalarField() [5/5]

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

Construct as copy setting internal field reference.

Definition at line 117 of file timeVaryingMassSorptionFvPatchScalarField.C.

References timeVaryingMassSorptionFvPatchScalarField().

Here is the call graph for this function:

Member Function Documentation

◆ TypeName()

TypeName ( "timeVaryingMassSorption" )

Runtime type information.

References timeVaryingMassSorptionFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [1/2]

virtual tmp< fvPatchField< scalar > > clone ( ) const
inlinevirtual

Return a clone.

Definition at line 259 of file timeVaryingMassSorptionFvPatchScalarField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ clone() [2/2]

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

Clone with an internal field reference.

Definition at line 267 of file timeVaryingMassSorptionFvPatchScalarField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ autoMap()

void autoMap ( const fvPatchFieldMapper & m)
virtual

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

Definition at line 133 of file timeVaryingMassSorptionFvPatchScalarField.C.

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 142 of file timeVaryingMassSorptionFvPatchScalarField.C.

◆ source()

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

Return source rate.

Definition at line 153 of file timeVaryingMassSorptionFvPatchScalarField.C.

References cp, Foam::cp(), Foam::max(), tmp< T >::New(), source(), and Foam::Zero.

Referenced by source().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

Update the coefficients associated with the patch field.

Definition at line 169 of file timeVaryingMassSorptionFvPatchScalarField.C.

References cp, Foam::cp(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld(), Foam::max(), Foam::nl, Foam::operator==(), tmp< T >::ref(), tsBackward, tsCrankNicolson, and tsEuler.

Here is the call graph for this function:

◆ write()

void write ( Ostream & os) const
virtual

Write.

Definition at line 245 of file timeVaryingMassSorptionFvPatchScalarField.C.

References os(), fvPatchField< 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: