From d91fe9a6acf5ced301781fff69ae300ad7d414cc Mon Sep 17 00:00:00 2001 From: sergio <s.ferraris@opencfd.co.uk> Date: Tue, 26 Apr 2022 14:05:16 -0700 Subject: [PATCH] ENH: multiphaseInter: ensure consistent Hf treatment for phases TUT: icoReactingMultiphaseInterFoam: update thermophysicalProperties.liquid --- .../MassTransferPhaseSystem/MassTransferPhaseSystem.C | 8 ++++---- .../phasesSystem/massTransferModels/Lee/Lee.C | 2 +- .../interfaceHeatResistance/interfaceHeatResistance.C | 4 ++-- .../kineticGasEvaporation/kineticGasEvaporation.C | 4 ++-- .../constant/thermophysicalProperties.liquid | 2 +- .../constant/thermophysicalProperties.liquid | 2 +- .../constant/thermophysicalProperties.liquid | 2 +- .../constant/thermophysicalProperties.liquid | 2 +- .../constant/thermophysicalProperties.solid | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/MassTransferPhaseSystem/MassTransferPhaseSystem.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/MassTransferPhaseSystem/MassTransferPhaseSystem.C index 5de5b50e70b..559fee3e639 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/MassTransferPhaseSystem/MassTransferPhaseSystem.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/MassTransferPhaseSystem/MassTransferPhaseSystem.C @@ -121,7 +121,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::calculateL const word species(speciesName.substr(0, speciesName.find('.'))); - L += pos(dmdtNetki)*interfacePtr->L(species, T); + L -= pos(dmdtNetki)*interfacePtr->L(species, T); } return tL; @@ -240,7 +240,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::heatTransfer if (KSp.valid()) { - Sp -= KSp.ref(); + Sp += KSp.ref(); } tmp<volScalarField> KSu = @@ -248,13 +248,13 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::heatTransfer if (KSu.valid()) { - Su -= KSu.ref(); + Su += KSu.ref(); } // If linearization is not provided used full explicit if (!KSp.valid() && !KSu.valid()) { - Su -= *dmdt_[keyik]; + Su += *dmdt_[keyik]; } } diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/Lee/Lee.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/Lee/Lee.C index b8313ea33e3..d0cde4679e2 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/Lee/Lee.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/Lee/Lee.C @@ -78,7 +78,7 @@ Foam::meltingEvaporationModels::Lee<Thermo, OtherThermo>::Kexp { return ( - coeff*pos(Tactivate_ - refValue) + coeff*pos(Tactivate_ - refValue) ); } } diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C index ca76c43a51e..0dfd7e8b117 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/interfaceHeatResistance/interfaceHeatResistance.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2020 Henning Scheufler - Copyright (C) 2020-2021 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -223,7 +223,7 @@ Foam::meltingEvaporationModels::interfaceHeatResistance<Thermo, OtherThermo> auto tempOpen = fullSpeciesName.find('.'); const word speciesName(fullSpeciesName.substr(0, tempOpen)); - tmp<volScalarField> L = this->L(speciesName, T); + tmp<volScalarField> L = mag(this->L(speciesName, T)); htc_ = R_/L(); diff --git a/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C b/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C index 7b89464004e..a0a45133992 100644 --- a/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C +++ b/src/phaseSystemModels/multiphaseInter/phasesSystem/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -206,7 +206,7 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo> ); word speciesName = IOobject::member(this->transferSpecie()); - tmp<volScalarField> L = this->L(speciesName, T); + tmp<volScalarField> L = mag(this->L(speciesName, T)); updateInterface(T); diff --git a/tutorials/multiphase/icoReactingMultiphaseInterFoam/evaporationMultiComponent/constant/thermophysicalProperties.liquid b/tutorials/multiphase/icoReactingMultiphaseInterFoam/evaporationMultiComponent/constant/thermophysicalProperties.liquid index 8f35a391441..a12acc2ec78 100644 --- a/tutorials/multiphase/icoReactingMultiphaseInterFoam/evaporationMultiComponent/constant/thermophysicalProperties.liquid +++ b/tutorials/multiphase/icoReactingMultiphaseInterFoam/evaporationMultiComponent/constant/thermophysicalProperties.liquid @@ -39,7 +39,7 @@ mixture thermodynamics { Cp 4181; - Hf 2.45e6;//-1.5833e7;//deltaHv 2.45e6; //[J/Kg] + Hf -2.45e6; //[J/Kg] } transport { diff --git a/tutorials/multiphase/icoReactingMultiphaseInterFoam/mixerVesselAMI2D/constant/thermophysicalProperties.liquid b/tutorials/multiphase/icoReactingMultiphaseInterFoam/mixerVesselAMI2D/constant/thermophysicalProperties.liquid index 7c58fc3403b..104d664c5c1 100644 --- a/tutorials/multiphase/icoReactingMultiphaseInterFoam/mixerVesselAMI2D/constant/thermophysicalProperties.liquid +++ b/tutorials/multiphase/icoReactingMultiphaseInterFoam/mixerVesselAMI2D/constant/thermophysicalProperties.liquid @@ -40,7 +40,7 @@ mixture thermodynamics { Cp 4181; - Hf 2.45e6; //[J/Kg] + Hf -2.45e6; //[J/Kg] } transport { diff --git a/tutorials/multiphase/icoReactingMultiphaseInterFoam/poolEvaporation/constant/thermophysicalProperties.liquid b/tutorials/multiphase/icoReactingMultiphaseInterFoam/poolEvaporation/constant/thermophysicalProperties.liquid index f1d85ecdca5..ea44fd872f3 100644 --- a/tutorials/multiphase/icoReactingMultiphaseInterFoam/poolEvaporation/constant/thermophysicalProperties.liquid +++ b/tutorials/multiphase/icoReactingMultiphaseInterFoam/poolEvaporation/constant/thermophysicalProperties.liquid @@ -39,7 +39,7 @@ mixture thermodynamics { Cp 4216; - Hf 2.45e6; + Hf -2.45e6; } transport { diff --git a/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.liquid b/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.liquid index 6f12cd4b91b..2de7a9a9bab 100644 --- a/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.liquid +++ b/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.liquid @@ -41,7 +41,7 @@ mixture thermodynamics { Cp 381; - Hf 0; + Hf 8.016e4; } transport { diff --git a/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.solid b/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.solid index 590032365eb..2c6e5a5e93b 100644 --- a/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.solid +++ b/tutorials/multiphase/icoReactingMultiphaseInterFoam/solidMelting2D/constant/thermophysicalProperties.solid @@ -39,7 +39,7 @@ mixture thermodynamics { Cp 381; - Hf 8.016e4;//[J/Kg]; + Hf 0; //[J/Kg]; } transport { @@ -48,4 +48,4 @@ mixture } -// ************************************************************************* // \ No newline at end of file +// ************************************************************************* // -- GitLab