29#include "surfaceInterpolate.H"
45void SLTSDdtScheme<Type>::relaxedDiag
59 diag[owner[facei]] +=
phi[facei];
60 rD[neighbour[facei]] +=
phi[facei];
64 diag[neighbour[facei]] -=
phi[facei];
65 rD[owner[facei]] -=
phi[facei];
72 const labelUList& faceCells = pphi.patch().patch().faceCells();
76 if (pphi[patchFacei] > 0.0)
78 diag[faceCells[patchFacei]] += pphi[patchFacei];
82 rD[faceCells[patchFacei]] -= pphi[patchFacei];
87 rD += (1.0/alpha_ - 2.0)*
diag;
92tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT()
const
95 mesh().objectRegistry::template
96 lookupObject<surfaceScalarField>(phiName_);
112 extrapolatedCalculatedFvPatchScalarField::typeName
118 relaxedDiag(rDeltaT,
phi);
120 if (
phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
122 rDeltaT.primitiveFieldRef() =
max
124 rDeltaT.primitiveField()/
mesh().V(),
125 scalar(1)/deltaT.value()
128 else if (
phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
131 mesh().objectRegistry::template lookupObject<volScalarField>
136 rDeltaT.primitiveFieldRef() =
max
138 rDeltaT.primitiveField()/(
rho.primitiveField()*
mesh().V()),
139 scalar(1)/deltaT.value()
145 <<
"Incorrect dimensions of phi: " <<
phi.dimensions()
149 rDeltaT.correctBoundaryConditions();
156tmp<GeometricField<Type, fvPatchField, volMesh>>
166 "ddt("+dt.
name()+
')',
183 tdtdt.
ref().primitiveFieldRef() =
215 "ddt("+vf.
name()+
')',
267 "ddt("+
rho.name()+
','+vf.
name()+
')',
319 "ddt("+
rho.name()+
','+vf.
name()+
')',
336 -
rho.oldTime().primitiveField()
342 -
rho.oldTime().boundaryField()
392 alpha.primitiveField()
393 *
rho.primitiveField()
396 -
alpha.oldTime().primitiveField()
397 *
rho.oldTime().primitiveField()
402 alpha.boundaryField()
406 -
alpha.oldTime().boundaryField()
407 *
rho.oldTime().boundaryField()
449 scalarField rDeltaT(SLrDeltaT()().primitiveField());
484 scalarField rDeltaT(SLrDeltaT()().primitiveField());
521 scalarField rDeltaT(SLrDeltaT()().primitiveField());
523 fvm.
diag() = rDeltaT*
rho.primitiveField()*
mesh().V();
528 *
rho.oldTime().primitiveField()
534 *
rho.oldTime().primitiveField()
561 scalarField rDeltaT(SLrDeltaT()().primitiveField());
564 rDeltaT*
alpha.primitiveField()*
rho.primitiveField()*
mesh().Vsc();
569 *
alpha.oldTime().primitiveField()
570 *
rho.oldTime().primitiveField()
576 *
alpha.oldTime().primitiveField()
577 *
rho.oldTime().primitiveField()
607 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
611 this->fvcDdtPhiCoeff(
U.oldTime(), phiUf0, phiCorr)
639 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
643 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime(), phiCorr)
669 rho.oldTime()*
U.oldTime()
682 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
686 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr,
rho.oldTime())
710 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
727 <<
"dimensions of Uf are not correct"
754 rho.oldTime()*
U.oldTime()
769 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
801 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
818 <<
"dimensions of phi are not correct"
850 tmeshPhi.
ref().setOriented();
const dimensionSet & dimensions() const
Return dimensions.
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
Generic dimensioned Type class.
const dimensionSet & dimensions() const
Return const reference to dimensions.
const Type & value() const
Return const reference to value.
const word & name() const
Return const reference to name.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Field< Type > & source() noexcept
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
A class for managing temporary objects.
tmp< volScalarField > trDeltaT
autoPtr< surfaceVectorField > Uf
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
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.
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVolume(pow3(dimLength))
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
const dimensionSet dimDensity
UList< label > labelUList
A UList of labels.
fvsPatchField< scalar > fvsPatchScalarField
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.
#define forAll(list, i)
Loop across all elements in list.