In-Class Assignment 11#

Exploring Heat Transfer via Convection with MESA#

Learning Objectives#

  • identify convective and radiative regions using MESA models

  • explain time-dependent convective behavior using Kippenhahn diagrams

  • identify regions of thermohaline mixing

To produce Kippenhahn plots later in this exercise, we use mesaplot

Note

py_mesa_reader is not available on PyPI, so it can be installed using pip as:

pip install git+https://github.com/rjfarmer/mesaplot
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import sys 

# this will be different for you, find its location using `pip show mesaplot`
## sys.path.append('/opt/anaconda3/lib/python3.11/site-packages/mesaPlot') 

# note the capital `P`
## import mesaPlot as mp

Download the following model files locally. These are different files than from the other day!

# load data and see which variables are available
##bd_profile = pd.read_csv('0p03Msun_1RJup_profile.data',sep=r'\s+',header=4)
##bd_profile.columns

##bd_history = pd.read_csv('0p03Msun_1RJup_history.data',sep=r'\s+',header=4)
##bd_history.columns
# example reading a variable from the profile data
##bd_profile_gradr = bd_profile_gradr['gradr']
##bd_profile_gradr

##bd_history = pd.read_csv('0p03Msun_1RJup_history.data',sep=r'\s+',header=4)
##bd_history.columns

Convection in Brown Dwarfs#

Using the Brown Dwarf model MESA profile:

a.#

  1. Plot the computed \(\nabla_{\rm{ad}}\) and \(\nabla_{\rm{rad}}\) from the MESA profile gradr as a function of mass.

Where is the model convective?

## a results here

b.#

Now, using mesaplot, lets produce a Kippenhan diagram.

  1. Place 0.03Msun_1RJup_history.data in a folder called LOGS_brown_dwarf for example.

  2. Rename the file to history.data. mesaPlot cannot take unique filenames.

  3. Load the history data by passing the path to LOGS/brown_dwarf to mesaPlot.

  4. Using these data, produce a Kippenhan plot below versus model number or age (Kip2).

Where is the model convective? Does it agree with a?

## b results here
##m=mp.MESA()
##p=mp.plot()
##m.loadHistory(##
##p.plotKip(##

Time-Evolution of Convection in Massive Stars#

Using the Massive Star model MESA history data:

c#

  1. Place 20m_pre_ms_to_O_dep_history.data in a folder called LOGS_massive_star for example.

  2. Rename the file to history.data. mesaPlot cannot take unique filenames.

  3. Load the history data by passing the path to LOGS_massive_star to mesaPlot.

  4. Using these data, produce a Kippenhan plot below versus model number or age (Kip2).

Where is the model convective? Does it agree with a?

## c results here

Time-Evolution of Different Convection Mechanisms in Low Mass Stars#

Using the Solar model MESA profile data:

d#

Plot \(\nabla_{\rm{ad}}\) (grada), \(\nabla_{\rm{T}}\) (gradT), B (brunt_B), and \(\nabla_{\rm{L}}\) (gradL) as a function of mass (or radius).

See MESA Paper II Eq. 13.

Determine where the model is convective, radiative, and undergoing thermohaline mixing.

### d results here

e#

Confirm the results of d by creating a Kippenhahn plot using the 1M history data.

## e results here