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() +
')',
375 makeAbsolute(rphi.
ref());
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);
Correction limiting method based on the absolute particle velocity.
Correction limiting method based on the relative particle velocity.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A field of fields is a PtrList of fields with reference counting.
Generic templated field type.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool good() const noexcept
True if next operation might succeed.
void append(const T &val)
Append an element at the end of the list.
List container for MRF zomes.
void reset(const dictionary &dict)
Reset the source list.
bool writeData(Ostream &os) const
Write data to Ostream.
void addAcceleration(const volVectorField &U, volVectorField &ddtU) const
Add the frame acceleration.
void makeAbsolute(volVectorField &U) const
Make the given relative velocity absolute within the MRF region.
void correctBoundaryVelocity(volVectorField &U) const
Correct the boundary velocity for the rotation of the MRF region.
const MRFZone & getFromName(const word &name) const
Return the MRF with a given name.
void makeRelative(volVectorField &U) const
Make the given absolute velocity relative within the MRF region.
void update()
Update MRFZone faces if the mesh topology changes.
tmp< volVectorField > DDt(const volVectorField &U) const
Return the frame acceleration.
bool active(const bool warn=false) const
Return active status.
void correctBoundaryFlux(const volVectorField &U, surfaceScalarField &phi) const
Correct the boundary flux for the rotation of the MRF region.
MRF zone definition based on cell zone and parameters obtained from a control dictionary constructed ...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
virtual bool read()
Re-read model coefficients if they have changed.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
void reset()
Reset to defaults.
A keyword and a list of tokens is an 'entry'.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
void clear() const noexcept
A class for handling words, derived from Foam::string.
MRF makeRelative(fvc::interpolate(rho), phiHbyA)
patchWriters resize(patchIds.size())
autoPtr< surfaceVectorField > Uf
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.