67 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
68 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho")),
69 UName_(
dict.getOrDefault<
word>(
"U",
"U")),
70 alphaName_(
dict.getOrDefault<
word>(
"alpha",
"none")),
71 alphaMin_(
dict.getOrDefault<scalar>(
"alphaMin", 1)),
88 const prghPermeableAlphaTotalPressureFvPatchScalarField& ptf,
90 const DimensionedField<scalar, volMesh>& iF,
91 const fvPatchFieldMapper& mapper
94 mixedFvPatchField<scalar>(ptf,
p, iF, mapper),
95 p0_(ptf.p0_.clone(
p.patch())),
96 phiName_(ptf.phiName_),
97 rhoName_(ptf.rhoName_),
99 alphaName_(ptf.alphaName_),
100 alphaMin_(ptf.alphaMin_),
112 p0_(tppsf.p0_.clone(this->patch().patch())),
113 phiName_(tppsf.phiName_),
114 rhoName_(tppsf.rhoName_),
115 UName_(tppsf.UName_),
116 alphaName_(tppsf.alphaName_),
117 alphaMin_(tppsf.alphaMin_),
130 p0_(tppsf.p0_.clone(this->patch().patch())),
131 phiName_(tppsf.phiName_),
132 rhoName_(tppsf.rhoName_),
133 UName_(tppsf.UName_),
134 alphaName_(tppsf.alphaName_),
135 alphaMin_(tppsf.alphaMin_),
169 p0_->rmap(tptf.p0_(), addr);
206 const scalar t = db().time().timeOutputValue();
212 - rhop*((
g.
value() &
patch().Cf()) - ghRef.value())
219 if (alphaName_ !=
"none")
225 valueFraction() = 1 - alphaCut;
230 const scalar
phi =
gSum(-phip);
232 Info<<
patch().boundaryMesh().mesh().name() <<
':'
233 <<
patch().name() <<
':'
234 << this->internalField().name() <<
" :"
235 <<
" mass flux[Kg/s]:" <<
phi
239 curTimeIndex_ = this->
db().time().timeIndex();
252 if (curTimeIndex_ != this->db().time().
timeIndex())
255 <<
"updateCoeffs(const scalarField& snGradp) MUST be called before"
256 " updateCoeffs() or evaluate() to set the boundary gradient."
268 os.writeEntryIfDifferent<word>(
"phi",
"phi", phiName_);
269 os.writeEntryIfDifferent<word>(
"rho",
"rho", rhoName_);
270 os.writeEntryIfDifferent<word>(
"U",
"U", UName_);
271 os.writeEntryIfDifferent<word>(
"alpha",
"none", alphaName_);
272 os.writeEntryIfDifferent<scalar>(
"alphaMin", 1, alphaMin_);
288 prghPermeableAlphaTotalPressureFvPatchScalarField
Macros for easy insertion into run-time selection tables.
const uniformDimensionedVectorField & g
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
const Type & value() const noexcept
Return const reference to value.
const objectRegistry & db() const
The associated objectRegistry.
const fvPatch & patch() const noexcept
Return the patch.
bool updated() const noexcept
True if the boundary condition has already been updated.
A FieldMapper for finite-volume patch fields.
static tmp< fvPatchField< scalar > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< scalar, volMesh > &)
const DimensionedField< scalar, volMesh > & internalField() const noexcept
virtual void operator=(const UList< Type > &)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
This boundary condition provides a base class for 'mixed' type boundary conditions,...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
mixedFvPatchField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
virtual void write(Ostream &) const
Write.
virtual Field< scalar > & refGrad()
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual Field< scalar > & refValue()
virtual scalarField & valueFraction()
The prghPermeableAlphaTotalPressure is a mixed boundary condition for the p_rgh variable in multiphas...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void write(Ostream &) const
Write.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
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.
prghPermeableAlphaTotalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void updateSnGrad(const scalarField &snGradp)
Update the patch pressure gradient field from the given snGradp.
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)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
Namespace for handling debugging switches.
const std::string patch
OpenFOAM patch number as a std::string.
dimensionedScalar pos(const dimensionedScalar &ds)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Type gSum(const FieldField< Field, Type > &f)
GeometricField< vector, fvPatchField, volMesh > volVectorField
List< label > labelList
A List of labels.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
UniformDimensionedField< scalar > uniformDimensionedScalarField
messageStream Info
Information stream (stdout output on master, null elsewhere).
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
UniformDimensionedField< vector > uniformDimensionedVectorField
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensionedScalar neg(const dimensionedScalar &ds)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
fvPatchField< scalar > fvPatchScalarField