How to mesh a surface passing through volumes

Dear cummunity,

I am using Coreform Cubit 2023.04 and want to mesh a geometry which has 3 bricks, two cylinders and one surface. The surface is passing through volumes and I hvae also removed cylinders from bricks. This is my journal file:

reset
brick x 4000 y 2000 z 50
brick x 4000 y 2000 z 20
brick x 4000 y 2000 z 50
move Volume 1 z -25 include_merged  
move Volume 2 z -60 include_merged 
move Volume 3 z -95 include_merged
cylinder rad 5 height 120
move Volume 4  x -1000 y -1000 z -60 include_merged 
cylinder rad 5 height 120
move Volume 5  x 1000 y -1000 z -60 include_merged
create surface rectangle width 4000 height 120 yplane
move Surface 25 z -60 include_merged
rotate Surface 25 angle 10  about Z include_merged 
subtract volume 4 5 from volume 1 2 3
imprint all
merge all
volume all size auto factor 7
mesh volume all

But meshing fails. How can I embed the surface into three volumes and make a hex mesh for such geometry?
Thanks for your support.

Hi,
if you need one mesh for everything you just have to make a webcut, so that there are overlapping surfaces that can be merged.

reset
brick x 4000 y 2000 z 50
brick x 4000 y 2000 z 20
brick x 4000 y 2000 z 50
move Volume 1 z -25 include_merged  
move Volume 2 z -60 include_merged 
move Volume 3 z -95 include_merged
cylinder rad 5 height 120
move Volume 4  x -1000 y -1000 z -60 include_merged 
cylinder rad 5 height 120
move Volume 5  x 1000 y -1000 z -60 include_merged
create surface rectangle width 4000 height 120 yplane
move Surface 25 z -60 include_merged
rotate Surface 25 angle 10  about Z include_merged 
subtract volume 4 5 from volume 1 2 3
webcut volume all with plane from surface 25  
imprint all
merge all
#volume all size auto factor 7
curve 56 46  interval 5
curve 56 46  scheme equal
mesh volume all except 6
mesh surface all

if you need one mesh for the volumes and one for the surface with overlapping nodes you can do an unmerge and keep the mesh on the surface

set unmerge duplicate_mesh on
unmerge volume 6
1 Like

Dear @Norbert_Hofbauer ,

Thanks a lot for dedicating time to my issue.
There one more thing I need to ask: the surface is not touching the borders of the bricks and how can I make the mesh without cutting the bricks with the surface?
With your solution three new volumes are generated but is there any way to make the mesh without splitting bricks to new ones?

Thanks again for your support.

Hi,
do you need the mesh for the surface connected with the volumes?

The new volumes should not be a problem if you are going to push them into a block for export. Maybe you can describe a bit the purbose of the surface in the mesh.

With you solution some extra surfaces are generated that attach my surface into the borders of the model. In the following fig I have decreased the width of the surface to show thes extra surfaces better. With your solution I have cut the model into smaller pieces. This is absolutely fine. I was only curious to see whether Cubit can make themesh withouht spliting the model.

Hi,

if I need a surface in a volume, for example to do FEM evaluations on that surface, I create the surface and subtract it from the volume.

This way I can access the surface for meshing or for creating the nodeset without cutting the volume into multiple subvolumes.

reset
##Geometry
brick x 10 y 10 z 10
create surface rectangle width 5 height 10 yplane
surface {Id("surface")} name "S_plane"
subtract surface with name "S_plane" from volume 1

## Mesh
merge all
surface with name "S_plane*" scheme trimesh
surface with name "S_plane*" size auto factor 4
mesh surface with name "S_plane*"

volume all scheme tetmesh
volume all size auto factor 7
mesh volume all
thex volume all

## Nodeset and Block
nodeset 1 add surface with name "S_plane*"
nodeset 1 name "S_plane"

block 1 add volume all
block 1 name "V_brick"

Thanks for your help.
Is there any way to create the surface and refine a hex mesh around it rather than tet mesh? I need to have hex to keep in my budget for number of elements and nodes in the mesh.

Hi,

A direct meshing with hex elements was I have not managed in a hurry, maybe you would have to play around with the mesh parameters a bit.

A work around would be to mesh everything relatively roughly with tet elements and then convert it to a hex mesh with thex and then refine it.

Hi,

Thanks for your help and suggestions.