48 cellValueSourceCorrection_(false),
50 resetSourcesOnStartup_(true),
61 sourceTerms.
readIfPresent(
"resetOnStartup", resetSourcesOnStartup_);
63 if (resetSourcesOnStartup_)
65 Info<<
"Cloud source terms will be reset" <<
endl;
69 Info<<
"Cloud source terms will be held constant" <<
endl;
84 transient_(cs.transient_),
85 calcFrequency_(cs.calcFrequency_),
86 logFrequency_(cs.logFrequency_),
89 trackTime_(cs.trackTime_),
90 deltaTMax_(cs.deltaTMax_),
91 coupled_(cs.coupled_),
92 cellValueSourceCorrection_(cs.cellValueSourceCorrection_),
93 maxTrackTime_(cs.maxTrackTime_),
94 resetSourcesOnStartup_(cs.resetSourcesOnStartup_),
112 cellValueSourceCorrection_(false),
114 resetSourcesOnStartup_(false),
130 transient_ = dict_.getOrDefault(
"transient",
false);
138 <<
"Transient tracking is not supported for LTS" 139 " simulations, switching to steady state tracking." 147 <<
"Transient tracking is not supported for steady-state" 148 " simulations, switching to steady state tracking." 154 dict_.readEntry(
"coupled", coupled_);
155 dict_.readEntry(
"cellValueSourceCorrection", cellValueSourceCorrection_);
156 dict_.readIfPresent(
"maxCo", maxCo_);
157 dict_.readIfPresent(
"deltaTMax", deltaTMax_);
159 dict_.readIfPresent(
"logFrequency", logFrequency_);
163 dict_.readEntry(
"calcFrequency", calcFrequency_);
164 dict_.readEntry(
"maxTrackTime", maxTrackTime_);
168 dict_.subDict(
"sourceTerms").lookup(
"resetOnStartup")
169 >> resetSourcesOnStartup_;
176 schemesDict(dict_.subDict(
"sourceTerms").subDict(
"schemes"));
183 schemes_[i].first() = vars[i];
186 ITstream& is = schemesDict.lookup(vars[i]);
188 if (
scheme ==
"semiImplicit")
190 schemes_[i].second().first() =
true;
192 else if (
scheme ==
"explicit")
194 schemes_[i].second().first() =
false;
199 <<
"Invalid scheme " <<
scheme <<
". Valid schemes are " 204 is >> schemes_[i].second().second();
214 if (fieldName == schemes_[i].first())
216 return schemes_[i].second().second();
221 <<
"Field name " << fieldName <<
" not found in schemes" 232 if (fieldName == schemes_[i].first())
234 return schemes_[i].second().first();
239 <<
"Field name " << fieldName <<
" not found in schemes" 251 mesh_.time().writeTime()
252 || (mesh_.time().timeIndex() % calcFrequency_ == 0)
261 trackTime_ = mesh_.time().deltaTValue();
265 trackTime_ = maxTrackTime_;
268 return solveThisStep();
276 && (logFrequency_ > 0)
277 && (mesh_.time().timeIndex() % logFrequency_ == 0);
283 return active_ && mesh_.time().writeTime();
291 return min(deltaTMax_, maxCo_*trackTime);
295 return min(deltaTMax_, trackTime);
virtual ~cloudSolution()
Destructor.
cloudSolution(const fvMesh &mesh)
Construct null from mesh reference.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
scalar relaxCoeff(const word &fieldName) const
Return relaxation coefficient for field.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static tmp< edgeInterpolationScheme< Type > > scheme(const edgeScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
scalar deltaLMax(const scalar lRef) const
Return the maximum integration length.
Lookup type of boundary radiation properties.
bool log() const
Returns true if possible to log this step.
#define forAll(list, i)
Loop across all elements in list.
bool semiImplicit(const word &fieldName) const
Return semi-implicit flag coefficient for field.
void setSize(const label n)
Alias for resize()
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
A class for handling words, derived from Foam::string.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
bool solveThisStep() const
Returns true if performing a cloud iteration this calc step.
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...
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. ...
scalar deltaTMax() const
Return the maximum integration time step.
List< word > wordList
A List of words.
Mesh data needed to do the Finite Volume discretisation.
messageStream Info
Information stream (stdout output on master, null elsewhere)
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
void read()
Read properties from dictionary.
bool output() const
Returns true if writing this step.
bool canEvolve()
Returns true if possible to evolve the cloud and sets timestep parameters.