[Mesa-users] removing mass inside the star
Natasha Ivanova
nata.ivanova at ualberta.ca
Fri Mar 15 15:12:43 UTC 2024
Hello all,
I need to smoothly remove the mass inside the star (e.g., imagine an
accretion during a CE). I used to do it with my old stellar code, which was
not a problem, but something is incorrect when I try to do it with MESA. I
am sure it is possible, as there were papers published on that subject with
MESA; I likely do not do all that is needed.
The mass removal should not affect (at least at the moment of the removal)
values of P, tho and T, the star has to relax to the new values as a
reaction to new mass coordinates.
So, assume I have new values of masses at each previous mesh point.
Is there a subroutine in MESA that updates all necessary values for q and
other quantities if the mass array is known?
Currently, I do the update (after the array m is updated) as
s% dm(s% nz) = s% m(s% nz)
do k = s% nz-1, 1, -1
s% dm(k) = s% m(k) - s% m(k+1)
end do
s% mstar = s% m(1)
s% xmstar = s% mstar - s% M_center
do k=1,s% nz
s% q(k) = (s% m(k) - s% M_center) / s% xmstar
end do
do k = 1,s% nz-1
s% dq(k) = s% q(k) - s% q(k+1)
end do
s% dq(s% nz) = s% q(s% nz)
but it is clearly either wrong, or not enough even for very tiny mass
corrections.
Applying the steps above on unchanged mass is OK, so the quantities above
seem to be found correctly, but perhaps not all quantities that are needed
are updated.
Does anyone know what to do?
Thanks!!
Natasha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20240315/401d03af/attachment.htm>
More information about the Mesa-users
mailing list