From 4d6a47972f81b2733829badd631a2adc56bdcb0b Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 12 Jul 2017 14:30:38 +0100 Subject: [PATCH] surfaceFilmModels::phaseChange: Updated energy transfer for consistency energy equation Currently heat is assumed to be removed by heat-transfer to the wall so the energy remains unchanged by the phase-change. This approximation can only be removed if the interface to the transfer models is extended to support transfers to and from the film AND the primary region. --- .../solidification/solidification.C | 2 ++ .../standardPhaseChange/standardPhaseChange.C | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C index 93239be24..b2d9c8803 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C @@ -121,6 +121,7 @@ void solidification::correctModel const thermoSingleLayer& film = filmType(); const scalarField& T = film.T(); + const scalarField& hs = film.hs(); const scalarField& alpha = film.alpha(); const scalar rateLimiter = min @@ -145,6 +146,7 @@ void solidification::correctModel // Heat is assumed to be removed by heat-transfer to the wall // so the energy remains unchanged by the phase-change. + dEnergy[celli] += dm*hs[celli]; } } } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 110333fd5..35a72f12c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -109,6 +109,7 @@ void standardPhaseChange::correctModel const scalarField& YInf = film.YPrimary()[vapId]; const scalarField& pInf = film.pPrimary(); const scalarField& T = film.T(); + const scalarField& hs = film.hs(); const scalarField& rho = film.rho(); const scalarField& rhoInf = film.rhoPrimary(); const scalarField& muInf = film.muPrimary(); @@ -121,6 +122,8 @@ void standardPhaseChange::correctModel forAll(dMass, celli) { + scalar dm = 0; + if (delta[celli] > deltaMin_) { // cell pressure [Pa] @@ -145,7 +148,7 @@ void standardPhaseChange::correctModel const scalar Cp = filmThermo.Cp(pc, Tloc); const scalar Tcorr = max(0.0, T[celli] - Tb); const scalar qCorr = limMass[celli]*Cp*(Tcorr); - dMass[celli] = qCorr/hVap; + dm = qCorr/hVap; } else { @@ -180,12 +183,15 @@ void standardPhaseChange::correctModel const scalar hm = Sh*Dab/(L_ + ROOTVSMALL); // add mass contribution to source - dMass[celli] = - dt*magSf[celli]*rhoInfc*hm*(Ys - YInf[celli])/(1.0 - Ys); + dm = dt*magSf[celli]*rhoInfc*hm*(Ys - YInf[celli])/(1.0 - Ys); } - dMass[celli] = min(limMass[celli], max(0.0, dMass[celli])); - dEnergy[celli] = dMass[celli]*hVap; + dMass[celli] += min(limMass[celli], max(dm, 0)); + + // Heat is assumed to be removed by heat-transfer to the wall + // so the energy remains unchanged by the phase-change. + dEnergy[celli] += dm*hs[celli]; + // dEnergy[celli] += dm*(hs[celli] + hVap); } } }