Go to the documentation of this file.
35 Foam::MRFZoneList::MRFZoneList
57 a = a || this->operator[](i).active();
60 if (warn && this->size() && !a)
62 Info<<
" No MRF zones active" <<
endl;
108 for (
const auto& mrf: *
this)
110 if (mrf.name() ==
name)
119 <<
"Unable to find MRFZone " <<
name
120 <<
". Available zones are: " <<
names
130 for (
auto& mrf: *
this)
133 allOk = (allOk && ok);
141 for (
const auto& mrf: *
this)
157 for (
const auto& mrf: *
this)
159 mrf.addCoriolis(
U, ddtU);
166 for (
const auto& mrf: *
this)
168 mrf.addCoriolis(
UEqn);
179 for (
const auto& mrf: *
this)
196 "MRFZoneList:acceleration",
197 U.mesh().time().timeName(),
203 auto& acceleration = tacceleration.ref();
205 for (
const auto& mrf: *
this)
207 mrf.addCoriolis(
U, acceleration);
210 return tacceleration;
226 for (
const auto& mrf: *
this)
235 for (
const auto& mrf: *
this)
237 mrf.makeRelative(
phi);
254 "relative(" + tphi().
name() +
')',
283 for (
const auto& mrf: *
this)
285 mrf.makeRelative(rphi.
ref());
310 for (
const auto& mrf: *
this)
312 mrf.makeRelative(rphi.
ref(), patchi);
332 for (
const auto& mrf: *
this)
334 mrf.makeRelative(
rho,
phi);
341 for (
const auto& mrf: *
this)
350 for (
const auto& mrf: *
this)
352 mrf.makeAbsolute(
phi);
369 "absolute(" + tphi().
name() +
')',
394 for (
const auto& mrf: *
this)
396 mrf.makeAbsolute(
rho,
phi);
403 for (
const auto& mrf: *
this)
405 mrf.correctBoundaryVelocity(
U);
418 relative(mesh_.Sf().boundaryField() &
U.boundaryField())
423 forAll(mesh_.boundary(), patchi)
425 if (isA<fixedValueFvsPatchScalarField>(phibf[patchi]))
427 phibf[patchi] ==
Uf[patchi];
435 if (mesh_.topoChanging())
437 for (
auto& mrf: *
this)
453 models.writeData(
os);
MRF zone definition based on cell zone and parameters obtained from a control dictionary constructed ...
A keyword and a list of tokens is an 'entry'.
void addAcceleration(const volVectorField &U, volVectorField &ddtU) const
Add the frame acceleration.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
A class for handling words, derived from Foam::string.
A field of fields is a PtrList of fields with reference counting.
void clear() const noexcept
bool writeData(Ostream &os) const
Write data to Ostream.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
List container for MRF zomes.
void reset(const dictionary &dict)
Reset the source list.
autoPtr< surfaceVectorField > Uf
void append(const T &val)
Append an element at the end of the list.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void correctBoundaryVelocity(volVectorField &U) const
Correct the boundary velocity for the rotation of the MRF region.
bool active(const bool warn=false) const
Return active status.
#define forAll(list, i)
Loop across all elements in list.
bool good() const noexcept
True if next operation might succeed.
void makeRelative(surfaceScalarField &phi, const volVectorField &U)
Make the given flux relative.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
patchWriters resize(patchIds.size())
messageStream Info
Information stream (stdout output on master, null elsewhere)
void makeRelative(volVectorField &U) const
Make the given absolute velocity relative within the MRF region.
tmp< surfaceScalarField > absolute(const tmp< surfaceScalarField > &phi) const
Return the given relative flux absolute within the MRF region.
tmp< volVectorField > DDt(const volVectorField &U) const
Return the frame acceleration.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Mesh data needed to do the Finite Volume discretisation.
tmp< surfaceScalarField > relative(const tmp< surfaceScalarField > &phi) const
Return the given absolute flux relative within the MRF region.
errorManipArg< error, int > exit(error &err, const int errNo=1)
meshPtr reset(new Foam::fvMesh(Foam::IOobject(regionName, runTime.timeName(), runTime, Foam::IOobject::MUST_READ), false))
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
void makeAbsolute(volVectorField &U) const
Make the given relative velocity absolute within the MRF region.
void correctBoundaryFlux(const volVectorField &U, surfaceScalarField &phi) const
Correct the boundary flux for the rotation of the MRF region.
void update()
Update MRFZone faces if the mesh topology changes.
static tmp< T > New(Args &&... args)
Construct tmp of T with forwarding arguments.
tmp< surfaceScalarField > relative(const tmp< surfaceScalarField > &tphi, const volVectorField &U)
Return the given absolute flux in relative form.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
bool read(const dictionary &dict)
Read dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const MRFZone & getFromName(const word &name) const
Return the MRF with a given name.
void makeAbsolute(surfaceScalarField &phi, const volVectorField &U)
Make the given flux absolute.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
tmp< GeometricField< Type, fvPatchField, volMesh > > DDt(const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &psi)