[FLASH-USERS] Changing Gamma (eos)

Anshu Dubey dubey at flash.uchicago.edu
Tue Apr 22 09:11:20 EDT 2008


Hi Seyit,

First, if at all possible for you, please switch to FLASH3. There is one
person in the center who is using FLASH2 for any work. And there
are at best 4-5 people who used FLASH2 more than two years ago, so even
though they have used it, they are not very familiar with it any more.
In the code group at the center I am the only one left who has had anything
to do with FLASH2 at all.

Your statement that eos1d is called only at initialization
is not accurate. If you look at hydro_sweep, there is a call to eos3d
after update solution at every sweep. Eos3d in turn calls eos1d. So
gamma should be getting updated every timestep. However, if you
need this update at the beginning of hydro calculation rather than at
the end, you should copy hydro_sweep into you directory, and move the
eos3d call for the entire block (including the guardcells) after the
guardcell fill call.

Anshu

> Hi Anshu,
>
> Like I said, I made that change in eos1d.F90 already. However, that file
> is only used when initialising FLASH. It is not used at every timestep.
> This is the whole issue. If I change the formula there, it will only
> calculate once in the beginning, then it will use that value throughout
> the whole simulation.
>
> Seyit
>
>
>
>> Hi Seyit,
>>
>> In FLASH 2.5 you need to make that change in eos1d.F90 also.
>>
>> Anshu
>>
>> Anshu
>>
>>
>>> Hi Anshu,
>>>
>>> I am using FLASH2.5 and it might be a little different to version 3.0.
>>> Though I have tried to change things in eos.F90, but the unfortunate
>>> thing is that (pretty sure) eos.F90 is not called at every timestep
>>> 'dt'. It is (might be) only used when initializing the blocks. This is
>>> of no use to me. I want to update gamma like you say at every timestep
>>> (gamma will be dependant on temperature and density basically).
>>>
>>> In Flash2.5, the eos.F90 is in "source/materials/eos/gamma/".
>>>
>>> Btw. I am using a module eos1d inside my "init_block.F90" file. Of
>>> course, changing the formula of gamma there isn't helping.
>>>
>>> Thanks,
>>> Seyit
>>>
>>>
>>>
>>>> Hi Seyit,
>>>>
>>>> This feature is not a part of FLASH default behavior. If you are using
>>>> FLASH3 then you have two options. The value of gamma in Eos is carried
>>>> in a variable called eos_gamma, which is defined in the data module
>>>> for
>>>> the Eos unit, in file "source/physics/Eos/EosMain/Eos_data.F90".
>>>> Normally
>>>> this variable is initialized in Eos_init, and then used in "Eos.F90".
>>>> Your first and simplest option is to add a line
>>>> at the beginning of "Eos.F90" to update the eos_gamma value at each
>>>> time
>>>> step. You can fetch the value of dt by calling the function
>>>> "Driver_getDt".  If you need time dependent gamma for only one
>>>> setup, then the better option is to place a copy of Eos.F90 in the
>>>> simulation directory and modify that file as described above. That way
>>>> you won't have to worry about the source tree when you get later
>>>> versions of FLASH.
>>>>
>>>> Anshu
>>>>
>>>>
>>>>
>>>>> Hi all,
>>>>>
>>>>> I have a simple question. I want to put a changing gamma in my
>>>>> simulation. e.g. a gamma which changes and depends on dt. Where to
>>>>> change this formula of gamma?
>>>>>
>>>>> I can't locate it in the database.
>>>>>
>>>>> Thanks,
>>>>> Seyit
>>>>>
>>>>>
>>>>>
>




More information about the flash-users mailing list