[Mesa-users] Query regarding implementing hydrodynamics

Ebraheem Farag ekfarag at asu.edu
Tue Mar 19 15:54:29 UTC 2024


Hi Abha,

Very Cool Science you're exploring!

to answer your questions:
1: yes, those two controls are all you need. u_flag is off by default, so
it shouldn't show up in your inlist unless you are going to turn v_flag
off, and u_flag on to enter the HLLC Riemann hydro mode.
2: split_merge_amr is for u_flag only, so don't worry about it, MESA uses
separate meshing functions for the finite difference solver, see
mesh-adjustment
<https://docs.mesastar.org/en/release-r24.03.1/reference/controls.html#mesh-adjustment>
.
3: 10 years is fine, but if you do capture a shock, it might crash. artificial
viscosity
<https://docs.mesastar.org/en/release-r24.03.1/reference/controls.html#pvsc-zsh>
can
help prevent a shock from forming and maybe velocity drag
<https://docs.mesastar.org/en/release-r24.03.1/reference/controls.html#drag-coefficient>
can
help damp dubious velocities, but beyond this, Riemann hydro is the path
forward. There is no shame in trying to use it.

-EbF

On Tue, Mar 19, 2024 at 8:34 AM Abha Vishwakarma <
abha.vishwakarma at niser.ac.in> wrote:

> Dear Jared and Ebraheem,
>
> Thanks a lot for your reply. I had some misunderstanding about the v_flag
> and u_flag parameters and this does seem to clarify it.
>
> To answer Jared's question, I am trying to model a common envelope system,
> in which the companion is a neutron star with a 12 solar mass red giant
> primary, and it is modelled by injecting extra_heat(as accretion energy)
> into the star at a radius corresponding to the orbital evolution of the
> system. To model the envelope expansion due to the accretion energy, and
> capturing potential shocks, I want to switch on hydrodynamics. It seems
> like I don't need to use u_flag for this purpose, as it is not an
> explosive system.
>
> I had a few more questions regarding this:
>
>    1. So, just to confirm, for my purposes all I need to do to keep
>    hydrodynamics on throughout the evolution is to set change_v_flag =
>    .true. and new_v_flag = .true., and not do anything to u_flag
>    parameters ?
>    2. Do I need to set the use_split_merge_amr = .true. because I will be
>    injecting extra_heat at specific zones which might need more refinement?
>    3. My evolution will not be on the scales of stellar evolution, it
>    should be around the order of 10 years or so, and I just wanted to know if
>    this timescale is consistent with the typical timescales in which MESA
>    simulations run with v_flag = .true. for red giant systems.
>
> I shall give more thought to the surface phenomena and boundary conditions
> as Ebraheem has pointed out and come back to this if I have any questions.
> Any help on the above listed questions will be very helpful!
>
> Best,
> Abha
>
> On Tue, Mar 19, 2024 at 3:18 AM Jared Goldberg <
> jgoldberg at flatironinstitute.org> wrote:
>
>> Dear Abha,
>>
>> What science case are you trying to do? MESA has 2 hydro solvers
>> implemented, including the HLLC (u_flag) and the non-HLLC (v_flag) solver.
>> The latter may be more stable for your purposes, depending on your desired
>> use case.
>>
>> You mention that you change both u_flag and v_flag to true.
>>
>> change_initial_u_flag = .true.
>>> change_initial_v_flag = .true.
>>>
>>
>> U_flag is for the newer (as of instrument paper IV) cell-centered,
>> better-shock-capturing hydro scheme useful for core-collapse supernova
>> explosions. V_flag turns on the older, more traditional face-centered hydro
>> solver with artificial viscosity. It’s not a good idea to have both on at
>> the same time (though only one will take priority anyway). See Paxton+18
>> <https://urldefense.com/v3/__https://ui.adsabs.harvard.edu/abs/2018ApJS..234...34P/abstract__;!!IKRxdwAv5BmarQ!d6n78vYvXa4k38_9Sj_ByNW2v1XKQ4AR4SsIxZS_srBBmuQn1rVm578bfMjRaTMGTDDAHCMnXM8HeMR7UwhfJiC8a3zqjDJfJg$> for
>> a detailed explanation of the different hydro solvers and various tests.
>>
>> In the various test_suite cases bringing 12 and 20Msun stars to
>> core-collapse (e.g. 20M_pre_ms_to_core_collapse), the v_flag hydro is set
>> on and u_flag is off. Maybe try using one of those test cases as a point of
>> reference instead.
>>
>> Cheers,
>> ~Jared
>>
>> On Mar 18, 2024, at 2:35 PM, Ebraheem Farag via Mesa-users <
>> mesa-users at lists.mesastar.org> wrote:
>>
>> 
>> Hello Abha,
>>
>> I don't have a whole lot to say here beyond "Here be dragons".
>>
>> In the current form we only use the HLLC rieman solver for explosion
>> modeling, not normal evolution calculations.
>> Perhaps investigate the $MESA_DIR/star/test_suite/PPISN test_suite to get
>> an idea for what might be needed to get rieman hydro working during a
>> normal evolution run with the core intact.
>> Also note that this was only done for very short timescales and a large
>> mesh with tight time steps might be necessary to get anywhere. Sometimes
>> the numerical initialization of riemann hydro can even drive the surface
>> crazy as well if done during an evolution calculation. I have some working
>> fixes for this but they are quite involved and do not exist in the current
>> release version. Just know that we're working on it and we'll likely
>> implement a future test suite to showcase how it's done :).
>>
>> -EbF
>>
>> On Fri, Mar 8, 2024 at 5:15 AM Abha Vishwakarma via Mesa-users <
>> mesa-users at lists.mesastar.org> wrote:
>>
>>> Dear MESA Users,
>>>
>>> I have been trying to switch on hydrodynamics in a 12 solar mass red
>>> giant star. I first ran the hse_reimann test suite which implements
>>> hydrodynamics in a 12 solar mass star with the core excised. But, I wish to
>>> implement hydrodynamics with the core intact.
>>>
>>> I switched on hydrodynamics by adding the following lines to my inlist:
>>>
>>>         change_initial_u_flag = .true.
>>>     change_initial_v_flag = .true.
>>>     new_v_flag = .false.
>>>     new_u_flag = .true.
>>>
>>> My program takes as input a 12 solar mass red giant. But, the program
>>> crashes because it hits the timestep limit or because of crossing some
>>> tolerances. But, if I instead take the 12 solar mass star with the core
>>> removed, as is done in the hse_reimann module, the code works fine.
>>>
>>> I am not sure what I am missing here, but I feel it has something to do
>>> with the core of the red giant, or some boundary conditions or physics that
>>> I might have missed. I have attached my inlist to this email, and any help
>>> in this regard would be greatly appreciated!
>>>
>>> Sincerely,
>>> Abha Vishwakarma
>>> _______________________________________________
>>> mesa-users at lists.mesastar.org
>>>
>>> https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!IKRxdwAv5BmarQ!bzUw4XcFA1iASqOxUxHhwcARQ6OtC83-QQ27p6R8v-bzLG-pTromCBdxIPBnsTAnsCwM93sbobPbhoMSOIB8KgNHttU90w$
>>>
>>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>> <https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!IKRxdwAv5BmarQ!d6n78vYvXa4k38_9Sj_ByNW2v1XKQ4AR4SsIxZS_srBBmuQn1rVm578bfMjRaTMGTDDAHCMnXM8HeMR7UwhfJiC8a3zGYiKI1g$>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20240319/f0d7dd42/attachment.htm>


More information about the Mesa-users mailing list