Skip to content

Commit

Permalink
Properly normalize the initial composition in Detonation
Browse files Browse the repository at this point in the history
  • Loading branch information
yut23 committed Mar 27, 2024
1 parent aa8d3b2 commit 7fae7f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Exec/science/Detonation/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ void problem_initialize ()

if (problem::in14 >= 0) {
problem::xn[problem::in14] = amrex::max(problem::nfrac, problem::smallx);
problem::xn[problem::ihe4] = 1.0_rt - problem::cfrac - problem::nfrac - problem::ofrac - (NumSpec - 3) * problem::smallx;
problem::xn[problem::ihe4] = 1.0_rt - problem::xn[problem::ic12] - problem::xn[problem::in14] - problem::xn[problem::io16] - (NumSpec - 4) * problem::smallx;
}
else {
problem::xn[problem::ihe4] = 1.0_rt - problem::cfrac - problem::ofrac - (NumSpec - 2) * problem::smallx;
problem::xn[problem::ihe4] = 1.0_rt - problem::xn[problem::ic12] - problem::xn[problem::io16] - (NumSpec - 3) * problem::smallx;
}

// Set the ambient material
Expand Down

0 comments on commit 7fae7f6

Please sign in to comment.