[Mesa-users] Variables on other_energy hook
José Lopes
josevlopes at tecnico.ulisboa.pt
Fri Nov 30 11:22:54 EST 2018
Hello Aaron,
As a matter of fact I usually go back and forth in MESA versions because I am currently updating an extension to I have been developing in order to be compatible with the most recent MESA version. Nonetheless, by your description, I can see to which portion of the code you are referring to. I will take a look!
Thank you,
Best Regards,
José Lopes
Ligado 30 de novembro de 2018 no 16:14:57, Aaron Dotter (aaron.dotter at gmail.com) escreveu:
Hi José,
You didn't mention what MESA version you're using but the place to look is in mlt/private/mlt.f90. In mesa10398 you can find the region where the smoothing is done between lines 550:650.
Aaron
On Fri, Nov 30, 2018 at 5:17 AM José Lopes <josevlopes at tecnico.ulisboa.pt> wrote:
Hello Aaron,
Using s%gradT instead of s%actual_gradT indeed solves this specific problem!
I have been taking a look at MESA's MLT subroutines trying to understand the method used to smooth s%gradT (I am facing a similar problem with numerical derivatives of quantities in regions with rapidly varying composition or mixing boundaries) but, unfortunately, I have not reached any conclusion yet. Can you please tell me what is the method used to smooth gradT or point me to a region of the code where I can better understand the methods algorithm?
Thank you very much for your help!
Best Regards,
José Lopes
Ligado 28 de novembro de 2018 no 19:48:15, Aaron Dotter (aaron.dotter at gmail.com) escreveu:
Hi Jose,
Is there a reason why you use s% actual_gradT instead of s% gradT?
s% gradT is calculated by mlt and is smoothed (by default). Please try that and see if it solves your problem.
Aaron
On Wed, Nov 28, 2018 at 2:34 PM José Lopes via Mesa-users <mesa-users at lists.mesastar.org> wrote:
Dear Mesa Users,
I am using the other_energy hook in MESA and while testing my subroutines I found that some internal variables are different when they are called in the hook and when they are called by the MESA output subroutines, within the same age step. In particular, I found that the variable s%actual_gradT shows a divergent behaviour when the other_energy hook is called, and has a much smoother behaviour when the output subroutines are called at the end of the age step (see the picture attached to this e-mail).
My problem is that the temperature gradient is one of the ingredients in my additional energy term (computed during the other_energy hook call) and its divergence is causing me troubles!
My guess would be that the variable actual_gradT is being smoothed/converged/computed again at the end of the age step. If so, how can I have access to the variable as in the end of the age step in the other_energy hook? Is it even possible? Am I missing something?
Thank you all,
José Vargas Lopes
PhD Student
CENTRA, Centre for Astrophysics and Gravitation
IST, University of Lisbon, Portugal
_______________________________________________
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/20181130/3d8cdc4c/attachment.html>
More information about the Mesa-users
mailing list