Go to the documentation of this file.
70 phiName_(ptf.phiName_),
71 rhoName_(ptf.rhoName_),
72 fieldInf_(ptf.fieldInf_),
86 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
87 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho")),
91 if (
dict.found(
"value"))
114 <<
"unphysical lInf specified (lInf < 0)" <<
nl
127 const advectiveFvPatchField& ptpsf
130 mixedFvPatchField<Type>(ptpsf),
131 phiName_(ptpsf.phiName_),
132 rhoName_(ptpsf.rhoName_),
133 fieldInf_(ptpsf.fieldInf_),
146 phiName_(ptpsf.phiName_),
147 rhoName_(ptpsf.rhoName_),
148 fieldInf_(ptpsf.fieldInf_),
160 this->db().objectRegistry::template lookupObject<surfaceScalarField>
164 this->
patch().template lookupPatchField<surfaceScalarField, scalar>
172 this->
patch().template lookupPatchField<volScalarField, scalar>
177 return phip/(rhop*this->
patch().magSf());
181 return phip/this->
patch().magSf();
194 const fvMesh&
mesh = this->internalField().mesh();
200 scalar deltaT = this->db().time().deltaTValue();
202 const GeometricField<Type, fvPatchField, volMesh>&
field =
203 this->db().objectRegistry::template
204 lookupObject<GeometricField<Type, fvPatchField, volMesh>>
206 this->internalField().name()
216 label patchi = this->
patch().index();
227 ddtScheme == fv::EulerDdtScheme<scalar>::typeName
228 || ddtScheme == fv::CrankNicolsonDdtScheme<scalar>::typeName
233 field.oldTime().boundaryField()[patchi] +
k*fieldInf_
236 this->valueFraction() = (1.0 +
k)/(1.0 +
alpha +
k);
238 else if (ddtScheme == fv::backwardDdtScheme<scalar>::typeName)
242 2.0*
field.oldTime().boundaryField()[patchi]
243 - 0.5*
field.oldTime().oldTime().boundaryField()[patchi]
247 this->valueFraction() = (1.5 +
k)/(1.5 +
alpha +
k);
251 ddtScheme == fv::localEulerDdtScheme<scalar>::typeName
260 w*this->
patch().deltaCoeffs()/rDeltaT.boundaryField()[patchi]
264 const scalarField k(w/(rDeltaT.boundaryField()[patchi]*lInf_));
268 field.oldTime().boundaryField()[patchi] +
k*fieldInf_
271 this->valueFraction() = (1.0 +
k)/(1.0 +
alpha +
k);
277 <<
" on patch " << this->
patch().name()
278 <<
" of field " << this->internalField().name()
279 <<
" in file " << this->internalField().objectPath()
287 ddtScheme == fv::EulerDdtScheme<scalar>::typeName
288 || ddtScheme == fv::CrankNicolsonDdtScheme<scalar>::typeName
291 this->refValue() =
field.oldTime().boundaryField()[patchi];
293 this->valueFraction() = 1.0/(1.0 +
alpha);
295 else if (ddtScheme == fv::backwardDdtScheme<scalar>::typeName)
299 2.0*
field.oldTime().boundaryField()[patchi]
300 - 0.5*
field.oldTime().oldTime().boundaryField()[patchi]
303 this->valueFraction() = 1.5/(1.5 +
alpha);
307 ddtScheme == fv::localEulerDdtScheme<scalar>::typeName
316 w*this->
patch().deltaCoeffs()/rDeltaT.boundaryField()[patchi]
319 this->refValue() =
field.oldTime().boundaryField()[patchi];
321 this->valueFraction() = 1.0/(1.0 +
alpha);
327 <<
"\n on patch " << this->
patch().name()
328 <<
" of field " << this->internalField().name()
329 <<
" in file " << this->internalField().objectPath()
352 this->writeEntry(
"value",
os);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
virtual void operator=(const UList< Type > &)
const DimensionedField< Type, volMesh > & internalField() const
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual scalarField & valueFraction()
static const volScalarField & localRDeltaT(const fvMesh &mesh)
A class for handling words, derived from Foam::string.
virtual Field< Type > & refValue()
A class for managing temporary objects.
static constexpr const zero Zero
const dimensionSet dimVelocity
const dimensionSet dimDensity
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const dimensionedScalar alpha
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual Field< Type > & refGrad()
Local time-step first-order Euler implicit/explicit ddt.
virtual const word & name() const
const dimensionSet dimArea(sqr(dimLength))
Second-oder Crank-Nicolson implicit ddt using the current and previous time-step fields as well as th...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual tmp< Field< Type > > patchInternalField() const
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
virtual void write(Ostream &) const
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
virtual void updateCoeffs()
This boundary condition provides a base class for 'mixed' type boundary conditions,...
virtual void updateCoeffs()
advectiveFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
ITstream & ddtScheme(const word &name) const
Second-order backward-differencing ddt using the current and two previous time-step values.
Ostream & writeEntry(const keyType &key, const T &value)
#define FatalIOErrorInFunction(ios)
Foam::fvPatchFieldMapper.
const fvPatch & patch() const
virtual tmp< scalarField > advectionSpeed() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Generic GeometricField class.
Basic first-order Euler implicit/explicit ddt using only the current and previous time-step values.
This boundary condition provides an advective outflow condition, based on solving DDt(W,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
const Boundary & boundaryField() const
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...