[Mesa-users] Star Mass Loss Question
paxton at kitp.ucsb.edu
Sun Aug 27 17:54:53 EDT 2017
Josiah is the one to talk to about the details of what you are physically trying to model.
For the engineering side, I can suggest this alternative:
in the process to evolve a single step, the following happen in this order:
set_mdot (in winds) — looks at the current wind scheme info and sets the desired mdot for this step (warning: for implicit mdot this is only the 1st try)
call s% other_adjust_mdot — yet another hook
do_adjust_mass — this is where the mass is added or removed from the surface
do_set_vars — the sets up all the internal variables for the newly adjusted structure after adjust mass
do the rest of the computation for the step
it might be possible for you to use the other_adjust_mdot hook for your purpose.
you can access and change xa(*,k) for each cell. just make sure the mass fractions still add up to 1 when you are finished.
use dm(k) times xa(*,k) to check how much mass of each species you are adding or removing.
use s% dt * s% mstar_dot to find out how much mass will be removed by do_adjust_mass.
add up dm(k) from 1 to where the sum exceeds the mass to be removed to find the range of cells to modify.
> On Aug 27, 2017, at 1:51 PM, Isaac Malsky <isaacmalsky at uchicago.edu> wrote:
> I was hoping to ask if anyone had a suggestion on how to modify the mass of a small star in a particular way so that the model loses hydrogen and helium in specific ways. I've written a hook in run_star_extras that determines how much mass for each element should be lost, but I'm unsure of how to modify the parameter in star_data.inc. Should I use something like
> s% star_mass_h1 = star_mass_h1 - escape_h1
> Similar to %s mstar_dot = blank_variable?
> I'd greatly appreciate any help/advice. This is all in the adjust_mdot and mass_loss subroutine.
More information about the Mesa-users