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_);
80 directionMixedFvPatchVectorField(
p, iF),
81 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi"))
86 if (
dict.found(
"tangentialVelocity"))
99 valueFraction() =
Zero;
106 const pressureInletOutletVelocityFvPatchVectorField& pivpvf
109 directionMixedFvPatchVectorField(pivpvf),
110 phiName_(pivpvf.phiName_),
111 tangentialVelocity_(pivpvf.tangentialVelocity_)
122 directionMixedFvPatchVectorField(pivpvf, iF),
123 phiName_(pivpvf.phiName_),
124 tangentialVelocity_(pivpvf.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 =
165 tangentialVelocity_.rmap(tiptf.tangentialVelocity_, addr);
180 valueFraction() =
neg(phip)*(
I -
sqr(patch().nf()));
182 directionMixedFvPatchVectorField::updateCoeffs();
183 directionMixedFvPatchVectorField::evaluate();
194 os.writeEntryIfDifferent<
word>(
"phi",
"phi", phiName_);
195 if (tangentialVelocity_.size())
197 tangentialVelocity_.writeEntry(
"tangentialVelocity",
os);
205void Foam::pressureInletOutletVelocityFvPatchVectorField::operator=
207 const fvPatchField<vector>& pvf
210 tmp<vectorField> normalValue =
transform(valueFraction(), refValue());
211 tmp<vectorField> transformGradValue =
transform(
I - valueFraction(), pvf);
223 pressureInletOutletVelocityFvPatchVectorField
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...
@ MUST_READ
Reading required.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
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,...
virtual void readDict(const dictionary &dict)
Read dictionary entries.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void operator=(const UList< Type > &)
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...
This velocity inlet/outlet boundary condition is applied to velocity boundaries where the pressure is...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void write(Ostream &) const
Write.
void setTangentialVelocity(const vectorField &tangentialVelocity)
Reset the tangential velocity.
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.
pressureInletOutletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
const vectorField & tangentialVelocity() const
Return the tangential velocity.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
const std::string patch
OpenFOAM patch number as a std::string.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
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).
fvPatchField< vector > fvPatchVectorField