Cubit/Trelis vertical mesh refinement

Hi there,

does anybody know, how to change ONLY the vertical refinement of the mesh to derive a higher resolution in z-direction that in x and y directions ?
A solution in Cubit GUI or with python/cubit commands are very welcomed.

Best regards

in cubit/trelis, there seems to be no easy way to refine only along a specific direction. the meshing workaround which leads to a finer mesh on top and coarsening with depth is to start meshing vertical edges first with a stretching function, then do the volume meshing. as an example with a box:

# single volume
cubit.cmd('brick x 134000 y 134000 z 60000')
cubit.cmd('volume 1 move x 67000 y 67000 z -30000')
# Mesh element size
elementsize = 3750.0
# default size
cubit.cmd('volume all size '+str(elementsize))

# stretching along vertical edges
cubit.cmd('curve 9 10 11 12  scheme bias factor 1.2')
cubit.cmd('mesh curve 9 10 11 12')

# final volume mesh
cubit.cmd('mesh volume all')

another option would be dicing after having created a (regular) volume mesh:

cubit.cmd('volume 1 initialize dicer')              # starts dicing
cubit.cmd('dicersheet default interval 1')          # interval 1 will leave elements at coarse level
cubit.cmd('curve 9 10 11 12 dicersheet interval 2') # interval 2 will dice into 2 element along curves
cubit.cmd('mesh volume 1')                          # creates dicer mesh
cubit.cmd('replace mesh volume 1')                  # replaces coarse mesh with new refined one

dicing here creates a regular refinement along the vertical direction. thus, if you want to coarsen the mesh further down, you would create different volumes with different element sizes and dice only within the top volume for example.

-daniel