mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TurbulenceModels/phaseCompressible: Up-cast the phase-system to twoPhaseSystem
This commit is contained in:
@ -134,7 +134,8 @@ NicenoKEqn<BasicTurbulenceModel>::gasTurbulence() const
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
const transportModel& liquid = this->transport();
|
const transportModel& liquid = this->transport();
|
||||||
const twoPhaseSystem& fluid = liquid.fluid();
|
const twoPhaseSystem& fluid =
|
||||||
|
refCast<const twoPhaseSystem>(liquid.fluid());
|
||||||
const transportModel& gas = fluid.otherPhase(liquid);
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
gasTurbulencePtr_ =
|
gasTurbulencePtr_ =
|
||||||
@ -175,7 +176,8 @@ tmp<volScalarField> NicenoKEqn<BasicTurbulenceModel>::bubbleG() const
|
|||||||
this->gasTurbulence();
|
this->gasTurbulence();
|
||||||
|
|
||||||
const transportModel& liquid = this->transport();
|
const transportModel& liquid = this->transport();
|
||||||
const twoPhaseSystem& fluid = liquid.fluid();
|
const twoPhaseSystem& fluid =
|
||||||
|
refCast<const twoPhaseSystem>(liquid.fluid());
|
||||||
const transportModel& gas = fluid.otherPhase(liquid);
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
|
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
|
||||||
|
|||||||
@ -109,7 +109,8 @@ SmagorinskyZhang<BasicTurbulenceModel>::gasTurbulence() const
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
const transportModel& liquid = this->transport();
|
const transportModel& liquid = this->transport();
|
||||||
const twoPhaseSystem& fluid = liquid.fluid();
|
const twoPhaseSystem& fluid =
|
||||||
|
refCast<const twoPhaseSystem>(liquid.fluid());
|
||||||
const transportModel& gas = fluid.otherPhase(liquid);
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
gasTurbulencePtr_ =
|
gasTurbulencePtr_ =
|
||||||
|
|||||||
@ -108,7 +108,8 @@ continuousGasKEqn<BasicTurbulenceModel>::liquidTurbulence() const
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid =
|
||||||
|
refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
const transportModel& liquid = fluid.otherPhase(gas);
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
liquidTurbulencePtr_ =
|
liquidTurbulencePtr_ =
|
||||||
|
|||||||
@ -145,7 +145,8 @@ LaheyKEpsilon<BasicTurbulenceModel>::gasTurbulence() const
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
const transportModel& liquid = this->transport();
|
const transportModel& liquid = this->transport();
|
||||||
const twoPhaseSystem& fluid = liquid.fluid();
|
const twoPhaseSystem& fluid =
|
||||||
|
refCast<const twoPhaseSystem>(liquid.fluid());
|
||||||
const transportModel& gas = fluid.otherPhase(liquid);
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
gasTurbulencePtr_ =
|
gasTurbulencePtr_ =
|
||||||
@ -186,7 +187,7 @@ tmp<volScalarField> LaheyKEpsilon<BasicTurbulenceModel>::bubbleG() const
|
|||||||
this->gasTurbulence();
|
this->gasTurbulence();
|
||||||
|
|
||||||
const transportModel& liquid = this->transport();
|
const transportModel& liquid = this->transport();
|
||||||
const twoPhaseSystem& fluid = liquid.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(liquid.fluid());
|
||||||
const transportModel& gas = fluid.otherPhase(liquid);
|
const transportModel& gas = fluid.otherPhase(liquid);
|
||||||
|
|
||||||
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
|
volScalarField magUr(mag(this->U_ - gasTurbulence.U()));
|
||||||
|
|||||||
@ -120,7 +120,7 @@ void continuousGasKEpsilon<BasicTurbulenceModel>::correctNut()
|
|||||||
|
|
||||||
const turbulenceModel& liquidTurbulence = this->liquidTurbulence();
|
const turbulenceModel& liquidTurbulence = this->liquidTurbulence();
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
const transportModel& liquid = fluid.otherPhase(gas);
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
volScalarField thetal(liquidTurbulence.k()/liquidTurbulence.epsilon());
|
volScalarField thetal(liquidTurbulence.k()/liquidTurbulence.epsilon());
|
||||||
@ -149,7 +149,8 @@ continuousGasKEpsilon<BasicTurbulenceModel>::liquidTurbulence() const
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid =
|
||||||
|
refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
const transportModel& liquid = fluid.otherPhase(gas);
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
liquidTurbulencePtr_ =
|
liquidTurbulencePtr_ =
|
||||||
@ -202,7 +203,7 @@ tmp<Foam::volScalarField>
|
|||||||
continuousGasKEpsilon<BasicTurbulenceModel>::rhoEff() const
|
continuousGasKEpsilon<BasicTurbulenceModel>::rhoEff() const
|
||||||
{
|
{
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
const transportModel& liquid = fluid.otherPhase(gas);
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
return tmp<volScalarField>
|
return tmp<volScalarField>
|
||||||
|
|||||||
@ -347,7 +347,8 @@ mixtureKEpsilon<BasicTurbulenceModel>::liquidTurbulence() const
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
|
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid =
|
||||||
|
refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
const transportModel& liquid = fluid.otherPhase(gas);
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
liquidTurbulencePtr_ =
|
liquidTurbulencePtr_ =
|
||||||
@ -375,7 +376,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::Ct2() const
|
|||||||
this->liquidTurbulence();
|
this->liquidTurbulence();
|
||||||
|
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
const transportModel& liquid = fluid.otherPhase(gas);
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
const volScalarField& alphag = this->alpha_;
|
const volScalarField& alphag = this->alpha_;
|
||||||
@ -399,7 +400,7 @@ template<class BasicTurbulenceModel>
|
|||||||
tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::rholEff() const
|
tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::rholEff() const
|
||||||
{
|
{
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
return fluid.otherPhase(gas).rho();
|
return fluid.otherPhase(gas).rho();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -408,7 +409,7 @@ template<class BasicTurbulenceModel>
|
|||||||
tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::rhogEff() const
|
tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::rhogEff() const
|
||||||
{
|
{
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
return
|
return
|
||||||
gas.rho()
|
gas.rho()
|
||||||
+ fluid.virtualMass(gas).Cvm()*fluid.otherPhase(gas).rho();
|
+ fluid.virtualMass(gas).Cvm()*fluid.otherPhase(gas).rho();
|
||||||
@ -484,7 +485,7 @@ tmp<volScalarField> mixtureKEpsilon<BasicTurbulenceModel>::bubbleG() const
|
|||||||
this->liquidTurbulence();
|
this->liquidTurbulence();
|
||||||
|
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
const transportModel& liquid = fluid.otherPhase(gas);
|
const transportModel& liquid = fluid.otherPhase(gas);
|
||||||
|
|
||||||
volScalarField magUr(mag(liquidTurbulence.U() - this->U()));
|
volScalarField magUr(mag(liquidTurbulence.U() - this->U()));
|
||||||
@ -531,7 +532,7 @@ template<class BasicTurbulenceModel>
|
|||||||
void mixtureKEpsilon<BasicTurbulenceModel>::correct()
|
void mixtureKEpsilon<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
const transportModel& gas = this->transport();
|
const transportModel& gas = this->transport();
|
||||||
const twoPhaseSystem& fluid = gas.fluid();
|
const twoPhaseSystem& fluid = refCast<const twoPhaseSystem>(gas.fluid());
|
||||||
|
|
||||||
// Only solve the mixture turbulence for the gas-phase
|
// Only solve the mixture turbulence for the gas-phase
|
||||||
if (&gas != &fluid.phase1())
|
if (&gas != &fluid.phase1())
|
||||||
|
|||||||
Reference in New Issue
Block a user