compressibleInterFoam: Corrected handling of thermal diffusivity with mixture turbulence model

Resolves bug-report https://bugs.openfoam.org/view.php?id=2958
This commit is contained in:
Henry Weller
2018-05-25 23:43:41 +01:00
parent 55f086bc86
commit 332f94b724
3 changed files with 25 additions and 13 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,7 +94,8 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
turbulence1_ = turbulence1_ =
( (
PhaseCompressibleTurbulenceModel<fluidThermo>::New ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
::New
( (
alpha1, alpha1,
rho1, rho1,
@ -107,7 +108,8 @@ Foam::compressibleInterPhaseTransportModel::compressibleInterPhaseTransportModel
turbulence2_ = turbulence2_ =
( (
PhaseCompressibleTurbulenceModel<fluidThermo>::New ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
::New
( (
alpha2, alpha2,
rho2, rho2,
@ -141,12 +143,18 @@ Foam::compressibleInterPhaseTransportModel::alphaEff() const
if (twoPhaseTransport_) if (twoPhaseTransport_)
{ {
return return
mixture_.alpha1()*mixture_.thermo1().alphaEff(turbulence1_->mut()) mixture_.alpha1()*mixture_.thermo1().alphaEff
+ mixture_.alpha2()*mixture_.thermo2().alphaEff(turbulence2_->mut()); (
turbulence1_->alphat()
)
+ mixture_.alpha2()*mixture_.thermo2().alphaEff
(
turbulence2_->alphat()
);
} }
else else
{ {
return turbulence_->mut(); return mixture_.alphaEff(turbulence_->alphat());
} }
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation \\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -84,10 +84,16 @@ class compressibleInterPhaseTransportModel
autoPtr<compressible::turbulenceModel> turbulence_; autoPtr<compressible::turbulenceModel> turbulence_;
//- Phase-1 transport model (constructed for two-phase transport) //- Phase-1 transport model (constructed for two-phase transport)
autoPtr<PhaseCompressibleTurbulenceModel<fluidThermo>> turbulence1_; autoPtr
<
ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
> turbulence1_;
//- Phase-2 transport model (constructed for two-phase transport) //- Phase-2 transport model (constructed for two-phase transport)
autoPtr<PhaseCompressibleTurbulenceModel<fluidThermo>> turbulence2_; autoPtr
<
ThermalDiffusivity<PhaseCompressibleTurbulenceModel<fluidThermo>>
> turbulence2_;
// Private Member Functions // Private Member Functions

View File

@ -365,8 +365,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::kappaEff
{ {
return return
alpha1().boundaryField()[patchi]*thermo1_->kappaEff(alphat, patchi) alpha1().boundaryField()[patchi]*thermo1_->kappaEff(alphat, patchi)
+ alpha2().boundaryField()[patchi]*thermo2_->kappaEff(alphat, patchi) + alpha2().boundaryField()[patchi]*thermo2_->kappaEff(alphat, patchi);
;
} }
@ -389,8 +388,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureThermo::alphaEff
{ {
return return
alpha1().boundaryField()[patchi]*thermo1_->alphaEff(alphat, patchi) alpha1().boundaryField()[patchi]*thermo1_->alphaEff(alphat, patchi)
+ alpha2().boundaryField()[patchi]*thermo2_->alphaEff(alphat, patchi) + alpha2().boundaryField()[patchi]*thermo2_->alphaEff(alphat, patchi);
;
} }