Refined Hex mesh for points embedded in a volume

Dear community,

I am trying to make a mesh with Coreform Cubit 2025.3 free educational license on windows 10.
My geometry is quite simple: two boxes which share a surface and some points in the middle of the on of volumes. As the volumes share a surface, their mesh should be confromable. The points in the box also should be mebedded into the box, I mean they should share vertices with the vertices of the box (I think it is called embedent). My refinement cheme is a bit complex. The mesh should be refined closed to one of the surface and also the points. I first defined a bias on curves and then tried to propagate the mesh but it was not what I needed. Another issue is that i do not know how to properly embed and refine the mesh close to the points. Here is my simple journal file:

reset
brick x 20 y 10 z 20
move Volume 1 z -10 include_merged  
surface 1 copy move z -5
webcut volume 1 with plane from surface 7
create vertex location 0 0 -10
create vertex location 0 0 -11
create vertex location 0 0 -12
create vertex location 0 0 -13
curve 6 19 scheme bias fine size 0.5 coarse size 2
curve 16 8 scheme bias fine size 2 coarse size 0.5
mesh curve 6 8 16 19
volume 1 3 sizing function type skeleton min_size auto max_size auto max_gradient 1.5 min_num_layers_3d 1 min_num_layers_2d 1 min_num_layers_1d 1
mesh volume 1 3

And here is how my geometry and mesh looks like:

I very much appreciate it if you help me for making hex mesh in such a geometry.

Cheers
Ali

Hi @ali_geo,
in your current journal the two volumes are not connected. I modified that a bit.

#!cubit
reset
brick x 20 y 10 z 20
move Volume 1 z -10 include_merged  
webcut volume 1 with plane zplane offset -5 
imprint vol all
merge vol all
create vertex location 0 0 -10
create vertex location 0 0 -11
create vertex location 0 0 -12
create vertex location 0 0 -13
curve 6 15 2 scheme bias fine size 0.5 coarse size 2
curve 8 13 4 scheme bias fine size 2 coarse size 0.5
mesh curve 13 15 6 8
mesh volume 1 2

I am not quite sure how exactly you want to refine with the vertices. Usually if i want a node at the exact location of the vertices i would do webcuts and either cut so that i get a vertex at the right location. Or i try to create a curve where i can place a vertex.

if i don’t have a node for the vertices in the mesh that i want to refine. i can at least try to get the hexes where the vertices are contained and refine from those.

Do you have a sketch from the mesh that you have in mind?

Dear @Norbert_Hofbauer ,

First and foremost, thanks for dedicating time to my issue.
In my geometry i need the points becaus later in the simulation i use them as Dirac Kernels to add mass to the model. Therefore, the mesh around these points should be refined. On the right handside surface of the mesh also i want to put a boundary condition, so it needs to be refined. I have prepared this sketch (a 2d cross section from middle of the model, it was not easy to make it in 3D):

The dash line separates two volumes. The mesh is refined around the points. The points should be properly embedded in the mesh. If i do not embed the points in the volume, later on during the numerical simulations the mass can not propagate from the points (Dirac Kernel) to the body of the mesh (matrix).
Thanks again for your help.

Cheers
Ali

I used the vertices to split the curve in the volume. This way i am able to create and select the nodes at the location of the vertices and use them for a refinement.

Is this what you are looking for?

#!cubit
reset
brick x 20 y 10 z 20
move Volume 1 z -10 include_merged  
webcut volume 1 with plane zplane offset -5 
webcut volume 2 with plane xplane
webcut volume 2 3 with plane yplane

create vertex location 0 0 -10
create vertex location 0 0 -11
create vertex location 0 0 -12
create vertex location 0 0 -13

split curve 61  close_to vertex 41 
split curve 77  close_to vertex 42 
split curve 79  close_to vertex 43 
split curve 81  close_to vertex 44 

imprint vol all
merge vol all

mesh vol all

#!python
nodes = []
node = cubit.parse_cubit_list(f"node","at 0 0 -10 in volume 3")
nodes.append(node[0])
node = cubit.parse_cubit_list(f"node","at 0 0 -11 in volume 3")
nodes.append(node[0])
node = cubit.parse_cubit_list(f"node","at 0 0 -12 in volume 3")
nodes.append(node[0])
node = cubit.parse_cubit_list(f"node","at 0 0 -13 in volume 3")
nodes.append(node[0])

cubit.cmd(f"refine node {nodes[0]} {nodes[1]} {nodes[2]} {nodes[3]} numsplit 1 bias 1.0 depth 1 smooth")

#!cubit
refine surface 28 36 numsplit 1 bias 1.0 depth 1 smooth

#if you need nodes at the vertices that are not connected to the volumes
#mesh vertex all
1 Like

@Norbert_Hofbauer
Thanks a lot.
Your solution looks like magic to me :slight_smile: it is what I needed.
Is there a way to read the list of coordinates (0 0 -10, 0 0 -11, 0 0 -12, 0 0 -13) as a csv file? In my real geometry I have a lot of them. Another favour is putting the cubit.parse_cubit_list into a for loop to make the journal file shorter.

Cheers
Ali