Skip to content

Commit

Permalink
Add comments on flow diags and fix conduction one
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekryjak committed May 28, 2024
1 parent 0aa087b commit 2027118
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/neutral_mixed.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,10 @@ void NeutralMixed::finally(const Options& state) {
+ Div_a_Grad_perp_upwind_flows(DnnPn, logPnlim,
energy_flow_xlow, energy_flow_ylow) // Perpendicular advection
;
energy_flow_xlow *= 5/2; // Note: Should this be 5/2?

// The factor here is likely 5/2 as we're advecting internal energy and pressure.
// Doing this still leaves a heat imbalance factor of 0.11 in the cells, but better than 0.33 with 3/2.
energy_flow_xlow *= 5/2;
energy_flow_ylow *= 5/2;

if (neutral_conduction) {
Expand All @@ -426,6 +429,10 @@ void NeutralMixed::finally(const Options& state) {
+ FV::Div_par_K_Grad_par(DnnNn, Tn) // Parallel conduction
;
}

// The factor here is likely 3/2 as this is pure energy flow, but needs checking.
energy_flow_xlow *= 3/2;
energy_flow_ylow *= 3/2;

Sp = pressure_source;
if (localstate.isSet("energy_source")) {
Expand Down

0 comments on commit 2027118

Please sign in to comment.