42Foam::timeVaryingMassSorptionFvPatchScalarField::ddtSchemeTypeNames_
45 ddtSchemeType::tsEuler,
46 fv::EulerDdtScheme<scalar>::typeName_()
49 ddtSchemeType::tsCrankNicolson,
50 fv::CrankNicolsonDdtScheme<scalar>::typeName_()
53 ddtSchemeType::tsBackward,
54 fv::backwardDdtScheme<scalar>::typeName_()
61Foam::timeVaryingMassSorptionFvPatchScalarField::
62timeVaryingMassSorptionFvPatchScalarField
68 fixedValueFvPatchScalarField(
p, iF),
75Foam::timeVaryingMassSorptionFvPatchScalarField::
76timeVaryingMassSorptionFvPatchScalarField
83 fixedValueFvPatchScalarField(
p, iF,
dict, false),
102Foam::timeVaryingMassSorptionFvPatchScalarField::
103timeVaryingMassSorptionFvPatchScalarField
111 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
118Foam::timeVaryingMassSorptionFvPatchScalarField::
119timeVaryingMassSorptionFvPatchScalarField
124 fixedValueFvPatchScalarField(ptf),
131Foam::timeVaryingMassSorptionFvPatchScalarField::
132timeVaryingMassSorptionFvPatchScalarField
138 fixedValueFvPatchScalarField(ptf, iF),
152 fixedValueFvPatchScalarField::autoMap(m);
162 fixedValueFvPatchScalarField::rmap(ptf, addr);
170 auto& source = tsource.ref();
175 source = -kabs_*w*
max(patchInternalField() -
cp, scalar(0));
177 source += kdes_*
max(
cp - patchInternalField(), scalar(0));
190 const label patchi = patch().index();
192 const scalar dt = db().time().deltaTValue();
199 const word ddtSchemeName(
fld.mesh().ddtScheme(
fld.name()));
200 const ddtSchemeType& ddtScheme = ddtSchemeTypeNames_[ddtSchemeName];
208 *
max(patchInternalField() -
cp, scalar(0))
213 *
max(
cp - patchInternalField(), scalar(0))
219 case tsCrankNicolson:
221 operator==(fld0.boundaryField()[patchi] + dfldp);
227 const scalar dt0 = db().time().deltaT0Value();
229 const scalar c = scalar(1) + dt/(dt + dt0);
230 const scalar c00 = dt*dt/(dt0*(dt + dt0));
231 const scalar c0 = c + c00;
236 c0*fld0.boundaryField()[patchi]
237 - c00*fld0.oldTime().boundaryField()[patchi]
247 << ddtSchemeName <<
nl
248 <<
" on patch " << this->patch().name()
249 <<
" of field " << this->internalField().name()
250 <<
" in file " << this->internalField().objectPath()
255 fixedValueFvPatchScalarField::updateCoeffs();
267 writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual void operator=(const UList< Type > &)
friend Ostream & operator(Ostream &, const fvPatchField< scalar > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a first order fixed-value condition for a given scalar field to mode...
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.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
ddtSchemeType
Enumeration defining the available ddt schemes.
tmp< scalarField > source() const
Return source rate.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
static constexpr const zero Zero
Global zero (0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
const volScalarField & cp