Failure in Hybrid Meshing (unable to generate mesh with hpc tetra)

Coreform Cubit Version: 2023.4
Platform: Windows 11

Issue
Hybrid meshing using Tets and Hex elements fails for the domain (Attached STEP file).
For controlling the size of the mesh, I am using Curve Sizing method of the elements. The domain has 7 volume: a center volume which contains a complex body which has to be meshed with tets and the surrounding 6 volumes which is meshed with hex elements.

I am able to acheive the mesh in GMSH easily but the meshing fails in Cubit. Since, GMSH cannot export in exodus format, I have to rely on Cubit.

Steps followed:

  1. Import the geometry
  2. Run healer autoheal volume all rebuild
  3. Run imprint all and merge all
  4. Apply curve sizing and mesh curve all.
  5. Select Tri mesh scheme for the center volume surfaces and auto scheme for other surfaces. Then mesh surface all.
  6. Select Tet mesh scheme for the center volume and auto scheme for other surfaces. Then mesh volume all.

Error: unable to generate mesh with hpc tetra. While Tet meshing for the central volume alone works, if don’t mesh the other volumes.

The hex elements are generated but the tet meshing fails.

How can I solve this issue ?

mesh.step (1.3 MB)

Thanks,
Gaurav

Hi @GauravG91,
the bounding box of the bird should be a little bigger, otherwise the tetmesher can’t insert enough tets and can’t match the inner surface.

I first tried to only tweak the volume with the bird but then the adjacent top and bottom volumes gets to thin to get meshed. They need to have more height too.

Just too show you that i can be meshed, i deleted all volumes except the center, then i tweaked the center with an offset to get the bird a little freedom. Afterwards i created a new bounding box for the center that can be easily meshed.

#!cubit
reset
import step "mesh.step" heal
delete vol all except 1
healer autoheal volume all rebuild
compress
create brick x 3500 y 3500 z 1500
tweak surface 62 67 offset 50
tweak surface 64 66 offset 50
tweak surface 63 65 offset 50
compress
subtract volume 2 from volume 1 keep_tool
split body 2
delete vol 4
webcut volume all with plane from surface 62
webcut volume all with plane from surface 63  
webcut volume all with plane from surface 64  
webcut volume all with plane from surface 65  
webcut volume all with plane from surface 66
webcut volume all with plane from surface 67  
  
imprint vol all
merge vol all
compress

volume 1 size 20
mesh vol all except 1

volume 1 scheme tetmesh
mesh vol 1


Thanks a lot ! It works. BTW how improve the quality of the tet mesh ? The minimum scaled jacobian is coming to be 0.01.

Even using Extreme optimization along with Minimize Over-Constrained Tets, Minimize Over-Constrained Edges and Minimize Silver Tets option doesn’t result in any improvement.

Also, is it possible to have Hex+Tet+Wedge elements instead of Hex+Tet+Pyramid elements ?

Yes it is possible to have a mesh consisting of hex, tet and wedge elements. You will just have to mesh the center first. The trimesh on the surfaces gets then sweeped to the outside.

To improve the mesh quality you could for example make a composite for the birds surfaces and limit the minimum tri size.

#!cubit
reset
import step "mesh.step" heal
delete vol all except 1
healer autoheal volume all rebuild
compress
create brick x 3500 y 3500 z 1500
tweak surface 62 67 offset 50
tweak surface 64 66 offset 50
tweak surface 63 65 offset 50
compress
subtract volume 2 from volume 1 keep_tool
split body 2
delete vol 4
webcut volume all with plane from surface 62
webcut volume all with plane from surface 63  
webcut volume all with plane from surface 64  
webcut volume all with plane from surface 65  
webcut volume all with plane from surface 66
webcut volume all with plane from surface 67  
  
imprint vol all
merge vol all
compress

composite create surface 1 to 61
surface 170 scheme trimesh minimum size 0.5

volume 1 size 20
volume 1 scheme tetmesh
mesh surface 170
mesh vol 1
mesh vol all except 1

Hey !
Thanks for the reply !
What does the composite command do exactly ? Does it create a virtual geometry using all the surface ?

