46 cellValueSourceCorrection_(false),
48 resetSourcesOnStartup_(true),
62 transient_(cs.transient_),
63 calcFrequency_(cs.calcFrequency_),
66 trackTime_(cs.trackTime_),
67 coupled_(cs.coupled_),
68 cellValueSourceCorrection_(cs.cellValueSourceCorrection_),
69 maxTrackTime_(cs.maxTrackTime_),
70 resetSourcesOnStartup_(cs.resetSourcesOnStartup_),
88 cellValueSourceCorrection_(false),
90 resetSourcesOnStartup_(false),
106 transient_ = dict_.lookupOrDefault(
"transient",
false);
114 <<
"Transient tracking is not supported for LTS"
115 " simulations, switching to steady state tracking."
120 if (mesh_.schemes().steady())
123 <<
"Transient tracking is not supported for steady-state"
124 " simulations, switching to steady state tracking."
130 dict_.lookup(
"coupled") >> coupled_;
131 dict_.lookup(
"cellValueSourceCorrection") >> cellValueSourceCorrection_;
132 dict_.readIfPresent(
"maxCo", maxCo_);
136 dict_.lookup(
"calcFrequency") >> calcFrequency_;
137 dict_.lookup(
"maxTrackTime") >> maxTrackTime_;
141 dict_.subDict(
"sourceTerms").lookup(
"resetOnStartup")
142 >> resetSourcesOnStartup_;
149 schemesDict(dict_.subDict(
"sourceTerms").subDict(
"schemes"));
152 schemes_.setSize(vars.
size());
156 schemes_[i].first() = vars[i];
161 if (
scheme ==
"semiImplicit")
163 schemes_[i].second().first() =
true;
165 else if (
scheme ==
"explicit")
167 schemes_[i].second().first() =
false;
172 <<
"Invalid scheme " <<
scheme <<
". Valid schemes are "
177 is >> schemes_[i].second().second();
187 if (fieldName == schemes_[i].
first())
189 return schemes_[i].second().second();
194 <<
"Field name " << fieldName <<
" not found in schemes"
205 if (fieldName == schemes_[i].
first())
207 return schemes_[i].second().first();
212 <<
"Field name " << fieldName <<
" not found in schemes"
221 return (mesh_.time().timeIndex() % calcFrequency_ == 0);
229 trackTime_ = mesh_.time().deltaTValue();
233 trackTime_ = maxTrackTime_;
236 return solveThisStep();
242 return mesh_.time().writeTime();
#define forAll(list, i)
Loop across all elements in list.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void size(const label)
Override size to be inconsistent with allocated storage.
Stores all relevant solution info for cloud.
virtual ~cloudSolution()
Destructor.
bool canEvolve()
Returns true if possible to evolve the cloud and sets timestep.
bool semiImplicit(const word &fieldName) const
Return semi-implicit flag coefficient for field.
bool output() const
Returns true if writing this step.
void read()
Read properties from dictionary.
scalar relaxCoeff(const word &fieldName) const
Return relaxation coefficient for field.
cloudSolution(const fvMesh &mesh)
Construct null from mesh reference.
bool solveThisStep() const
Returns true if performing a cloud iteration this calc step.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
wordList toc() const
Return the table of contents.
Mesh data needed to do the Finite Volume discretisation.
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
static tmp< surfaceInterpolationScheme< Type > > scheme(const surfaceScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
labelList first(const UList< labelPair > &p)