29#include "surfaceInterpolate.H"
46tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT()
const
50 tmp<volScalarField> tcorDeltaT
57 cofrDeltaT.instance(),
62 extrapolatedCalculatedFvPatchScalarField::typeName
73 corDeltaT[owner[facei]] =
74 max(corDeltaT[owner[facei]], cofrDeltaT[facei]);
76 corDeltaT[neighbour[facei]] =
77 max(corDeltaT[neighbour[facei]], cofrDeltaT[facei]);
81 cofrDeltaT.boundaryField();
83 forAll(cofrDeltaTbf, patchi)
86 const fvPatch&
p = pcofrDeltaT.patch();
87 const labelUList& faceCells =
p.patch().faceCells();
89 forAll(pcofrDeltaT, patchFacei)
91 corDeltaT[faceCells[patchFacei]] =
max
93 corDeltaT[faceCells[patchFacei]],
94 pcofrDeltaT[patchFacei]
99 corDeltaT.correctBoundaryConditions();
106tmp<surfaceScalarField> CoEulerDdtScheme<Type>::CofrDeltaT()
const
111 static_cast<const objectRegistry&
>(
mesh())
112 .lookupObject<surfaceScalarField>(phiName_);
114 if (
phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
123 return max(Co/maxCo_, scalar(1))/deltaT;
125 else if (
phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
128 static_cast<const objectRegistry&
>(
mesh())
129 .lookupObject<volScalarField>(rhoName_).oldTime();
138 return max(Co/maxCo_, scalar(1))/deltaT;
142 <<
"Incorrect dimensions of phi: " <<
phi.dimensions()
150tmp<GeometricField<Type, fvPatchField, volMesh>>
160 "ddt("+dt.
name()+
')',
177 tdtdt.
ref().primitiveFieldRef() =
179 *(1.0 -
mesh().Vsc0()/
mesh().Vsc());
210 "ddt("+vf.
name()+
')',
262 "ddt("+
rho.name()+
','+vf.
name()+
')',
314 "ddt("+
rho.name()+
','+vf.
name()+
')',
331 -
rho.oldTime().primitiveField()
337 -
rho.oldTime().boundaryField()
387 alpha.primitiveField()
388 *
rho.primitiveField()
391 -
alpha.oldTime().primitiveField()
392 *
rho.oldTime().primitiveField()
397 alpha.boundaryField()
401 -
alpha.oldTime().boundaryField()
402 *
rho.oldTime().boundaryField()
444 scalarField rDeltaT(CorDeltaT()().primitiveField());
479 scalarField rDeltaT(CorDeltaT()().primitiveField());
516 scalarField rDeltaT(CorDeltaT()().primitiveField());
518 fvm.
diag() = rDeltaT*
rho.primitiveField()*
mesh().Vsc();
523 *
rho.oldTime().primitiveField()
529 *
rho.oldTime().primitiveField()
556 scalarField rDeltaT(CorDeltaT()().primitiveField());
559 rDeltaT*
alpha.primitiveField()*
rho.primitiveField()*
mesh().Vsc();
564 *
alpha.oldTime().primitiveField()
565 *
rho.oldTime().primitiveField()
571 *
alpha.oldTime().primitiveField()
572 *
rho.oldTime().primitiveField()
602 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
606 this->fvcDdtPhiCoeff(
U.oldTime(), phiUf0, phiCorr)
634 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
638 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime(), phiCorr)
664 rho.oldTime()*
U.oldTime()
677 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
681 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr,
rho.oldTime())
705 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
722 <<
"dimensions of Uf are not correct"
749 rho.oldTime()*
U.oldTime()
764 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
796 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
813 <<
"dimensions of phi are not correct"
845 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.
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of boundary fields.
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< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
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 > &)
virtual const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.
A class for managing temporary objects.
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.
Calculate the divergence of the given field.
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 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
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVolume(pow3(dimLength))
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.