Specifying material types for stratified heterogeneous reservoir
Dears,
I am trying to model CO2 injection in heterogeneous aquifer that is composed of 23 layers with different porosity, permeability, and capillary pressure data. I have defined 23 material types corresponding to the reservoir layers. I find a problem to specify the material types to the corresponding grid cells in my model. The model is 2D (79*120). So I need to define the material type for every cell manually which is very difficult task. I wonder if there is easy way to do that!.
Thanks in advance
7 replies
-
You can write a program or script to automate this task. toughio can do that:
import toughio # Read file with block ELEME (e.g. MESH) parameters = toughio.read_input("MESH") # Loop over elements for label, element in parameters["elements"].items(): x, y, z = element["centers"] # Assign material name depending on element's depth if 0.0 >= z > -10.0: element["material"] = "mat01" elif -10.0 >= z > -20.0: element["material"] = "mat02" elif -20.0 >= z > -30.0: element["material"] = "mat03" # and so on # Write your file back with modified materials toughio.write_input("MESH") # Make sure to have a copy of the original file!
Note that if you create your mesh directly with toughio, you can automatically assign materials that are within a specific boxed domain (see https://tough.forumbee.com/t/60h36fd?r=x2h3l0f).