In-Class Assignment 6#
Identifying Different Regimes in Solar-like Stellar Model#
Learning Objectives#
explore the stellar structure of a solar-like star on the main-sequence
determine the radiative diffusion dominated regions
determine where convection dominates
explore opacity profiles in solar models
define core structure in stellar models
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
a. Locating the Radiative Diffusion Dominated Regime in a Solar-like star#
Download the following model files locally. These data were produced using the MESA 1m_pre_ms_to_wd test suite.
New \(1.0 M_{\odot}\) Main-Sequence profile data: 1m_pre_ms_to_wd.data;
Plot the radius (in units of Rsun) versus the radiative luminosity
lum_raddivided by the total luminosityluminosityusing the MESA data.Locate the approximate fractional radius and annotate where the \(L_{\rm{rad}}/L<1\) using
plt.axvlinewith a black dashed or dotted line.
Hint: this value in the Sun is about 72% in Solar calibration models
Describe in a few sentences the results of your plot and what could be happening in the region where radiation luminosity is non-dominant.
## load MESA data here
#one_msun_ms_profile = pd.read_csv('data/1m_pre_ms_to_wd.data',sep=r'\s+',header=4)
#one_msun_ms_profile.columns
lsun_cgs = 3.826e33 # erg / sec (1 Lsun)
rsun_cgs = 6.96e10  # cm
# obtain mesa variables here
#one_msun_ms_radius_cm = one_msun_ms_profile['###
#one_msun_ms_lum_cgs = one_msun_ms_profile['##
#one_msun_ms_lum_rad_cgs = one_msun_ms_profile['###
## 1-2 result here
#plt.plot(##,label=r'$L_{rad}/L$')
#plt.axvline(###,color='k',ls='--')
#plt.legend()
#plt.xlabel(##)
3 result here in words#
\(\ldots\)
b. Locating the Non-Diffusion Dominated Regime in a Solar-like star#
Using the same MESA data:
Next, compute the radial radiative flux (\(F_{\rm{rad}}\)) and the total convective flux (\(F_{\rm{conv}}\)) as a function of radius (in units of Rsun) and plot them on the same plot and label. Normalize both fluxes by their maximum values for comparison using
max(). Make sure to use cgs!
Hint: Use our relation for the Flux where \(F=l~/4\pi r^2\),
On this same plot, again label the approximate location where \(F_{\rm{rad}}\) < \(F_{\rm{conv}}\) in this case.
This plot suggests we transition from radiation diffusion dominated to convection dominated in the outer region.
Confirm this result by plotting our opacity \(\kappa\) as a function of radius on a seperate. Due to the large range of this value limit of
plt.ylim(0,30).
Hint: From the terminal you can open mesa data using the command
less -S 1m_ms_profile.datathen you can tab left and right to see which variables are available. \(\kappa\) isopacityin this case.
Describe in a few words what this change in opacity might suggest to help or hurt the onset of convective energy transfer?
# 1 result here - be sure to convert to CGS before computing the Flux!
#one_msun_ms_lum_conv_cgs =##
#one_msun_ms_flux = one_msun_ms_lum_cgs ##
# plot the fluxes here 
#plt.plot(##,label=r'$F_{rad}$')
#plt.plot(##,label=r'$F_{conv}$')
#plt.axvline(##,color='k',ls='--')
#plt.legend()
# obtain opacity here
#one_msun_ms_kappa =# 
# plot kappa here 
#plt.plot(#,label='$\kappa$')
#plt.ylim(#)
#plt.axvline(##,color='k',ls='--')
#plt.axvline(##,color='k',ls='--')
#plt.legend()
b 4 result here in words#
\(\ldots\)
c. Defining a Core-Boundary in a Solar-Like star#
Using the same MESA data:
Reproduce your Flux plots from part B.2.
Our goal is to add a few more things to this plot.
Plot the normalized nuclear energy generation as a function of radius (in units of Rsun) on the same plot and label.
Then, use that to determine the approximate location where \(\epsilon_{\rm{nuc,normalized}}\rightarrow0\), we will define this as the edge of the hydrogen burning core.
Hint: In the sun, this is at about a fractional radius of 20%
Lastly, annotate the three regions on the same plot, ‘core’, ‘radiative’, and ‘convective’ using annotate.
# obtain eps nuc
#one_msun_ms_eps_nuc = #
# plot everything combined and annotated
#plt.plot(#,label=r'$F_{rad}$')
#plt.plot(#,label=r'$F_{conv}$')
#plt.plot(#,label=r'$\epsilon_{\rm{nuc}}$')
#plt.axvline(#,color='k',ls='--')
#plt.axvline(#,color='k',ls='--')
#plt.annotate('core',xy=(#,#)) ## (x,y) data pair of the x and y variable
#plt.ylabel('Normalized Variable')
#plt.xlabel('r/Rsun')
#plt.legend()