Skip to content

Commit

Permalink
Change conduction to upwind and expose fluxes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekryjak committed May 28, 2024
1 parent b8accfe commit 0aa087b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/neutral_mixed.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ private:
Field3D particle_flow_xlow, particle_flow_ylow;
Field3D momentum_flow_xlow, momentum_flow_ylow;
Field3D energy_flow_xlow, energy_flow_ylow;
Field3D conduction_flow_xlow, conduction_flow_ylow;
};

namespace {
Expand Down
23 changes: 22 additions & 1 deletion src/neutral_mixed.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ void NeutralMixed::finally(const Options& state) {
energy_flow_ylow *= 5/2;

if (neutral_conduction) {
ddt(Pn) += FV::Div_a_Grad_perp(DnnNn, Tn) // Perpendicular conduction
ddt(Pn) += Div_a_Grad_perp_upwind_flows(DnnNn, Tn,
conduction_flow_xlow, conduction_flow_ylow) // Perpendicular conduction
+ FV::Div_par_K_Grad_par(DnnNn, Tn) // Parallel conduction
;
}
Expand Down Expand Up @@ -646,6 +647,26 @@ void NeutralMixed::outputVars(Options& state) {
{"species", name},
{"source", "evolve_pressure"}});
}
if (conduction_flow_xlow.isAllocated()) {
set_with_attrs(state[std::string("ConductionFlow_") + name + std::string("_xlow")],conduction_flow_xlow,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
{"standard_name", "power"},
{"long_name", name + " conducted power through X cell face. Note: May be incomplete."},
{"species", name},
{"source", "evolve_pressure"}});
}
if (conduction_flow_ylow.isAllocated()) {
set_with_attrs(state[std::string("ConductionFlow_") + name + std::string("_ylow")], conduction_flow_ylow,
{{"time_dimension", "t"},
{"units", "W"},
{"conversion", rho_s0 * SQ(rho_s0) * Pnorm * Omega_ci},
{"standard_name", "power"},
{"long_name", name + " conducted power through Y cell face. Note: May be incomplete."},
{"species", name},
{"source", "evolve_pressure"}});
}
}
}

Expand Down

0 comments on commit 0aa087b

Please sign in to comment.