44 directionMixedFvPatchVectorField(
p, iF),
49 valueFraction() =
Zero;
62 directionMixedFvPatchVectorField(ptf,
p, iF, mapper),
63 phiName_(ptf.phiName_)
65 if (ptf.tangentialVelocity_.
size())
67 tangentialVelocity_ = mapper(ptf.tangentialVelocity_);
76 const DimensionedField<vector, volMesh>& iF,
77 const dictionary&
dict 80 directionMixedFvPatchVectorField(
p, iF),
81 phiName_(
dict.getOrDefault<word>(
"phi",
"phi"))
86 if (
dict.found(
"tangentialVelocity"))
99 valueFraction() =
Zero;
109 directionMixedFvPatchVectorField(pivpvf),
110 phiName_(pivpvf.phiName_),
111 tangentialVelocity_(pivpvf.tangentialVelocity_)
122 directionMixedFvPatchVectorField(pivpvf, iF),
123 phiName_(pivpvf.phiName_),
124 tangentialVelocity_(pivpvf.tangentialVelocity_)
133 tangentialVelocity_ = tangentialVelocity;
135 refValue() = tangentialVelocity_ -
n*(
n & tangentialVelocity_);
144 directionMixedFvPatchVectorField::autoMap(m);
145 if (tangentialVelocity_.size())
147 tangentialVelocity_.autoMap(m);
158 directionMixedFvPatchVectorField::rmap(ptf, addr);
160 if (tangentialVelocity_.size())
162 const pressureInletOutletVelocityFvPatchVectorField& tiptf =
163 refCast<const pressureInletOutletVelocityFvPatchVectorField>(ptf);
165 tangentialVelocity_.rmap(tiptf.tangentialVelocity_, addr);
177 const fvsPatchField<scalar>& phip =
182 directionMixedFvPatchVectorField::updateCoeffs();
195 if (tangentialVelocity_.size())
197 tangentialVelocity_.writeEntry(
"tangentialVelocity",
os);
205 void Foam::pressureInletOutletVelocityFvPatchVectorField::operator=
223 pressureInletOutletVelocityFvPatchVectorField
void size(const label n)
Older name for setAddressableSize.
fvPatchField< vector > fvPatchVectorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
virtual void write(Ostream &) const
Write.
dimensionedScalar neg(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
pressureInletOutletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
static const Identity< scalar > I
This velocity inlet/outlet boundary condition is applied to velocity boundaries where the pressure is...
A class for handling words, derived from Foam::string.
A FieldMapper for finite-volume patch fields.
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 void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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 autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
void setTangentialVelocity(const vectorField &tangentialVelocity)
Reset the tangential velocity.
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.
Field< vector > vectorField
Specialisation of Field<T> for vector.
List< label > labelList
A List of labels.
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)
static constexpr const zero Zero
Global zero (0)