mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
reactingEulerFoam: Moved dilatation from AnisothermalPhaseModel to MovingPhaseModel
to support phase volume fraction changes due to pressure
This commit is contained in:
@ -37,7 +37,6 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::AnisothermalPhaseModel
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
BasePhaseModel(fluid, phaseName, index),
|
BasePhaseModel(fluid, phaseName, index),
|
||||||
divU_(NULL),
|
|
||||||
K_
|
K_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -133,25 +132,6 @@ bool Foam::AnisothermalPhaseModel<BasePhaseModel>::compressible() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasePhaseModel>
|
|
||||||
const Foam::tmp<Foam::volScalarField>&
|
|
||||||
Foam::AnisothermalPhaseModel<BasePhaseModel>::divU() const
|
|
||||||
{
|
|
||||||
return divU_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasePhaseModel>
|
|
||||||
void
|
|
||||||
Foam::AnisothermalPhaseModel<BasePhaseModel>::divU
|
|
||||||
(
|
|
||||||
const tmp<volScalarField>& divU
|
|
||||||
)
|
|
||||||
{
|
|
||||||
divU_ = divU;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class BasePhaseModel>
|
template<class BasePhaseModel>
|
||||||
const Foam::volScalarField&
|
const Foam::volScalarField&
|
||||||
Foam::AnisothermalPhaseModel<BasePhaseModel>::K() const
|
Foam::AnisothermalPhaseModel<BasePhaseModel>::K() const
|
||||||
|
|||||||
@ -54,9 +54,6 @@ class AnisothermalPhaseModel
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Dilatation rate
|
|
||||||
tmp<volScalarField> divU_;
|
|
||||||
|
|
||||||
//- Kinetic energy
|
//- Kinetic energy
|
||||||
volScalarField K_;
|
volScalarField K_;
|
||||||
|
|
||||||
@ -94,12 +91,6 @@ public:
|
|||||||
//- Return true if the phase is compressible otherwise false
|
//- Return true if the phase is compressible otherwise false
|
||||||
virtual bool compressible() const;
|
virtual bool compressible() const;
|
||||||
|
|
||||||
//- Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
|
|
||||||
virtual const tmp<volScalarField>& divU() const;
|
|
||||||
|
|
||||||
//- Set the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
|
|
||||||
virtual void divU(const tmp<volScalarField>& divU);
|
|
||||||
|
|
||||||
//- Return the phase kinetic energy
|
//- Return the phase kinetic energy
|
||||||
virtual const volScalarField& K() const;
|
virtual const volScalarField& K() const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -174,6 +174,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
|
|||||||
fluid.mesh(),
|
fluid.mesh(),
|
||||||
dimensionedVector("0", dimAcceleration, vector::zero)
|
dimensionedVector("0", dimAcceleration, vector::zero)
|
||||||
),
|
),
|
||||||
|
divU_(NULL),
|
||||||
turbulence_
|
turbulence_
|
||||||
(
|
(
|
||||||
phaseCompressibleTurbulenceModel::New
|
phaseCompressibleTurbulenceModel::New
|
||||||
@ -317,6 +318,25 @@ Foam::MovingPhaseModel<BasePhaseModel>::DUDt() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
const Foam::tmp<Foam::volScalarField>&
|
||||||
|
Foam::MovingPhaseModel<BasePhaseModel>::divU() const
|
||||||
|
{
|
||||||
|
return divU_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class BasePhaseModel>
|
||||||
|
void
|
||||||
|
Foam::MovingPhaseModel<BasePhaseModel>::divU
|
||||||
|
(
|
||||||
|
const tmp<volScalarField>& divU
|
||||||
|
)
|
||||||
|
{
|
||||||
|
divU_ = divU;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class BasePhaseModel>
|
template<class BasePhaseModel>
|
||||||
Foam::tmp<Foam::volScalarField>
|
Foam::tmp<Foam::volScalarField>
|
||||||
Foam::MovingPhaseModel<BasePhaseModel>::continuityError() const
|
Foam::MovingPhaseModel<BasePhaseModel>::continuityError() const
|
||||||
|
|||||||
@ -80,6 +80,9 @@ class MovingPhaseModel
|
|||||||
//- Lagrangian acceleration field (needed for virtual-mass)
|
//- Lagrangian acceleration field (needed for virtual-mass)
|
||||||
volVectorField DUDt_;
|
volVectorField DUDt_;
|
||||||
|
|
||||||
|
//- Dilatation rate
|
||||||
|
tmp<volScalarField> divU_;
|
||||||
|
|
||||||
//- Turbulence model
|
//- Turbulence model
|
||||||
autoPtr<phaseCompressibleTurbulenceModel> turbulence_;
|
autoPtr<phaseCompressibleTurbulenceModel> turbulence_;
|
||||||
|
|
||||||
@ -151,6 +154,12 @@ public:
|
|||||||
//- Return the substantive acceleration
|
//- Return the substantive acceleration
|
||||||
virtual tmp<volVectorField> DUDt() const;
|
virtual tmp<volVectorField> DUDt() const;
|
||||||
|
|
||||||
|
//- Return the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
|
||||||
|
virtual const tmp<volScalarField>& divU() const;
|
||||||
|
|
||||||
|
//- Set the phase dilatation rate (d(alpha)/dt + div(alpha*phi))
|
||||||
|
virtual void divU(const tmp<volScalarField>& divU);
|
||||||
|
|
||||||
//- Constant access the continuity error
|
//- Constant access the continuity error
|
||||||
virtual tmp<volScalarField> continuityError() const;
|
virtual tmp<volScalarField> continuityError() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user