Yes, it is creating a virtual geometry to get many surfaces to one.
This can be useful for example to avoid bad element quality at narrow curves or get a many to one sweep.

Hii, @Norbert_Hofbauer
Is is possible to reduce the number of tets while maintaining the quality ? The above code gives a lot of tets which is more than what i can export ? So, I won’t be of any use to me. Thanks !

Also, why I get low quality tets ? I am using the same commands as you did.

import step "mesh.step" heal
delete vol all except 1
healer autoheal vol all rebuild
compress
composite create surface 1 to 61
surface 62 scheme trimesh minimum size 0.5
volume 1 size 20
volume 1 scheme tetmesh
mesh surface 62
mesh vol 1
quality vol 1 scaled jacobian global draw mesh

At my example the bounding box of the bird was bigger. So the mesher got more space to insert the tets.

You can play with the sizes and the gradation to reduce number of elements.
Usually the quality drops when the gradation is bigger.

#!cubit
reset
import step "mesh.step" heal
delete vol all except 1
healer autoheal volume all rebuild
compress
tweak surface 62 67 offset 50
tweak surface 64 66 offset 50
tweak surface 63 65 offset 50
compress

composite create surface 1 to 61

set trimesher surface gradation 1.2
set trimesher volume gradation 2

surface 68 scheme trimesh minimum size 1
volume 1 size 20
volume 1 scheme tetmesh
mesh surface 68
mesh vol 1

If you need more control over the mesh, its best to start with decomposition of the geometry. Only with the tet mesher options this probably won’t get any better.

Sure, thanks for the tips. I will check.

Hello @Norbert_Hofbauer,
Is there a way to resolve this overlapping at boundary layer ? This is the screenshot of the issue.

Code to reproduce:

import step "swift7_wb.step" heal
healer autoheal vol all rebuild
compress
create brick x 3500 y 3500 z 1500
subtract vol 1 to 5 from vol 6
compress
create midsurface volume 1 surface 4 6
delete vol 1
compress
curve 1, 6, 8, 9, 11, 12  scheme equal interval 8
curve 2, 5 scheme equal interval 4
curve 3, 4, 10 scheme equal interval 2
curve 7, 13 scheme equal interval 16
mesh curve all
undo group begin
create boundary_layer 1
modify boundary_layer 1 add curve 1 2 3 to 13 surface 1
modify boundary_layer 1 uniform height 1 growth 1.2 layers 10
modify boundary_layer 1 continuity yes
undo group end
mesh surface 1
quality surface 1 mesh scaled jacobian

If I turn of the countinuity feature, I get this discontinuous boundary layer.

Swift7_wb.step (902.8 KB)

You will have to mesh with a smaller boundary layer height, so that the layer for the curves won’t overlap.

modify boundary_layer 1 uniform height 0.03 growth 1.2 layers 10

1 Like

Hello Norbert,
I am moving back to 3D meshing with the geometry. Based on the 2D meshing, I tried adding boundary layers to my geometry with a fine size. But unlike 2D the boundary layer is not visible around the geometry and Cubit crashes. How can I solve this issue ?

