From 7fae7f68cd20c195d24b54eaa094bdd3c8e95800 Mon Sep 17 00:00:00 2001 From: "Eric T. Johnson" Date: Wed, 27 Mar 2024 14:31:25 -0400 Subject: [PATCH] Properly normalize the initial composition in Detonation --- Exec/science/Detonation/problem_initialize.H | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Exec/science/Detonation/problem_initialize.H b/Exec/science/Detonation/problem_initialize.H index 58205bbf24..a904962dd4 100644 --- a/Exec/science/Detonation/problem_initialize.H +++ b/Exec/science/Detonation/problem_initialize.H @@ -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