[mesa-users] hydrostatic equilibrium calculation with mesa data

Noam Chai noamchai at gmail.com
Wed Oct 5 03:43:04 EDT 2016


I'm having a trouble calculating the hydrostatic equilibrium for a simple
star with the mass of the sun. I use matlab 2014a to calculate the gradient
of dpdr, by using two methods:
1. the inner function 'gradient'.
2. with a for loop - (p(i+1)-p(i-1))/(r(i+1)-r(i-1))

The plot from both methods have lots of significant spikes that looks like
noise in it. Did anyone struggled with this problem? why does it happend?

Another question:
How does mesa decides the intervals of the radius? it seems that the
intervals are not constant. How can I change the length of the vector r and
how can I make it an evenly spaced vector?

Thank you all,

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

More information about the Mesa-users mailing list