[mesa-users] convergence problems
zoe ansari
zoemc.ansari at gmail.com
Tue Jul 5 15:10:12 EDT 2016
Hi Josiah,
Taking integer instead of real is a really bad mistake, I know the
differences between them, and also the differences between real and
real(dp). I am just a beginner in fortran and MESA, so I hope you
understand this may happen to me.
And thank you for your advices about changing Y slowly or changing initial
model.
regards,
Zoe.
On Tue, Jul 5, 2016 at 10:47 PM, Josiah Schwab <jwschwab at berkeley.edu>
wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20160705/7e7898c0/attachment.html>
More information about the Mesa-users
mailing list