From be02e72220cd78e30a9a3608313ecc4bc69ecd19 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 15 Feb 2018 16:22:00 +0000 Subject: [PATCH] phaseModels: Buried turbulence modelling --- ...ayatillekeWallFunctionFvPatchScalarField.C | 6 +- ...allBoilingWallFunctionFvPatchScalarField.C | 24 ++++- ...ixedMultiPhaseHeatFluxFvPatchScalarField.C | 11 +-- .../KocamustafaogullariIshii.C | 7 +- .../departureFrequencyModels/Cole/Cole.C | 9 +- .../turbulentDispersionModels/Burns/Burns.C | 13 ++- .../turbulentDispersionModels/Gosman/Gosman.C | 5 +- .../LopezDeBertodano/LopezDeBertodano.C | 4 +- .../constantTurbulentDispersionCoefficient.C | 4 +- .../turbulentDispersionModel.C | 18 +++- .../turbulentDispersionModel.H | 6 +- .../AnisothermalPhaseModel.C | 4 +- .../MovingPhaseModel/MovingPhaseModel.C | 89 ++++++++++++++++++- .../MovingPhaseModel/MovingPhaseModel.H | 40 ++++++++- .../MultiComponentPhaseModel.C | 4 +- .../phaseModel/phaseModel/phaseModel.H | 51 +++++++++-- .../reactingMultiphaseEulerFoam/pUf/UEqns.H | 2 +- .../reactingTwoPhaseEulerFoam/pU/pEqn.H | 4 +- .../reactingTwoPhaseEulerFoam/pUf/UEqns.H | 4 +- .../reactingTwoPhaseEulerFoam/pUf/pEqn.H | 4 +- .../IATE/IATEsources/IATEsource/IATEsource.C | 2 +- 21 files changed, 241 insertions(+), 70 deletions(-) diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C index f6d8e847c..4372952c8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C @@ -132,7 +132,11 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat const label patchi = patch().index(); // Retrieve turbulence properties from model - const phaseCompressibleTurbulenceModel& turbModel = phase.turbulence(); + const phaseCompressibleTurbulenceModel& turbModel = + db().lookupObject + ( + IOobject::groupName(turbulenceModel::propertiesName, phase.name()) + ); const scalar Cmu25 = pow025(Cmu_); diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C index 4146e24fa..312d4d328 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C @@ -408,9 +408,25 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() const phaseModel& vapor(fluid.phases()[otherPhaseName_]); - // Retrieve turbulence properties from model + // Retrieve turbulence properties from models const phaseCompressibleTurbulenceModel& turbModel = - liquid.turbulence(); + db().lookupObject + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + liquid.name() + ) + ); + const phaseCompressibleTurbulenceModel& vaporTurbModel = + db().lookupObject + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + vapor.name() + ) + ); const tmp tnutw = turbModel.nut(patchi); @@ -457,10 +473,10 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs() const scalarField yPlusTherm(this->yPlusTherm(P, Prat)); const fvPatchScalarField& rhoLiquidw = - liquid.turbulence().rho().boundaryField()[patchi]; + turbModel.rho().boundaryField()[patchi]; const fvPatchScalarField& rhoVaporw = - vapor.turbulence().rho().boundaryField()[patchi]; + vaporTurbModel.rho().boundaryField()[patchi]; tmp tCp = liquid.thermo().Cp(); const volScalarField& Cp = tCp(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C index a5e5edba9..bc270ce28 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,14 +139,7 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs() const fvPatchScalarField& T = thermo.T().boundaryField()[patch().index()]; - const scalarField kappaEff - ( - thermo.kappaEff - ( - phase.turbulence().alphat(patch().index()), - patch().index() - ) - ); + const scalarField kappaEff(phase.kappaEff(patch().index())); if (debug) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C index 11a0d9ec4..1cd17644a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureDiameterModels/KocamustafaogullariIshii/KocamustafaogullariIshii.C @@ -89,11 +89,8 @@ KocamustafaogullariIshii::dDeparture const uniformDimensionedVectorField& g = liquid.mesh().lookupObject("g"); - const fvPatchScalarField& rhoLiquid = - liquid.turbulence().rho().boundaryField()[patchi]; - - const fvPatchScalarField& rhoVapor = - vapor.turbulence().rho().boundaryField()[patchi]; + const scalarField rhoLiquid(liquid.thermo().rho(patchi)); + const scalarField rhoVapor(vapor.thermo().rho(patchi)); const scalarField rhoM((rhoLiquid - rhoVapor)/rhoVapor); diff --git a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C index 7cbe774a1..aec77d9f4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C +++ b/applications/solvers/multiphase/reactingEulerFoam/derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Cole/Cole.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,11 +82,8 @@ Cole::fDeparture const uniformDimensionedVectorField& g = liquid.mesh().lookupObject("g"); - const fvPatchScalarField& rhoLiquid = - liquid.turbulence().rho().boundaryField()[patchi]; - - const fvPatchScalarField& rhoVapor = - vapor.turbulence().rho().boundaryField()[patchi]; + const scalarField rhoLiquid(liquid.thermo().rho(patchi)); + const scalarField rhoVapor(vapor.thermo().rho(patchi)); return sqrt ( diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C index d06a7929f..461946591 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Burns/Burns.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,20 +82,17 @@ Foam::tmp Foam::turbulentDispersionModels::Burns::D() const { const fvMesh& mesh(pair_.phase1().mesh()); - const dragModel& - drag + const dragModel& drag = + mesh.lookupObject ( - mesh.lookupObject - ( - IOobject::groupName(dragModel::typeName, pair_.name()) - ) + IOobject::groupName(dragModel::typeName, pair_.name()) ); return 0.75 *drag.CdRe() *pair_.continuous().nu() - *pair_.continuous().turbulence().nut() + *continuousTurbulence().nut() /( sigma_ *sqr(pair_.dispersed().d()) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C index 98463216e..e153c9806 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/Gosman/Gosman.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,7 +27,6 @@ License #include "phasePair.H" #include "phaseCompressibleTurbulenceModel.H" #include "addToRunTimeSelectionTable.H" - #include "dragModel.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -86,7 +85,7 @@ Foam::turbulentDispersionModels::Gosman::D() const *drag.CdRe() *pair_.dispersed() *pair_.continuous().nu() - *pair_.continuous().turbulence().nut() + *continuousTurbulence().nut() /( sigma_ *sqr(pair_.dispersed().d()) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C index 68c0e1627..79199240c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/LopezDeBertodano/LopezDeBertodano.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ Foam::turbulentDispersionModels::LopezDeBertodano::D() const return Ctd_ *pair_.continuous().rho() - *pair_.continuous().turbulence().k(); + *continuousTurbulence().k(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C index 548856146..3f72ddefe 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/constantTurbulentDispersionCoefficient/constantTurbulentDispersionCoefficient.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,7 @@ D() const Ctd_ *pair_.dispersed() *pair_.continuous().rho() - *pair_.continuous().turbulence().k(); + *continuousTurbulence().k(); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C index 0bb29c1be..07490e769 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,6 +28,7 @@ License #include "fvcGrad.H" #include "surfaceInterpolate.H" #include "fvcSnGrad.H" +#include "phaseCompressibleTurbulenceModel.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -61,6 +62,21 @@ Foam::turbulentDispersionModel::~turbulentDispersionModel() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +const Foam::phaseCompressibleTurbulenceModel& +Foam::turbulentDispersionModel::continuousTurbulence() const +{ + return + pair_.phase1().mesh().lookupObject + ( + IOobject::groupName + ( + turbulenceModel::propertiesName, + pair_.continuous().name() + ) + ); +} + + Foam::tmp Foam::turbulentDispersionModel::F() const { diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H index 56e72ebca..715217666 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/turbulentDispersionModel/turbulentDispersionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,6 +40,7 @@ SourceFiles #include "volFields.H" #include "dictionary.H" #include "runTimeSelectionTables.H" +#include "phaseCompressibleTurbulenceModelFwd.H" namespace Foam { @@ -114,6 +115,9 @@ public: // Member Functions + //- Return a reference to the turbulence model for the continuous phase + const phaseCompressibleTurbulenceModel& continuousTurbulence() const; + //- Turbulent diffusivity // multiplying the gradient of the phase-fraction virtual tmp D() const = 0; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index e7c8f0f8f..cd2b1c392 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,7 +122,7 @@ Foam::AnisothermalPhaseModel::heEqn() const volScalarField& contErr(this->continuityError()); - const volScalarField alphaEff(this->turbulence().alphaEff()); + const volScalarField alphaEff(this->alphaEff()); volScalarField& he = this->thermo_->he(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 0aa04c362..fa8becd48 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -251,6 +251,7 @@ template void Foam::MovingPhaseModel::correctEnergyTransport() { BasePhaseModel::correctEnergyTransport(); + turbulence_->correctEnergyTransport(); } @@ -395,10 +396,90 @@ Foam::MovingPhaseModel::alphaRhoPhi() template -const Foam::phaseCompressibleTurbulenceModel& -Foam::MovingPhaseModel::turbulence() const +Foam::tmp +Foam::MovingPhaseModel::mut() const { - return turbulence_; + return turbulence_->mut(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::muEff() const +{ + return turbulence_->muEff(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::nut() const +{ + return turbulence_->nut(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::nuEff() const +{ + return turbulence_->nuEff(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::kappaEff() const +{ + return turbulence_->kappaEff(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::kappaEff(const label patchi) const +{ + return turbulence_->kappaEff(patchi); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::alphaEff() const +{ + return turbulence_->alphaEff(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::alphaEff(const label patchi) const +{ + return turbulence_->alphaEff(patchi); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::k() const +{ + return turbulence_->k(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::pPrime() const +{ + return turbulence_->pPrime(); +} + + +template +Foam::tmp +Foam::MovingPhaseModel::divDevRhoReff() +{ + return turbulence_->divDevRhoReff(U_); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H index 7a120b200..7c5d016a3 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -186,10 +186,42 @@ public: virtual surfaceScalarField& alphaRhoPhi(); - // Turbulence + // Transport - //- Return the turbulence model - virtual const phaseCompressibleTurbulenceModel& turbulence() const; + //- Return the turbulent dynamic viscosity + virtual tmp mut() const; + + //- Return the effective dynamic viscosity + virtual tmp muEff() const; + + //- Return the turbulent kinematic viscosity + virtual tmp nut() const; + + //- Return the effective kinematic viscosity + virtual tmp nuEff() const; + + //- Return the effective thermal conductivity + virtual tmp kappaEff() const; + + //- Return the effective thermal conductivity on a patch + virtual tmp kappaEff(const label patchi) const; + + //- Return the effective thermal diffusivity for enthalpy + virtual tmp alphaEff() const; + + //- Return the effective thermal conductivity for enthalpy on a + // patch + virtual tmp alphaEff(const label patchi) const; + + //- Return the turbulent kinetic energy + virtual tmp k() const; + + //- Return the phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + virtual tmp pPrime() const; + + //- Return the turbulent term for the momentum equation + virtual tmp divDevRhoReff(); }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index 575bc3f68..534ebca40 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -168,7 +168,7 @@ Foam::MultiComponentPhaseModel::YiEqn - fvm::laplacian ( fvc::interpolate(alpha) - *fvc::interpolate(this->turbulence().muEff()/Sc_), + *fvc::interpolate(this->muEff()/Sc_), Yi ) == diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H index 5f2cee19d..dcca84914 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -310,13 +310,15 @@ public: //- Return the laminar thermal conductivity on a patch virtual tmp kappa(const label patchi) const = 0; - //- Return the effective thermal conductivity + //- Return the effective thermal conductivity, given the turbulent + // thermal diffusivity virtual tmp kappaEff ( const volScalarField& alphat ) const = 0; - //- Access the effective thermal conductivity + //- Return the effective thermal conductivity on a patch, given the + // turbulent thermal diffusivity virtual tmp kappaEff ( const scalarField& alphat, @@ -329,13 +331,15 @@ public: //- Return the laminar thermal diffusivity for enthalpy on a patch virtual tmp alpha(const label patchi) const = 0; - //- Return the effective thermal diffusivity for enthalpy + //- Return the effective thermal diffusivity for enthalpy, given the + // turbulent thermal diffusivity virtual tmp alphaEff ( const volScalarField& alphat ) const = 0; - //- Return the effective thermal diffusivity for enthalpy on a patch + //- Return the effective thermal diffusivity for enthalpy on a + // patch, given the turbulent thermal diffusivity virtual tmp alphaEff ( const scalarField& alphat, @@ -345,9 +349,40 @@ public: // Turbulence - //- Return the turbulence model - virtual const phaseCompressibleTurbulenceModel& - turbulence() const = 0; + //- Return the turbulent dynamic viscosity + virtual tmp mut() const = 0; + + //- Return the effective dynamic viscosity + virtual tmp muEff() const = 0; + + //- Return the turbulent kinematic viscosity + virtual tmp nut() const = 0; + + //- Return the effective kinematic viscosity + virtual tmp nuEff() const = 0; + + //- Return the effective thermal conductivity + virtual tmp kappaEff() const = 0; + + //- Return the effective thermal conductivity on a patch + virtual tmp kappaEff(const label patchi) const = 0; + + //- Return the effective thermal diffusivity for enthalpy + virtual tmp alphaEff() const = 0; + + //- Return the effective thermal conductivity for enthalpy on a + // patch + virtual tmp alphaEff(const label patchi) const = 0; + + //- Return the turbulent kinetic energy + virtual tmp k() const = 0; + + //- Return the phase-pressure' + // (derivative of phase-pressure w.r.t. phase-fraction) + virtual tmp pPrime() const = 0; + + //- Return the turbulent term for the momentum equation + virtual tmp divDevRhoReff() = 0; }; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/UEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/UEqns.H index 4b3f036fe..ac73cb7aa 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/UEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pUf/UEqns.H @@ -41,7 +41,7 @@ PtrList UEqns(phases.size()); ( fvm::div(alphaRhoPhi, U) - fvm::Sp(fvc::div(alphaRhoPhi), U) + MRF.DDt(alpha*rho, U) - + phase.turbulence().divDevRhoReff(U) + + phase.divDevRhoReff() + fvm::SuSp(fvOptions(alpha, rho)&rho, U) == fvOptions(alpha, rho, U) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H index a6b5d8166..d601e37bf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H @@ -44,7 +44,7 @@ tmp phiF2; ( fvc::interpolate ( - rAU1*(D + phase1.turbulence().pPrime()) + rAU1*(D + phase1.pPrime()) ) ); @@ -53,7 +53,7 @@ tmp phiF2; ( fvc::interpolate ( - rAU2*(D + phase2.turbulence().pPrime()) + rAU2*(D + phase2.pPrime()) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H index dc32d2360..da38304f5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/UEqns.H @@ -27,7 +27,7 @@ fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVol/dimTime); fvm::div(alphaRhoPhi1, U1) - fvm::Sp(fvc::div(alphaRhoPhi1), U1) + fvm::Sp(dmdt21, U1) - dmdt21*U2 + MRF.DDt(alpha1*rho1, U1) - + phase1.turbulence().divDevRhoReff(U1) + + phase1.divDevRhoReff() + Vm*(UgradU1 - (UgradU2 & U2)) - fvOptions(alpha1, rho1, U1) + fvm::SuSp(fvOptions(alpha1, rho1)&rho1, U1) @@ -44,7 +44,7 @@ fvVectorMatrix U2Eqn(U2, rho2.dimensions()*U2.dimensions()*dimVol/dimTime); fvm::div(alphaRhoPhi2, U2) - fvm::Sp(fvc::div(alphaRhoPhi2), U2) - fvm::Sp(dmdt12, U2) + dmdt12*U1 + MRF.DDt(alpha2*rho2, U2) - + phase2.turbulence().divDevRhoReff(U2) + + phase2.divDevRhoReff() + Vm*(UgradU2 - (UgradU1 & U1)) - fvOptions(alpha2, rho2, U2) + fvm::SuSp(fvOptions(alpha2, rho2)&rho2, U2) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H index 3648e6dd9..09f95208a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H @@ -60,13 +60,13 @@ tmp Ff2; // Phase-1 turbulent dispersion and particle-pressure diffusivity surfaceScalarField Df1 ( - fvc::interpolate(D + phase1.turbulence().pPrime()) + fvc::interpolate(D + phase1.pPrime()) ); // Phase-2 turbulent dispersion and particle-pressure diffusivity surfaceScalarField Df2 ( - fvc::interpolate(D + phase2.turbulence().pPrime()) + fvc::interpolate(D + phase2.pPrime()) ); // Cache the phase diffusivities for implicit treatment in the diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C index 8fc3632da..8b238247a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.C @@ -87,7 +87,7 @@ Foam::tmp Foam::diameterModels::IATEsource::Ur() const Foam::tmp Foam::diameterModels::IATEsource::Ut() const { - return sqrt(2*otherPhase().turbulence().k()); + return sqrt(2*otherPhase().k()); } Foam::tmp Foam::diameterModels::IATEsource::Re() const