[FLASH-USERS] Flash 4.4 OPAL opacity
Klaus Weide
klaus at flash.uchicago.edu
Thu Dec 1 20:55:50 EST 2016
On Wed, 30 Nov 2016, Amit Kashi wrote:
> I'm trying to use the new OPAL opacity option, but I'm having trouble
> getting FLASH to load the tables properly.
Amit,
Please give more info. How did you notice that FLASH was not loading
tables properly? (Do not rely on the file opacity_printout_tables.txt;
the OPAL code currently does not yet write anything meaningful
to it even when it is otherwise working.)
The OPAL code should produce output like the following (on standard
output) upon recognizing and opening an OPAL table file (basically
echoing the first few lines of the file):
----------------------------------------------
OPAL file lowT_fa05_gs98_z2m2_x00.data:
low temperature opacities from Ferguson, Alexander, et al (2005) with gs98 metals
form version X Z logRs logR_min logR_max logTs logT_min logT_max
1 37 0.000000 0.020000 46 -8.000000 1.000000 105 2.700000 4.500000
OPAL file gs98_z2m2_x00.data:
fixed metal distribution -- based on Grevesse & Sauval (1998) solar abundances
form version X Z logRs logR_min logR_max logTs logT_min logT_max
1 37 0.000000 0.020000 37 -8.000000 1.000000 138 3.750000 8.700000
----------------------------------------------
Do you get output like this?
This is from a first pass that examines all table files.
Later on, when the table are opened again and the table data is actually read into memory,
the first lines are echoed again and should look like this:
----------------------------------------------
R OPAL file lowT_fa05_gs98_z2m2_x00.data:
Rlow temperature opacities from Ferguson, Alexander, et al (2005) with gs98 metals
R form version X Z logRs logR_min logR_max logTs logT_min logT_max
R 1 37 0.000000 0.020000 46 -8.000000 1.000000 105 2.700000 4.500000
R
R logT logR = logRho - 3*logT + 18
R.
R OPAL file gs98_z2m2_x00.data:
Rfixed metal distribution -- based on Grevesse & Sauval (1998) solar abundances
R form version X Z logRs logR_min logR_max logTs logT_min logT_max
R 1 37 0.000000 0.020000 37 -8.000000 1.000000 138 3.750000 8.700000
R
R logT logR = logRho - 3*logT + 18
R.
----------------------------------------------
Do you see this?
> I ran it in a debug mode and got this:
More context would be helpful - what is the ouput before the
following lines?
> ----------------------------------------------
> [op_getOpalTableOpacity] i,j,k,l= 1 1 46
> 46
The i,j = 1,1 indicates that the code is looking up an opacity for a
temperature that is below the lower boundary of the temperature range
covered by this file.
The k,l = 46,46 indicates that the code is looking up an opacity for a
logR that is above the upper boundary of the logR range
covered by this file.
But that line of debug output is for a different (temperature,density)
point than the next ones (assuming you have not changed the order of the
print statements in op_getOpalTableOpacity.F90):
> op_getOpalTableOpacity: mfH,temprange are 2 1 ,ok
> op_getOpalTableOpacity: thisTypeTable%table ok
> op_getOpalTableOpacity: thisTypeTable%table%table ok
> speciesDensity{,RO}= 2.5434026735557760E-014 -13.594584876529337
> -8.0000000000000000 1.0000000000000000
> nstepsDensity= 46 F T F
> SHAPE(thisTypeTable%table%table)= 75 46
> -----------------------------------------------
What comes after this?
The next line of output should have 'i,j,k,l=' again.
Maybe the lookup is somehow directed to the wrong file, for a given
(temperatiure,density) combination, by the runtime parameters in effect.
Or maybe your OPAL table files are not in the right format.
I would like to help, but need more information.
Klaus
More information about the flash-users
mailing list