Commit 5459e8cd authored by Henry Weller's avatar Henry Weller
Browse files

reactingEulerFoam: Moved dilatation from AnisothermalPhaseModel to MovingPhaseModel

to support phase volume fraction changes due to pressure
parent 56eb6756
......@@ -37,7 +37,6 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::AnisothermalPhaseModel
)
:
BasePhaseModel(fluid, phaseName, index),
divU_(NULL),
K_
(
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>
const Foam::volScalarField&
Foam::AnisothermalPhaseModel<BasePhaseModel>::K() const
......
......@@ -54,9 +54,6 @@ class AnisothermalPhaseModel
{
// Private data
//- Dilatation rate
tmp<volScalarField> divU_;
//- Kinetic energy
volScalarField K_;
......@@ -94,12 +91,6 @@ public:
//- Return true if the phase is compressible otherwise false
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
virtual const volScalarField& K() const;
};
......
......@@ -174,6 +174,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel
fluid.mesh(),
dimensionedVector("0", dimAcceleration, vector::zero)
),
divU_(NULL),
turbulence_
(
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>
Foam::tmp<Foam::volScalarField>
Foam::MovingPhaseModel<BasePhaseModel>::continuityError() const
......
......@@ -80,6 +80,9 @@ class MovingPhaseModel
//- Lagrangian acceleration field (needed for virtual-mass)
volVectorField DUDt_;
//- Dilatation rate
tmp<volScalarField> divU_;
//- Turbulence model
autoPtr<phaseCompressibleTurbulenceModel> turbulence_;
......@@ -151,6 +154,12 @@ public:
//- Return the substantive acceleration
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
virtual tmp<volScalarField> continuityError() const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment