Replies: 5 comments 5 replies
-
You can use the t2grid from t2data import *
dat = t2data('mydata.dat')
values = [101.3e3, 20.]
inc = dat.grid.incons(values)
inc.write('mydata.incon') If you want to create initial conditions with different values in different blocks, you can pass in a 2-D array of numbers for the 'values' parameter. |
Beta Was this translation helpful? Give feedback.
-
Here's an example of setting up initial conditions with a simple approximate hydrostatic pressure profile (based on the distance between each block centre and the top surface of the column, which might vary from column to column). You could modify it to include e.g. a temperature gradient as well. from t2data import *
geo = mulgrid('my_geometry.dat')
dat = t2data('my_data.dat')
P0 = 101.3e3
T0 = 20.
rho = 998.
g = 9.8
vars = []
for blk in dat.grid.blocklist:
if blk.rocktype.name == 'atmos':
P = P0
T = T0
else:
colname = geo.column_name(blk.name)
surf = geo.column[colname].surface
h = surf - blk.centre[2]
P = P0 + rho * g * h
T = T0
vars.append([P, T])
inc = dat.grid.incons(vars)
inc..write('my_data.incon') |
Beta Was this translation helpful? Give feedback.
-
Hello, Andrian: Thank you for your contribution. Could you please assist me how import Json file(geometry file which is Json extension) to TIM or Pytough2 for visualization. |
Beta Was this translation helpful? Give feedback.
-
That looks like some sort of 3D mesh file, with 3D nodes defined first, then some 3D elements? How was it generated? If so, then you will only be able to create a geometry file if you are sure the mesh has a layer/column structure (otherwise the Mulgrid geometry file format won't support it). If that is the case, you will have to write a custom script to create the geometry file - there is nothing in PyTOUGH to convert a general 3D mesh into a Mulgrid geometry file (partly because it is not always possible). The only thing close to that is the |
Beta Was this translation helpful? Give feedback.
-
I have TOUGH2 input file and Geometry file produced on LEAPFROG, however I couldn't manage to prepare INCON file. Can you show me how to prepare initial condition?
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions