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>>
159 "ddt("+dt.
name()+
')',
160 mesh().time().timeName(),
181 tdtdt.
ref().primitiveFieldRef() =
218 "ddt("+vf.
name()+
')',
219 mesh().time().timeName(),
270 "ddt("+rho.
name()+
','+vf.
name()+
')',
271 mesh().time().timeName(),
303 rDeltaT*rho*(vf - vf.
oldTime())
322 "ddt("+rho.
name()+
','+vf.
name()+
')',
323 mesh().time().timeName(),
379 mesh().time().timeName(),
452 scalarField rDeltaT(SLrDeltaT()().primitiveField());
487 scalarField rDeltaT(SLrDeltaT()().primitiveField());
524 scalarField rDeltaT(SLrDeltaT()().primitiveField());
564 scalarField rDeltaT(SLrDeltaT()().primitiveField());
610 "ddtCorr(" + U.
name() +
',' + Uf.
name() +
')',
611 mesh().time().timeName(),
614 this->fvcDdtPhiCoeff(U.
oldTime(), phiUf0, phiCorr)
642 "ddtCorr(" + U.
name() +
',' + phi.
name() +
')',
643 mesh().time().timeName(),
686 mesh().time().timeName(),
689 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr, rho.
oldTime())
714 mesh().time().timeName(),
730 <<
"dimensions of Uf are not correct" 733 return fluxFieldType::null();
773 mesh().time().timeName(),
805 mesh().time().timeName(),
821 <<
"dimensions of phi are not correct" 824 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
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.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual 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.
virtual 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.
virtual 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
virtual 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...
virtual tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity