[mesa-users] other_momentum subroutine

Robert Farmer rjfarmer at asu.edu
Thu Jan 19 12:29:59 EST 2017


Hi
So if you grep inside the mesa source:

cd $MESA_DIR/star/private

grep -rin extra_dPdm *.f90

alloc.f90:909:            call do1(s% extra_dPdm, c% extra_dPdm)
alloc.f90:910:            if (failed('extra_dPdm')) exit
hydro_vars.f90:2618:            dlnP_dm_qhse = dlnP_dm_qhse + s%
extra_dPdm(k)/Ppoint_start
hydro_vars.f90:3008:            dvdt_AdPdm = dvdt_AdPdm - 4*pi*R2*s%
extra_dPdm(k)
profile_getval.f90:827:            case (p_extra_dPdm)
profile_getval.f90:828:               val = s% extra_dPdm(k)
star_profile_def.f90:368:      integer, parameter :: p_extra_dPdm =
p_extra_omegadot + 1
star_profile_def.f90:369:      integer, parameter :: p_extra_heat =
p_extra_dPdm + 1
star_profile_def.f90:1044:         profile_column_name(p_extra_dPdm) =
'extra_dPdm'


The line you want is:
hydro_vars.f90:2618:            dlnP_dm_qhse = dlnP_dm_qhse + s%
extra_dPdm(k)/Ppoint_start
line 2618 in hydro_vars.f90

Where (early in the function) the comment says
dlnP_dm_qhse = -G m / (4 pi r^4 <P>)

Rob



On Wed, Jan 18, 2017 at 11:39 PM, Ehsan Moravveji <e.moravveji at gmail.com>
wrote:

> Dear Sheyda,
>
> If the your quantity “x” has the same dimensionality as pressure, dx/dm
> seems like a legitimate term to be added to the HSE. In other words, you do
> not need to multiply/divide by pressure.
> However, make sure that “x” is a cell-averaged quantity (like pressure
> is), so that the derivative dx/dm is carried out at the face of the cell.
>
> I leave the answer to your other questions to those who have already used
> s% extra_dpdm.
>
> Best
> Ehsan.
>
> > On 18 Jan 2017, at 23:12, sheyda najafi <sh.najafi8590 at gmail.com> wrote:
> >
> > Hi MESA users
> >
> > I am trying to add an extra term (- dx/dm) to the hydrostatic
> equilibrium equation as follows:
> >
> > dp/dm = - G m/4 pi r^4 - dx/dm
> >
> >  or
> >
> > (( s%  p(k+1)-    s% p(k))/s% dm_bar(k)) = - (s% standard_cgrav)* s%
> m(k) / (4*pi* (s% r(k)**4 )) -((   xn(k+1)-    xn(k)) / s% dm_bar(k))
> >
> > where x is a new quantity. I am not sure about setting
> >
> > s% extra_dpdm(k) = - ((   xn(k+1)-    xn(k)) / s% dm_bar(k))
> >
> > Is it correct? or it must be divided by the interpolated pressure to be
> consistent with the hydrostatic equilibrium equation mesa solve.
> >
> > Another question is :  on which side of the hydrostatic equilibrium
> equation, the term (s% extra_dpdm) is added into the mesa code ?
> >  In other words, what is the sign of (dx/dm) in the (s% extra_dpdm) in
> my case?
> >
> >
> > Thank you in advance
> >
> > Sheyda Najafi
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot______
> _________________________________________
> > mesa-users mailing list
> > mesa-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/mesa-users
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20170119/d4ed63fa/attachment.html>


More information about the Mesa-users mailing list