[Mesa-users] sound speed and mesa eos
Francis Timmes
fxt44 at mac.com
Fri Jun 1 15:33:32 EDT 2018
thanks.
fxt
> On May 31, 2018, at 10:26 PM, Philip Chang <chang65 at uwm.edu> wrote:
>
> Hi Frank, Mike,
>
> Lets try this. Attached is a simple fortran code that will link to the mesa eos -- latest stable release. You can make it with (as long as MESA_DIR is defined). Here X=0.7 and Z=0.02
>
> make -f Makefile.testeos
>
> ./testeos
>
> you will find a listing as follows:
>
> <rho> <temp> <energy> <gamma_1>
>
> For the example, I have set rho = 0.75. Here two places are interesting. First at around 3000K:
>
> 0.75000000000000000 2818.3830714824689 917005561701.84265 1.2581053851756669
> 0.75000000000000000 3162.2778229206556 952987205766.07312 -0.48236718089717862
> 0.75000000000000000 3548.1340810338475 996770407222.82629 1.4353201560216964
>
> Gamma drops below 0. Second around 20000K
>
> 0.75000000000000000 17782.795473224207 3014600600934.2007 0.87688372997603969
> 0.75000000000000000 19952.624724264893 3513540317247.7241 0.60056105331790610
> 0.75000000000000000 22387.213190793434 4150639358313.1377 0.43825390162693439
> 0.75000000000000000 25118.866383555487 4618606989381.9092 0.63425392672279690
>
> Gamma drops below 1. In both cases, my hydro code will crash, but for different reasons. For \gamma_1 < 0, I get an undefined sound speed. For \gamma_1 below 1, then the relation between pressure and energy gets all screwed up. The latter case can probably be cleaned up -- I did assume an ideal eos in my hydro solver. But I am uncertain about the former.
>
> I know MESA has an implicit hydro solver (with first order reconstruction as stated in paper III or IV). I also know it has a an HLLC solver where you need the sound speed. It is not clear looking at the code how MESA tackles this. So how does MESA get the sound speed in the case when gamma_1 < 0 and what is the proper way of doing this?
>
> Thanks for all your help.
>
> Cheers,
> Phil
>
> On 5/31/18 10:53 PM, Francis Timmes wrote:
>> hi phil,
>>
>> i have no doubt you may be experiencing problems,
>> but if what you claim about the mesa eos was generally true,
>> a good fraction of the nightly mesa test suite would stop - and we would notice.
>>
>> fxt
>>
>>
>>
>>
>>> On May 31, 2018, at 5:02 PM, Philip Chang <chang65 at uwm.edu> wrote:
>>>
>>> Michael,
>>>
>>> What do you mean by convex? I am new to all this.
>>>
>>> Also I will write a short test code tomorrow to reproduce the issue.
>>>
>>> Cheers,
>>> Phil
>>>
>>> Get Outlook for Android
>>>
>>> From: Michael Zingale <michael.zingale at stonybrook.edu>
>>> Sent: Thursday, May 31, 2018 5:48:32 PM
>>> To: Philip Chang
>>> Cc: Francis Timmes; mesa-users
>>> Subject: Re: [Mesa-users] sound speed and mesa eos
>>> is the EOS with ionization convex? A non-convex EOS can cause hydro problems.
>>>
>>> On Thu, May 31, 2018 at 6:46 PM, Philip Chang <chang65 at uwm.edu> wrote:
>>> For what it is worth, r10398 had the same error. Any recommendations for an EOS with ionization that is reasonably easy to use (ideally with the multithreaded interpolation function)?
>>>
>>> Cheers,
>>>
>>> Phil
>>>
>>>
>>>
>>>
>>> On 05/30/2018 04:21 PM, Francis Timmes wrote:
>>> perhaps try the latest public version, r10398.
>>>
>>> i will say there is work going on (today even!)
>>> that further improves the mesa eos in the indicated regime.
>>>
>>> fxt
>>>
>>>
>>>
>>>
>>>
>>> On May 30, 2018, at 2:15 PM, Philip Chang <chang65 at uwm.edu> wrote:
>>>
>>> Hi Frank,
>>>
>>> r9575.
>>>
>>> -Phil
>>>
>>> On 05/30/2018 04:13 PM, Francis Timmes wrote:
>>> hi phil,
>>>
>>> what version of mesa are you trying this with?
>>>
>>> fxt
>>>
>>>
>>>
>>> On May 30, 2018, at 12:34 PM, Philip Chang <chang65 at uwm.edu> wrote:
>>>
>>> Dear Mesa users,
>>>
>>> I am using mesa for a rather specialized purpose. I have integrated the mesa eos into a hydrodynamics code (moving-mesh voronoi tessellation) and am using it for dynamically stellar problems. Right now I have been simulating a 15 solar mass ZAMS star both in SPH and moving mesh mode. SPH works great. But the moving-mesh stuff crashes.
>>>
>>> The reason is that I need the sound speed or some estimate for the Riemann solve. In doing so, I get P, rho and gamma_1 from the mesa eos. However, I have found that the return values of gamma_1 are sometimes < 1 -- bad -- and sometimes < 0 -- really bad. As the sound speed is \sqrt{\gamma_1 P/rho}, this gives NaN's everywhere. Negative gamma_1's are occuring around that appears to be ionization zones for H or He and are fairly strongly negative like -2 or -3.
>>>
>>> I'm trying to see what the best way of dealing with this is. As MESA has a HLLC solver in it, it also relies on the sound speed to get an estimate for the signal velocities and contact wave pressure. As far as I can tell, it would be vulnerable to the same issues that I am encountering.
>>>
>>> So my question is two fold.
>>>
>>> 1. Is the negative gamma_1 physical? I believe it is, as it occurs near ionization zones.
>>>
>>> 2. What is the proper way of computing sound speed in this circumstances?
>>>
>>> Thanks in advance for any help.
>>>
>>> Cheers,
>>>
>>> Phil
>>>
>>> _______________________________________________
>>> mesa-users at lists.mesastar.org
>>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>>
>>>
>>> _______________________________________________
>>> mesa-users at lists.mesastar.org
>>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>>
>>>
>>>
>>>
>>> --
>>> Michael Zingale
>>> Associate Professor
>>>
>>> Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800
>>> phone: 631-632-8225
>>> e-mail: Michael.Zingale at stonybrook.edu
>>> web: http://www.astro.sunysb.edu/mzingale
>>> github: http://github.com/zingale
>>>
>
> <testeos.tar.gz>
More information about the Mesa-users
mailing list