[mesa-users] tracking stellar moment of inertia
bjackson at dtm.ciw.edu
Mon Nov 4 15:44:10 EST 2013
D'oh! I need to take physics 101 again, clearly. Thanks for catching my mistake.
On Mon, Nov 4, 2013 at 3:38 PM, Josiah Schwab <jwschwab at berkeley.edu> wrote:
> 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.
More information about the Mesa-users