27 #include "surfaceInterpolate.H" 44 tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT()
const 48 tmp<volScalarField> tcorDeltaT
55 extrapolatedCalculatedFvPatchScalarField::typeName
66 corDeltaT[owner[facei]] =
67 max(corDeltaT[owner[facei]], cofrDeltaT[facei]);
69 corDeltaT[neighbour[facei]] =
70 max(corDeltaT[neighbour[facei]], cofrDeltaT[facei]);
73 const surfaceScalarField::Boundary& cofrDeltaTbf =
74 cofrDeltaT.boundaryField();
79 const fvPatch& p = pcofrDeltaT.patch();
80 const labelUList& faceCells = p.patch().faceCells();
82 forAll(pcofrDeltaT, patchFacei)
84 corDeltaT[faceCells[patchFacei]] =
max 86 corDeltaT[faceCells[patchFacei]],
87 pcofrDeltaT[patchFacei]
92 corDeltaT.correctBoundaryConditions();
99 tmp<surfaceScalarField> CoEulerDdtScheme<Type>::CofrDeltaT()
const 104 static_cast<const objectRegistry&
>(
mesh())
105 .lookupObject<surfaceScalarField>(phiName_);
107 if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
116 return max(Co/maxCo_, scalar(1))/deltaT;
118 else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
121 static_cast<const objectRegistry&
>(
mesh())
122 .lookupObject<volScalarField>(rhoName_).
oldTime();
131 return max(Co/maxCo_, scalar(1))/deltaT;
136 <<
"Incorrect dimensions of phi: " << phi.dimensions()
139 return tmp<surfaceScalarField>(
nullptr);
145 tmp<GeometricField<Type, fvPatchField, volMesh>>
155 "ddt("+dt.
name()+
')',
156 mesh().time().timeName(),
177 tdtdt.
ref().primitiveFieldRef() =
179 *(1.0 -
mesh().Vsc0()/
mesh().Vsc());
215 "ddt("+vf.
name()+
')',
216 mesh().time().timeName(),
267 "ddt("+rho.
name()+
','+vf.
name()+
')',
268 mesh().time().timeName(),
300 rDeltaT*rho*(vf - vf.
oldTime())
319 "ddt("+rho.
name()+
','+vf.
name()+
')',
320 mesh().time().timeName(),
376 mesh().time().timeName(),
449 scalarField rDeltaT(CorDeltaT()().primitiveField());
484 scalarField rDeltaT(CorDeltaT()().primitiveField());
521 scalarField rDeltaT(CorDeltaT()().primitiveField());
561 scalarField rDeltaT(CorDeltaT()().primitiveField());
607 "ddtCorr(" + U.
name() +
',' + Uf.
name() +
')',
608 mesh().time().timeName(),
611 this->fvcDdtPhiCoeff(U.
oldTime(), phiUf0, phiCorr)
639 "ddtCorr(" + U.
name() +
',' + phi.
name() +
')',
640 mesh().time().timeName(),
683 mesh().time().timeName(),
686 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr, rho.
oldTime())
711 mesh().time().timeName(),
727 <<
"dimensions of Uf are not correct" 730 return fluxFieldType::null();
770 mesh().time().timeName(),
802 mesh().time().timeName(),
818 <<
"dimensions of phi are not correct" 821 return fluxFieldType::null();
fvsPatchField< scalar > fvsPatchScalarField
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
const word & name() const
Return name.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
const dimensionSet dimVol(dimVolume)
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Generic dimensioned Type class.
UList< label > labelUList
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Mesh &, const dimensionSet &, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
Return a temporary field constructed from name, mesh, dimensionSet.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
const dimensionSet & dimensions() const
Return dimensions.
virtual tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
virtual tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
const Type & value() const
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
errorManip< error > abort(error &err)
Calculate the divergence of the given field.
const word & name() const
Return const reference to name.
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.
const dimensionSet dimDensity
Internal & ref()
Return a reference to the dimensioned internal field.
virtual tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionSet & dimensions() const
Return const reference to dimensions.
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity