[Mesa-users] Questions about using other_eos

Jeremy Sakstein sakstein at hawaii.edu
Fri Dec 11 21:34:31 EST 2020


Hi everyone,

I have two questions about using other_eos. To give some context, I would
like to call the usual MESA EOS routines to find the EOS then change the
values in the entries of res(i).

I'm using r-12778.

My questions are:

1) I am currently writing my other_eosDT_get routine in run_star_extras.f.
In order to call the default EOS first, I am just copying the routine from
$MESA_DIR/eos/public/eos_lib.f90 but it appears that this relies on modules
located in $MESA_DIR/eos/make.

My workaround for this is to just copy these to the make directory and then
my code compiles. I am worried that I may be messing something up when I do
this.

Is the correct way to use other_eos to write my routine directly into
$MESA_DIR/eos/public/eos_lib.f90, recompile the entire module, then point
to this from run_star_extras.f?

2) My plan was just to modify the other_eosDT_get routine to change the
entries in res(i). Do I need to modify the entire set of routines given in
$MESA_DIR/star/other/other_eos.f90 e.g.

         ! s% other_eosDT_get_T => my_eosDT_get_T

         ! s% other_eosDT_get_Rho => my_eosDT_get_Rho

         ! s% other_eosPT_get => my_eosPT_get

         ! s% other_eosPT_get_T => my_eosPT_get_T

         ! s% other_eosPT_get_Pgas => my_eosPT_get_Pgas

         ! s% other_eosPT_get_Pgas_for_Rho => my_eosPT_get_Pgas_for_Rho

as well? Looking at these routines, it looks like if routines like
my_eosPT_get or my_eosDE_get are called then I need to do this, but I am
not sure if they are called during a normal MESA run or not. The others
seem to find the density, temperature, gas pressure given the EOS so it
looks like I can leave these alone.

Is this correct?

Thanks for any help you can give.

Cheers,

Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20201211/e68f1929/attachment.htm>


More information about the Mesa-users mailing list