[mesa-users] More on the definition of Teff

Warrick Ball wball at bison.ph.bham.ac.uk
Wed Apr 26 06:35:08 EDT 2017


Hi again all,

Continuing my tinkering with atmospheric structure, I've come across what 
looks like some coding of Teff as the temperature of a model's outermost 
meshpoint.  Since I'm working on incorporating the stellar atmosphere into 
the stellar model, the outermost meshpoint is *not* the photosphere, which 
causes issues.

As a simple example, I've attached an inlist for r9575 that extends the 
outermost meshpoint of the model to an optical depth of 0.001*(2/3).  It's 
possible to show that by solving the usual structure equations above the 
photosphere, you recover an Eddington grey atmosphere.

When run, you'll get a profile for the last model (final.profile).  In the 
header data, I find Teff = 5778.56 K, as is displayed to the terminal 
during the evolution.  But if I compute the effective temperature using 
the black body law with photosphere_L and photosphere_r from the same 
profile, I get Teff = 5780.28 K.  What's going on?

I did some digging into the code and found that Teff is set by the 
atmosphere module.  Following the function calls, I eventually got to line 
215 of atm/private/integrate_atm.f90:

     Teff4 = L/(4d0*pi*R*R*boltz_sigma)

which, on first sight, looks fine.  But what are R and L here?  Turns out 
that these come from line 1372+ in star/private/hydro_vars.f90:

     call atm_get_int_T_tau( &
        s% atm_int_errtol, s% cgrav(1), M, r_surf, L_surf, &
        ...

As the name suggests, r_surf and L_surf are defined on lines 809-810 as

     r_surf = s% r(1)
     L_surf = s% L(1)

So Teff is indeed being defined by the outermost meshpoints, rather than 
the actual photosphere.

Two notes here.  First, this doesn't matter if, like in most cases I 
expect, the outermost meshpoint *is* the photosphere. Second, I noticed 
that elsewhere (and for what purpose I'm not sure) the star_info structure 
has a variable called photosphere_black_body_T.  This is computed e.g. on 
lines 93-94 of star/private/report.f90:

     s% photosphere_black_body_T = &
        atm_black_body_T(s% photosphere_L, s% photosphere_r)

where atm_black_body_T is on lines 656-661 in atm/public/atm_lib.f90:

     real(dp) function atm_black_body_T(L, R)
        use crlibm_lib, only: pow_cr
        use const_def, only: pi, boltz_sigma
        real(dp), intent(in) :: L, R
        atm_black_body_T = pow_cr(L / (4d0*pi*R*R*boltz_sigma), 0.25d0)
     end function atm_black_body_T

and is therefore what I would expect Teff to be.

Anyway, I'm not sure what the "fix" is.  In my own work in progress, I use 
the star_info pointer to get the photospheric information inside the 
routine for the atmospheric BC, so that Teff is returned correctly.  It 
works for me but I have no idea if that a universal or optimal solution.

Cheers,
Warrick




------------
Warrick Ball
Postdoc, School of Physics and Astronomy
University of Birmingham, Edgbaston, Birmingham B15 2TT
wball at bison.ph.bham.ac.uk
+44 (0)121 414 4552
-------------- next part --------------
&star_job
    write_profile_when_terminate = .true.
    filename_for_profile_when_terminate = 'final.profile'

    relax_to_this_tau_factor = 1d-3
    dlogtau_factor = 0.1d0
    relax_tau_factor = .true.
    relax_initial_tau_factor = .true.
    
/ !end of star_job namelist


&controls
    mesh_delta_coeff = 0.5
    initial_mass = 1 ! in Msun units
    max_model_number = 40
    which_atm_option = 'simple_photosphere'
/ ! end of controls namelist


More information about the Mesa-users mailing list