\documentclass[preprint, 12pt]{aastex}

\pagestyle{empty}

\usepackage{listings}
\usepackage{color}

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
  language=Java,
  aboveskip=3mm,
  belowskip=3mm,
  showstringspaces=false,
  columns=flexible,
  basicstyle={\small\ttfamily},
  numbers=none,
  numberstyle=\tiny\color{gray},
  keywordstyle=\color{blue},
  commentstyle=\color{dkgreen},
  stringstyle=\color{mauve},
  breaklines=true,
  breakatwhitespace=true,
  tabsize=3
}


\begin{document}

\section*{Simulating Stars 2018}
\section*{Novae Lab 3: Taking our nova model further}

In the lecture, we discussed several interesting aspects of nuclear reactions relevant for the ignition, energy release, and nucleosynthesis in novae. We've also talked about the importance of mass loss in novae. The goal in this lab is to explore some of these using our MESA models.

\vspace{1.0em}
{\noindent\bf Part 1. Extending the nuclear net}

Our models so far have been using the nuclear network {\verb basic.net }.
\begin{itemize}
	\item Have a look at the file {\verb basic.net } which you can find in {\verb mesa/data/net_data/nets } . The {\verb .net } file defines the nuclei and reactions that make up the network. Do you think that {\verb basic.net } includes all of the nuclei and reactions needed for studies of novae? When would you want to use a more complex network and why?
\item Now try using a different network by using the {\verb change_initial_net } and {\verb new_net_name } controls (you could extend the {\verb set_inlist } function in {\verb driver.py } to take an extra parameter {\verb net_name } and set the controls there.) Rerun one of your models with {\verb cno_extras.net } instead of {\verb basic.net } (have a look at the network definition file to see what this net includes). What differences do you see? For example, plot the lightcurves in the same plot and compare them. Which aspects of the nova does {\verb basic.net } capture accurately and where does it fail?
\item An alternative is to let MESA determine the size of the network as needed as the models progress. Try turning on MESA's adaptive network. Add the following to the \verb|&star_job| section of your inlist:

\verb| enable_adaptive_network = .true.|

\verb|min_x_for_keep = 1d-5|

\verb|min_x_for_n = 1d-4|

\verb|min_x_for_add = 1d-4|

\verb|max_Z_for_add = 999|

\verb|max_N_for_add = 999|

\verb|max_A_for_add = 999|

These are the default options given on the MESA website. Try running the model and watch the network. You might want to turn on the \verb|Network| window so you can see the network more clearly. 


\end{itemize}


\vspace{1.0em}
{\noindent\bf 2. Mini-project}

This last part of the lab is more open-ended. The idea is to have some fun investigating an aspect of novae using your MESA model! Use MESA to investigate one of the following questions:

\begin{itemize}
\item {\em The role of $^3$He in ignition.} In the lecture we discussed the possibility that a significant amount of energy could come from the reaction $^3$He + $^3$He $\rightarrow$ 2p + $^4$He. Run a sequence of models for different mass fractions of $^3$He, and investigate its effect on the ignition mass. For reference, the peak mass fraction of $^3$He in the Sun is $X_3\approx 3\times 10^{-3}$ (but you could and should consider larger values...)
\item {\em Novae as contributors to Galactic nucleosynthesis.} Nova may contribute to the abundance of some nuclei, particularly $^7$Li, $^{15}$N, or $^{17}$O, as long as the overproduction factor (abundance compared to solar) is $\gtrsim 100$. Use your nova models to calculate how much of these elements are ejected, and the corresponding overproduction factor.
\item {\em The distribution of CNO elements.} Initial energy release in the runaway comes from proton captures on $^{12}$C, but if the accreted material has been CNO processed in the companion, the CNO elements may be predominantly $^{14}$N instead. Investigate the effect of changing the mixture of CNO elements on nova properties.
\item {\em Mass loss in novae.} In our model we use the super-Eddington wind prescription for mass loss. There are other options in MESA that in principle provide a more realistic description of the mass loss, in particular you could look at \verb|rlo_wind|, \verb|nova_wind|, and \verb|flash_wind|. You will find a description of them on the MESA website (look at \verb|http://mesa.sourceforge.net/controls_defaults.html#mass_gain_or_loss|). \\Try implementing one or more of these winds and investigate how it changes the nova.

\end{itemize}

\end{document}




\newpage
\vspace{1.0em}
{\noindent\bf Hints and tips}

\begin{itemize}
	\item When running many different parameter variations, it can be useful to automate things. We've provided a python script {\verb driver.py } that automatically generates an inlist for MESA based on a template {\verb inlist_flash_template }. You can use this to run one model or many models iterating over different parameters. The script generates the inlist and then, if the run is successful, stores the {\verb history.dat } and final model, and makes a movie of the run using the {\verb .png } files generated by pgstar.
	\item If you change a parameter, e.g.~accretion rate, by a large amount, you'll probably run into convergence issues with the model. If that happens, try taking a smaller step. 
\end{itemize}

