Hello, I was wondering if there is an easy way to create blocks from a mesh using coordiantes so that I can assign multiple materials to the mesh. For example I have the following simple surface:
which I created using the following code:
lx = 10000.0
lz = 600.0
I1 = 500.0
W1 = 100.0
nPml = 3
elementSize = 25 # Mean element size in meters
cubit.cmd(‘create surface rectangle width ‘+str(lx+nPmlelementSize)+’ height '+str(lz+nPmlelementSize)+’ yplane’) # Create a lx*lz rectangle
cubit.cmd('volume 1 move x ‘+str(lx/2.0)+’ z '+str(-lz/2.0)) # To get correct coordinates
cubit.cmd('surface 1 size '+str(elementsize))
cubit.cmd(‘mesh surface all’)
is there a simple way I can make blocks based on coordinates? I would like to assign divide this into 200 meter layers?
Also it is very important that I am able to do this using coordiantes, going forward I will need to be able to assign more complex materials based on coordinates (I am trying to build an earth model the materials for which is defined in a 3d array, ultimately I want to be able to assign materials based on coordinates so that I can simply take the closest material and assign it to the corresponding part of the mesh).
I really appreciate the assistance,