[mesa-users] tracking stellar moment of inertia

Josiah Schwab jwschwab at berkeley.edu
Mon Nov 4 15:38:09 EST 2013


Hi Brian,

> I've tried calculating the moment of inertia directly from the model
> itself by inserting the following lines into the run_star_extras.f
> file (along with the code to make Irot_tot and Irot_comp print to the
> history.data file):
>
>          Irot_comp = 0.
>          Irot_tot = 0.
>
>          do i = s% nz - 1, 1, -1
>             Irot_tot = Irot_tot + s%i_rot(i)*s%dm(i)
>             Irot_comp = Irot_comp + s%dm(i)*s%rmid(i)**2
>          end do
>
> However, doing this produces values that disagree (at about 50%).
>
> Any suggestions?

The moment of inertia of a spherical shell is not s%dm(i)*s%rmid(i)**2.
Unless you are correcting for that somewhere outside of the code snippet
you included, that is likely the source of the apparent discrepancy.

Best,
Josiah




More information about the Mesa-users mailing list