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];
181 ITstream& 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);