[mesa-users] Eq. 9 in Paxton et al. 2011

Bill Paxton paxton at kitp.ucsb.edu
Sun Sep 14 13:12:45 EDT 2014

On Sep 14, 2014, at 9:30 AM, Ehsan Moravveji wrote:

> Thanks Bill for your detailed explanations.
>>         dP0 = s% surf_bc_offset_factor*s% cgrav(1)*s% mstar*s% dm(1)/(8*pi*r*r*r*r)
>>         dT0 = dP0*s% gradT(1)*s% T(1)/s% P(1)
> There still remains a puzzle for me to resolve:
> I understand the necessity of the interlaced mesh for intensive and extensive quantities for the sake of numerical efficiencies. dP0 equation is Okay.
> However, what I see is the blend of two variable types in dT0 equation above; here, gradT and dP0 are defined at the face, whereas P and T are defined as cell averages. But, both are used on the RHS of dT0 equation.
> Why is this an allowed operation?
> Am I missing a point here?
> I will try test_suite/low_z with/without s% surf_bc_offset_factor and let you know.
> Happy weekend,
> Ehsan.

Hi Ehsan,

Very good find!   It should be

         dT0 = dP0*s% gradT(1)*T_surf/P_surf

and these partials of dT0 must be changed to match: dT0_dlnR, dT0_dlnT, dT0_dlnd, dT0_dL

Then we can see what breaks as a result of fixing that bug!  ;D

If you want to give it a try, modify the code and rerun the test suite to see what happens.


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

More information about the Mesa-users mailing list