75 #ifndef CrankNicolsonDdtScheme_H 76 #define CrankNicolsonDdtScheme_H 104 template<
class GeoField>
109 label startTimeIndex_;
130 label startTimeIndex()
const;
133 GeoField& operator()();
136 void operator=(
const GeoField& gf);
152 template<
class GeoField>
153 DDt0Field<GeoField>& ddt0_
160 template<
class GeoField>
161 bool evaluate(
const DDt0Field<GeoField>& ddt0)
const;
165 template<
class GeoField>
166 scalar coef_(
const DDt0Field<GeoField>&)
const;
170 template<
class GeoField>
171 scalar coef0_(
const DDt0Field<GeoField>&)
const;
175 template<
class GeoField>
180 template<
class GeoField>
184 template<
class GeoField>
209 if (ocCoeff_ < 0 || ocCoeff_ > 1)
213 "CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is)",
215 ) <<
"Off-centreing coefficient = " << ocCoeff_
216 <<
" should be >= 0 and <= 1" 300 const fluxFieldType&
phi 314 const fluxFieldType&
phi
scalar ocCoeff() const
Return the off-centreing coefficient.
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
Mesh data needed to do the Finite Volume discretisation.
word name(const complex &)
Return a string representation of a complex.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
Generic dimensioned Type class.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Dimension set for the base types.
TypeName("CrankNicolson")
Runtime type information.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
const volScalarField & psi
const fvMesh & mesh() const
Return mesh reference.
Generic GeometricField class.
Abstract base class for ddt schemes.
ddtScheme< Type >::fluxFieldType fluxFieldType
const fvMesh & mesh() const
Return mesh reference.
Second-oder Crank-Nicolson implicit ddt using the current and previous time-step fields as well as th...
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
A class for managing temporary objects.