From 5011524f1182c041e264ae392b683d251ac4b3f5 Mon Sep 17 00:00:00 2001 From: Thomas Howarth Date: Wed, 18 Sep 2024 16:04:59 +0200 Subject: [PATCH] go back to wbar for wbarflux --- Source/PeleLMeX_Diffusion.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Source/PeleLMeX_Diffusion.cpp b/Source/PeleLMeX_Diffusion.cpp index c2fc3880..e6e68509 100644 --- a/Source/PeleLMeX_Diffusion.cpp +++ b/Source/PeleLMeX_Diffusion.cpp @@ -702,24 +702,17 @@ PeleLM::addWbarTerm( for (int n = 0; n < NUM_SPECIES; n++) { y[n] = rhoY(i, j, k, n) * rho_inv; } - amrex::Real imw[NUM_SPECIES] = {0.0}; - eos.inv_molecular_weight(imw); - // amrex::Real WBAR = 0.0; - // eos.Y2WBAR(y, WBAR); - // WBAR *= 0.001; + amrex::Real WBAR = 0.0; + eos.Y2WBAR(y, WBAR); + WBAR *= 0.001; for (int n = 0; n < NUM_SPECIES; n++) { - // imw[n] *= 1000.0; - // spFlux_ar(i, j, k, n) -= - // y[n] / WBAR * beta_ar(i, j, k, n) * gradWbar_ar(i, j, k); - spFlux_ar(i, j, k, n) -= - y[n] * imw[n] * beta_ar(i, j, k, n) * gradWbar_ar(i, j, k); + spFlux_ar(i, j, k, n) -= + y[n] / WBAR * beta_ar(i, j, k, n) * gradWbar_ar(i, j, k); } if (need_wbar_fluxes != 0) { for (int n = 0; n < NUM_SPECIES; n++) { - // spwbarFlux_ar(i, j, k, n) = - // -y[n] / WBAR * beta_ar(i, j, k, n) * gradWbar_ar(i, j, k); - spwbarFlux_ar(i, j, k, n) = - -y[n] * imw[n] * beta_ar(i, j, k, n) * gradWbar_ar(i, j, k); + spwbarFlux_ar(i, j, k, n) = + -y[n] / WBAR * beta_ar(i, j, k, n) * gradWbar_ar(i, j, k); } } });