75 mesh.time().constant(),
124 mesh.time().timeName(),
143void Foam::regionModels::regionFaModel::constructMeshObjects
177 catch (
const Foam::error& err)
184 catch (
const Foam::IOerror& err)
199 <<
"Failed to create finite-area mesh [" <<
areaName_
201 <<
"A common cause is an incorrect or "
202 "missing 'area' entry in the setup" <<
nl
211void Foam::regionModels::regionFaModel::initialise()
215 Pout<<
"regionFaModel::initialise()" <<
endl;
218 vsmPtr_.reset(
new volSurfaceMapping(regionMeshPtr_()));
220 if (!outputPropertiesPtr_)
222 outputPropertiesPtr_.reset
226 createPropertiesIOobject
239bool Foam::regionModels::regionFaModel::init(
const dictionary&
dict)
243 if (
const dictionary* dictptr =
dict.findDict(modelName_ +
"Coeffs"))
245 coeffs_ <<= *dictptr;
248 infoOutput_.readIfPresent(
"infoOutput",
dict);
270 const word& regionType,
271 const word& modelName,
290 modelName_(modelName),
292 regionName_(
dict.get<
word>(
"region")),
293 coeffs_(
dict.subOrEmptyDict(modelName +
"Coeffs"))
302 Switch sw = Switch::find(suffixHint_);
322 constructMeshObjects(
dict);
338 Info<<
"\nEvolving " << modelName_
339 <<
" for region " << regionMesh().name();
343 Info<<
" [" << areaName_ <<
"]";
bool empty() const noexcept
True if the list is empty.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
virtual void write(Ostream &os, const bool withTitle=true) const
Print error message.
@ REGISTER
Request registration (bool: true).
@ NO_READ
Nothing to be read.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
Find and return a sub-dictionary as a copy, otherwise return an empty dictionary.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
dictionary()
Default construct, a top-level empty dictionary.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
virtual void write(Ostream &os, const bool withTitle=true) const
Print error message.
bool throwing() const noexcept
Return the current exception throwing state (on or off).
static const objectRegistry & Registry(const polyMesh &pMesh)
Return the singleton parent registry (on the polyMesh) that contains all objects related to finite-ar...
A class for handling file names.
Mesh data needed to do the Finite Volume discretisation.
Mesh consisting of general polyhedral cells.
static const word & regionName(const word ®ion)
The mesh region name or word::null if polyMesh::defaultRegion.
Base class for area region models.
Switch active_
Active flag.
word areaName_
The finite-area mesh name (default: region0).
const Time & time_
Reference to the time database.
word suffixHint_
Suffix hint for automatic model variable names (default: "").
const word modelName_
Model name.
virtual void postEvolveRegion()
Post-evolve region.
Switch infoOutput_
Active information output.
word regionName_
Region name.
autoPtr< volSurfaceMapping > vsmPtr_
Volume/surface mapping.
static const word regionFaModelName
Default name regionFaModel.
virtual scalar CourantNumber() const
Courant number of the region.
const Time & time() const noexcept
Return the reference to the time database.
dictionary coeffs_
Model coefficients dictionary.
autoPtr< faMesh > regionMeshPtr_
Pointer to the region mesh database.
virtual void preEvolveRegion()
Pre-evolve region.
virtual void evolve()
Main driver routing to evolve the region - calls other evolves.
const fvMesh & primaryMesh_
Reference to the primary mesh database.
virtual void info()=0
Provide some feedback.
const volSurfaceMapping & vsm() const
Return mapping between surface and volume fields.
const faMesh & regionMesh() const
Return the region mesh database.
regionFaModel(const fvMesh &mesh, const word ®ionType, const word &modelName, const dictionary &dict, bool readFields=true)
Construct from mesh and name and dict.
const word & modelName() const noexcept
Return the model name.
virtual void evolveRegion()
Evolve the region.
Volume to surface and surface to volume mapping.
A class for handling words, derived from Foam::string.
word ext() const
Return file name extension (part after last .).
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text.
constexpr char nl
The newline '\n' character (0x0a).