From 17657673b25b027baba15f4e54a58de5ac092ee8 Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 10 Dec 2021 09:58:09 +0000 Subject: [PATCH] ENH: Updating wall boiling models for new rho and Cp functions --- .../CHFModels/Zuber/Zuber.C | 12 +++++++--- .../CHFSubCoolModels/HuaXu/HuaXu.C | 15 ++++++++++--- .../MHFModels/Jeschar/Jeschar.C | 17 +++++++++----- .../filmBoilingModels/Bromley/Bromley.C | 22 +++++++++++-------- 4 files changed, 46 insertions(+), 20 deletions(-) diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C index 833992e4b9..275050aed2 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFModels/Zuber/Zuber.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2020 OpenCFD Ltd + Copyright (C) 2018-2021 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,9 +85,15 @@ Foam::wallBoilingModels::CHFModels::Zuber::CHF const uniformDimensionedVectorField& g = liquid.mesh().time().lookupObject("g"); - const scalarField rhoVapor(vapor.thermo().rho(patchi)); - const scalarField rhoLiq(liquid.thermo().rho(patchi)); + const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells(); + const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; + + tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoVapor = trhoVapor.ref(); + + tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoLiq = trhoLiq.ref(); const phasePairKey pair(liquid.name(), vapor.name()); const scalarField sigma ( diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C index 983fbdd7cd..72fa00fefa 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/CHFSubCoolModels/HuaXu/HuaXu.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2020 OpenCFD Ltd + Copyright (C) 2018-2021 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -87,8 +87,17 @@ Foam::wallBoilingModels::CHFModels::HuaXu::CHFSubCool const scalarField alphaLiq(liquid.alpha(patchi)); - const scalarField rhoVapor(vapor.thermo().rho(patchi)); - const scalarField rhoLiq(liquid.thermo().rho(patchi)); + const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells(); + + const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; + + tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoVapor = trhoVapor.ref(); + + tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoLiq = trhoLiq.ref(); + + tmp tCp = liquid.thermo().Cp(); const volScalarField& Cp = tCp(); const fvPatchScalarField& Cpw = Cp.boundaryField()[patchi]; diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C index 79bea89a42..af7046fe82 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/MHFModels/Jeschar/Jeschar.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2020 OpenCFD Ltd + Copyright (C) 2018-2021 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,7 +59,7 @@ Foam::wallBoilingModels::CHFModels::Jeschar::Jeschar ) : MHFModel(), - Kmhf_(dict.getOrDefault("Kmhf", 1)) + Kmhf_(dict.getOrDefault("Kmhf", 0.16)) {} @@ -85,8 +85,15 @@ Foam::wallBoilingModels::CHFModels::Jeschar::MHF const uniformDimensionedVectorField& g = liquid.mesh().time().lookupObject("g"); - const scalarField rhoVapor(vapor.thermo().rho(patchi)); - const scalarField rhoLiq(liquid.thermo().rho(patchi)); + const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells(); + + const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; + + tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoVapor = trhoVapor.ref(); + + tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoLiq = trhoLiq.ref(); const phasePairKey pair(liquid.name(), vapor.name()); const scalarField sigma @@ -95,7 +102,7 @@ Foam::wallBoilingModels::CHFModels::Jeschar::MHF ); return - Kmhf_*0.09*rhoVapor*L + Kmhf_*rhoVapor*L *( pow(sigma/(mag(g.value())*(rhoLiq - rhoVapor)), 0.25) * sqrt(mag(g.value())*(rhoLiq - rhoVapor)/(rhoLiq + rhoVapor)) diff --git a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C index 1600e3f089..6cbd883ef1 100644 --- a/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C +++ b/src/phaseSystemModels/reactingEuler/multiphaseSystem/derivedFvPatchFields/wallBoilingSubModels/filmBoilingModels/Bromley/Bromley.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2020 OpenCFD Ltd + Copyright (C) 2018-2021 OpenCFD Ltd ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -85,18 +85,23 @@ Foam::wallBoilingModels::filmBoilingModels::Bromley::htcFilmBoil const scalarField& L ) const { - const fvPatchScalarField& Tw = liquid.thermo().T().boundaryField()[patchi]; + const uniformDimensionedVectorField& g = liquid.mesh().time().lookupObject("g"); - const fvPatchScalarField& rhoVaporw - ( - vapor.thermo().rho()().boundaryField()[patchi] - ); + const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells(); + + const scalarField& pw = liquid.thermo().p().boundaryField()[patchi]; + + tmp trhoVapor = vapor.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoVapor = trhoVapor.ref(); + + tmp trhoLiq = liquid.thermo().rhoEoS(Tsatw, pw, cells); + const scalarField& rhoLiq = trhoLiq.ref(); + - const scalarField rhoLiq(liquid.thermo().rho(patchi)); const scalarField kappaVapor(vapor.kappa(patchi)); tmp tCp = vapor.thermo().Cp(); @@ -104,7 +109,6 @@ Foam::wallBoilingModels::filmBoilingModels::Bromley::htcFilmBoil const scalarField& CpVapor = Cp.boundaryField()[patchi]; const scalarField muVapor(vapor.mu(patchi)); - //const scalarField dbVapor(vapor.d()().boundaryField()[patchi]); const scalarField htcRad ( @@ -116,7 +120,7 @@ Foam::wallBoilingModels::filmBoilingModels::Bromley::htcFilmBoil Cn_*pow ( pow3(kappaVapor) - *rhoVaporw*(rhoLiq - rhoVaporw)*mag(g.value()) + *rhoVapor*(rhoLiq - rhoVapor)*mag(g.value()) *(L + 0.4*CpVapor*max((Tw-Tsatw), scalar(0))) /(L_*muVapor*max((Tw-Tsatw), scalar(1e-4))), 0.25