[FLASH-USERS] Time and space dependent adiabatic index gamma

Klaus Weide klaus at flash.uchicago.edu
Thu Oct 15 14:06:43 EDT 2015


On Wed, 14 Oct 2015, Marko Pavlovic wrote:

> Dear FLASH users and colleagues,
> 
> I'm working on a problem which requires time and space
> dependent adiabatic index gamma, instead of a constant value
> used in default implementation of EOS unit. Actually, I want
> to implement gamma as grid data, having the different value
> for each cell of the domain and it should be updated at each
> time step.
> 
> Do you have some advice?

Two suggestions:

1) Create a variant of the EosMain/Gamma implementation. Modify 
EosMain/Gamma/eos_idealGamma.F90 to use passed-in values of 
eosData(gamc+i), instead of fixed eos_gamma, in the various computations. 
This is not totally trivial since some references to gamma (more exactly, 
gamma_c) occur in the form of precomputed variables like 
eos_gammam1, gam1inv, ggprod, ggprodinv.

You then also have to make sure that all calls of Eos() pass the right 
values for the EOS_GAMC components in eosData. This should already be in 
place for the calls that happen through Eos_wrapped(), but you have to 
locate all the other Eos() calls that may occur (at least in the code 
relevant to the simulation you are building).

2) Maybe the following trick would work for you instead of your plan.
Instead of a modified "Gamma", use "Multigamma" with two species.
The species differ in their GAMMA values and are otherwise the same.
Instead of varying gamma directly by setting GAMC_VAR, you would vary the 
mass fractions of the two species to the same effect.

Klaus



More information about the flash-users mailing list