[mesa-users] Modified P in other_eos removed by P definition in micro.f90
Ireland, Lewis
lgi201 at exeter.ac.uk
Thu Oct 13 11:31:32 EDT 2016
Hello,
I am experimenting with adding an additional pressure term to s% P(k) after the EOS has ran, i.e. s% P(k) = s% P(k) + P_mag with appropriate modifications to other variables for thermodynamic consistency. All other variables retain their new values, i.e. the res(:) output variables, however, my modification to s% P(k) is wiped out by the store_eos_for_cell subroutine in star/private/micro.f90, as it is defined as s% P(k) = s% Prad(k) + s% Pgas(k). Therefore, when I print the value of P later on in my other_mlt part of run_star_extras.f, it does not include the addition.
Am I correct in thinking the only way to resolve this is to add the additional pressure term into the s% P(k) definition in the micro.f90 file, by making it a star structure variable, i.e. x_ctrl(1)? I am sceptical seeing as it is a private file and I have always used hooks to involve new physics in MESA, but this time I cannot see any alternative. If this is right, how do I “./mk” for private file modifications?
Cheers,
Lewis
More information about the Mesa-users
mailing list