[mesa-users] The meaning of photosphere_r

Aaron Dotter aaron.dotter at gmail.com
Tue Oct 18 07:22:32 EDT 2016


Hi Warrick,

I agree with your assessment.  T=Teff is a more general definition for the
photosphere than tau=2/3.  I bet the error introduced (by using tau=2/3
inappropriately) is usually small but I'd be curious to know if it is ever
large.

Aaron


On Tuesday, October 18, 2016, Warrick Ball <
wball at astro.physik.uni-goettingen.de> wrote:

> Hi,
>
> I'm currently considering models with the atmospheric structure included
> in the stellar model by placing the outer boundary condition at a smaller
> optical depth using tau_factor in &star_job.  I had a look at the variable
> s% photosphere_r, which is the radius of the photosphere, and set by the
> function get_r_phot in star/private/star_utils.f90.
>
> Judging by that code (appended below because it's quite short), it looks
> like photosphere_r is the depth at which tau=2/3.  Is that the desired
> behaviour?  I would personally say that the photospheric radius is where
> T=Teff.  For an Eddington grey atmosphere, this is tau=2/3, but it isn't
> for other T(tau) relations.  The T=Teff values are already in the function
> atm_tau_base in atm/public/atm_lib.f90, which returns the optical depth of
> T=Teff for the T(tau) relations: about 0.312 and 0.412 for krishna_swamy
> and solar_Hopf, respectively.
>
> Now that I know what photosphere_r really means, I can (quite easily!)
> write my own routine for run_star_extras.f.  But I thought I'd bring this
> up because this definition of the photosphere isn't what I expected, so
> it's possible that it's not what other user expect(ed) either.
>
> Cheers,
> Warrick
>
>
>       real(dp) function get_r_phot(s) ! return r where optical depth = 2/3
>          type (star_info), pointer :: s
>
>          integer :: k
>          real(dp) :: tau00, taup1, dtau, r003, rp13, r3
>
>          real(dp), parameter :: tau_phot = 2d0/3d0
>
>          include 'formats'
>
>          tau00 = 0
>          taup1 = 0
>          get_r_phot = s% r(1)
>          if (s% tau_factor >= 1) return
>          tau00 = s% tau_factor*s% tau_base
>          if (tau00 >= tau_phot) return
>          do k = 1, s% nz-1
>             dtau = s% dm(k)*s% opacity(k)/(4*pi*s% rmid(k)*s% rmid(k))
>             taup1 = tau00 + dtau
>             if (taup1 >= tau_phot .and. dtau > 0d0) then
>                r003 = s% r(k)*s% r(k)*s% r(k)
>                rp13 = s% r(k+1)*s% r(k+1)*s% r(k+1)
>                r3 = r003 + (rp13 - r003)*(tau_phot - tau00)/dtau
>                get_r_phot = pow_cr(r3,1d0/3d0)
>                return
>             end if
>             tau00 = taup1
>          end do
>
>       end function get_r_phot
>
>
>
>
> ------------
> Warrick Ball
> Postdoc, Institut für Astrophysik Göttingen
> wball at astro.physik.uni-goettingen.de
> +49 (0) 551 39 5069
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20161018/ae256433/attachment.html>


More information about the Mesa-users mailing list