[mesa-users] Setting surface optical depth

Bill Paxton paxton at kitp.ucsb.edu
Mon Jun 10 18:16:14 EDT 2013

On Jun 10, 2013, at 11:38 AM, Christopher J. White wrote:

> On a related issue, just to make sure I'm reading the code correctly, it seems that the starting point for integrations is not 10^-5 absolute optical depth, but rather 10^-5 times the desired endpoint, based on line 258 of atm/private/integrate_atm.f. Is this correct?

Hi Chris,

It is wonderful that you are digging into the code!  
And if you find someplace where you need to change something such as an arbitrary constant like the 1e-5, please let us know.
I'm happy to add more hooks and controls.

Ehsan's reply covers most of your email, but I can address the specific one about the atm integration.
It is starting from an optical depth of 1e-5 times the tau_base argument.
The comment in atm/public/atm_lib says this:

         real(dp), intent(in) :: tau_base ! stop integration when reach this optical depth
            ! this defines the base of the atmosphere. does not need to be at photosphere.

To check what star is actually passing, grep for 'atm_get_int_T_tau' in star/private
Turns out there are 2 calls: one in create_atm.f and the other in hydro_vars.f.
The call in create_atm calculates the argument to atm_get_int_T_tau by this line

            tau_surface = s% tau_factor*s% tau_base ! tau at outer edge of cell 1

And it seems that I must have done a cut-and-paste since the line in hydro_vars is the same:

         tau_surface = s% tau_factor*s% tau_base ! tau at outer edge of cell 1

However I can now see a source of possible confusion.  The arg in atm_lib is called "tau_base",
but in star we calculate the base of the atmosphere to be the outer edge of cell 1 with
an optical depth of tau_factor*tau_base.    sigh.....    

The answer to your question is that the starting point for the integrations is 10^-5 times the optical depth
at the outer edge of cell 1 -- i.e., the "surface" of the model, which does not have to be the photosphere.

Does that help clarify things?  Or just confuse them even more?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20130610/758e3988/attachment.html>

More information about the Mesa-users mailing list