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_),
113 phiName_(tppsf.phiName_),
114 rhoName_(tppsf.rhoName_),
115 UName_(tppsf.UName_),
116 alphaName_(tppsf.alphaName_),
117 alphaMin_(tppsf.alphaMin_),
131 phiName_(tppsf.phiName_),
132 rhoName_(tppsf.rhoName_),
133 UName_(tppsf.UName_),
134 alphaName_(tppsf.alphaName_),
135 alphaMin_(tppsf.alphaMin_),
165 refCast<const prghPermeableAlphaTotalPressureFvPatchScalarField>(ptf);
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")
224 tmp<scalarField> alphaCut(
pos(alphap - alphaMin_));
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." 288 prghPermeableAlphaTotalPressureFvPatchScalarField
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
const Type & value() const noexcept
Return const reference to value.
virtual void write(Ostream &) const
Write.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
UniformDimensionedField< vector > uniformDimensionedVectorField
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a base class for 'mixed' type boundary conditions, i.e. conditions that mix fixed value and patch-normal gradient conditions.
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.
prghPermeableAlphaTotalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
GeometricField< vector, fvPatchField, volMesh > volVectorField
UniformDimensionedField< scalar > uniformDimensionedScalarField
dimensionedScalar neg(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
virtual Field< scalar > & refValue()
The prghPermeableAlphaTotalPressure is a mixed boundary condition for the p_rgh variable in multiphas...
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pos(const dimensionedScalar &ds)
Type gSum(const FieldField< Field, Type > &f)
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual scalarField & valueFraction()
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A FieldMapper for finite-volume patch fields.
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
const uniformDimensionedVectorField & g
int debug
Static debugging option.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
OBJstream os(runTime.globalPath()/outputName)
static const gravity & New(const word &name, const Time &runTime)
Return named gravity field cached or construct on Time.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void operator=(const UList< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Field< vector > vectorField
Specialisation of Field<T> for vector.
virtual void write(Ostream &) const
Write.
virtual void updateSnGrad(const scalarField &snGradp)
Update the patch pressure gradient field from the given snGradp.
List< label > labelList
A List of labels.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
virtual Field< scalar > & refGrad()
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.