[mesa-users] convergence problems
Josiah Schwab
jwschwab at berkeley.edu
Tue Jul 5 14:17:53 EDT 2016
Hi Zoe,
>> integer, parameter:: Y=0.4
>
> 0.4 is a real number, not an integer.
> you want to declare Y to be a double precision real number.
As Frank points out, you need to spend some time getting familiar with
Fortran variable types, both in type declarations and in assignment.
For example, in your earlier code, rr was 0 because (1/4) is 0.
Make sure you understand the difference between integer and real, and
also between single (real) and double precision (real(dp)).
MESA structure variables are in double precision, so when you do finite
differences in your run_star_extras, the values should be real(dp) and
not real, or you'll have some surprises when the difference is small.
MESA is starting with a model near the hydrostatic equilibrium that we
know and love. A value of Y~1 is likely a dramatic change to the star's
structure, so it is not surprising that MESA can't converge.
After you secure your new Fortran knowledge, you should give it a try
with a smaller value of Y first. If you want to explore Y~1, you may
need to ramp up the value of Y slowly or change how you are getting your
initial model.
Josiah
More information about the Mesa-users
mailing list