37Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
38fixedNormalInletOutletVelocityFvPatchVectorField
44 directionMixedFvPatchVectorField(
p, iF),
46 fixTangentialInflow_(true),
54 valueFraction() =
Zero;
58Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
59fixedNormalInletOutletVelocityFvPatchVectorField
66 directionMixedFvPatchVectorField(
p, iF),
67 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
68 fixTangentialInflow_(
dict.
lookup(
"fixTangentialInflow")),
78 valueFraction() =
Zero;
82Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
83fixedNormalInletOutletVelocityFvPatchVectorField
91 directionMixedFvPatchVectorField(ptf,
p, iF, mapper),
92 phiName_(ptf.phiName_),
93 fixTangentialInflow_(ptf.fixTangentialInflow_),
101Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
102fixedNormalInletOutletVelocityFvPatchVectorField
107 directionMixedFvPatchVectorField(pivpvf),
108 phiName_(pivpvf.phiName_),
109 fixTangentialInflow_(pivpvf.fixTangentialInflow_),
110 normalVelocity_(pivpvf.normalVelocity().clone())
114Foam::fixedNormalInletOutletVelocityFvPatchVectorField::
115fixedNormalInletOutletVelocityFvPatchVectorField
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();
176 directionMixedFvPatchVectorField::evaluate();
188 os.
writeEntry(
"fixTangentialInflow", fixTangentialInflow_);
194 writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
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,...
virtual Ostream & endBlock()
Write end block group.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
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,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
This velocity inlet/outlet boundary condition combines a fixed normal component obtained from the "no...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const fvPatchVectorField & normalVelocity() const
Return the BC which provides the normal component of velocity.
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual void operator=(const UList< vector > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Lookup type of boundary radiation properties.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
static const Identity< scalar > I
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensionedScalar neg(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.