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"));
174 schemes_.setSize(vars.
size());
178 schemes_[i].first() = vars[i];
182 const word scheme(is);
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);
An input stream of tokens.
void size(const label n)
Older name for setAddressableSize.
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 deltaLMax(const scalar lRef) const
Return the maximum integration length.
scalar relaxCoeff(const word &fieldName) const
Return relaxation coefficient for field.
scalar deltaTMax() const
Return the maximum integration time step.
bool solveThisStep() const
Returns true if performing a cloud iteration this calc step.
virtual bool enabled() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
wordList toc() const
Return the table of contents.
Mesh data needed to do the Finite Volume discretisation.
Lookup type of boundary radiation properties.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
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.
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.