Closed nikolai-andrianov closed 1 year ago
The self.element.row_name
variable should be of type list
, not dict
.
Is it possible you are passing in a dict
for the blocks
parameter when you create your toughreact_tecplot
object?
The blocks parameter should be either a list
, a mulgrid
or a t2grid
. A dict
can't be used because the order of the block names is important.
The toughreact_tecplot
object is created from dat.grid.block
, which is in turn created by calling the t2grid()
constructor. So when I call write_vtk
method of toughreact_tecplot
, self.element.row_name
is a dict
, not list
. See an example script tough_cpg.py
at https://github.com/nikolai-andrianov/TOUGH-CPG.
You should just pass in dat.grid
for the blocks parameter, not dat.grid.block
. As the user guide says, this parameter should be either a list of strings, a mulgrid
geometry object or a t2grid
object.
For example, line 469 in your script should be:
lst = toughreact_tecplot(folder + '/flowdata.tec', dat.grid)
That works, thanks a lot!
Thanks for pyTOUGH, has been quite useful!
The
write_vtk
method oftoughreact_tecplot
yields an error when exporting TOUGHREACT simulation results to VTK inget_vtk_data
around line 1804 oft2listing.py
. Apparently this happens whengeo_matches == False
in this subroutine which is always the case due to the comparisonin
write_vtk
(which always givesFalse
because a list is compared to a dict).A workaround is to replace this comparison by