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...
Public Types | |
enum | ddtSchemeType { tsEuler, tsCrankNicolson, tsBackward } |
Enumeration defining the available ddt schemes. More... | |
Public Member Functions | |
TypeName ("timeVaryingMassSorption") | |
Runtime type information. More... | |
timeVaryingMassSorptionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &) | |
Construct from patch and internal field. More... | |
timeVaryingMassSorptionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &) | |
Construct from patch, internal field and dictionary. More... | |
timeVaryingMassSorptionFvPatchScalarField (const timeVaryingMassSorptionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &) | |
timeVaryingMassSorptionFvPatchScalarField (const timeVaryingMassSorptionFvPatchScalarField &) | |
Construct as copy. More... | |
virtual tmp< fvPatchScalarField > | clone () const |
Construct and return a clone. More... | |
timeVaryingMassSorptionFvPatchScalarField (const timeVaryingMassSorptionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &) | |
Construct as copy setting internal field reference. More... | |
virtual tmp< fvPatchScalarField > | clone (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... | |
tmp< scalarField > | source () const |
Return source rate. More... | |
virtual void | updateCoeffs () |
Update the coefficients associated with the patch field. More... | |
virtual void | write (Ostream &) const |
Write. More... | |
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 |
<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:
Definition at line 158 of file timeVaryingMassSorptionFvPatchScalarField.H.
enum ddtSchemeType |
Enumeration defining the available ddt schemes.
Enumerator | |
---|---|
tsEuler | |
tsCrankNicolson | |
tsBackward |
Definition at line 167 of file timeVaryingMassSorptionFvPatchScalarField.H.
timeVaryingMassSorptionFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct from patch and internal field.
Definition at line 63 of file timeVaryingMassSorptionFvPatchScalarField.C.
Referenced by timeVaryingMassSorptionFvPatchScalarField::clone().
timeVaryingMassSorptionFvPatchScalarField | ( | const fvPatch & | p, |
const DimensionedField< scalar, volMesh > & | iF, | ||
const dictionary & | dict | ||
) |
Construct from patch, internal field and dictionary.
Definition at line 77 of file timeVaryingMassSorptionFvPatchScalarField.C.
References dict, p, and Foam::Zero.
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 104 of file timeVaryingMassSorptionFvPatchScalarField.C.
Construct as copy.
Definition at line 120 of file timeVaryingMassSorptionFvPatchScalarField.C.
timeVaryingMassSorptionFvPatchScalarField | ( | const timeVaryingMassSorptionFvPatchScalarField & | ptf, |
const DimensionedField< scalar, volMesh > & | iF | ||
) |
Construct as copy setting internal field reference.
Definition at line 133 of file timeVaryingMassSorptionFvPatchScalarField.C.
TypeName | ( | "timeVaryingMassSorption" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Definition at line 232 of file timeVaryingMassSorptionFvPatchScalarField.H.
References timeVaryingMassSorptionFvPatchScalarField::timeVaryingMassSorptionFvPatchScalarField().
|
inlinevirtual |
Construct and return a clone setting internal field reference.
Definition at line 249 of file timeVaryingMassSorptionFvPatchScalarField.H.
References timeVaryingMassSorptionFvPatchScalarField::timeVaryingMassSorptionFvPatchScalarField().
|
virtual |
Map (and resize as needed) from self given a mapping object.
Definition at line 148 of file timeVaryingMassSorptionFvPatchScalarField.C.
|
virtual |
Reverse map the given fvPatchField onto this fvPatchField.
Definition at line 157 of file timeVaryingMassSorptionFvPatchScalarField.C.
Foam::tmp< Foam::scalarField > source | ( | ) | const |
Return source rate.
Definition at line 167 of file timeVaryingMassSorptionFvPatchScalarField.C.
References Foam::cp(), Foam::max(), tmp< T >::New(), Foam::foamVersion::patch, and Foam::Zero.
|
virtual |
Update the coefficients associated with the patch field.
Definition at line 183 of file timeVaryingMassSorptionFvPatchScalarField.C.
References Foam::constant::universal::c, Foam::cp(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, fld, Foam::max(), Foam::nl, Foam::operator==(), Foam::foamVersion::patch, and tmp< T >::ref().
|
virtual |
Write.
Definition at line 259 of file timeVaryingMassSorptionFvPatchScalarField.C.
References os(), fvPatchField< scalar >::write(), Ostream::writeEntry(), and Ostream::writeEntryIfDifferent().