36 Foam::MRFZoneList::MRFZoneList
58 a = a || this->operator[](i).active();
61 if (warn && this->size() && !a)
73 for (
const entry& dEntry :
dict)
84 for (
const entry& dEntry :
dict)
88 const word&
name = dEntry.keyword();
96 new MRFZone(
name, mesh_, modelDict)
108 DynamicList<word>
names;
109 for (
const auto& mrf: *
this)
111 if (mrf.name() ==
name)
120 <<
"Unable to find MRFZone " <<
name 121 <<
". Available zones are: " <<
names 131 for (
auto& mrf: *
this)
134 allOk = (allOk && ok);
142 for (
const auto& mrf: *
this)
158 for (
const auto& mrf: *
this)
160 mrf.addCoriolis(
U, ddtU);
167 for (
const auto& mrf: *
this)
169 mrf.addCoriolis(
UEqn);
180 for (
const auto& mrf: *
this)
199 auto& acceleration = tacceleration.ref();
201 for (
const auto& mrf: *
this)
203 mrf.addCoriolis(
U, acceleration);
206 return tacceleration;
231 for (
const auto& mrf : *
this)
242 for (
const auto& mrf: *
this)
251 for (
const auto& mrf: *
this)
253 mrf.makeRelative(
phi);
260 const tmp<surfaceScalarField>& tphi
265 tmp<surfaceScalarField> rphi
270 "relative(" + tphi().
name() +
')',
297 for (
const auto& mrf: *
this)
299 mrf.makeRelative(rphi.
ref());
322 for (
const auto& mrf: *
this)
324 mrf.makeRelative(rphi.
ref(), patchi);
342 for (
const auto& mrf: *
this)
344 mrf.makeRelative(
rho,
phi);
351 for (
const auto& mrf: *
this)
360 for (
const auto& mrf: *
this)
362 mrf.makeAbsolute(
phi);
369 const tmp<surfaceScalarField>& tphi
374 tmp<surfaceScalarField> rphi
379 "absolute(" + tphi().
name() +
')',
402 for (
const auto& mrf: *
this)
404 mrf.makeAbsolute(
rho,
phi);
411 for (
const auto& mrf: *
this)
413 mrf.correctBoundaryVelocity(
U);
424 FieldField<fvsPatchField, scalar>
Uf 426 relative(mesh_.Sf().boundaryField() &
U.boundaryField())
431 forAll(mesh_.boundary(), patchi)
433 if (isA<fixedValueFvsPatchScalarField>(phibf[patchi]))
435 phibf[patchi] ==
Uf[patchi];
443 if (mesh_.topoChanging())
445 for (
auto& mrf: *
this)
458 const MRFZoneList& models
461 models.writeData(
os);
void makeAbsolute(volVectorField &U) const
Make the given relative velocity absolute within the MRF region.
void update()
Update MRFZone faces if the mesh topology changes.
void reset(const dictionary &dict)
Reset the source list.
tmp< GeometricField< Type, fvPatchField, volMesh > > DDt(const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &psi)
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void addAcceleration(const volVectorField &U, volVectorField &ddtU) const
Add the frame acceleration.
patchWriters resize(patchIds.size())
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void append(const T &val)
Append an element at the end of the list.
MRF zone definition based on cell zone and parameters obtained from a control dictionary constructed ...
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
constexpr char nl
The newline '\n' character (0x0a)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
A field of fields is a PtrList of fields with reference counting.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const MRFZone & getFromName(const word &name) const
Return the MRF with a given name.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
bool active(const bool warn=false) const
Return active status.
void correctBoundaryVelocity(volVectorField &U) const
Correct the boundary velocity for the rotation of the MRF region.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void correctBoundaryFlux(const volVectorField &U, surfaceScalarField &phi) const
Correct the boundary flux for the rotation of the MRF region.
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &phi) const
Return the given relative flux absolute within the MRF region.
autoPtr< surfaceVectorField > Uf
tmp< volVectorField > DDt(const volVectorField &U) const
Return the frame acceleration.
static tmp< GeometricField< vector, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< vector >::calculatedType())
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions and patch type. [Takes current timeN...
tmp< surfaceScalarField > phi() const
Return the MRF absolute flux.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool writeData(Ostream &os) const
Write data to Ostream.
OBJstream os(runTime.globalPath()/outputName)
tmp< surfaceScalarField > relative(const tmp< surfaceScalarField > &phi) const
Return the given absolute flux relative within the MRF region.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
bool good() const noexcept
True if next operation might succeed.
Mesh data needed to do the Finite Volume discretisation.
fvMatrix< vector > fvVectorMatrix
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void makeRelative(surfaceScalarField &phi, const volVectorField &U)
Make the given flux relative.
void makeRelative(volVectorField &U) const
Make the given absolute velocity relative within the MRF region.
bool read(const dictionary &dict)
Read dictionary.
Do not request registration (bool: false)
const dimensionSet dimArea(sqr(dimLength))
tmp< surfaceScalarField > relative(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given absolute flux in relative form.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity