[Mesa-users] Relaxing angle-averaged model from hydro simulation

Pablo Marchant pamarca at gmail.com
Tue Feb 6 20:20:00 EST 2018


Ok, seems it has a rough start.

Couple of pointers.

- the original files go from 0 to 1 in the first column, yours go the other
way. Need to check but I don't remember if the implementation is robust to
that.

- in the table you give a non-zero value for specific angular momentum at
the core. As you can imagine that might not behave well, deeper layers will
have infinite omega. I'd recommend setting the innermost value to zero. I
guess I could provide an option to fix a certain inner mass fraction of the
star to solid rotation to avoid issues at the very center.

- For the entropy relaxation, the surface can be a bit tricky. Not sure if
you run into this issue in particular, but if the outermost averaged cell
in your simulation is in average too hot/dense, it might not reproduce the
very outer layers of a star with a radiative envelope too well. It seems
your averages do have a spike in entropy at the very surface, so this might
be irrelevant. In my experience this can cause the relaxation to struggle,
but it finally produces a star that very quickly readjusts its surface to
something reasonable.

- Small subtlety regarding averaging of a simulation. If you divide your
volume in shells, going from q to q+dq, what final value of q are you
assigning to the shell? The value at its face q+dq? Be careful that this
would cause a slight offset. For instance, check this bit from the
relax_entropy routines

 833             xq(1) = s% dq(1)/2 ! xq for cell center
 834             do k = 2, nz
 835                xq(k) = xq(k-1) + (s% dq(k) + s% dq(k-1))/2
 836             end do

That bit of code computes cell-centered coordinates rather than face
valued. The input is assumed to correspond to cell-centered quantities with
their corresponding cell-centered coordinates. Also, If you do not provide
the values at the very edges of the model (q=0 or 1), the nearest value
will be assigned to points outside (i.e. no extrapolation, just assigning
the nearest value).

- Extra small subtlety when relaxing a rotating model. MESA assumes the
shells represent isobars in the shellular approximation. If you just do
spherical averages you will be mixing your isobars and producing a small
mismatch.

In terms of getting a relaxed model, probably the first three pointers are
more important, the other might be relevant to improve the final match.

Let me know how it goes ;). Your experience is very valuable to produce
better documentation.

Cheers

On Feb 6, 2018 5:24 PM, "Manos Chatzopoulos" <chatzopoulos at phys.lsu.edu>
wrote:

> Pablo,
>
> Thanks for the very helpful and kind response! I will certainly look
> forward to trying out your suggestions. In the meantime, here is the
> terminal output I get when I include angular momentum relaxation:
>
> -------
>
>                        avg remaining difference, lambda
> 0.0000000000000000D+00    1.0000000000000000D+00
>
>                          relax_initial_angular_momentum
>  relax_angular_momentum: max_steps_to_use        1000
> failed in mixing angular momentum
>        retry log10(dt/yr), log10(dt), retry_factor     1     1
> -9.602060       -2.102948        0.500000
> hydro_newton_step failed to accept
>        retry log10(dt/yr), log10(dt), retry_factor     2     1
> -9.903090       -2.403978        0.500000
>  have reached retry limit so now backup
> failed in mixing angular momentum
>        retry log10(dt/yr), log10(dt), retry_factor     1     1
> -10.204120       -2.705008        0.500000
> hydro_newton_step failed to accept
>        retry log10(dt/yr), log10(dt), retry_factor     2     1
> -10.505150       -3.006038        0.500000
>  have reached retry limit so now backup
> hydro_newton_step failed to accept
>        retry log10(dt/yr), log10(dt), retry_factor     1     1
> -11.408240       -3.909128        0.500000
> hydro_newton_step failed to accept
>        retry log10(dt/yr), log10(dt), retry_factor     2     1
> -11.709270       -4.210158        0.500000
>  have reached retry limit so now backup
> hydro_newton_step failed to accept
>        retry log10(dt/yr), log10(dt), retry_factor     1     1
> -13.214420       -5.715308        0.500000
> hydro_newton_step failed to accept
>        retry log10(dt/yr), log10(dt), retry_factor     2     1
> -13.515450       -6.016338        0.500000
>  have reached retry limit so now backup
>                                                      dt
> 3.0096197113037110D-08
>                                      min_timestep_limit
> 9.9999999999999995D-07
>
>  stopping because of problems dt < min_timestep_limit
>
>  do_relax_initial_angular_momentum ierr          -1
>  do_star_job_controls_after ierr          -1
>  before_evolve_loop ierr          -1
>
>
> ---------
>
> And here it is when I exclude it:
>
>  avg relative error, dt/secyer, model_number  0.73839791983438141
> 4.6050354628669335E-014         712
> hydro_newton_step failed to accept
>        retry log10(dt/yr), log10(dt), retry_factor     1   713
> -13.938827       -6.439715        0.500000
>                                                      dt
> 7.2663199909396781D-07
>                                      min_timestep_limit
> 9.9999999999999995D-07
>
>  stopping because of problems dt < min_timestep_limit
>
>  do_relax_initial_entropy ierr          -1
>  do_star_job_controls_after ierr          -1
>  before_evolve_loop ierr          -1
>
>
> --------
>
> Cheers, and thanks again for the valuable input!
>
> Manos
>
>
>
>
> On 2/6/18 5:16 PM, Pablo Marchant wrote:
>
> Hi Manos,
>
> can you share your terminal output to get an idea?
>
> we are doing some work to stabilize the relax routines, can't give you an
> ETA on that though. In particular with rotation I found that the current
> implementation of the calculation of FP and FT (the correction factors to
> the pressure and temperature equations) can experience some large changes
> which make convergence hard.
>
> I have some unfinished work now trying to integrate these factors for the
> case of a point mass Roche potential. This is a good approximation for most
> stellar purposes, and it allows constructing a simple fit to the integrated
> values rather than having to recompute it in MESA. Attached is a simple
> example of this implementation, it's mostly using a couple of by-eye-fits I
> made (see the attached plot showing the factors as a function of the volume
> equivalent radius). Can you try this out and see if it improves things at
> all? Goes in star/private/. Not promising anything though.
>
> Another option is to increase the steps for relaxation, for instance:
>
>   num_steps_to_relax_composition = 300
>
> in star_job
>
> Cheers
>
> On Tue, Feb 6, 2018 at 4:23 PM, Manos Chatzopoulos <
> chatzopoulos at phys.lsu.edu> wrote:
>
>> Dear mesa-users,
>>
>> We are using our 3D hydro code (OctoTiger) to simulate the stellar merger
>> of an 1Msun star within the envelope of a larger (~14 Msun) star. We then
>> extract the angle-averaged data in the format required by the MESA (v.
>> 10108) relaxation routines (as set in the relax_composition_j_entropy
>> test_suite setup and described in the star/defaults/star_job.defaults).
>> I attach plots of our entropy_new.dat, angular_momentum_new.dat and
>> composition_new.dat inputs showing the models we import into MESA starting
>> with the inlist_relax_composition_j_entropy (attached). I also attach
>> *png plots showing comparison between these profiles (only for H/He in
>> composition) and the original profiles used in the test_suite problem. As
>> you can see we are setting the mass of the desired relaxed model equal to
>> the mass coming out from our simulation.
>>
>> We are having issues getting a converged/relaxed model, especially when
>> we turn on relaxation for the angular momentum profile (Which we need,
>> ultimately). Any help/input would be greatly appreciated on how to move
>> forward.
>>
>> Best regards,
>>
>> --
>> Dr. Manos Chatzopoulos
>> Assistant Professor
>> Department of Physics & Astronomy
>> Louisiana State University
>> Nicholson #275
>> Office # 225-578-2907
>> Baton Rouge, LA 70803
>> United States of America
>> http://www.lsu.edu/physics/people/faculty/chatzopoulos.php
>>
>>
>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>
>>
>>
>
>
> --
> Pablo Marchant Campos
> M.Sc on Astrophysics, Universidad Católica de Chile
> PhD on Astrophysics, Argelander-Institut für Astronomie, Universität Bonn
>
>
> --
> Dr. Manos Chatzopoulos
> Assistant Professor
> Department of Physics & Astronomy
> Louisiana State University
> Nicholson #275
> Office # 225-578-2907
> Baton Rouge, LA 70803
> United States of Americahttp://www.lsu.edu/physics/people/faculty/chatzopoulos.php
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20180206/1fa18201/attachment.html>


More information about the Mesa-users mailing list