Problem in meshing hexahedral prism volume with hexahedral elements

###############################

hexagonal prism with cylindrical holes on faces

###############################
create Prism height 0.089 sides 6 radius 0.048
create Cylinder height 0.003 radius 0.007915

Volume 2 copy
Volume 2 copy
Volume 2 copy
Volume 2 copy
Volume 2 copy

align volume 2 surface 11 with surface 3 include_merged
align volume 3 surface 14 with surface 4 include_merged
align volume 4 surface 17 with surface 5 include_merged
align volume 5 surface 20 with surface 6 include_merged
align volume 6 surface 23 with surface 7 include_merged
align volume 7 surface 26 with surface 8 include_merged

Volume 2 copy move z 0.02383
Volume 2 copy move z -0.02383

Volume 3 copy move z 0.02383
Volume 3 copy move z -0.02383

Volume 4 copy move z 0.02383
Volume 4 copy move z -0.02383

Volume 5 copy move z 0.02383
Volume 5 copy move z -0.02383

Volume 6 copy move z 0.02383
Volume 6 copy move z -0.02383

Volume 7 copy move z 0.02383
Volume 7 copy move z -0.02383

subtract volume 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 from volume 1

Volume all size 0.001
Volume all scheme auto
mesh volume all

################
####please help in meshing above geometry properly
################

Hi,
this is a little bit tricky to do webcuts to find sweepable volumes.
But you could also aim for some volumes where the polyhedral scheme will work.

reset
create Prism height 0.089 sides 6 radius 0.048
create Cylinder height 0.003 radius 0.007915

Volume 2 copy
Volume 2 copy
Volume 2 copy
Volume 2 copy
Volume 2 copy

align volume 2 surface 11 with surface 3 include_merged
align volume 3 surface 14 with surface 4 include_merged
align volume 4 surface 17 with surface 5 include_merged
align volume 5 surface 20 with surface 6 include_merged
align volume 6 surface 23 with surface 7 include_merged
align volume 7 surface 26 with surface 8 include_merged

Volume 2 copy move z 0.02383
Volume 2 copy move z -0.02383

Volume 3 copy move z 0.02383
Volume 3 copy move z -0.02383

Volume 4 copy move z 0.02383
Volume 4 copy move z -0.02383

Volume 5 copy move z 0.02383
Volume 5 copy move z -0.02383

Volume 6 copy move z 0.02383
Volume 6 copy move z -0.02383

Volume 7 copy move z 0.02383
Volume 7 copy move z -0.02383

subtract volume 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 from volume 1

create sphere radius 0.007915
move Volume 20 location surface 70  include_merged
volume 20 copy
move Volume 20 location surface 90  include_merged
volume 20 copy
move Volume 20 location surface 68  include_merged
Volume 20 to 22 copy rotate 60 about z repeat 5 

intersect volume all keep 
delete volume 20 to 37
subtract volume all except 1 from volume 1 keep_tool 

create Cylinder height 0.1 radius 0.02 

subtract volume 56  from volume 1  keep_tool
webcut volume 56  with plane from surface 181  
webcut volume 57  with plane from surface 182 
delete volume 56 58

webcut volume all with plane from surface 125
webcut volume all with plane from surface 131 
webcut volume all with plane from surface 137
webcut volume all  with plane from surface 143  
webcut volume all with plane from surface 149
webcut volume all with plane from surface 155 

webcut volume all with plane zplane offset 0 
webcut volume all with plane zplane offset 0.02383 
webcut volume all with plane zplane offset -0.02383

webcut volume all except 57 98 78 118 69 109 89 129 70 110 90 130 67 107 87 127 85 105 65 125 63 103 83 123 121 80 101 61 81 with general plane xplane spin about axis 0 0 1 angle 0
webcut volume all except 57 98 78 118 69 109 89 129 70 110 90 130 67 107 87 127 85 105 65 125 63 103 83 123 121 80 101 61 81 with general plane xplane spin about axis 0 0 1 angle 30
webcut volume all except 57 98 78 118 69 109 89 129 70 110 90 130 67 107 87 127 85 105 65 125 63 103 83 123 121 80 101 61 81 with general plane xplane spin about axis 0 0 1 angle 60
webcut volume all except 57 98 78 118 69 109 89 129 70 110 90 130 67 107 87 127 85 105 65 125 63 103 83 123 121 80 101 61 81 with general plane xplane spin about axis 0 0 1 angle 90
webcut volume all except 57 98 78 118 69 109 89 129 70 110 90 130 67 107 87 127 85 105 65 125 63 103 83 123 121 80 101 61 81 with general plane xplane spin about axis 0 0 1 angle 120
webcut volume all except 57 98 78 118 69 109 89 129 70 110 90 130 67 107 87 127 85 105 65 125 63 103 83 123 121 80 101 61 81 with general plane xplane spin about axis 0 0 1 angle 150

imprint vol all
merge vol all

Volume all size 0.001
Volume all scheme auto
# inner polyhedrons
Volume 170 164 160 159 161 162 163 155 158 144 148 165 166 167 71 168 1 169 227 131 132 133 134 135 117 91 230 232 231 233 179 184 194 191 195 198 201 199 196 197 200 202 206 205 204 203 215 220 scheme polyhedron
# half spheres
Volume 38 to 55, 72 to 77, 92 to 97, 111 to 116,136 to 141, 145, 146, 149, 150, 153, 154, 171 to 176, 180, 181, 185, 186,189, 190, 207 to 212, 216, 217, 221, 222, 225, 226 scheme polyhedron
mesh Volume 170 164 160 159 161 162 163 155 158 144 148 165 166 167 71 168 1 169 227 131 132 133 134 135 117 91 230 232 231 233 179 184 194 191 195 198 201 199 196 197 200 202 206 205 204 203 215 220
mesh volume all

is that gonna work for you?

1 Like

thank you
I get the logic behind meshing.
Actually, after subtracting volumes, ‘keep_tool’ is not working in my version of Cubit.

Which version of Cubit are you using and on which OS?