From 6b02f5f4ea1b91a416a7bc25226807339fba5127 Mon Sep 17 00:00:00 2001 From: sergio <s.ferraris@opencfd.co.uk> Date: Tue, 12 Apr 2022 14:37:45 -0700 Subject: [PATCH] BUG: Reverting change made in commit d4cd87830d9e35c71 Previous commit solved: "mixture rho to volume-based in rhoThermo." This proved to work correctly for rho=constant EoS but not for idealGas. Fixes #2304. The previous gitlab issue was #1812. --- .../basic/rhoThermo/heRhoThermo.C | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C index 9faeed3de4d..798798b3575 100644 --- a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2015-2020 OpenCFD Ltd. + Copyright (C) 2015-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,9 +74,6 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate const typename MixtureType::thermoType& mixture_ = this->cellMixture(celli); - const typename MixtureType::thermoType& volMixture_ = - this->cellVolMixture(pCells[celli], TCells[celli], celli); - if (this->updateT()) { TCells[celli] = mixture_.THE @@ -88,7 +85,7 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate } psiCells[celli] = mixture_.psi(pCells[celli], TCells[celli]); - rhoCells[celli] = volMixture_.rho(pCells[celli], TCells[celli]); + rhoCells[celli] = mixture_.rho(pCells[celli], TCells[celli]); muCells[celli] = mixture_.mu(pCells[celli], TCells[celli]); alphaCells[celli] = mixture_.alphah(pCells[celli], TCells[celli]); @@ -119,19 +116,10 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate const typename MixtureType::thermoType& mixture_ = this->patchFaceMixture(patchi, facei); - const typename MixtureType::thermoType& volMixture_ = - this->patchFaceVolMixture - ( - pp[facei], - pT[facei], - patchi, - facei - ); - phe[facei] = mixture_.HE(pp[facei], pT[facei]); ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = volMixture_.rho(pp[facei], pT[facei]); + prho[facei] = mixture_.rho(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pp[facei], pT[facei]); palpha[facei] = mixture_.alphah(pp[facei], pT[facei]); } @@ -143,22 +131,13 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate const typename MixtureType::thermoType& mixture_ = this->patchFaceMixture(patchi, facei); - const typename MixtureType::thermoType& volMixture_ = - this->patchFaceVolMixture - ( - pp[facei], - pT[facei], - patchi, - facei - ); - if (this->updateT()) { pT[facei] = mixture_.THE(phe[facei], pp[facei], pT[facei]); } ppsi[facei] = mixture_.psi(pp[facei], pT[facei]); - prho[facei] = volMixture_.rho(pp[facei], pT[facei]); + prho[facei] = mixture_.rho(pp[facei], pT[facei]); pmu[facei] = mixture_.mu(pp[facei], pT[facei]); palpha[facei] = mixture_.alphah(pp[facei], pT[facei]); } -- GitLab