27 #include "surfaceInterpolate.H" 43 void SLTSDdtScheme<Type>::relaxedDiag
57 diag[owner[facei]] += phi[facei];
58 rD[neighbour[facei]] += phi[facei];
62 diag[neighbour[facei]] -= phi[facei];
63 rD[owner[facei]] -= phi[facei];
70 const labelUList& faceCells = pphi.patch().patch().faceCells();
74 if (pphi[patchFacei] > 0.0)
76 diag[faceCells[patchFacei]] += pphi[patchFacei];
80 rD[faceCells[patchFacei]] -= pphi[patchFacei];
85 rD += (1.0/alpha_ - 2.0)*
diag;
90 tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT()
const 93 mesh().objectRegistry::template
94 lookupObject<surfaceScalarField>(phiName_);
110 extrapolatedCalculatedFvPatchScalarField::typeName
116 relaxedDiag(rDeltaT, phi);
118 if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
120 rDeltaT.primitiveFieldRef() =
max 122 rDeltaT.primitiveField()/
mesh().V(),
123 scalar(1)/deltaT.value()
126 else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
129 mesh().objectRegistry::template lookupObject<volScalarField>
134 rDeltaT.primitiveFieldRef() =
max 136 rDeltaT.primitiveField()/(rho.primitiveField()*
mesh().V()),
137 scalar(1)/deltaT.value()
143 <<
"Incorrect dimensions of phi: " << phi.dimensions()
147 rDeltaT.correctBoundaryConditions();
154 tmp<GeometricField<Type, fvPatchField, volMesh>>
164 "ddt("+dt.
name()+
')',
165 mesh().time().timeName(),
186 tdtdt.
ref().primitiveFieldRef() =
223 "ddt("+vf.
name()+
')',
224 mesh().time().timeName(),
275 "ddt("+rho.
name()+
','+vf.
name()+
')',
276 mesh().time().timeName(),
308 rDeltaT*rho*(vf - vf.
oldTime())
327 "ddt("+rho.
name()+
','+vf.
name()+
')',
328 mesh().time().timeName(),
384 mesh().time().timeName(),
457 scalarField rDeltaT(SLrDeltaT()().primitiveField());
492 scalarField rDeltaT(SLrDeltaT()().primitiveField());
529 scalarField rDeltaT(SLrDeltaT()().primitiveField());
569 scalarField rDeltaT(SLrDeltaT()().primitiveField());
615 "ddtCorr(" + U.
name() +
',' + Uf.
name() +
')',
616 mesh().time().timeName(),
619 this->fvcDdtPhiCoeff(U.
oldTime(), phiUf0, phiCorr)
647 "ddtCorr(" + U.
name() +
',' + phi.
name() +
')',
648 mesh().time().timeName(),
691 mesh().time().timeName(),
694 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr, rho.
oldTime())
719 mesh().time().timeName(),
735 <<
"dimensions of Uf are not correct" 738 return fluxFieldType::null();
778 mesh().time().timeName(),
810 mesh().time().timeName(),
826 <<
"dimensions of phi are not correct" 829 return fluxFieldType::null();
fvsPatchField< scalar > fvsPatchScalarField
#define forAll(list, i)
Loop across all elements in list.
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.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
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.
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
errorManip< error > abort(error &err)
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
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
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.
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
tmp< volScalarField > trDeltaT
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity