55 cellValueSourceCorrection_(false),
57 resetSourcesOnStartup_(true),
68 sourceTerms.readIfPresent(
"resetOnStartup", resetSourcesOnStartup_);
70 if (resetSourcesOnStartup_)
72 Info<<
"Cloud source terms will be reset" <<
endl;
76 Info<<
"Cloud source terms will be held constant" <<
endl;
91 transient_(cs.transient_),
92 calcFrequency_(cs.calcFrequency_),
93 logFrequency_(cs.logFrequency_),
96 trackTime_(cs.trackTime_),
97 deltaTMax_(cs.deltaTMax_),
98 coupled_(cs.coupled_),
99 cellValueSourceCorrection_(cs.cellValueSourceCorrection_),
100 maxTrackTime_(cs.maxTrackTime_),
101 resetSourcesOnStartup_(cs.resetSourcesOnStartup_),
102 schemes_(cs.schemes_)
119 cellValueSourceCorrection_(false),
121 resetSourcesOnStartup_(false),
131 transient_ = dict_.getOrDefault(
"transient",
false);
139 <<
"Transient tracking is not supported for LTS" 140 " simulations, switching to steady state tracking." 148 <<
"Transient tracking is not supported for steady-state" 149 " simulations, switching to steady state tracking." 155 dict_.readEntry(
"coupled", coupled_);
156 dict_.readEntry(
"cellValueSourceCorrection", cellValueSourceCorrection_);
157 dict_.readIfPresent(
"maxCo", maxCo_);
158 dict_.readIfPresent(
"deltaTMax", deltaTMax_);
160 dict_.readIfPresent(
"logFrequency", logFrequency_);
164 dict_.readEntry(
"calcFrequency", calcFrequency_);
165 dict_.readEntry(
"maxTrackTime", maxTrackTime_);
169 dict_.subDict(
"sourceTerms").lookup(
"resetOnStartup")
170 >> resetSourcesOnStartup_;
177 schemesDict(dict_.subDict(
"sourceTerms").subDict(
"schemes"));
184 schemes_[i].first() = vars[i];
187 ITstream& is = schemesDict.lookup(vars[i]);
189 if (
scheme ==
"semiImplicit")
191 schemes_[i].second().first() =
true;
193 else if (
scheme ==
"explicit")
195 schemes_[i].second().first() =
false;
200 <<
"Invalid scheme " <<
scheme <<
". Valid schemes are " 205 is >> schemes_[i].second().second();
213 for (
const auto&
scheme : schemes_)
215 if (fieldName ==
scheme.first())
217 return scheme.second().second();
224 <<
"Field name " << fieldName <<
" not found in schemes. " 225 <<
"Setting relaxation factor to 1" <<
endl;
234 for (
const auto&
scheme : schemes_)
236 if (fieldName ==
scheme.first())
238 return scheme.second().first();
245 <<
"Field name " << fieldName <<
" not found in schemes. " 246 <<
"Setting relaxation factor to 1" <<
endl;
258 mesh_.time().writeTime()
259 || (mesh_.time().timeIndex() % calcFrequency_ == 0)
268 trackTime_ = mesh_.time().deltaTValue();
272 trackTime_ = maxTrackTime_;
275 return solveThisStep();
283 && (logFrequency_ > 0)
284 && (mesh_.time().timeIndex() % logFrequency_ == 0);
290 return active_ && mesh_.time().writeTime();
298 return min(deltaTMax_, maxCo_*trackTime);
302 return min(deltaTMax_, trackTime);
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.
defineDebugSwitchWithName(pointMVCWeight, "pointMVCWeight", 0)
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.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
bool solveThisStep() const
Returns true if performing a cloud iteration this calc step.
int debug
Static debugging option.
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
List of word.
Stores all relevant solution info for cloud.
#define WarningInFunction
Report a warning using Foam::Warning.
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.