Skip to content

Commit

Permalink
go back to wbar for wbarflux
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Howarth committed Sep 18, 2024
1 parent 30c0f08 commit 5011524
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions Source/PeleLMeX_Diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
});
Expand Down

0 comments on commit 5011524

Please sign in to comment.