46 inletOutletFvPatchVectorField(
p, iF),
61 inletOutletFvPatchVectorField(ptf,
p, iF, mapper),
62 relative_(ptf.relative_),
75 inletOutletFvPatchVectorField(
p, iF),
76 relative_(
dict.getOrDefault(
"relative", false)),
79 this->phiName_ =
dict.getOrDefault<
word>(
"phi",
"phi");
90 inletOutletFvPatchVectorField(srfvpvf),
91 relative_(srfvpvf.relative_),
103 inletOutletFvPatchVectorField(srfvpvf, iF),
104 relative_(srfvpvf.relative_),
119 const SRF::SRFModel& srf =
120 db().lookupObject<SRF::SRFModel>(
"SRFProperties");
125 this->internalField().
mesh()
126 .ddtScheme(this->internalField().
name())
129 if (ddtScheme == fv::steadyStateDdtScheme<scalar>::typeName)
134 refValue() = UInf_ - srf.velocity(patch().Cf());
145 scalar time = this->db().time().value();
146 scalar theta = time*
mag(srf.omega().value());
149 cos(theta)*UInf_ +
sin(theta)*(srf.axis() ^ UInf_)
150 - srf.velocity(
patch().Cf());
154 valueFraction() =
neg(refValue() & patch().Sf());
163 os.writeEntry(
"relative", relative_);
164 os.writeEntry(
"UInf", UInf_);
165 os.writeEntry(
"phi", this->phiName_);
177 SRFFreestreamVelocityFvPatchVectorField
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,...
Freestream velocity condition to be used in conjunction with the single rotating frame (SRF) model (s...
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
SRFFreestreamVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Top level model for single rotating frame.
vectorField velocity(const vectorField &positions) const
Return velocity vector from positions.
const vector & axis() const
Return the axis of rotation.
const dimensionedVector & omega() const
Return the angular velocity field [rad/s].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const Type & value() const noexcept
Return const reference to value.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
SteadyState implicit/explicit ddt which returns 0.
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.
dimensionedScalar sin(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar neg(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0).
fvPatchField< vector > fvPatchVectorField
dimensionedScalar cos(const dimensionedScalar &ds)