Hi Randy,
Thank you for your answer.
I need to have the upper surface sampled very finely (it is then composed 4 million elements). However the volume below can be made of much bigger elements. Without what I propose the final mesh would be composed of 12 million elements instead of ~30 without it. Computational time is divided by 3…
I don’t think refinement will solve the problem for you. I wonder if you could use boundary layers or a pillow layer? Look up boundary layers and/or pillowing in the documentation to see if either of those techniques is a good fit.
Good idea! The difficulty I see here is constructing group 2 sorted the same way than group 1 so we need one single loop to do the merging…
Here is what I have so far (could be optimized I guess):
cubit.cmd('set developer commands on')
cubit.cmd('brick x 10')
cubit.cmd('mesh vol 1')
cubit.cmd('refine surface 1 numsplit 1 bias 1 depth 0')
cubit.cmd('block 1 face in surf 1')
quads_in_surf = cubit.get_block_faces(1)
list_all_hex = cubit.parse_cubit_list('hex', 'all')
Nhex = len(list_all_hex)
nodesGroup1 = []
nodesGroup2 = []
s = set(quads_in_surf)
for h in list_all_hex:
faces = cubit.get_sub_elements('hex', h, 2)
for f in faces:
nodesInFace = cubit.get_connectivity("face",f)
if f in s:
for node in nodesInFace:
nodesGroup1.append(node)
# How do we get the corresponding node here?
nodes = cubit.get_connectivity("hex", h)
for node in nodes:
if node not in nodesInFace:
nodesGroup2.append(node)
# We are not sure here that the two lists are sorted the same way meaning that:
# cubit.cmd('merge node '+str(nodesGroup2[i])+' '+str(nodesGroup1[i])) makes sense
I am sure this can be figured out somehow…
Then there is this error:
ERROR: Node being merged into is owned by a lower order entity
than the node being merged. Merge not allowed