diff --git a/massive_star/GNUmakefile b/massive_star/GNUmakefile index abb65ba..e6690f6 100644 --- a/massive_star/GNUmakefile +++ b/massive_star/GNUmakefile @@ -17,7 +17,7 @@ USE_CXX_REACTIONS = TRUE USE_FORT_MICROPHYSICS = FALSE -MAX_ZONES := 32768 +MAX_ZONES := 65536 DEFINES += -DNPTS_MODEL=$(MAX_ZONES) diff --git a/massive_star/README.md b/massive_star/README.md index aa435f1..385f2cb 100644 --- a/massive_star/README.md +++ b/massive_star/README.md @@ -1,10 +1,12 @@ +# massive star initial model + This is the initial model routine for the massive star problem. -The file: 15m_500_sec.txt is a 15 solar mass MESA initial model, with +The file: `15m_500_sec.txt` is a 15 solar mass MESA initial model, with an aprox21 composition. It can be converted into the subset of nuclei for aprox19 via -convert_21_to_19.py +`convert_21_to_19.py` This setup uses Ye as the primary composition variable from the initial model in regions that are in NSE. @@ -12,10 +14,10 @@ model in regions that are in NSE. Note: you should ensure that the NSE conditions in the inputs file match those of your simulation, so the model will be properly in HSE. -Also note that when running with 32768 zones, you need to do: +Also note that when running with > 16384 zones, you need to do: ``` -ulimit -s 16384 +ulimit -s 32768 ``` -Since the arrays are put on the stack. +since the arrays are put on the stack. diff --git a/massive_star/init_1d.H b/massive_star/init_1d.H index 660d34b..2bbcca7 100644 --- a/massive_star/init_1d.H +++ b/massive_star/init_1d.H @@ -83,12 +83,18 @@ set_aux(eos_t& eos_state) { Real dbeadt_pass; Real e_nu_pass; - nse_interp(eos_state.T, eos_state.rho, eos_state.aux[AuxZero::iye], - abar_pass, bea_pass, - dyedt_pass, dabardt_pass, dbeadt_pass, e_nu_pass, - eos_state.xn); + nse_table_t nse_state; + nse_state.T = eos_state.T; + nse_state.rho = eos_state.rho; + nse_state.Ye = eos_state.aux[AuxZero::iye]; - eos_state.aux[AuxZero::iabar] = abar_pass; + nse_interp(nse_state); + + for (int n = 0; n < NumSpec; ++n) { + eos_state.xn[n] = nse_state.X[n]; + } + + eos_state.aux[AuxZero::iabar] = nse_state.abar; } else { set_aux_comp_from_X(eos_state);