Go to the documentation of this file.
58 template<
class GeoField>
69 wordList masterNames(fieldObjects.names());
74 const wordList localNames(masterNames);
81 const word& masterFld = masterNames[i];
85 if (iter == localNamesSet.end())
88 <<
"Fields not synchronised across processors." <<
endl
89 <<
"Master has fields " << masterNames
95 localNamesSet.erase(iter);
102 <<
"Fields not synchronised across processors." <<
endl
103 <<
"Master has fields " << masterNames
110 fields.setSize(masterNames.size());
116 Info<<
"Reading " << GeoField::typeName <<
' ' << masterNames[i]
119 const IOobject& io = *fieldObjects[masterNames[i]];
157 Info<<
" Operating in no-flow mode; no models will be loaded."
158 <<
" All vol, surface and point fields will be loaded." <<
endl;
236 ReadUniformFields(constantObjects, usFlds,
true);
239 ReadUniformFields(constantObjects, uvFlds,
true);
242 ReadUniformFields(constantObjects, ustFlds,
true);
245 ReadUniformFields(constantObjects, usymmtFlds,
true);
248 ReadUniformFields(constantObjects, utFlds,
true);
301 "turbulenceProperties",
309 if (turbulencePropertiesHeader.headerOk())
331 "transportProperties",
359 "turbulenceProperties",
367 if (turbulencePropertiesHeader.headerOk())
388 "transportProperties",
402 <<
"Incorrect dimensions of phi: " <<
phi.dimensions()
441 int main(
int argc,
char *argv[])
448 "suppress creating flow models"
453 "do not read any field data"
469 readFunctionObjects(
args, runTime, folDict)
481 folPtr = readFunctionObjects(
args, runTime, folDict);
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
static autoPtr< IncompressibleTurbulenceModel > New(const volVectorField &U, const surfaceScalarField &phi, const TransportModel &transportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
An STL-conforming iterator.
#define forAll(list, i)
Loop across all elements in list.
Info<< "Creating field dpdt\n"<< endl;volScalarField dpdt(IOobject("dpdt", runTime.timeName(), mesh), mesh, dimensionedScalar("dpdt", p.dimensions()/dimTime, 0));Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));volScalarField p_rgh(IOobject("p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh);p_rgh=p - rho *gh;mesh.setFluxRequired(p_rgh.name());multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
wordList ReadFields(const typename GeoMesh::Mesh &mesh, const IOobjectList &objects, PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields, const bool syncPar=true, const bool readOldTime=false)
Helper routine to read Geometric fields.
static autoPtr< fluidThermo > New(const fvMesh &, const word &phaseName=word::null)
Selector.
static bool & parRun()
Is this a parallel run?
void calc(const argList &args, const Time &runTime, const fvMesh &mesh)
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
static void scatter(const List< commsStruct > &comms, T &Value, const int tag, const label comm)
Scatter data. Distribute without modification. Reverse of gather.
Extract command arguments and options from the supplied argc and argv parameters.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple single-phase transport model based on viscosityModel.
const fileName & instance() const
A HashTable with keys but without contents.
List of function objects with start(), execute() and end() functions that is called for each object.
static const pointMesh & New(const polyMesh &mesh)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const objectRegistry & db() const
Return the local objectRegistry.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in time.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
bool & registerObject()
Register object created from this IOobject with registry if true.
const word & name() const
Return name.
int main(int argc, char *argv[])
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
Mesh data needed to do the Finite Volume discretisation.
Mesh representing a set of points created from polyMesh.
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
IOobjectList lookupClass(const word &className) const
Return the list for all IOobjects of a given class.
static autoPtr< ThermalDiffusivity > New(const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &transportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
List of IOobjects with searching and retrieving facilities.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static instantList timeDirs
singlePhaseTransportModel laminarTransport(U, phi)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Helper routine to read fields.
static void addOptions(const bool constant=true, const bool withZero=false)
Add the options handled by timeSelector to argList::validOptions.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
virtual bool execute(const bool forceWrite=false)
Called at each ++ or += of the time-loop. forceWrite overrides.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const word & constant() const
Return constant name.
bool optionFound(const word &opt) const
Return true if the named option is found.
void reset(T *=0)
If object pointer already set, delete object and set to given.
const dimensionSet dimVolume(pow3(dimLength))
static instantList select0(Time &runTime, const argList &args)
Return the set of times selected based on the argList options.
Generic GeometricField class.
Foam::argList args(argc, argv)
const fileName & local() const