[FLASH-USERS] How to properly calculate sound speed

Seyit Hocuk seyit at astro.rug.nl
Wed Feb 3 09:28:36 EST 2010


Very basic question maybe, but does one have to use Helmholtz eos to get 
that gamma? Is it simple to switch from multigamma (for multispecies) to 
Helmholtz gamma.

Thanks Mike, Carlo and James.

Seyit


Mike Zingale wrote:
> that is dlogP/dlogrho at constant entropy.  THe helmholt EOS returns 
> thermodynamic derivatives with T and rho (and composition) held 
> constant, so that expression is dlogP/dlogrho with entropy held 
> constant expressed in terms of thermodynamic derivatives with rho and 
> T held constant.
>
>
>
>
> On Tue, 2 Feb 2010, James Guillochon wrote:
>
>> Actually, this is how the Helmholtz routine calculates gamma_1:
>>
>> !!  form gamma_1
>> presi = 1.0e0/pres
>> chit  = btemp*presi * dpresdt
>> chid  = dpresdd * den*presi
>> x7     = pres * deni * chit/(btemp * denerdt)
>> gamc  = chit*x7 + chid
>>
>> If you compare the result you get from this set of equations to 
>> dlogP/dlogrho, the gamma values are similar but NOT the same. Does 
>> anyone know where this derivation comes from, and why it's used 
>> instead of just dlogP/dlogrho? It doesn't seem to be in the Helmholtz 
>> EOS paper...
>>
>> -- 
>> James Guillochon
>> Department of Astronomy & Astrophysics
>> University of California, Santa Cruz
>> jfg at ucolick.org
>>
>> On Feb 2, 2010, at 7:18 AM, Mike Zingale wrote:
>>
>>> One additional comment, gamma_1 is that derivative (dlogP/dlogrho) 
>>> at constant entropy.  The link to the FLASH manual seems to omit 
>>> what is held constant.
>>>
>>> On Tue, 2 Feb 2010, Carlo Graziani wrote:
>>>
>>>> Hi Seyit.
>>>>
>>>> To amplify a bit on Tomek:  as documented in the User's Guide, at
>>>> http://flash.uchicago.edu/website/codesupport/flash3_ug_3p2/node21.html#SECTION06220000000000000000 
>>>>
>>>> gamma_c is in fact a calculated thermodynamic variable, emitted by
>>>> helmoltz_eos, defined as (rho/P)(dP/drho).  It is definitely not a
>>>> constant, and in fact the local speed of sound is correctly calculated
>>>> using the formula c^2 = dP/drho = gamma_c * P / rho.
>>>>
>>>> Cheers,
>>>>
>>>> Carlo
>>>>
>>>>> Seyit -
>>>>> The sound speed is one of the quantities defined by the equation 
>>>>> of state, and so the gamma(s) in general are as well. Constant 
>>>>> gamma is essentially a fairly good model applying only to 
>>>>> relatively simple gases. As you already implied, the value of 
>>>>> sound speed does not depend on physics processes per se but rather 
>>>>> on the thermodynamic state of matter.
>>>>> Also,
>>>>> C^2 Reviewing a few chapters in the thermodynamics textbook might 
>>>>> be most useful, and you may want to take a look at
>>>>> http://en.wikipedia.org/wiki/Speed_of_sound
>>>>> Tomek
>>>>> ---
>>>>> Seyit Hocuk wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> Within Flash, the speed of sound is calculated by "C > a constant 
>>>>>> predefined gamma. However, if you have additional physics > like 
>>>>>> heating, cooling, or radiative transfer effects, gamma should 
>>>>>> vary. > Hence, the sound speed is then calculated wrong. Gamma is 
>>>>>> in fact > "dlog(P)/dlog(rho)" and the sound speed is actually 
>>>>>> "dP/drho".
>>>>>>
>>>>>> How can one approximate, if not solve, the sound speed more 
>>>>>> carefully?
>>>>>>
>>>>>> One basic idea I had was to derive 'C' for a zone using a 
>>>>>> neighboring > zone (P2-P1/rho2-rho1) and to take the average of 
>>>>>> 'C' for an entire > block. That doesn't work very well.
>>>>>>
>>>>>> Kind regards,
>>>>>> Seyit
>>>>>>
>>>>
>>>> -- 
>>>> Carlo Graziani                                 (773) 702-7973 (Voice)
>>>> Department of Astronomy and Astrophysics       (773) 702-6645 (FAX)
>>>> University of Chicago      -------------------------------------
>>>> 5640 South Ellis Avenue    | When the capital development of a country
>>>> Chicago, IL 60637          | becomes a by-product of the activities of
>>>> carlo at oddjob.uchicago.edu  | a casino, the job is likely to be 
>>>> ill-done.
>>>>                         |    -- J.M. Keynes, 1936
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------------- 
>>>
>>> Michael Zingale (mzingale at mail.astro.sunysb.edu)
>>> Assistant Professor
>>>
>>> Dept. of Physics and Astronomy    office: ESS 440
>>> Stony Brook University            phone:  631-632-8225
>>> Stony Brook, NY 11794-3800        web: 
>>> http://www.astro.sunysb.edu/mzingale
>>> ---------------------------------------------------------------------------- 
>>>
>>>
>>>
>>> !DSPAM:10135,4b6842384014021468!
>>>
>>
>>
>
>
> ---------------------------------------------------------------------------- 
>
> Michael Zingale (mzingale at mail.astro.sunysb.edu)
> Assistant Professor
>
> Dept. of Physics and Astronomy    office: ESS 440
> Stony Brook University            phone:  631-632-8225
> Stony Brook, NY 11794-3800        web: 
> http://www.astro.sunysb.edu/mzingale
> ---------------------------------------------------------------------------- 
>
>




More information about the flash-users mailing list