27 #include "surfaceInterpolate.H" 44 tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT()
const 48 tmp<volScalarField> tcorDeltaT
55 extrapolatedCalculatedFvPatchScalarField::typeName
66 corDeltaT[owner[facei]] =
67 max(corDeltaT[owner[facei]], cofrDeltaT[facei]);
69 corDeltaT[neighbour[facei]] =
70 max(corDeltaT[neighbour[facei]], cofrDeltaT[facei]);
74 cofrDeltaT.boundaryField();
79 const fvPatch& p = pcofrDeltaT.patch();
80 const labelUList& faceCells = p.patch().faceCells();
82 forAll(pcofrDeltaT, patchFacei)
84 corDeltaT[faceCells[patchFacei]] =
max 86 corDeltaT[faceCells[patchFacei]],
87 pcofrDeltaT[patchFacei]
92 corDeltaT.correctBoundaryConditions();
99 tmp<surfaceScalarField> CoEulerDdtScheme<Type>::CofrDeltaT()
const 104 static_cast<const objectRegistry&
>(
mesh())
105 .lookupObject<surfaceScalarField>(phiName_);
107 if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0))
116 return max(Co/maxCo_, scalar(1))/deltaT;
118 else if (phi.dimensions() == dimensionSet(1, 0, -1, 0, 0))
121 static_cast<const objectRegistry&
>(
mesh())
122 .lookupObject<volScalarField>(rhoName_).
oldTime();
131 return max(Co/maxCo_, scalar(1))/deltaT;
136 <<
"Incorrect dimensions of phi: " << phi.dimensions()
139 return tmp<surfaceScalarField>(
nullptr);
145 tmp<GeometricField<Type, fvPatchField, volMesh>>
153 const word ddtName(
"ddt("+dt.
name()+
')');
172 tdtdt.
ref().primitiveFieldRef() =
174 *(1.0 -
mesh().Vsc0()/
mesh().Vsc());
208 const word ddtName(
"ddt("+vf.
name()+
')');
253 const word ddtName(
"ddt("+rho.
name()+
','+vf.
name()+
')');
262 rDeltaT()*rho.
value()*
281 rDeltaT*rho*(vf - vf.
oldTime())
298 const word ddtName(
"ddt("+rho.
name()+
','+vf.
name()+
')');
415 const scalarField rDeltaT(CorDeltaT()().primitiveField());
450 const scalarField rDeltaT(CorDeltaT()().primitiveField());
487 const scalarField rDeltaT(CorDeltaT()().primitiveField());
527 const scalarField rDeltaT(CorDeltaT()().primitiveField());
569 "ddtCorr(" + U.
name() +
',' + Uf.
name() +
')',
570 this->fvcDdtPhiCoeff(U.
oldTime(), phiUf0, phiCorr)*rDeltaT*phiCorr
592 "ddtCorr(" + U.
name() +
',' + phi.
name() +
')',
626 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + Uf.
name() +
')',
627 this->fvcDdtPhiCoeff(rhoU0, phiUf0, phiCorr, rho.
oldTime())
645 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + Uf.
name() +
')',
658 <<
"dimensions of Uf are not correct" 661 return fluxFieldType::null();
695 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + phi.
name() +
')',
718 "ddtCorr(" + rho.
name() +
',' + U.
name() +
',' + phi.
name() +
')',
731 <<
"dimensions of phi are not correct" 734 return fluxFieldType::null();
fvsPatchField< scalar > fvsPatchScalarField
#define forAll(list, i)
Loop across all elements in list.
virtual tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const word & name() const
Return name.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
#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.
GeometricBoundaryField< scalar, fvsPatchField, surfaceMesh > Boundary
Type of the boundary field.
Generic dimensioned Type class.
UList< label > labelUList
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimTime
const dimensionSet & dimensions() const
Return dimensions.
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
virtual tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
const dimensionSet dimVol
const dimensionSet dimFlux
const dimensionSet dimDensity
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.
faceListList boundary(nPatches)
errorManip< error > abort(error &err)
Calculate the divergence of the given field.
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.
Internal & ref()
Return a reference to the dimensioned internal field.
virtual tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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
dimensioned< scalar > mag(const dimensioned< Type > &)
virtual tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const surfaceScalarField & deltaCoeffs() const
Return reference to cell-centre difference coefficients.