39 #include "surfaceInterpolate.H" 44 template<
class BasePhaseModel>
48 word phiName(IOobject::groupName(
"phi", this->
name()));
53 U.mesh().time().timeName(),
58 if (phiHeader.headerOk())
60 Info<<
"Reading face flux field " << phiName <<
endl;
62 return tmp<surfaceScalarField>
69 U.mesh().time().timeName(),
80 Info<<
"Calculating face flux field " << phiName <<
endl;
84 U.boundaryField().size(),
85 calculatedFvPatchScalarField::typeName
88 forAll(U.boundaryField(), i)
92 isA<fixedValueFvPatchVectorField>(U.boundaryField()[i])
93 || isA<slipFvPatchVectorField>(U.boundaryField()[i])
94 || isA<partialSlipFvPatchVectorField>(U.boundaryField()[i])
97 phiTypes[i] = fixedValueFvPatchScalarField::typeName;
101 return tmp<surfaceScalarField>
108 U.mesh().time().timeName(),
123 template<
class BasePhaseModel>
126 const phaseSystem& fluid,
127 const word& phaseName,
131 BasePhaseModel(fluid, phaseName, index),
136 IOobject::groupName(
"U", this->
name()),
149 IOobject::groupName(
"alphaPhi", this->
name()),
160 IOobject::groupName(
"alphaRhoPhi", this->
name()),
171 IOobject::groupName(
"DUDt", this->
name()),
195 IOobject::groupName(
"continuityError", this->
name()),
210 template<
class BasePhaseModel>
217 template<
class BasePhaseModel>
222 this->
fluid().MRF().correctBoundaryVelocity(U_);
228 - (this->
fluid().fvOptions()(*
this,
rho)&rho);
232 template<
class BasePhaseModel>
235 BasePhaseModel::correctKinematics();
241 template<
class BasePhaseModel>
244 BasePhaseModel::correctTurbulence();
246 turbulence_->correct();
250 template<
class BasePhaseModel>
253 BasePhaseModel::correctEnergyTransport();
254 turbulence_->correctEnergyTransport();
258 template<
class BasePhaseModel>
266 -
fvm::Sp(continuityError_, U_)
268 + turbulence_->divDevRhoReff(U_)
273 template<
class BasePhaseModel>
288 template<
class BasePhaseModel>
291 const tmp<surfaceScalarField>& DbyA
298 template<
class BasePhaseModel>
306 template<
class BasePhaseModel>
314 template<
class BasePhaseModel>
322 template<
class BasePhaseModel>
330 template<
class BasePhaseModel>
334 const tmp<volScalarField>&
divU 341 template<
class BasePhaseModel>
345 return continuityError_;
349 template<
class BasePhaseModel>
357 template<
class BasePhaseModel>
365 template<
class BasePhaseModel>
373 template<
class BasePhaseModel>
381 template<
class BasePhaseModel>
389 template<
class BasePhaseModel>
397 template<
class BasePhaseModel>
#define forAll(list, i)
Loop across all elements in list.
tmp< GeometricField< Type, fvPatchField, volMesh > > DDt(const surfaceScalarField &phi, const GeometricField< Type, fvPatchField, volMesh > &psi)
ThermalDiffusivity< PhaseCompressibleTurbulenceModel< phaseModel > > phaseCompressibleTurbulenceModel
Typedef for phaseCompressibleTurbulenceModel.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > Sp(const DimensionedField< scalar, volMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
MovingPhaseModel(const phaseSystem &fluid, const word &phaseName, const label index)
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void correctTurbulence()
Correct the turbulence.
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual const tmp< volScalarField > & divU() const
Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Calculate the first temporal derivative.
psiReactionThermo & thermo
const dimensionSet dimAcceleration
virtual ~MovingPhaseModel()
Destructor.
virtual const phaseCompressibleTurbulenceModel & turbulence() const
Return the turbulence model.
Calculate the face-flux of the given field.
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calulate the matrix for the first temporal derivative.
Calculate the divergence of the given field.
tmp< fvMatrix< Type > > div(const surfaceScalarField &flux, const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(psi *p+alphal *rhol0+((alphav *psiv+alphal *psil)-psi)*pSat, rhoMin);#1"/home/ubuntu/OpenFOAM-4.1/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H"1{alphav=max(min((rho-rholSat)/(rhovSat-rholSat), scalar(1)), scalar(0));alphal=1.0-alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
virtual tmp< surfaceScalarField > alphaPhi() const
Constant access the volumetric flux of the phase.
virtual void correct()
Correct the phase properties other than the thermo and turbulence.
word name(const complex &)
Return a string representation of a complex.
virtual void correctEnergyTransport()
Correct the energy transport e.g. alphat.
const dimensionSet dimDensity
static const GeometricField< scalar, fvsPatchField, surfaceMesh > & null()
Return a null geometric field.
Calculate the matrix for the divergence of the given field and flux.
List< word > wordList
A List of words.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual tmp< volVectorField > DUDt() const
Return the substantive acceleration.
virtual tmp< fvVectorMatrix > UEqn()
Return the momentum equation.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
virtual const surfaceScalarField & DbyA() const
Return the phase diffusivity divided by the momentum coefficient.
volScalarField divU(fvc::div(fvc::absolute(phi, U)))
virtual void correctKinematics()
Correct the kinematics.
virtual tmp< surfaceScalarField > phi() const
Constant access the volumetric flux.
A class for managing temporary objects.
tmp< surfaceScalarField > flux(const volVectorField &vvf)
Return the face-flux field obtained from the given volVectorField.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
virtual tmp< volVectorField > U() const
Constant access the velocity.
virtual tmp< volScalarField > continuityError() const
Constant access the continuity error.
Calculate the matrix for implicit and explicit sources.
virtual tmp< surfaceScalarField > alphaRhoPhi() const
Constant access the mass flux of the phase.