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

add a new option: basestate_use_pres_model #398

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions Source/MaestroBaseState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,13 @@ void Maestro::InitBaseState(BaseState<Real>& rho0, BaseState<Real>& rhoh0,
}
#endif

// (rho,T) --> p,h
eos(eos_input_rt, eos_state);
if (basestate_use_pres_model) {
// (rho,p) --> T,h
eos(eos_input_rp, eos_state);
} else {
// (rho,T) --> p,h
eos(eos_input_rt, eos_state);
}

s0_init_arr(n, r, Rho) = d_ambient;
s0_init_arr(n, r, RhoH) = d_ambient * eos_state.h;
Expand All @@ -209,7 +214,7 @@ void Maestro::InitBaseState(BaseState<Real>& rho0, BaseState<Real>& rhoh0,
}
#endif
p0_init_arr(n, r) = eos_state.p; // p_ambient !
s0_init_arr(n, r, Temp) = t_ambient;
s0_init_arr(n, r, Temp) = eos_state.T;

// keep track of the height where we drop below the cutoff density
if (s0_init_arr(n, r, Rho) <= base_cutoff_density &&
Expand Down
3 changes: 3 additions & 0 deletions Source/param/_cpp_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ perturb_model bool false y
# print out HSE diagnostics as a function of r for the initial model
print_init_hse_diag bool false y

# do we use rho, T or rho, P from the initial model to establish thermodynamics
basestate_use_pres_model int 0 y

#-----------------------------------------------------------------------------
# category: timestepping
#-----------------------------------------------------------------------------
Expand Down
Loading