[mesa-users] Writing out the atmosphere in the profile
Anwesh Mazumdar
anwesh at tifr.res.in
Thu Jan 24 14:52:19 EST 2013
Dear Morgan, Radek and Bill,
Thanks for your prompt responses.
It seems from Bill's email that currently there is indeed no switch to
add the atmosphere to the profile, which was my understanding also. I
will try out the method suggested by Bill to do this in the coming days,
and if successful, will be glad to share it. Thank you Bill for the
explanation and the prescription.
However, Morgan and Radek's emails seem to indicate that they have been
able to write out the atm information in the profile already. I think
just using
write_pulse_info_with_profile = .true.
does not include the atm in the profile (I recall having tried that),
but maybe I am missing something there.
Radek's solution:
relax_tau_factor=.true.
relax_to_this_tau_factor=1e-3
is something I have not tried so far.
Let me explain the reason behind wanting to do this in the first place.
I am using MESA models including atmospheres to calculate frequencies
(using ADIPLS). However, other asteroseismic quantities that we can
calculate from the model would not include the atmosphere, if we use the
model only. For example, if one would like to compare the acoustic
radius of the star (\int_0^R dr/c) computed from the model to the
inverse of twice the average large separation of the frequencies, then
the two calculations would not be consistent because the atmosphere
would not be included in the former. Of course, it is possible to use
(with a little bit of effort) the pulse_output to calculate the acoustic
radius, instead of the profile output, but it would be nice to have the
atmosphere output written out in the profile as well (as an option). It
would also be handy for other asteroseismic stuff as well. Hence the
"wish-list" :)
With best regards,
Anwesh
On 01/25/2013 12:56 AM, Bill Paxton wrote:
> 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
>
>
>
>
>
>
--
Dr. Anwesh Mazumdar
Homi Bhabha Centre for Science Education
Tata Institute of Fundamental Research
V. N. Purav Marg, Mankhurd, Mumbai 400088, India.
Phone: +91 22 2507 2424 Fax: +91 22 2556 6803
E-mail: anwesh at tifr.res.in
More information about the Mesa-users
mailing list