35 namespace functionObjects
51 Foam::functionObjects::adjustTimeStepToReaction::propsDictIo
53 const IOobject::readOption& r
57 typeIOobject<timeIOdictionary>
59 name() +
"Properties",
80 phaseName_(
word::null),
83 haveReactionDeltaT0_(false),
104 maxCo_ =
dict.lookupOrDefault<scalar>(
"maxCo", 1);
105 extrapolate_ =
dict.lookupOrDefault<
bool>(
"extrapolate",
false);
112 if (propsDictIo.headerOk())
116 haveReactionDeltaT0_ =
true;
117 reactionDeltaT0_ =
propsDict.lookup<scalar>(
"reactionDeltaT");
121 haveReactionDeltaT0_ =
false;
136 if (extrapolate_ && obr_.time().writeTime())
140 propsDict.add(
"reactionDeltaT", reactionDeltaT0_);
152 if (!time_.controlDict().lookupOrDefault(
"adjustTimeStep",
false))
181 if (
thermo.solveSpecie(i))
188 const scalar reactionDeltaT1 = maxCo_/
max(
gMax(rhoDotByRho), vSmall);
195 if (extrapolate_ && haveReactionDeltaT0_)
197 const scalar
x =
min(
max(reactionDeltaT1/reactionDeltaT0_, 0), 1);
198 const scalar
f = (1 - rootSmall)*(1 -
sqrt(1 -
sqr(
x))) + rootSmall;
199 deltaT =
f*reactionDeltaT1;
203 deltaT = reactionDeltaT1;
207 haveReactionDeltaT0_ =
true;
208 reactionDeltaT0_ = reactionDeltaT1;
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static tmp< DimensionedField< Type, GeoMesh, PrimitiveField > > New(const word &name, const GeoMesh &mesh, const dimensionSet &, const PrimitiveField< Type > &)
Return a temporary field constructed from name, mesh,.
static word groupName(Name name, const word &group)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
const word & name() const
Return const reference to name.
Base-class for multi-component fluid thermodynamic properties.
Abstract base-class for Time/database functionObjects.
const word & name() const
Return the name of this functionObject.
Returns the minimum bulk reaction time scale.
virtual scalar maxDeltaT() const
Return the minimum reaction time-scale.
adjustTimeStepToReaction(const word &name, const Time &runTime, const dictionary &dict)
Construct from components.
virtual ~adjustTimeStepToReaction()
virtual bool execute()
Do nothing.
virtual bool write()
Do nothing.
virtual bool read(const dictionary &)
Read and reset the timeStep Function1.
const objectRegistry & obr_
Reference to the objectRegistry.
Specialisation of Foam::functionObject for a region.
const Time & time() const
Return time.
Base class for reaction models.
static const word reactionPropertiesName
Default reactionProperties dictionary name.
Reaction base-class holding the specie names and coefficients.
timeIOdictionary derived from IOdictionary with globalFile set false to enable writing to processor t...
Templated form of IOobject providing type information for file reading and header type checking.
A class for handling words, derived from string.
static const word null
An empty word.
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
const dimensionSet & dimless
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimTime
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Type gMax(const UList< Type > &f, const label comm)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
fluidMulticomponentThermo & thermo
IOdictionary propsDict(systemDict("particleTracksDict", args, runTime))