Closed two-phaseflow closed 5 years ago
I just tried this myself and found the problem was in the MULTI data block - the INFILE created by the script didn't have one, but convert_to_AUTOUGH2() was creating one and it didn't make sense.
For a problem as simple as this you don't really need to use convert_to_AUTOUGH2(). You can just add a SIMULATOR data block, and save the data file and incon file with the kinds of filenames AUTOUGH2 expects, e.g.:
dat = t2data('INFILE')
dat.simulator = 'AUTOUGH2.2EW'
dat.write('model.dat')
inc = t2incon('INCON')
inc.write('model.incon')
However I have also pushed a fix to the PyTOUGH testing branch so that convert_to_AUTOUGH2() now checks if the MULTI block exists before trying to modify it. So if you run that branch you should be able to substitute the dat.simulator = 'AUTOUGH2.2EW'
line with dat.convert_to_AUTOUGH2()
now and it should also work.
Thanks Adrian. I'm still running into issues, though... For one thing, the incon file is instantiated a bit different in the 3d hydrostatic example inc = dat.grid.incons()
vs. the way you described above inc = t2incon('INCON')
...
Judging by the listing file, there seems to be an issue with the EOS and/or the initial temperature/pressure conditions... I post part of it below
Using SIMUL AUTOUGH2.2 1***
EOS1: EQUATION OF STATE FOR WATER (OPTIONAL: TWO-WATER MIXTURES) *
OPTIONS SELECTED ARE: (NK,NEQ,NPH,NB) = (0,0,0,0)
NK = 0 - NUMBER OF FLUID COMPONENTS
NEQ = 0 - NUMBER OF EQUATIONS PER GRID BLOCK
NPH = 0 - NUMBER OF PHASES THAT CAN BE PRESENT
NB = 0 - NUMBER OF SECONDARY PARAMETERS (OTHER THAN COMPONENT MASS FRACTIONS)
For NK = 2 and NB = 8, diffusion is "on", otherwise, diffusion is "off"
...
..... NEGLECT VAPOR PRESSURE LOWERING .....
TEMPERATURE = 0.150202E+06 OUT OF RANGE IN SAT ++++++++++ EOS CANNOT FIND PARAMETERS AT ELEMENT ATM 0 XX(M) = 0.00000E+00
Sorry, perhaps I wasn't clear... the little script above is for converting the output of the original script for use with AUTOUGH2. But you probably want to adapt the original script so it produces AUTOUGH2-compatible output directly.
To do that:
1) add a line dat.simulator = 'AUTOUGH2.2EW'
, e.g. just after you create the t2data object
2) change the line that writes out the data file so it uses the kind of filename AUTOUGH2 expects, e.g. dat.write('model.dat')
3) same thing for the incon file, e.g. inc.write('model.incon')
Got it, seems to work now. I was indeed trying to use directly in the original 3d hydrostatic script but the problem was that I had dat = t2data('INFILE')
instead of dat = t2data()
(the latter which worked).
I am trying to prepare the input data for the 3d hydrostatic example to run in AUTOUGH2_5 (the teaching distribution that comes with TIM) but have been unable despite calling the
convert_to_AUTOUGH2()
method on thet2data
object. AUTOUGH2 simply exits after I specify the name of the input file.I have seen in the documentation there are some differences in the .dat file formats for TOUGH2 and AUTOUGH2, but haven't seen an example PyTOUGH script for creating an input file for AUTOUGH2, so I am guessing there are other methods I need to call or additional arguments I need to specify as parameters for the t2data object or the
convert_to_AUTOUGH2()
function, for example, the EOS... but I am not sure about what is necessary.