Go to the documentation of this file.
29 #include "surfaceInterpolate.H"
45 void 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;
92 tmp<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();
156 tmp<GeometricField<Type, fvPatchField, volMesh>>
166 "ddt("+dt.
name()+
')',
167 mesh().time().timeName(),
183 tdtdt.
ref().primitiveFieldRef() =
215 "ddt("+vf.name()+
')',
216 mesh().time().timeName(),
228 rDeltaT.dimensions()*vf.dimensions(),
267 "ddt("+
rho.name()+
','+vf.name()+
')',
268 mesh().time().timeName(),
280 rDeltaT.dimensions()*
rho.dimensions()*vf.dimensions(),
319 "ddt("+
rho.name()+
','+vf.name()+
')',
320 mesh().time().timeName(),
332 rDeltaT.dimensions()*
rho.dimensions()*vf.dimensions(),
336 -
rho.oldTime().primitiveField()
342 -
rho.oldTime().boundaryField()
376 mesh().time().timeName(),
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());
451 fvm.diag() = rDeltaT*
mesh().V();
484 scalarField rDeltaT(SLrDeltaT()().primitiveField());
486 fvm.diag() = rDeltaT*
rho.value()*
mesh().V();
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() +
')',
608 mesh().time().timeName(),
611 this->fvcDdtPhiCoeff(
U.oldTime(), phiUf0, phiCorr)
639 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
640 mesh().time().timeName(),
643 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime(), phiCorr)
669 rho.oldTime()*
U.oldTime()
682 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
683 mesh().time().timeName(),
686 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr,
rho.oldTime())
710 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
711 mesh().time().timeName(),
727 <<
"dimensions of Uf are not correct"
730 return fluxFieldType::null();
754 rho.oldTime()*
U.oldTime()
769 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
770 mesh().time().timeName(),
801 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
802 mesh().time().timeName(),
818 <<
"dimensions of phi are not correct"
821 return fluxFieldType::null();
850 tmeshPhi.
ref().setOriented();
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity
const dimensionSet dimDensity
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
fvsPatchField< scalar > fvsPatchScalarField
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
autoPtr< surfaceVectorField > Uf
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
const word & name() const
Return const reference to name.
const Type & value() const
Return const reference to value.
#define forAll(list, i)
Loop across all elements in list.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
const dimensionSet dimArea(sqr(dimLength))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Generic dimensioned Type class.
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...
errorManip< error > abort(error &err)
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
A special matrix type and solver, designed for finite volume solutions of scalar equations....
tmp< volScalarField > trDeltaT
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
UList< label > labelUList
A UList of labels.
const dimensionSet & dimensions() const
Return const reference to dimensions.
const dimensionSet dimVolume(pow3(dimLength))
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const dimensionSet dimless
Dimensionless.