44 directionMixedFvPatchVectorField(
p, iF),
46 fixTangentialInflow_(true),
54 valueFraction() =
Zero;
66 directionMixedFvPatchVectorField(
p, iF),
67 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
68 fixTangentialInflow_(
dict.
lookup(
"fixTangentialInflow")),
78 valueFraction() =
Zero;
91 directionMixedFvPatchVectorField(ptf,
p, iF, mapper),
92 phiName_(ptf.phiName_),
93 fixTangentialInflow_(ptf.fixTangentialInflow_),
107 directionMixedFvPatchVectorField(pivpvf),
108 phiName_(pivpvf.phiName_),
109 fixTangentialInflow_(pivpvf.fixTangentialInflow_),
110 normalVelocity_(pivpvf.normalVelocity().clone())
121 directionMixedFvPatchVectorField(pivpvf, iF),
122 phiName_(pivpvf.phiName_),
123 fixTangentialInflow_(pivpvf.fixTangentialInflow_),
124 normalVelocity_(pivpvf.normalVelocity().clone())
135 directionMixedFvPatchVectorField::autoMap(m);
136 normalVelocity_->autoMap(m);
146 directionMixedFvPatchVectorField::rmap(ptf, addr);
149 refCast<const fixedNormalInletOutletVelocityFvPatchVectorField>(ptf);
162 normalVelocity_->evaluate();
163 refValue() = normalVelocity();
165 valueFraction() =
sqr(
patch().nf());
167 if (fixTangentialInflow_)
172 valueFraction() +=
neg(phip)*(
I - valueFraction());
175 directionMixedFvPatchVectorField::updateCoeffs();
188 os.
writeEntry(
"fixTangentialInflow", fixTangentialInflow_);
200 void Foam::fixedNormalInletOutletVelocityFvPatchVectorField::operator=
218 fixedNormalInletOutletVelocityFvPatchVectorField
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
const fvPatchVectorField & normalVelocity() const
Return the BC which provides the normal component of velocity.
fvPatchField< vector > fvPatchVectorField
This velocity inlet/outlet boundary condition combines a fixed normal component obtained from the "no...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
Lookup type of boundary radiation properties.
dimensionedScalar neg(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
static const Identity< scalar > I
A class for handling words, derived from Foam::string.
fixedNormalInletOutletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
A FieldMapper for finite-volume patch fields.
virtual Ostream & endBlock()
Write end block group.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
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.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
virtual void write(Ostream &) const
Write.
static constexpr const zero Zero
Global zero (0)