[mesa-users] Writing out the atmosphere in the profile
Bill Paxton
paxton at kitp.ucsb.edu
Thu Jan 24 14:26:38 EST 2013
On Jan 24, 2013, at 11:00 AM, Anwesh Mazumdar wrote:
> Hi!
>
> I am looking for a way to write out the atmosphere also along with the
> model. Currently, I find only two switches to turn the atmosphere
> calculation on and to write it out in the "pulse" output file, but
> nothing to write it out in the profile:
>
> which_atm_option = '...'
> add_atmosphere_to_pulse_info = .true.
>
> Can someone kindly guide me on how to write it out in the profile file
> as well?
Hi Anwesh,
When you add an atmosphere for pulsation info, it is only for pulsation info;
we don't actually add the atmosphere to the mesa model, we just call the
atm routines to give us info about the atmosphere that we add to the pulse output.
The profile contains only information about the mesa model, so it doesn't have
anything about the atmosphere that was "added" for pulsation analysis.
So to get details about the added atmosphere you need to go to the pulse output.
If you'd like to add a new output that has combined information for atmosphere + model,
then you can give it a try from you run_star_extras. First, get the atmosphere information
by calling the routine "star_create_atm" (see star/public/star_lib). That will fill in
the s% atm_structure information -- look in star/public/star_data.inc for that.
! atmosphere structure information (only created on demand)
integer :: atm_structure_num_pts
real(dp), pointer :: atm_structure(:,:) ! (num_results_for_create_atm,atm_structure_num_pts)
! defined at points in atmosphere
! atm_structure(:,1) is base of atmosphere
! atm_structure(:,atm_structure_num_pts) is top of atmosphere
The entries in this array are defined in mesa/atm/public/atm_def
! info about structure of atmosphere
integer, parameter :: atm_xm = 1 ! mass of atm exterior to this point (g)
integer, parameter :: atm_delta_r = atm_xm+1 ! radial distance above base of envelope (cm)
integer, parameter :: atm_lnP = atm_delta_r+1
integer, parameter :: atm_lnd = atm_lnP+1
integer, parameter :: atm_lnT = atm_lnd+1
integer, parameter :: atm_gradT = atm_lnT+1
integer, parameter :: atm_kap = atm_gradT+1
integer, parameter :: atm_gamma1 = atm_kap+1
integer, parameter :: atm_grada = atm_gamma1+1
integer, parameter :: atm_chiT = atm_grada+1
integer, parameter :: atm_chiRho = atm_chiT+1
integer, parameter :: atm_cv = atm_chiRho+1
integer, parameter :: atm_cp = atm_cv+1
integer, parameter :: atm_lnfree_e = atm_cp+1
integer, parameter :: atm_dlnkap_dlnT = atm_lnfree_e+1
integer, parameter :: atm_dlnkap_dlnd = atm_dlnkap_dlnT+1
integer, parameter :: atm_lnPgas = atm_dlnkap_dlnd+1
integer, parameter :: atm_tau = atm_lnPgas+1
integer, parameter :: atm_gradr = atm_tau+1
That tells you what info you have available at the points in the atmosphere. The same values
are of course available for points in the model, so you could write out a file with columns
for these items in both atmosphere and in model. Like a profile, but limited to items that
are defined in both atmosphere + model.
If you get that working, please share it with us!
Cheers,
Bill
More information about the Mesa-users
mailing list