[Mesa-users] R: total_mass h1

Guglielmo Volpato guglielmogosh at hotmail.it
Tue May 11 09:49:18 UTC 2021


Thanks Warrick!
Cheers,
Guglielmo
________________________________
Da: Warrick Ball <W.H.Ball at bham.ac.uk>
Inviato: martedì 11 maggio 2021 11:40
A: Guglielmo Volpato <guglielmogosh at hotmail.it>
Cc: mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
Oggetto: Re: [Mesa-users] total_mass h1

Hi Guglielmo,

I think `total_mass h1` has a fairly intuitive definition: it's the total mass of all the hydrogen-1 in the star.  If the units are unclear, it's in solar masses.

If you want to see how something like this is defined, a good place to start is `star/private/history.f90`.  If you search for `total_mass` eventually you'll find (on line 3771 in r15140):

     case('total_mass')
        val = star_avg_x(s,i)*s% xmstar/Msun

`s% xmstar` is the star's total mass, `i` is the index of that isotope in the abundance array (`h1` is usually 1) and `star_avg_x` is defined in the same file (lines 3545–3553):

     real(dp) function star_avg_x(s,j)
        type (star_info), pointer :: s
        integer, intent(in) :: j
        if (j == 0) then
           star_avg_x = 0
           return
        end if
        star_avg_x = dot_product(s% xa(j,1:s% nz),s% dq(1:s% nz))/sum(s% dq(1:s% nz))
     end function star_avg_x

Cheers,
Warrick




___________

Warrick Ball
Postdoc, School of Physics and Astronomy
University of Birmingham, Edgbaston, Birmingham B15 2TT
W.H.Ball at bham.ac.uk
+44 (0)121 414 4552

On Tue, 11 May 2021, mesa-users at lists.mesastar.org wrote:

> Hi all,
> I'm wondering, where can I find the definition of total_mass h1 (column in hystory_columns) and how is it computed?
> Thanks for your kindness,
> best regards,
> Guglielmo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20210511/9dec931e/attachment.htm>


More information about the Mesa-users mailing list