Go to the documentation of this file.
47 cellValueSourceCorrection_(false),
49 resetSourcesOnStartup_(true),
60 sourceTerms.
readIfPresent(
"resetOnStartup", resetSourcesOnStartup_);
62 if (resetSourcesOnStartup_)
64 Info<<
"Cloud source terms will be reset" <<
endl;
68 Info<<
"Cloud source terms will be held constant" <<
endl;
83 transient_(cs.transient_),
84 calcFrequency_(cs.calcFrequency_),
87 trackTime_(cs.trackTime_),
88 deltaTMax_(cs.deltaTMax_),
89 coupled_(cs.coupled_),
90 cellValueSourceCorrection_(cs.cellValueSourceCorrection_),
91 maxTrackTime_(cs.maxTrackTime_),
92 resetSourcesOnStartup_(cs.resetSourcesOnStartup_),
109 cellValueSourceCorrection_(false),
111 resetSourcesOnStartup_(false),
127 transient_ = dict_.getOrDefault(
"transient",
false);
135 <<
"Transient tracking is not supported for LTS"
136 " simulations, switching to steady state tracking."
144 <<
"Transient tracking is not supported for steady-state"
145 " simulations, switching to steady state tracking."
151 dict_.readEntry(
"coupled", coupled_);
152 dict_.readEntry(
"cellValueSourceCorrection", cellValueSourceCorrection_);
153 dict_.readIfPresent(
"maxCo", maxCo_);
154 dict_.readIfPresent(
"deltaTMax", deltaTMax_);
158 dict_.readEntry(
"calcFrequency", calcFrequency_);
159 dict_.readEntry(
"maxTrackTime", maxTrackTime_);
163 dict_.subDict(
"sourceTerms").lookup(
"resetOnStartup")
164 >> resetSourcesOnStartup_;
171 schemesDict(dict_.subDict(
"sourceTerms").subDict(
"schemes"));
178 schemes_[i].first() = vars[i];
181 Istream& is = schemesDict.lookup(vars[i]);
183 if (
scheme ==
"semiImplicit")
185 schemes_[i].second().first() =
true;
187 else if (
scheme ==
"explicit")
189 schemes_[i].second().first() =
false;
194 <<
"Invalid scheme " <<
scheme <<
". Valid schemes are "
199 is >> schemes_[i].second().second();
209 if (fieldName == schemes_[i].first())
211 return schemes_[i].second().second();
216 <<
"Field name " << fieldName <<
" not found in schemes"
227 if (fieldName == schemes_[i].first())
229 return schemes_[i].second().first();
234 <<
"Field name " << fieldName <<
" not found in schemes"
246 mesh_.time().writeTime()
247 || (mesh_.time().timeIndex() % calcFrequency_ == 0)
256 trackTime_ = mesh_.time().deltaTValue();
260 trackTime_ = maxTrackTime_;
263 return solveThisStep();
269 return active_ && mesh_.time().writeTime();
277 return min(deltaTMax_, maxCo_*trackTime);
281 return min(deltaTMax_, trackTime);
A class for handling words, derived from Foam::string.
scalar deltaTMax() const
Return the maximum integration time step.
bool canEvolve()
Returns true if possible to evolve the cloud and sets timestep.
scalar deltaLMax(const scalar lRef) const
Return the maximum integration length.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
bool output() const
Returns true if writing this step.
static bool enabled(const fvMesh &mesh)
Return true if LTS is enabled.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool solveThisStep() const
Returns true if performing a cloud iteration this calc step.
messageStream Info
Information stream (uses stdout - output is on the master only)
Stores all relevant solution info for cloud.
Lookup type of boundary radiation properties.
bool semiImplicit(const word &fieldName) const
Return semi-implicit flag coefficient for field.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
scalar relaxCoeff(const word &fieldName) const
Return relaxation coefficient for field.
void read()
Read properties from dictionary.
cloudSolution(const fvMesh &mesh)
Construct null from mesh reference.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
void setSize(const label newSize)
Alias for resize(const label)
virtual ~cloudSolution()
Destructor.
static tmp< edgeInterpolationScheme< Type > > scheme(const edgeScalarField &faceFlux, Istream &schemeData)
Return weighting factors for scheme given from Istream.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const