Go to the documentation of this file.
46 cellValueSourceCorrection_(false),
48 resetSourcesOnStartup_(true),
59 sourceTerms.
readIfPresent(
"resetOnStartup", resetSourcesOnStartup_);
61 if (resetSourcesOnStartup_)
63 Info<<
"Cloud source terms will be reset" <<
endl;
67 Info<<
"Cloud source terms will be held constant" <<
endl;
82 transient_(cs.transient_),
83 calcFrequency_(cs.calcFrequency_),
86 trackTime_(cs.trackTime_),
87 deltaTMax_(cs.deltaTMax_),
88 coupled_(cs.coupled_),
89 cellValueSourceCorrection_(cs.cellValueSourceCorrection_),
90 maxTrackTime_(cs.maxTrackTime_),
91 resetSourcesOnStartup_(cs.resetSourcesOnStartup_),
108 cellValueSourceCorrection_(false),
110 resetSourcesOnStartup_(false),
126 transient_ = dict_.lookupOrDefault(
"transient",
false);
134 <<
"Transient tracking is not supported for LTS"
135 " simulations, switching to steady state tracking."
143 <<
"Transient tracking is not supported for steady-state"
144 " simulations, switching to steady state tracking."
150 dict_.readEntry(
"coupled", coupled_);
151 dict_.readEntry(
"cellValueSourceCorrection", cellValueSourceCorrection_);
152 dict_.readIfPresent(
"maxCo", maxCo_);
153 dict_.readIfPresent(
"deltaTMax", deltaTMax_);
157 dict_.readEntry(
"calcFrequency", calcFrequency_);
158 dict_.readEntry(
"maxTrackTime", maxTrackTime_);
162 dict_.subDict(
"sourceTerms").lookup(
"resetOnStartup")
163 >> resetSourcesOnStartup_;
170 schemesDict(dict_.subDict(
"sourceTerms").subDict(
"schemes"));
177 schemes_[i].first() = vars[i];
180 Istream& is = schemesDict.lookup(vars[i]);
182 if (
scheme ==
"semiImplicit")
184 schemes_[i].second().first() =
true;
186 else if (
scheme ==
"explicit")
188 schemes_[i].second().first() =
false;
193 <<
"Invalid scheme " <<
scheme <<
". Valid schemes are "
198 is >> schemes_[i].second().second();
208 if (fieldName == schemes_[i].first())
210 return schemes_[i].second().second();
215 <<
"Field name " << fieldName <<
" not found in schemes"
226 if (fieldName == schemes_[i].first())
228 return schemes_[i].second().first();
233 <<
"Field name " << fieldName <<
" not found in schemes"
245 mesh_.time().writeTime()
246 || (mesh_.time().timeIndex() % calcFrequency_ == 0)
255 trackTime_ = mesh_.time().deltaTValue();
259 trackTime_ = maxTrackTime_;
262 return solveThisStep();
268 return active_ && mesh_.time().writeTime();
276 return min(deltaTMax_, maxCo_*trackTime);
280 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