Skip to content

Commit

Permalink
remove mass_code_units
Browse files Browse the repository at this point in the history
  • Loading branch information
psharda committed Jul 25, 2023
1 parent 9ce8fb7 commit 852ee12
Show file tree
Hide file tree
Showing 37 changed files with 3 additions and 41 deletions.
8 changes: 3 additions & 5 deletions src/EOS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ template <typename problem_t> struct EOS_Traits {
static constexpr double cs_isothermal = NAN; // only used when gamma = 1
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <typename problem_t> class EOS
Expand All @@ -54,7 +53,6 @@ template <typename problem_t> class EOS
static constexpr amrex::Real gamma_ = EOS_Traits<problem_t>::gamma;
static constexpr amrex::Real boltzmann_constant_ = EOS_Traits<problem_t>::boltzmann_constant;
static constexpr amrex::Real mean_molecular_weight_ = EOS_Traits<problem_t>::mean_molecular_weight;
static constexpr amrex::Real mass_code_units_ = EOS_Traits<problem_t>::mass_code_units;
};

template <typename problem_t>
Expand Down Expand Up @@ -88,7 +86,7 @@ AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputeTgasFromEin
chem_eos_t estate;
estate.rho = rho;
estate.e = Eint / rho;
estate.mu = mean_molecular_weight_ / mass_code_units_;
estate.mu = mean_molecular_weight_ / C::m_u;
eos(eos_input_re, estate);
// scale returned temperature in case boltzmann constant is dimensionless
Tgas = estate.T * C::k_B / boltzmann_constant_;
Expand Down Expand Up @@ -130,7 +128,7 @@ AMREX_FORCE_INLINE AMREX_GPU_HOST_DEVICE auto EOS<problem_t>::ComputeEintFromTga
chem_eos_t estate;
estate.rho = rho;
estate.T = Tgas;
estate.mu = mean_molecular_weight_ / mass_code_units_;
estate.mu = mean_molecular_weight_ / C::m_u;
eos(eos_input_rt, estate);
Eint = estate.e * rho * boltzmann_constant_ / C::k_B;
}
Expand Down Expand Up @@ -170,7 +168,7 @@ EOS<problem_t>::ComputeEintTempDerivative(const amrex::Real rho, const amrex::Re
chem_eos_t estate;
estate.rho = rho;
estate.T = Tgas;
estate.mu = mean_molecular_weight_ / mass_code_units_;
estate.mu = mean_molecular_weight_ / C::m_u;
eos(eos_input_rt, estate);
dEint_dT = estate.dedT * rho * boltzmann_constant_ / C::k_B;
}
Expand Down
1 change: 0 additions & 1 deletion src/FCQuantities/test_fc_quantities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ template <> struct quokka::EOS_Traits<FCQuantities> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<FCQuantities> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroBlast2D/test_hydro2d_blast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ template <> struct quokka::EOS_Traits<BlastProblem> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<BlastProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroBlast3D/test_hydro3d_blast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ template <> struct quokka::EOS_Traits<SedovProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct HydroSystem_Traits<SedovProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroContact/test_hydro_contact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ template <> struct quokka::EOS_Traits<ContactProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ContactProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroHighMach/test_hydro_highmach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ template <> struct quokka::EOS_Traits<HighMachProblem> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<HighMachProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroKelvinHelmholz/test_hydro2d_kh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ template <> struct quokka::EOS_Traits<KelvinHelmholzProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct HydroSystem_Traits<KelvinHelmholzProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroLeblanc/test_hydro_leblanc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ template <> struct quokka::EOS_Traits<ShocktubeProblem> {
static constexpr double gamma = (5. / 3.);
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShocktubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroQuirk/test_quirk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ template <> struct quokka::EOS_Traits<QuirkProblem> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct HydroSystem_Traits<QuirkProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroRichtmeyerMeshkov/test_hydro2d_rm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ template <> struct quokka::EOS_Traits<RichtmeyerMeshkovProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct HydroSystem_Traits<RichtmeyerMeshkovProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroSMS/test_hydro_sms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ template <> struct quokka::EOS_Traits<ShocktubeProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShocktubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroShocktube/test_hydro_shocktube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ template <> struct quokka::EOS_Traits<ShocktubeProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShocktubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroShocktubeCMA/test_hydro_shocktube_cma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ template <> struct quokka::EOS_Traits<ShocktubeProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShocktubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroShuOsher/test_hydro_shuosher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ template <> struct quokka::EOS_Traits<ShocktubeProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShocktubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroVacuum/test_hydro_vacuum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ template <> struct quokka::EOS_Traits<ShocktubeProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShocktubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/HydroWave/test_hydro_wave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ template <> struct quokka::EOS_Traits<WaveProblem> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<WaveProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/ODEIntegration/test_ode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ template <> struct quokka::EOS_Traits<ODETest> {
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

struct ODEUserData {
Expand Down
1 change: 0 additions & 1 deletion src/PassiveScalar/test_scalars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ template <> struct quokka::EOS_Traits<ScalarProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ScalarProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadBeam/test_radiation_beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ template <> struct quokka::EOS_Traits<BeamProblem> {
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<BeamProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadForce/test_radiation_force.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ template <> struct quokka::EOS_Traits<TubeProblem> {
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = gamma_gas;
static constexpr double cs_isothermal = a0; // only used when gamma = 1
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<TubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadMarshak/test_radiation_marshak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ template <> struct quokka::EOS_Traits<SuOlsonProblem> {
static constexpr double mean_molecular_mass = 1.0;
static constexpr double boltzmann_constant = 1.0;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<SuOlsonProblem> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ template <> struct quokka::EOS_Traits<SuOlsonProblemCgs> {
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<SuOlsonProblemCgs> {
Expand Down
1 change: 0 additions & 1 deletion src/RadMarshakCGS/test_radiation_marshak_cgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ template <> struct quokka::EOS_Traits<SuOlsonProblemCgs> {
static constexpr double mean_molecular_mass = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<SuOlsonProblemCgs> {
Expand Down
1 change: 0 additions & 1 deletion src/RadMatterCoupling/test_radiation_matter_coupling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ template <> struct quokka::EOS_Traits<CouplingProblem> {
static constexpr double mean_molecular_mass = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<CouplingProblem> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ template <> struct quokka::EOS_Traits<CouplingProblem> {
static constexpr double mean_molecular_mass = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<CouplingProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadPulse/test_radiation_pulse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ template <> struct quokka::EOS_Traits<PulseProblem> {
static constexpr double mean_molecular_weight = 1.0;
static constexpr double boltzmann_constant = (2. / 3.);
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<PulseProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadShadow/test_radiation_shadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ template <> struct quokka::EOS_Traits<ShadowProblem> {
static constexpr double mean_molecular_weight = 10. * C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<ShadowProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadStreaming/test_radiation_streaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ template <> struct quokka::EOS_Traits<StreamingProblem> {
static constexpr double mean_molecular_weight = 1.0;
static constexpr double boltzmann_constant = 1.0;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<StreamingProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadTophat/test_radiation_tophat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ template <> struct quokka::EOS_Traits<TophatProblem> {
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = 5. / 3.;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<TophatProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadTube/test_radiation_tube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ template <> struct quokka::EOS_Traits<TubeProblem> {
static constexpr double mean_molecular_weight = mu;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double gamma = gamma_gas;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<TubeProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadhydroShell/test_radhydro_shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ template <> struct quokka::EOS_Traits<ShellProblem> {
static constexpr double mean_molecular_weight = 2.2 * m_H;
static constexpr double boltzmann_constant = k_B;
static constexpr double gamma = gamma_gas;
static constexpr double mass_code_units = C::m_u;
};

template <> struct RadSystem_Traits<ShellProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadhydroShock/test_radhydro_shock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ template <> struct quokka::EOS_Traits<ShockProblem> {
static constexpr double mean_molecular_weight = mu;
static constexpr double boltzmann_constant = k_B;
static constexpr double gamma = gamma_gas;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShockProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RadhydroShockCGS/test_radhydro_shock_cgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ template <> struct quokka::EOS_Traits<ShockProblem> {
static constexpr double mean_molecular_weight = C::m_p + C::m_e;
static constexpr double boltzmann_constant = k_B;
static constexpr double gamma = gamma_gas;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShockProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RayleighTaylor2D/test_hydro2d_rt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ template <> struct quokka::EOS_Traits<RTProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct HydroSystem_Traits<RTProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/RayleighTaylor3D/test_hydro3d_rt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ template <> struct quokka::EOS_Traits<RTProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct HydroSystem_Traits<RTProblem> {
Expand Down
1 change: 0 additions & 1 deletion src/ShockCloud/cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ template <> struct quokka::EOS_Traits<ShockCloud> {
static constexpr double gamma = 5. / 3.; // default value
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct Physics_Traits<ShockCloud> {
Expand Down
1 change: 0 additions & 1 deletion src/SphericalCollapse/spherical_collapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ template <> struct quokka::EOS_Traits<CollapseProblem> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = NAN;
static constexpr double boltzmann_constant = C::k_B;
static constexpr double mass_code_units = C::m_u;
};

template <> struct HydroSystem_Traits<CollapseProblem> {
Expand Down

0 comments on commit 852ee12

Please sign in to comment.