[Swift7_wb.step|attachment](upload://mtmxwzyhAJfPdAjXIqpugsHlfWu.step) (693.8 KB)

reset
import step "swift7_wb.step" heal
healer autoheal vol all rebuild
compress
create brick x 500 y 500 z 500
create brick x 3500 y 3500 z 1500
subtract vol 6 from vol 7 keep_tool
subtract vol 1 2 3 4 5 from vol 6
rotate volume all angle -90 about z include_merged
volume all scale 0.001
compress
webcut vol all with plane from surface 1
webcut vol all with plane from surface 2
webcut vol all with plane from surface 3
webcut vol all with plane from surface 4
webcut vol all with plane from surface 5
webcut vol all with plane from surface 6
imprint all
merge all
composite create surface 19 to 54
compress
block 1 add vol 2
block 2 add vol 1 3 4 6 9 15
block 3 add vol all except 1 2 3 4 6 9 15
sideset 1 add surface 16 18 20 93 98 100 103 105 108
sideset 2 add surface 23 27 30 77 80 84 85 89 90
sideset 3 add surface 22 47 48 63 66 78 79 95 96
sideset 4 add surface 29 58 59 71 72 88 91 106 107
sideset 5 add surface 7 11 14 45 50 52 55 57 60
sideset 6 add surface 8 12 13 31 34 37 39 40 43
sideset 7 add surface 109
set trimesher surface gradation 1.5
set trimesher volume gradation 1.5
surface 109 scheme trimesh minimum size 0.0025
vol 2 scheme tetmesh
mesh surface 109 1 4
copy mesh surface 1 onto surface 2 source curve 2 source vertex 2 target curve 8 target vertex 5 smooth
copy mesh surface 4 onto surface 6 source curve 3 source vertex 3 target curve 1 target vertex 2 smooth
mesh vol 2

curve 28 30 31 34 38 42 48 55 60 63 73 75 85 86 91 92 93 96 97 114 129 130 136 137 140 46 56 59 61 64 106 117 135 141 tangent opposite
curve 13 14 15 16 40 53 57 68 81 87 109 126 131 26 43 67 68 101 tangent opposite
curve 31 33 34 36 45 46 47 51 54 55 59 60 63 66 75 77 86 88 93 97 106 107 113 114 120 121 125 129 135 136 140 144 scheme bias fine size 0.075 factor 1.4
curve 27 28 29 30 37 38 41 42 48 50 56 58 61 64 72 73 74 79 84 85 91 92 96 100 116 117 123 127 130 132 137 141 scheme bias fine size 0.075 factor 1.4
curve 13 14 15 16 21 22 23 24 25 26 39 40 43 44 52 53 57 65 67 68 80 81 87 98 101 103 108 109 115 126 131 142 scheme bias fine size 0.075 factor 1.4
mesh curve 31 33 34 36 45 46 47 51 54 55 59 60 63 66 75 77 86 88 93 97 106 107 113 114 120 121 125 129 135 136 140 144
mesh curve 27 28 29 30 37 38 41 42 48 50 56 58 61 64 72 73 74 79 84 85 91 92 96 100 116 117 123 127 130 132 137 141
mesh curve 13 14 15 16 21 22 23 24 25 26 39 40 43 44 52 53 57 65 67 68 80 81 87 98 101 103 108 109 115 126 131 142

volume 3 redistribute nodes off
volume 3 scheme Sweep source surface 6 target surface 37 sweep transform least squares
volume 3 autosmooth target on fixed imprints off smart smooth off

volume 4 redistribute nodes off
volume 4 scheme Sweep source surface 2 target surface 71 sweep transform least squares
volume 4 autosmooth target on fixed imprints off smart smooth off

mesh vol 1 3 4 6 9 15
mesh volume all except 1 2 3 4 6 9 15

Is the swift7_wb.step still the same as above? If not please upload it.

Also i don’t see any commands regarding the boundary layer. Can you share the whole journal that causes cubit to crash.

Hello,
The step file was changed a little, here’s the new step file.
Swift7_wb.step

This is the full journal file, sorry for the inconvinience.

reset
import step "swift7_wb.step" heal
healer autoheal vol all rebuild
compress
create brick x 500 y 500 z 500
create brick x 3500 y 3500 z 1500
subtract vol 6 from vol 7 keep_tool
subtract vol 1 2 3 4 5 from vol 6
rotate volume all angle -90 about z include_merged
volume all scale 0.001
compress
webcut vol all with plane from surface 1
webcut vol all with plane from surface 2
webcut vol all with plane from surface 3
webcut vol all with plane from surface 4
webcut vol all with plane from surface 5
webcut vol all with plane from surface 6
imprint all
merge all
composite create surface 19 to 54
compress
block 1 add vol 2
block 2 add vol 1 3 4 6 9 15
block 3 add vol all except 1 2 3 4 6 9 15
sideset 1 add surface 16 18 20 93 98 100 103 105 108
sideset 2 add surface 23 27 30 77 80 84 85 89 90
sideset 3 add surface 22 47 48 63 66 78 79 95 96
sideset 4 add surface 29 58 59 71 72 88 91 106 107
sideset 5 add surface 7 11 14 45 50 52 55 57 60
sideset 6 add surface 8 12 13 31 34 37 39 40 43
sideset 7 add surface 109
set trimesher surface gradation 1.5
set trimesher volume gradation 1.5
surface 109 scheme trimesh minimum size 0.0025
vol 2 scheme tetmesh
mesh surface 109 1 4
copy mesh surface 1 onto surface 2 source curve 2 source vertex 2 target curve 8 target vertex 5 smooth
copy mesh surface 4 onto surface 6 source curve 3 source vertex 3 target curve 1 target vertex 2 smooth

undo group begin
create boundary_layer 1
modify boundary_layer 1 add surface 109 volume 2
modify boundary_layer 1 uniform height 0.002 growth 1.2 layers 4
modify boundary_layer 1 continuity yes
undo group end

mesh vol 2

curve 28 30 31 34 38 42 48 55 60 63 73 75 85 86 91 92 93 96 97 114 129 130 136 137 140 46 56 59 61 64 106 117 135 141 tangent opposite
curve 13 14 15 16 40 53 57 68 81 87 109 126 131 26 43 67 68 101 tangent opposite
curve 31 33 34 36 45 46 47 51 54 55 59 60 63 66 75 77 86 88 93 97 106 107 113 114 120 121 125 129 135 136 140 144 scheme bias fine size 0.075 factor 1.4
curve 27 28 29 30 37 38 41 42 48 50 56 58 61 64 72 73 74 79 84 85 91 92 96 100 116 117 123 127 130 132 137 141 scheme bias fine size 0.075 factor 1.4
curve 13 14 15 16 21 22 23 24 25 26 39 40 43 44 52 53 57 65 67 68 80 81 87 98 101 103 108 109 115 126 131 142 scheme bias fine size 0.075 factor 1.4
mesh curve 31 33 34 36 45 46 47 51 54 55 59 60 63 66 75 77 86 88 93 97 106 107 113 114 120 121 125 129 135 136 140 144
mesh curve 27 28 29 30 37 38 41 42 48 50 56 58 61 64 72 73 74 79 84 85 91 92 96 100 116 117 123 127 130 132 137 141
mesh curve 13 14 15 16 21 22 23 24 25 26 39 40 43 44 52 53 57 65 67 68 80 81 87 98 101 103 108 109 115 126 131 142

volume 3 redistribute nodes off
volume 3 scheme Sweep source surface 6 target surface 37 sweep transform least squares
volume 3 autosmooth target on fixed imprints off smart smooth off

volume 4 redistribute nodes off
volume 4 scheme Sweep source surface 2 target surface 71 sweep transform least squares
volume 4 autosmooth target on fixed imprints off smart smooth off

mesh vol 1 3 4 6 9 15
mesh volume all except 1 2 3 4 6 9 15

Yes this indeed causes cubit to crash. I will inform the dev’s about this.

But i think the main issue here is the bad geometry of the bird. There are spline surfaces that causes already some displaying issues. When i create a composite with this one, cubit can’t evaluate the facets of the surface anymore. Spline surfaces that more or less are making a U-turn will most likely cause meshing issues. I would suggest to first work on a clean geometry with as less spline surfaces as possible. Also i would rather “split” the wing in half then wrapping a surfaces around an edge.

Hello @Norbert_Hofbauer,
Thank you for taking a look at the problem. I have also noticed the facet issue. This is particularly with the wing. I will try to remodel the wings, and try again.

reset
create brick x 10 y 10 z 10
create brick x 100 y 100 z 100
subtract vol 1 from vol 2
compress

surface 7 to 12 interval 20
surface 7 to 12 scheme trimesh
mesh surface 7 to 12

undo group begin
create boundary_layer 1
modify boundary_layer 1 add surface 7 to 12 vol 1
modify boundary_layer 1 uniform height 0.2 growth 1.2 layers 4
modify boundary_layer 1 continuity yes
undo group end

vol 1 scheme tetmesh
mesh vol 1

I checked it is working for the above example, so probably the issue with wing geometry is causing cubit to crash.