35 namespace functionObjects
51 Foam::functionObjects::adjustTimeStepToCombustion::propsDictIo
53 const IOobject::readOption& r
57 typeIOobject<timeIOdictionary>
59 name() +
"Properties",
80 phaseName_(
word::null),
83 haveCombustionDeltaT0_(false),
84 combustionDeltaT0_(NaN)
104 maxCo_ =
dict.lookupOrDefault<scalar>(
"maxCo", 1);
105 extrapolate_ =
dict.lookupOrDefault<
bool>(
"extrapolate",
false);
112 if (propsDictIo.headerOk())
116 haveCombustionDeltaT0_ =
true;
117 combustionDeltaT0_ =
propsDict.lookup<scalar>(
"combustionDeltaT");
121 haveCombustionDeltaT0_ =
false;
136 if (extrapolate_ && obr_.time().writeTime())
140 propsDict.add(
"combustionDeltaT", combustionDeltaT0_);
152 if (!time_.controlDict().lookupOrDefault(
"adjustTimeStep",
false))
181 if (
thermo.solveSpecie(i))
183 rhoDotByRho +=
mag(combustion.
R(i))/2/
thermo.rho()();
188 const scalar combustionDeltaT1 = maxCo_/
max(
gMax(rhoDotByRho), vSmall);
195 if (extrapolate_ && haveCombustionDeltaT0_)
197 const scalar
x =
min(
max(combustionDeltaT1/combustionDeltaT0_, 0), 1);
198 const scalar
f = (1 - rootSmall)*(1 -
sqrt(1 -
sqr(
x))) + rootSmall;
199 deltaT =
f*combustionDeltaT1;
203 deltaT = combustionDeltaT1;
207 haveCombustionDeltaT0_ =
true;
208 combustionDeltaT0_ = combustionDeltaT1;
#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 > > New(const word &name, const Mesh &mesh, const dimensionSet &, const Field< 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.
Base class for combustion models.
const fluidMulticomponentThermo & thermo() const
Return const access to the thermo.
virtual tmp< volScalarField::Internal > R(const label speciei) const =0
Consumption rate, i.e. source term for specie equation.
static const word combustionPropertiesName
Default combustionProperties dictionary name.
const fvMesh & mesh() const
Return const access to the mesh database.
A list of keyword definitions, which are a keyword followed by any number of values (e....
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 combustion time-scale.
virtual ~adjustTimeStepToCombustion()
adjustTimeStepToCombustion(const word &name, const Time &runTime, const dictionary &dict)
Construct from components.
virtual bool execute()
Do nothing.
virtual bool write()
Do nothing.
virtual bool read(const dictionary &)
Read and reset the timeStep Function1.
Specialisation of Foam::functionObject for a region and providing a reference to the region Foam::obj...
const objectRegistry & obr_
Reference to the region objectRegistry.
const Time & time() const
Return time.
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(adjustTimeStepToCombustion, 0)
addToRunTimeSelectionTable(functionObject, adjustTimeStepToCombustion, dictionary)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
word name(const bool)
Return a word representation of a bool.
const dimensionSet dimless
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimTime
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
Type gMax(const FieldField< Field, Type > &f)
fluidMulticomponentThermo & thermo
IOdictionary propsDict(systemDict("particleTracksDict", args, runTime))