27 #include "surfaceInterpolate.H" 44 tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT()
const 48 tmp<volScalarField> tcorDeltaT
55 cofrDeltaT.instance(),
60 extrapolatedCalculatedFvPatchScalarField::typeName
71 corDeltaT[owner[facei]] =
72 max(corDeltaT[owner[facei]], cofrDeltaT[facei]);
74 corDeltaT[neighbour[facei]] =
75 max(corDeltaT[neighbour[facei]], cofrDeltaT[facei]);
78 const surfaceScalarField::Boundary& cofrDeltaTbf =
79 cofrDeltaT.boundaryField();
84 const fvPatch& p = pcofrDeltaT.patch();
85 const labelUList& faceCells = p.patch().faceCells();
87 forAll(pcofrDeltaT, patchFacei)
89 corDeltaT[faceCells[patchFacei]] =
max 91 corDeltaT[faceCells[patchFacei]],
92 pcofrDeltaT[patchFacei]
97 corDeltaT.correctBoundaryConditions();
104 tmp<surfaceScalarField> CoEulerDdtScheme<Type>::CofrDeltaT()
const 109 static_cast<const objectRegistry&
>(
mesh())
110 .lookupObject<surfaceScalarField>(phiName_);
112 if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
121 return max(Co/maxCo_, scalar(1))/deltaT;
123 else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
126 static_cast<const objectRegistry&
>(
mesh())
127 .lookupObject<volScalarField>(rhoName_).
oldTime();
136 return max(Co/maxCo_, scalar(1))/deltaT;
141 <<
"Incorrect dimensions of phi: " << phi.dimensions()
144 return tmp<surfaceScalarField>(
nullptr);
150 tmp<GeometricField<Type, fvPatchField, volMesh>>
160 "ddt("+dt.
name()+
')',
161 mesh().time().timeName(),
182 tdtdt.
ref().primitiveFieldRef() =
184 *(1.0 -
mesh().Vsc0()/
mesh().Vsc());
220 "ddt("+vf.
name()+
')',
221 mesh().time().timeName(),
272 "ddt("+rho.
name()+
','+vf.
name()+
')',
273 mesh().time().timeName(),
305 rDeltaT*rho*(vf - vf.
oldTime())
324 "ddt("+rho.
name()+
','+vf.
name()+
')',
325 mesh().time().timeName(),
381 mesh().time().timeName(),
454 scalarField rDeltaT(CorDeltaT()().primitiveField());
489 scalarField rDeltaT(CorDeltaT()().primitiveField());
526 scalarField rDeltaT(CorDeltaT()().primitiveField());
566 scalarField rDeltaT(CorDeltaT()().primitiveField());
612 "ddtCorr(" + U.
name() +
',' + Uf.
name() +
')',
613 mesh().time().timeName(),
616 this->fvcDdtPhiCoeff(U.
oldTime(), phiUf0, phiCorr)
644 "ddtCorr(" + U.
name() +
',' + phi.
name() +
')',
645 mesh().time().timeName(),
688 mesh().time().timeName(),
691 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr, rho.
oldTime())
716 mesh().time().timeName(),
732 <<
"dimensions of Uf are not correct" 735 return fluxFieldType::null();
775 mesh().time().timeName(),
807 mesh().time().timeName(),
823 <<
"dimensions of phi are not correct" 826 return fluxFieldType::null();
fvsPatchField< scalar > fvsPatchScalarField
#define forAll(list, i)
Loop across all elements in list.
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
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVolume(pow3(dimLength))
const dimensionSet & dimensions() const
Return dimensions.
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
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.
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 > &)
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