Skip to content

Commit

Permalink
Fix initial He4 mass fraction 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 55b3ce1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Exec/science/Detonation/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,15 @@ 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 55b3ce1

Please sign in to comment.