diff --git a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C index 3cddd50af5..e35ad01340 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C @@ -134,7 +134,8 @@ NicenoKEqn::gasTurbulence() const const volVectorField& U = this->U_; const transportModel& liquid = this->transport(); - const twoPhaseSystem& fluid = liquid.fluid(); + const twoPhaseSystem& fluid = + refCast(liquid.fluid()); const transportModel& gas = fluid.otherPhase(liquid); gasTurbulencePtr_ = @@ -175,7 +176,8 @@ tmp NicenoKEqn::bubbleG() const this->gasTurbulence(); const transportModel& liquid = this->transport(); - const twoPhaseSystem& fluid = liquid.fluid(); + const twoPhaseSystem& fluid = + refCast(liquid.fluid()); const transportModel& gas = fluid.otherPhase(liquid); volScalarField magUr(mag(this->U_ - gasTurbulence.U())); diff --git a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C index 688a570030..47b0d4ff75 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C +++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C @@ -109,7 +109,8 @@ SmagorinskyZhang::gasTurbulence() const const volVectorField& U = this->U_; const transportModel& liquid = this->transport(); - const twoPhaseSystem& fluid = liquid.fluid(); + const twoPhaseSystem& fluid = + refCast(liquid.fluid()); const transportModel& gas = fluid.otherPhase(liquid); gasTurbulencePtr_ = diff --git a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C index 96c1ad8808..c4d2efe6da 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C @@ -108,7 +108,8 @@ continuousGasKEqn::liquidTurbulence() const const volVectorField& U = this->U_; const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = + refCast(gas.fluid()); const transportModel& liquid = fluid.otherPhase(gas); liquidTurbulencePtr_ = diff --git a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C index e9e02edf46..7c3b6a8aa9 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C @@ -145,7 +145,8 @@ LaheyKEpsilon::gasTurbulence() const const volVectorField& U = this->U_; const transportModel& liquid = this->transport(); - const twoPhaseSystem& fluid = liquid.fluid(); + const twoPhaseSystem& fluid = + refCast(liquid.fluid()); const transportModel& gas = fluid.otherPhase(liquid); gasTurbulencePtr_ = @@ -186,7 +187,7 @@ tmp LaheyKEpsilon::bubbleG() const this->gasTurbulence(); const transportModel& liquid = this->transport(); - const twoPhaseSystem& fluid = liquid.fluid(); + const twoPhaseSystem& fluid = refCast(liquid.fluid()); const transportModel& gas = fluid.otherPhase(liquid); volScalarField magUr(mag(this->U_ - gasTurbulence.U())); diff --git a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C index 0ae2dcff36..8d5f216dd2 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C @@ -120,7 +120,7 @@ void continuousGasKEpsilon::correctNut() const turbulenceModel& liquidTurbulence = this->liquidTurbulence(); const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = refCast(gas.fluid()); const transportModel& liquid = fluid.otherPhase(gas); volScalarField thetal(liquidTurbulence.k()/liquidTurbulence.epsilon()); @@ -149,7 +149,8 @@ continuousGasKEpsilon::liquidTurbulence() const const volVectorField& U = this->U_; const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = + refCast(gas.fluid()); const transportModel& liquid = fluid.otherPhase(gas); liquidTurbulencePtr_ = @@ -202,7 +203,7 @@ tmp continuousGasKEpsilon::rhoEff() const { const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = refCast(gas.fluid()); const transportModel& liquid = fluid.otherPhase(gas); return tmp diff --git a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C index 453ca45dd2..f0b8a4f537 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C @@ -347,7 +347,8 @@ mixtureKEpsilon::liquidTurbulence() const const volVectorField& U = this->U_; const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = + refCast(gas.fluid()); const transportModel& liquid = fluid.otherPhase(gas); liquidTurbulencePtr_ = @@ -375,7 +376,7 @@ tmp mixtureKEpsilon::Ct2() const this->liquidTurbulence(); const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = refCast(gas.fluid()); const transportModel& liquid = fluid.otherPhase(gas); const volScalarField& alphag = this->alpha_; @@ -399,7 +400,7 @@ template tmp mixtureKEpsilon::rholEff() const { const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = refCast(gas.fluid()); return fluid.otherPhase(gas).rho(); } @@ -408,7 +409,7 @@ template tmp mixtureKEpsilon::rhogEff() const { const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = refCast(gas.fluid()); return gas.rho() + fluid.virtualMass(gas).Cvm()*fluid.otherPhase(gas).rho(); @@ -484,7 +485,7 @@ tmp mixtureKEpsilon::bubbleG() const this->liquidTurbulence(); const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = refCast(gas.fluid()); const transportModel& liquid = fluid.otherPhase(gas); volScalarField magUr(mag(liquidTurbulence.U() - this->U())); @@ -531,7 +532,7 @@ template void mixtureKEpsilon::correct() { const transportModel& gas = this->transport(); - const twoPhaseSystem& fluid = gas.fluid(); + const twoPhaseSystem& fluid = refCast(gas.fluid()); // Only solve the mixture turbulence for the gas-phase if (&gas != &fluid.phase1())