Go to the documentation of this file.
75 #ifndef CrankNicolsonDdtScheme_H
76 #define CrankNicolsonDdtScheme_H
104 template<
class GeoField>
152 template<
class GeoField>
160 template<
class GeoField>
165 template<
class GeoField>
170 template<
class GeoField>
175 template<
class GeoField>
180 template<
class GeoField>
184 template<
class GeoField>
209 if (ocCoeff_ < 0 || ocCoeff_ > 1)
214 ) <<
"Off-centreing coefficient = " <<
ocCoeff_
215 <<
" should be >= 0 and <= 1"
CrankNicolsonDdtScheme(const fvMesh &mesh)
Construct from mesh.
const fvMesh & mesh() const
Return mesh reference.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
A class for handling words, derived from string.
void operator=(const CrankNicolsonDdtScheme &)
Disallow default bitwise assignment.
scalar ocCoeff_
Off-centering coefficient, 1 -> CN, less than one blends with EI.
A class for managing temporary objects.
bool evaluate(const DDt0Field< GeoField > &ddt0) const
Check if the ddt0 needs to be evaluated for this time-step.
dimensionedScalar rDtCoef0_(const DDt0Field< GeoField > &) const
Return the reciprocal old time-step coefficient for Euler for the.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
DDt0Field< GeoField > & ddt0_(const word &name, const dimensionSet &dims)
label startTimeIndex() const
Return the start-time index.
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
scalar coef_(const DDt0Field< GeoField > &) const
Return the coefficient for Euler scheme for the first time-step.
TypeName("CrankNicolson")
Runtime type information.
DDt0Field(const IOobject &io, const fvMesh &mesh)
Constructor from file for restart.
Dimension set for the base types.
ddtScheme< Type >::fluxFieldType fluxFieldType
GeoField & operator()()
Cast to the underlying GeoField.
scalar ocCoeff() const
Return the off-centreing coefficient.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Second-oder Crank-Nicolson implicit ddt using the current and previous time-step fields as well as th...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void operator=(const GeoField &gf)
Assignment to a GeoField.
dimensionedScalar rDtCoef_(const DDt0Field< GeoField > &) const
Return the reciprocal time-step coefficient for Euler for the.
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
Class to store the ddt0 fields on the objectRegistry for use in the.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
CrankNicolsonDdtScheme(const CrankNicolsonDdtScheme &)
Disallow default bitwise copy construct.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const fvMesh & mesh() const
Return mesh reference.
scalar coef0_(const DDt0Field< GeoField > &) const
Return the old time-step coefficient for Euler scheme for the.
const volScalarField & psi
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
tmp< GeoField > offCentre_(const GeoField &ddt0) const
Return ddt0 multiplied by the off-centreing coefficient.
Abstract base class for ddt schemes.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Generic GeometricField class.
word name(const complex &)
Return a string representation of a complex.
CrankNicolsonDdtScheme(const fvMesh &mesh, Istream &is)
Construct from mesh and Istream.