Skip to content

Commit

Permalink
some more commentw
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jun 7, 2024
1 parent 1ef584d commit 88e3d6c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 8 additions & 3 deletions Util/exact_riemann/riemann_rarefaction.H
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,14 @@ rarefaction(const amrex::Real pstar,
const double S1{0.9};
const double S2{4.0};

// Compute Z_s = C for a rarefaction connecting the state to the star
// region by integrating the Riemann invariant from p_s to pstar.
// This means solving a system of ODEs. We use RK4.
// Compute Z_s = C(p*, rho*) for a rarefaction connecting the
// state to the star region by integrating the Riemann invariant
// from p_s to pstar.
//
// The system is:
//
// dtau/dp = -1/C**2
// du/dp = +/- 1/C (+ for 1-wave, - for 3-wave)

constexpr amrex::Real tol = 1.e-5;

Expand Down
7 changes: 5 additions & 2 deletions Util/exact_riemann/riemann_star_state.H
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ riemann_star_state(const amrex::Real rho_l, const amrex::Real u_l, const amrex::

const amrex::Real tol = 1.e-10_rt;
const amrex::Real smallp = 1.e-8_rt;
const amrex::Real SMALL = 1.e-13_rt;
const amrex::Real SMALL = 1.e-8_rt;


// get the initial sound speeds
Expand Down Expand Up @@ -79,7 +79,9 @@ riemann_star_state(const amrex::Real rho_l, const amrex::Real u_l, const amrex::

// find the exact pstar and ustar

std::cout << "solving for star state: " << rho_l << " " << u_l << " " << p_l << " " << rho_r << " " << u_r << " " << p_r << std::endl;
std::cout << "solving for star state: " << std::endl;
std::cout << rho_l << " " << u_l << " " << p_l << std::endl;
std::cout << rho_r << " " << u_r << " " << p_r << std::endl;


// this procedure follows directly from Colella & Glaz 1985, section 1
Expand Down Expand Up @@ -116,6 +118,7 @@ riemann_star_state(const amrex::Real rho_l, const amrex::Real u_l, const amrex::

amrex::Real Z_l, Z_r;

std::cout << "iteration: " << iter << " " << pstar << " " << p_l << " " << p_r << std::endl;
// left wave

if (pstar - p_l > SMALL * p_l) {
Expand Down

0 comments on commit 88e3d6c

Please sign in to comment.