Go to the documentation of this file.
43 cellValueSourceCorrection_(false),
45 resetSourcesOnStartup_(true),
60 Info<<
"Cloud source terms will be reset" <<
endl;
64 Info<<
"Cloud source terms will be held constant" <<
endl;
75 transient_(cs.transient_),
76 calcFrequency_(cs.calcFrequency_),
79 trackTime_(cs.trackTime_),
80 deltaTMax_(cs.deltaTMax_),
81 coupled_(cs.coupled_),
82 cellValueSourceCorrection_(cs.cellValueSourceCorrection_),
83 maxTrackTime_(cs.maxTrackTime_),
84 resetSourcesOnStartup_(cs.resetSourcesOnStartup_),
101 cellValueSourceCorrection_(false),
103 resetSourcesOnStartup_(false),
118 dict_.lookup(
"transient") >> transient_;
119 dict_.lookup(
"coupled") >> coupled_;
120 dict_.lookup(
"cellValueSourceCorrection") >> cellValueSourceCorrection_;
121 dict_.readIfPresent(
"maxCo", maxCo_);
122 dict_.readIfPresent(
"deltaTMax", deltaTMax_);
126 dict_.lookup(
"calcFrequency") >> calcFrequency_;
127 dict_.lookup(
"maxTrackTime") >> maxTrackTime_;
131 dict_.subDict(
"sourceTerms").lookup(
"resetOnStartup")
132 >> resetSourcesOnStartup_;
139 schemesDict(dict_.subDict(
"sourceTerms").subDict(
"schemes"));
142 schemes_.setSize(vars.
size());
146 schemes_[i].first() = vars[i];
151 if (
scheme ==
"semiImplicit")
153 schemes_[i].second().first() =
true;
155 else if (
scheme ==
"explicit")
157 schemes_[i].second().first() =
false;
162 <<
"Invalid scheme " <<
scheme <<
". Valid schemes are "
167 is >> schemes_[i].second().second();
177 if (fieldName == schemes_[i].first())
179 return schemes_[i].second().second();
184 <<
"Field name " << fieldName <<
" not found in schemes"
195 if (fieldName == schemes_[i].first())
197 return schemes_[i].second().first();
202 <<
"Field name " << fieldName <<
" not found in schemes"
214 mesh_.time().outputTime()
215 || (mesh_.time().timeIndex() % calcFrequency_ == 0)
224 trackTime_ = mesh_.time().deltaTValue();
228 trackTime_ = maxTrackTime_;
231 return solveThisStep();
237 return active_ && mesh_.time().outputTime();
245 return min(deltaTMax_, maxCo_*trackTime);
249 return min(deltaTMax_, trackTime);
dictionary dict_
Dictionary used during construction.
Switch resetSourcesOnStartup_
Flag to indicate whether coupling source terms should be.
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
scalar deltaTMax() const
Return the maximum integation time step.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
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.
bool output() const
Returns true if writing this step.
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.
Stores all relevant solution info for cloud.
bool semiImplicit(const word &fieldName) const
Return semi-implicit flag coefficient for field.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
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.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
void read()
Read properties from dictionary.
cloudSolution(const fvMesh &mesh)
Construct null from mesh reference.
wordList toc() const
Return the table of contents.
void size(const label)
Override size to be inconsistent with allocated storage.
tmp< surfaceInterpolationScheme< Type > > scheme(const surfaceScalarField &faceFlux, Istream &streamData)
Return weighting factors for scheme given from Istream.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual ~cloudSolution()
Destructor.
const Switch active_
Cloud active flag.
stressControl lookup("compactNormalStress") >> compactNormalStress