[Mesa-users] Using other_momentum in Riemann solver

Jing-Ze Ma mjz18 at mails.tsinghua.edu.cn
Mon Feb 22 14:02:24 UTC 2021


Hi everyone,


So I have a followup question. I was wondering how the other_pressure routine enters MESA r15140.
When I grep into star/private for extra_pressure I get this message:
grep -rin extra_pressure *.f90


alloc.f90:1027:            call do1(s% extra_pressure, c% extra_pressure)
alloc.f90:1028:            if (failed('extra_pressure')) exit
hydro_energy.f90:623:            if (s% use_other_pressure) PR_18%val = PR_18%val + s% extra_pressure(k-1)
hydro_energy.f90:647:         if (s% use_other_pressure) PL_18%val = PL_18%val + s% extra_pressure(k)
star_utils.f90:3370:         if (s% use_other_pressure) XP_18%val = XP_18%val + s% extra_pressure(k)


And I am not sure how to interpret these.
The main questions I want to ask are:


1. Is s% extra_pressure a P_extra so that P_total = P_rad + P_gas + P_extra ? When I refer to s% P(k), is it correct that I get P_total?


2. If so, can extra_pressure automatically enter the momentum equation and energy equation in Riemann solver?


3. Will this extra_pressure affects thermodynamic quantities?


Thanks a lot!


Best regards,
Jing-Ze


-----Original Messages-----
From:"Jing-Ze Ma via Mesa-users" <mesa-users at lists.mesastar.org>
Sent Time:2021-02-20 09:37:13 (Saturday)
To: "Jeremy Sakstein" <sakstein at hawaii.edu>
Cc: mesa-users <mesa-users at lists.mesastar.org>
Subject: Re: [Mesa-users] Using other_momentum in Riemann solver

Hi Jeremy,


Thank you for your suggestions.


I did create modified ZAMS models with my extra force included and loaded them following exactly what you have done in https://zenodo.org/record/4037390#.YDBfQjLis2z. I haven't tried many runs, but for some cases this method did work in r15140 and the star went all the way to core collapse. If too many ppisn runs fail in r15140, I think I will have to go back to older versions. Thanks!


I also noted another potential issue if cgrav is not constant throughout the star. It appears that cgrav is not updated during newton iteration as pointed out previously (https://lists.mesastar.org/pipermail/mesa-users/2020-July/011606.html), but so far this issue has not caused me any trouble.


Best regards,
Jing-Ze



-----Original Messages-----
From:"Jeremy Sakstein" <sakstein at hawaii.edu>
Sent Time:2021-02-20 03:02:22 (Saturday)
To: "Jing-Ze Ma" <mjz18 at mails.tsinghua.edu.cn>
Cc: mesa-users <mesa-users at lists.mesastar.org>
Subject: Re: [Mesa-users] Using other_momentum in Riemann solver


Hi Jing-Ze,

I am not able to help you with your question, but I wanted to make you aware of another potential issue you may run up against down the line.

After the pulses end, the star is relaxed to the new model. The initial step for this is to load a  ZAMS model and begin the relaxation from there (see https://arxiv.org/pdf/1710.08424.pdf sec 7 and appendix B). When I ran with a different value of (a less complicated example of what you want to do) I found that the relaxation failed and the code terminated. The reason for this is that the ZAMS models that are called are not in hydrostatic equilibrium with extra forces present (or different values of ).

I was able to solve this in 12778 by generating new ZAMS models with modified values of and calling those instead. It is likely that you will be able to overcome this issue using a similar method, but it may be tricky in r-15104. The routine where these models are called has been moved to the /star/public/star_lib.f90 (star_relax_to_star_cut) so you may find it harder to load modified models. 


An immediately obvious solution would be to go back to 12778 but I am not sure if you need some features of 15140.


Cheers,


Jeremy





On Fri, Feb 19, 2021 at 12:13 AM Jing-Ze Ma via Mesa-users <mesa-users at lists.mesastar.org> wrote:
>
> Hi everyone,
>
> I'm trying to add another kind of force into the momentum equation in the ppisn test_suite, but the other_momentum and other_momentum_implicit hooks are not implemented into the Riemann solver. I can always introduce a vector change to cgrav (setting cgrav to different values in different cells) so that an additional force is equivalently added to the momentum equation, but I think the energy equation would be physically wrong according to section 4 of MESA instrument paper IV published in 2018 (or perhaps I'm getting it wrong?). Is there any other way to add another force into Riemann solver using hooks?
>
> I'm using MESA r15140.
>
> Thanks a lot!
>
> Best regards,
> Jing-Ze
>
>
> --
> Jing-Ze Ma
> Undergraduate Student,
> Tsien Excellence in Engineering Program (TEEP) 2018,
> School of Aerospace Engineering,
> Tsinghua University
>
> _______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20210222/2f0d39a8/attachment.htm>


More information about the Mesa-users mailing list