[FLASH-USERS] Doubly-declared eos data

Dean Townsley Dean.M.Townsley at ua.edu
Fri Aug 16 15:12:17 EDT 2013


Hi all,

I have some custom Units that interact pretty closely with the 
"Helmholtz" electron-ion plasma EOS implementation.  In updating things 
to flash4 I noticed that the location of some data in the EOS sub-units 
has changed in what seems like a not-entirely-consistent way.  Basically 
a few pieces of data are double-declared in different sub-unit data 
structures and not all instances get initialized. (And yes I discovered 
this the hard way :) twice :D .)

The variables I am talking about are eos_smallt, eos_tol, and 
eos_maxNewton, which are declared in both
source/physics/Eos/EosMain/Eos_data.F90
and
source/physics/Eos/EosMain/Helmholtz/eos_helmData.F90

Two corresponding runtime parameters, eos_tolerance and eos_MaxNewton, 
are declared in
source/physics/Eos/EosMain/Helmholtz/Config
whereas smallt is actually declared in
source/Grid/GridMain/paramesh/Config
So eos_smallt seems to be a "local" copy of a global-ish parameter, 
which seems normal in flash.

Though note the eos_tolerance and eos_maxNewton runtime parameters are 
also declared in the following:
source/physics/Eos/EosMain/multiTemp/Gamma/Config
source/physics/Eos/EosMain/multiTemp/Multigamma/Config
source/physics/Eos/EosMain/multiTemp/Multitype/Config
which will be important in a moment.


Initialization of these parameters among various alternative EOS 
sub-units is not entirely consistent.  There is no initialization of them in
source/physics/Eos/EosMain/Eos_init.F90
it is left to sub-units.
For the Helmholtz sub-unit, the eos_helmData instances are initialized in
source/physics/Eos/EosMain/Helmholtz/SpeciesBased/eos_initHelmholtz.F90
and the Eos_data instances are left uninitialized.
In contrast, for the multiTemp sub-unit, the Eos_data instances are 
initialized in
source/physics/Eos/EosMain/multiTemp/Eos_init.F90
as there is no sub-unit-level data structure, and, despite being called 
in Eos_init(), the eos_initMtemp() subroutine has no real 
implementation, only the stub in the Eos/localAPI directory.


My question is: which way does the mainline Flash want to move in 
resolving this?  So that I can move in that direction in my own 
modules.  Should these data be stored at the Unit or sub-unit level?

I don't think that the sub-unit data structures (e.g. eos_helmData) 
should duplicate data from the main Unit data structure (Eos_data), but 
currently some eos sub-units are storing this data at the sub-unit level 
and others are storing it at the unit level.  Since it is not uncommon 
for EOS sub-units to require iteration, it seems like having these 
parameters declared in source/physics/Eos/EosMain/Config, stored in 
Eos_data and initialized in Eos_init makes some sense.  But I am unsure 
since this basically involves un-doing some of the changes made from 
flash3.3 to flash4 in the Helmholtz sub-unit, and other people using the 
multiTemp sub-unit may be moving in the opposite direction.  So I send 
this email to consult.


Comments welcome!

Dean









More information about the flash-users mailing list