Skip to content

Commit

Permalink
add low-mach HLLD solver
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Oct 11, 2024
1 parent 358ae04 commit db0ad99
Show file tree
Hide file tree
Showing 5 changed files with 408 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inputs/precipitator_mhd_lowres.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ nx3 = 32 # Number of zones in X3-direction
fluid = glmmhd
gamma = 1.6666666666666667 # gamma = C_p/C_v
eos = adiabatic
riemann = hlld
riemann = lhlld
reconstruction = ppm
first_order_flux_correct = true
use_scratch = false
Expand Down
8 changes: 8 additions & 0 deletions src/hydro/hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) {
riemann = RiemannSolver::lhllc;
} else if (riemann_str == "hlld") {
riemann = RiemannSolver::hlld;
} else if (riemann_str == "lhlld") {
riemann = RiemannSolver::lhlld;
} else if (riemann_str == "none") {
riemann = RiemannSolver::none;
// If hyperbolic fluxes are disabled, there's no restriction from those
Expand Down Expand Up @@ -370,6 +372,12 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) {
add_flux_fun<Fluid::glmmhd, Reconstruction::weno3, RiemannSolver::hlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::limo3, RiemannSolver::hlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::wenoz, RiemannSolver::hlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::dc, RiemannSolver::lhlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::plm, RiemannSolver::lhlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::ppm, RiemannSolver::lhlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::weno3, RiemannSolver::lhlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::limo3, RiemannSolver::lhlld>(flux_functions);
add_flux_fun<Fluid::glmmhd, Reconstruction::wenoz, RiemannSolver::lhlld>(flux_functions);
// Add first order recon with LLF fluxes (implemented for testing as tight loop)
flux_functions[std::make_tuple(Fluid::euler, Reconstruction::dc, RiemannSolver::llf)] =
Hydro::CalculateFluxesTight<Fluid::euler>;
Expand Down
Loading

0 comments on commit db0ad99

Please sign in to comment.