\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 2: Exploring the parameter space of novae}

Having run our first nova model in Lab 1, we'll now expand the range of white dwarf mass and accreted compositions to see the influence on the nova lightcurve. 

\vspace{1.0em}
{\noindent\bf Part 1: Stable burning}

Nuclear burning on white dwarfs isn't always unstable. At high accretion rates, the burning stabilizes. Wolf et al.~(2013, ApJ 777, 136) used MESA to calculate a sequence of stably-burning accreting white dwarf models. We've included these models with the files for this lab -- they are in {\verb stable_burning_models.tgz } (you can also find them on the MESA Marketplace at {\verb http://mesastar.org }). The models cover a range of white dwarf masses from 0.51 to 1.36 $M_\odot$.

\begin{itemize}
\item First choose a white dwarf mass from those available in the stable-burning models in the range 0.51 to 1.1 $M_\odot$. Copy the model to your work directory, edit your inlist to use the new model, and then check that if you accrete at a high rate the burning is stable. You may need to experiment with the rate a bit, but something in the range $3\times 10^{-7}$ to  $3\times 10^{-6}\ M_\odot\ {\rm yr^{-1}}$ should work.

\item Once you see stable burning, lower the accretion rate until you see unstable burning begin. Report the mass accretion rate of the last stable burning model you find $\dot M_{\rm stable}$, and the temperature and pressure at which the hydrogen burns in that model.
\end{itemize}

\vspace{1.0em}
{\noindent\bf Part 2: Unstable burning across the parameter space of mass and metallicity}

We discussed in the lecture that it is likely that the layer of accreted H/He is polluted by metals from the underlying white dwarf, either between novae as the layer builds up or during the nova itself. Published calculations often simulate this by adding extra metals to the accreting material. We'll do this here, adjusting the total amount of hydrogen and helium such that the ratio $Y/X$ is fixed.

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.

\begin{itemize}
\item Use the same mass as in part 1, but now choose a metallicity in the range $0$--$0.5$. Set the values of $Z$, $\dot M$ and $M$ in {\verb driver.py }, and then run it in the terminal by typing \verb| python driver.py |. Run the model at a high accretion rate again to find the stable-burning solution at your chosen $Z$.
\item Now explore lower accretion rates where the burning is unstable. For each value of $\dot M$, calculate the following:
\begin{itemize}
\item the recurrence time and ignition mass
\item the maximum temperature and pressure reached in the H burning region
\item the lightcurve of the nova
\item the rate at which the white dwarf mass is changing
\end{itemize}
Note that if you change 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}

We will collect the results for different $M_{WD}$ and $Z$ from each group to compare at the end of the session. 



\end{document}





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

\begin{itemize}
	\item To set up a new MESA work directory, copy it from inside MESA, e.g. to set up a new work directory named {\verb lab2_work }, you can use:

	\verb| cp -r $MESA_DIR/star/work lab2_work |

	\item A good starting accretion rate to use is $10^{-7}$--$10^{-6}\ M_\odot\ {\rm yr^{-1}}$ because hydrogen burning should be stable at those high rates.
	\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.
	
\end{itemize}

\vspace{1.0em}
{\noindent\bf Part 3: The nuclear physics of novae}

This part will explore some aspects of the nuclear flow in novae. Might give different options for the students to look at. Possibilities are the effect of $^3$He,  using more detailed networks than basic.net, looking in more detail at what happens to CNO nuclei in the runaway.



 
 Wolf et al.~(2013, ApJ 777, 136) calculated a sequence of stably-burning accreting white dwarfs for a range of masses. The models are available at the MESA Marketplace site ({\verb http://mesastar.org }). We've included them with the files for this lab -- they are in {\verb stable_burning_models.tgz }. (Some white dwarf models are included in MESA, in the directory  {\verb mesa/data/star_data/white_dwarf_models/ } , but because they have the temperature profile of a cooling white dwarf rather than an accreting white dwarf, it is a bit tricky to get convergence when using these as a starting point for accreting models.)


 
 

\vspace{1.0em}
{\noindent\bf Part 4: Mass loss}

This will explore what happens with different prescriptions for mass loss, either using the built-in's from MESA which implement some different formulae from the literature, or using {\verb run_star_extras } to implement an "other" mass loss routine.


