Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make n14 optional for detonation setup #2656

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Exec/science/Detonation/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void problem_initialize ()
problem::in14 = network_spec_index("nitrogen-14");
problem::io16 = network_spec_index("oxygen-16");

if (problem::ihe4 < 0 || problem::ic12 < 0 || problem::in14 < 0 || problem::io16 < 0) {
if (problem::ihe4 < 0 || problem::ic12 < 0 || problem::io16 < 0) {
amrex::Error("ERROR: species indices not found");
}

Expand Down Expand Up @@ -51,9 +51,15 @@ void problem_initialize ()
}

problem::xn[problem::ic12] = amrex::max(problem::cfrac, problem::smallx);
problem::xn[problem::in14] = amrex::max(problem::nfrac, problem::smallx);
problem::xn[problem::io16] = amrex::max(problem::ofrac, problem::smallx);
problem::xn[problem::ihe4] = 1.0_rt - problem::cfrac - problem::nfrac - problem::ofrac - (NumSpec - 3) * problem::smallx;

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;
}
else {
problem::xn[problem::ihe4] = 1.0_rt - problem::cfrac - problem::ofrac - (NumSpec - 2) * problem::smallx;
}

// Set the ambient material

Expand Down
Loading