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_);
105 extrapolatedCalculatedFvPatchScalarField::typeName
111 relaxedDiag(rDeltaT, phi);
113 if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
115 rDeltaT.primitiveFieldRef() =
max 117 rDeltaT.primitiveField()/
mesh().V(),
118 scalar(1)/deltaT.value()
121 else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
124 mesh().objectRegistry::template lookupObject<volScalarField>
129 rDeltaT.primitiveFieldRef() =
max 131 rDeltaT.primitiveField()/(rho.primitiveField()*
mesh().V()),
132 scalar(1)/deltaT.value()
138 <<
"Incorrect dimensions of phi: " << phi.dimensions()
142 rDeltaT.correctBoundaryConditions();
149 tmp<GeometricField<Type, fvPatchField, volMesh>>
157 const word ddtName(
"ddt("+dt.
name()+
')');
176 tdtdt.
ref().primitiveFieldRef() =
211 const word ddtName(
"ddt("+vf.
name()+
')');
252 const word ddtName(
"ddt("+rho.
name()+
','+vf.
name()+
')');
276 rDeltaT*rho*(vf - vf.
oldTime())
293 const word ddtName(
"ddt("+rho.
name()+
','+vf.
name()+
')');
404 const scalarField rDeltaT(SLrDeltaT()().primitiveField());
439 const scalarField rDeltaT(SLrDeltaT()().primitiveField());
476 const scalarField rDeltaT(SLrDeltaT()().primitiveField());
516 const scalarField rDeltaT(SLrDeltaT()().primitiveField());
558 "ddtCorr(" + U.
name() +
',' + Uf.
name() +
')',
559 this->fvcDdtPhiCoeff(U.
oldTime(), phiUf0, phiCorr)
582 "ddtCorr(" + U.
name() +
',' + phi.
name() +
')',
616 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + Uf.
name() +
')',
617 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr, rho.
oldTime())
635 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + Uf.
name() +
')',
648 <<
"dimensions of Uf are not correct" 651 return fluxFieldType::null();
685 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + phi.
name() +
')',
708 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + phi.
name() +
')',
721 <<
"dimensions of phi are not correct" 724 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.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
const dimensionSet dimless
Generic dimensioned Type class.
UList< label > labelUList
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimVol
const dimensionSet dimFlux
const dimensionSet dimDensity
virtual tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
This boundary condition is not designed to be evaluated; it is assumed 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.
virtual tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
errorManip< error > abort(error &err)
const dimensionSet dimVelocity
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.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionSet & dimensions() const
Return const reference to dimensions.
const dimensionSet dimVolume
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
tmp< volScalarField > trDeltaT
virtual tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)