Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Jan 16, 2024
1 parent 6274f1c commit 95019fd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/AdvectionSimulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ template <typename problem_t> void AdvectionSimulation<problem_t>::setInitialCon
{
// default empty implementation
// user should implement using problem-specific template specialization
// note: an implementation is only required if face-centered vars are used
}

template <typename problem_t> void AdvectionSimulation<problem_t>::computeAfterTimestep()
Expand Down
4 changes: 2 additions & 2 deletions src/HydroBlast2D/test_hydro2d_blast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct BlastProblem {

template <> struct quokka::EOS_Traits<BlastProblem> {
static constexpr double gamma = 5. / 3.;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double mean_molecular_weight = 1.0;
static constexpr double boltzmann_constant = C::k_B;
};

Expand Down Expand Up @@ -169,7 +169,7 @@ auto problem_main() -> int
sim.stopTime_ = 0.1; // 1.5;
sim.cflNumber_ = 0.3;
sim.maxTimesteps_ = 20000;
// sim.plotfileInterval_ = 2000;
sim.plotfileInterval_ = 2000;

// initialize
sim.setInitialConditions();
Expand Down
7 changes: 3 additions & 4 deletions src/HydroKelvinHelmholz/test_hydro2d_kh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct KelvinHelmholzProblem {

template <> struct quokka::EOS_Traits<KelvinHelmholzProblem> {
static constexpr double gamma = 1.4;
static constexpr double mean_molecular_weight = C::m_u;
static constexpr double mean_molecular_weight = 1.0;
static constexpr double boltzmann_constant = C::k_B;
};

Expand Down Expand Up @@ -84,7 +84,6 @@ template <> void RadhydroSimulation<KelvinHelmholzProblem>::setInitialConditions
state_cc(i, j, k, HydroSystem<KelvinHelmholzProblem>::x2Momentum_index) = rho * vy;
state_cc(i, j, k, HydroSystem<KelvinHelmholzProblem>::x3Momentum_index) = rho * vz;
state_cc(i, j, k, HydroSystem<KelvinHelmholzProblem>::energy_index) = P / (gamma - 1.) + 0.5 * rho * v_sq;
state_cc(i, j, k, HydroSystem<KelvinHelmholzProblem>::internalEnergy_index) = P / (gamma - 1.);
});
}

Expand Down Expand Up @@ -122,7 +121,7 @@ template <> void RadhydroSimulation<KelvinHelmholzProblem>::ErrorEst(int lev, am

auto problem_main() -> int
{
// Boundary conditions
// Problem parameters
const int ncomp_cc = Physics_Indices<KelvinHelmholzProblem>::nvarTotal_cc;
amrex::Vector<amrex::BCRec> BCs_cc(ncomp_cc);
for (int n = 0; n < ncomp_cc; ++n) {
Expand All @@ -135,7 +134,7 @@ auto problem_main() -> int
// Problem initialization
RadhydroSimulation<KelvinHelmholzProblem> sim(BCs_cc);

// sim.stopTime_ = 1.5;
sim.stopTime_ = 1.5;
sim.cflNumber_ = 0.4;
sim.maxTimesteps_ = 40000;
sim.plotfileInterval_ = 100;
Expand Down
1 change: 1 addition & 0 deletions src/RadhydroSimulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ template <typename problem_t> void RadhydroSimulation<problem_t>::setInitialCond
{
// default empty implementation
// user should implement using problem-specific template specialization
// note: an implementation is only required if face-centered vars are used
}

template <typename problem_t> void RadhydroSimulation<problem_t>::computeAfterTimestep()
Expand Down
2 changes: 1 addition & 1 deletion src/simulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ template <typename problem_t> class AMRSimulation : public amrex::AmrCore

// Nghost = number of ghost cells for each array
int nghost_cc_ = 4; // PPM needs nghost >= 3, PPM+flattening needs nghost >= 4
int nghost_fc_ = 2; // at least 2 are needed for tracer particles
int nghost_fc_ = Physics_Traits<problem_t>::is_mhd_enabled ? 4 : 2; // 4 needed for MHD, otherwise only 2 for tracer particles
amrex::Vector<std::string> componentNames_cc_;
amrex::Vector<std::string> componentNames_fc_;
amrex::Vector<std::string> derivedNames_;
Expand Down

0 comments on commit 95019fd

Please sign in to comment.