[mesa-users] Printing planet profile properties
paxton at kitp.ucsb.edu
Tue Jul 12 00:47:41 EDT 2011
On Jul 11, 2011, at 8:58 PM, Gabriel-Dominique Marleau wrote:
> Dear MESA/star users,
> With in mind the modeling of giant gas planets (which seems to be garnering a healthy amount of attention in this mailing list), would someone know how to:
> 1. Print log*.data files of the "on-the-side" models calculated while adding a core with relax_M_center and relax_R_center on (as explained in star/public/run_star_defaults.dek)?
I didn't anticipate anyone wanting to do that! As you've seen, the standard "relax" routines turn off logging. I can think of 2 things you might do. You can find the relevant code in star/private/relax.f. The routine do_internal_evolve is the place where logging is turned off by the following 2 lines:
s% do_log_files = .false.
s% do_profiles = .false.
You could try just commenting those out and remaking star by doing
An alternative method that doesn't involve modifying the code would be to write your own versions of the relax routines that you want to follow.
For example, you could copy the routines do_relax_R_center, before_evolve_relax_R_center, relax_R_center_check_model, and do1_relax_R_center.
Replace the call on do_internal_evolve in do_relax_R_center by a call on star_evolve_to_check_point (see star/public/star_lib).
> 2. Add to the log files the composition in terms of the H, H_2, He mass fractions, i.e. track their dissociation and ionisation fractions within the star? I could not find a relevant column name in mesa/data/star_data/profile_columns.list but I may be missing something simple.
The mesa/eos doesn't provide the ionization fractions; that's why you didn't find them. If you'd like to provide a routine to return the ionization fractions for H and He, I'd be delighted.
> 3. Get the following columns to print?
if you don't find what you want in mesa/data/star_data/profile_columns.list, you can add columns in your run_star_extras using how_many_extra_profile_columns and data_for_extra_profile_columns.
here are a few things related to Brunt and mixing that are already available:
> - chiY ! dlnP/dlnY used in calculate of brunt_B term
> - dlnY_dlnP ! the actual dlnY/dlnP in the model as used in brunt_B
!brunt_N2 ! brunt-vaisala frequency squared
!brunt_A ! = N^2*r/g
!brunt_N2_dimensionless ! N2 in units of 3GM/R^3
!brunt_N_dimensionless ! N in units of sqrt(3GM/R^3)
!brunt_frequency ! cycles per day
!brunt_N ! sqrt(abs(brunt_N2))
!log_brunt_N ! log10(brunt_N)
!log_brunt_N2 ! log10(brunt_N2)
!sign_brunt_N2 ! sign of brunt_N2 (+1 for Ledoux stable; -1 for Ledoux unstable)
!lamb_S2 ! for l=1: S = 2*(csound/r)^2
!lamb_S ! for l=1: S = sqrt(2)*csound/r
!brunt_dlnRho_dlnR ! smoothed numerical difference
> - dlnmu_dr ! for salt-finger mixing
> - semiconvection_criterion ! positive means stable
> Including them in profile_columns.list with "use_Ledoux_criterion = .true." and values for alpha_semiconvection and thermo_haline_coeff yields for each a "failed to recognize item" error.
!gradL ! gradient for Ledoux criterion for convection
!gradL_composition_term ! = composition term in gradL. negative means thermohaline instability.
!sch_stable ! 1 if grada > gradr, 0 otherwise
!ledoux_stable ! 1 if gradL > gradr, 0 otherwise
!stability_type ! values same as defined in mlt_def for mixing types
More information about the Mesa-users