31#include "surfaceInterpolate.H"
63 <<
"Ddt scheme not specified" <<
endl <<
endl
64 <<
"Valid ddt schemes are :" <<
endl
65 << IstreamConstructorTablePtr_->sortedToc()
69 const word schemeName(schemeData);
71 auto* ctorPtr = IstreamConstructorTable(schemeName);
80 *IstreamConstructorTablePtr_
84 return ctorPtr(
mesh, schemeData);
147 U.mesh().time().timeName(),
157 if (ddtPhiCoeff_ < 0)
160 ddtCouplingCoeff -=
min
175 forAll(
U.boundaryField(), patchi)
179 U.boundaryField()[patchi].fixesValue()
193 <<
"ddtCouplingCoeff mean max min = "
197 return tddtCouplingCoeff;
205 const fluxFieldType&
phi,
206 const fluxFieldType& phiCorr
214 tmp<surfaceScalarField> tddtCouplingCoeff
221 U.mesh().time().timeName(),
231 if (ddtPhiCoeff_ < 0)
234 ddtCouplingCoeff -=
min
240 *
mesh().time().deltaT()*
mesh().deltaCoeffs()/
mesh().magSf(),
246 ddtCouplingCoeff.setOriented(
false);
256 forAll(
U.boundaryField(), patchi)
260 U.boundaryField()[patchi].fixesValue()
271 auto avg =
gAverage(ddtCouplingCoeff.primitiveField());
274 <<
"ddtCouplingCoeff mean max min = "
278 return tddtCouplingCoeff;
286 const fluxFieldType&
phi,
287 const fluxFieldType& phiCorr,
291 if (experimentalDdtCorr)
294 fvcDdtPhiCoeffExperimental
312 const fluxFieldType&
phi
315 if (experimentalDdtCorr)
318 fvcDdtPhiCoeffExperimental
342 const fluxFieldType&
phi,
346 if (experimentalDdtCorr)
348 return fvcDdtPhiCoeffExperimental
358 return fvcDdtPhiCoeff
void setOriented(bool on=true) noexcept
Set the oriented flag: on/off.
Generic GeometricField class.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef().
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
bool eof() const noexcept
True if end of input seen.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Mesh data needed to do the Finite Volume discretisation.
static bool experimentalDdtCorr
Flag to use experimental ddtCorr from org version Default is off for backwards compatibility.
scalar ddtPhiCoeff_
Input for fvcDdtPhiCoeff.
static tmp< ddtScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return a pointer to a new ddtScheme created on freestore.
virtual tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)=0
tmp< surfaceScalarField > fvcDdtPhiCoeffExperimental(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi, const fluxFieldType &phiCorr)
const fvMesh & mesh() const
Return mesh reference.
virtual tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)=0
tmp< surfaceScalarField > fvcDdtPhiCoeff(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi, const fluxFieldType &phiCorr)
GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > fluxFieldType
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define InfoInFunction
Report an information message using Foam::Info.
Namespace for handling debugging switches.
Namespace for finite-volume.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.