Volumes not meshing

Dear Forum,

I have built an assembly in Solidworks and saved it as a .stp file. Before I exported, I used an interference check in Solidworks. I then import the .stp file into Cubit. The import appears to work fine and the assembly looks correct. It is a simple assembly with 8-parts (volumes) in Cubit. I have read that the first thing to do is the following:

imprint all
merge all

I then proceed to mesh the volumes. However, two of the volumes do not mesh. One of the volumes is very thin and I can see that not meshing. However, the other volume does not mesh. My question is the following:

1: What more can I check (either in Solidworks or Cubit) to see if a volume will not mesh?
2: Is there a tutorial that walks through how to mesh volumes with examples?

Thank you.
Chad F

Hi @ChadJames,
before imprinting and merging you often have to defeature and decompose volumes to get a geometry that can be meshed.
On our website we have some tutorials and training material to get you into the cubit workflow. This takes some time but is definitely worth it.

Can you share your geometry that you are trying to mesh?

Dear Norbert,

Thank you for the response. One thing that did work was switching to tet for meshing. I did get the following message.

WARNING: >>>>Poor Quality Shape Tet Generated!<<<< on Volume 5 ( Cut-Extrude1 Cut_Extrude1 )
(For example, the Shape metric for Tet 257170 is 0.0805587 .)
The threshold for a Tet is 0.2

I would be happy to send my .stp file. Will that work?

Yes the .stp that you import in cubit should be fine.

Can I email it to you?

Hi, I am also confused on how to set the density. Here is what I get. Do you see something wrong? The density is not correct.

Cubit>Create Material 1 Name ‘Plastic - 100’ Density ‘1.032’

Created material 1.

Finished Command: create material 1 name “Plastic - 100” density “1.032”

Cubit>list material 1

Material 1
Material Name: Plastic - 100
Property Group: CUBIT-FEA

MODULUS:  
SHEAR_MODULUS:  
POISSON:  
DENSITY:  1.79769313e+308
SPECIFIC_HEAT:  
CONDUCTIVITY:  
THERMAL_EXPANSION:  
YIELD_STRENGTH:  
ULTIMATE_STRENGTH:  
ULTIMATE_STRAIN:  
USER_CONSTANTS:  

Finished Command: list material 1

Please use https://transfer.coreform.com/ and post the link afterwards.

Your input for the density is a string and not a number. don’t use " or ’ if you want to input a number.
e.g. create material name "test" density 1e6

                    # Upload from web
                    Drag your files here, or  click to browse.
                

https://transfer.coreform.com/KXlQTSlhzo/HPGe_assm_2_7_mm.STEP

Please let me know if you get it. Thanks for the fix. Density is correct now.

I got your geometry.

I took an attempt to mesh it. First i put each of your volumes into a block because i will decompose them with webcuts a lot to get some usefull symmetry for meshing. I could either handpick them or write a short python loop for it.

#!cubit
reset
import step "/home/user/Downloads/HPGe_assm_2_7_mm.STEP" heal

#!python
vids = cubit.parse_cubit_list("volume","all")
i = 1
for id in vids:
 cubit.cmd(f"block {i} add  volume {id}")
 i=i+1
print("finished")

First i will make a webcut on volume 6

webcut volume 6  with sheet extended from surface 114 113

next is volume 1. We will decompose again using webcuts and defeature the chamfers.

webcut volume 1  sweep surface 23  perpendicular inward through_all 
webcut volume 1  sweep surface 21  perpendicular inward through_all 
webcut volume 1 with sheet extended from surface 10  
remove surface 8, 19 connected_sets
remove surface 7, 20 connected_sets

On volume 2 we first remove the sink holes before doing the webcut.

remove surface 30, 32, 34, 36, 43, 45, 47, 49 connected_sets
webcut volume 2  with sheet extended from surface 29 50  

Volume 4 will be cut down quite a lot but i don’t have to worry about skewed elements for this part.

webcut volume 4  with sheet extended from surface 100 59  
webcut volume 4  with sheet extended from surface 77 70  
webcut volume 19 4  with sheet extended from surface 82  
webcut volume 21 4  with sheet extended from surface 81  
webcut volume 21 4  with sheet extended from surface 85  
webcut volume 20 4  with sheet extended from surface 84  
webcut volume 20 4  with sheet extended from surface 88  
webcut volume 22 4  with sheet extended from surface 87 


Then i can make webcuts in x and z plane through all volumes. This is just to force more symmetry on the mesh. Then we can imprint and merge.

webcut volume all with plane zplane offset 0 
webcut volume all with plane xplane offset 0 

imprint vol all
merge vol all

Then we can already set a desired mesh size and mesh.

vol all size auto factor 4
mesh vol all

I am not really happy with the shape of the elements here.

So i will try to set the pave scheme for this surface and run the whole journal again.

#!cubit
reset
import step "/home/user/Downloads/HPGe_assm_2_7_mm.STEP" heal

#!python
vids = cubit.parse_cubit_list("volume","all")
i = 1
for id in vids:
 cubit.cmd(f"block {i} add  volume {id}")
 i=i+1
print("finished")

#!cubit

webcut volume 6  with sheet extended from surface 114 113

draw vol 1
webcut volume 1  sweep surface 23  perpendicular inward through_all 
webcut volume 1  sweep surface 21  perpendicular inward through_all 
webcut volume 1 with sheet extended from surface 10  
remove surface 8, 19 connected_sets
remove surface 7, 20 connected_sets

draw vol 2
remove surface 30, 32, 34, 36, 43, 45, 47, 49 connected_sets
webcut volume 2  with sheet extended from surface 29 50  


draw vol 4

webcut volume 4  with sheet extended from surface 100 59  
webcut volume 4  with sheet extended from surface 77 70  
webcut volume 19 4  with sheet extended from surface 82  
webcut volume 21 4  with sheet extended from surface 81  
webcut volume 21 4  with sheet extended from surface 85  
webcut volume 20 4  with sheet extended from surface 84  
webcut volume 20 4  with sheet extended from surface 88  
webcut volume 22 4  with sheet extended from surface 87  

webcut volume all with plane zplane offset 0 
webcut volume all with plane xplane offset 0 

imprint vol all
merge vol all

Surface 308 scheme pave
vol all size auto factor 4
mesh vol all

I hope this gives you some ideas how you could handle such geometries.

As we put all our starting volumes into blocks in the beginning you can now draw them with draw block all

Also for export the base volumes are now already assigned to an element set.

Hi Norbert,
Yes. This is very informative. I have a few questions.

1: What is webcut?
2: From your post it looks like you can run python code in the terminal of Cubit? Is that correct? Where does cubit.parse_cubit_list come from
3: Have you ever imported these UM into MCNP?

Thank you.

1:
Webcuts are the main tool for decomposing the geometry into smaller meshable parts. Basically it creates cutting planes to slice down the geometry. Please take a look into our tutorials and training material.

2:
Yes, you can switch between cubit and python in the command line window. Either with #!cubit and #!python or with the buttons on the bottom left. It is easier to use the journal editor to build scripts.

You can find the available Methods for the Python API in the documentation.

If you want to create something more than a python script you will need the SDK and C++.

3: No. I don’t really have any experience using MCNP.

Hi Norbert,

Thank you for your help earlier in learning how to mesh. I have a new object I would like to mesh. This is a target chamber as shown below.

image

I use the following few lines to try and mesh this object.

Volume 1 Rename "part_1"
#----------------
# Mesh Geometries
#----------------
Tetmesher Optimize Level 4
part_1 Scheme Tetmesh 
mesh part_1

When I do this is just spins and freezes. Can you recommend what else I can try to mesh this object. Thank you.

Hi @ChadJames,
there seems to be a lot of small features in the model. Are they necessary?
Cleaning up the model would help a lot.

Can you share the geometry?

Dear Norbert, I did what you suggested. I removed all of the bolt hole and small features and it now works. Thank you.

I am revisiting the issue with I am having in meshing a complex sphere. Here is the updated sphere model.

Here is the error I am getting

Cubit>mesh part_1
Matching intervals successful.
Begin tri meshing 1157 surfaces 1 to 1157
WARNING: MeshGems has problem meshing surfaces 193 638 1064 1065 1068 1069 1072 1073 1076 1077 1080 1081 1083 1085 1088 1089 1092 1093 1096 1097 1100 1101 1104 1105 1108 1109 1112 1113 1116 1117 1120 1121 1124 1125 1128 1129 1132 1133 1136 1137 1140 1141 1144 1145 1148 1149 1151 1152 1156 1157 187 645 186 647 184 651 649 174 175 176 185 189 204 207 617 642 662 666 179 195 205 621 657 664 194 206 614 623 636 209 619 660 177 196 199 197 629 632 634 164 681 686 674 696 691 165 169 167 166 345 376 407 438 469 432 337 368 399 461 1062 1063 1066 1067 1070 1071 1074 1075 1078 1079 1082 1084 1086 1087 1090 1091 1094 1095 1098 1099 1102 1103 1106 1107 1110 1111 1114 1115 1118 1119 1122 1123 1126 1127 1130 1131 1134 1135 1138 1139 1142 1143 1146 1147 1150 1153 1154 1155 287 295 299 303 291 286 290 294 298 302 133 769 339 370 401 463 403 341 434 465 372 430 708 716 712 714 710 322 130 773 828 40 906 4 16 731 72 1054 110 978 81 944 68 914 895 77 1030 153 887 54 151 1033 980 108 70 79 1056 947 26 28 30 32 995 997 1003 1005 66 75 898 916 2 52 908 890 38 14 734 830 775 129 715 707 709 713 711 697 673 675 680 682 690 685 687 692 695 304 7 853 1041 23 1049 95 1013 11 117 811 104 848 922 92 838 98 742 148 64 858 770 34 93 748 750 36 1051 96 99 101 760 840 758 21 158 156 970 968 1043 755 90 924 753 56 58 937 939 115 813 105 836 146 744 107 834 62 860 140 142 43 45 721 723 9 1015 987 989 143 145 855 5 102 850 137 846 844 139 132 771 131 366 428 335 397 459 436 467 374 343 405 446 384 353 415 451 358 420 327 389 772 388 419 326 357 450 448 386 324 417 355 447 449 323 325 356 387 418 385 416 354 615 618 620 622 624 630 633 635 637 332 424 362 456 363 394 425 393 331 455 154 119 934 972 1018 47 124 826 1035 73 1 879 12 779 136 726 1025 149 24 797 953 956 114 126 127 1047 60 965 992 118 20 962 728 806 42 59 790 111 13 904 121 823 920 135 88 876 55 1000 83 1028 89 1008 781 8 33 46 930 809 49 784 50 817 18 739 1011 122 901 48 788 69 37 803 19 870 763 155 1039 1059 84 128 61 928 41 113 820 893 976 86 873 78 150 159 718 737 51 82 885 950 794 123 120 984 87 1022 125 912 74 959 864 25 882 17 867 85 942 29 112 766 65 800 342 373 404 435 466 460 336 367 398 429 396 458 334 365 427 392 361 423 330 454 329 391 340 371 402 433 464 360 453 422 359 421 426 364 457 395 328 333 390 452 500 501 168 677 160 162 700 163 699 701 161 702 381 319 412 350 443 538 536 537 539 534 552 549 551 553 554 312 311 307 308 309 313 314 306 310 317 493 490 491 492 494 482 487 484 478 480 318 380 351 413 382 444 411 320 349 442 683 698 693 676 688 672 689 694 679 684 705 704 703 706 678 377 293 408 297 470 301 439 289 285 346 344 406 468 400 369 462 431 375 437 338 109 67 80 152 733 829 889 915 3 76 15 1055 27 31 39 53 897 71 946 979 907 996 1004 1032 347 378 440 471 409 300 296 288 292 284 598 606 607 599 596 609 594 608 604 597 481 483 485 488 479 498 499 495 496 497 526 527 579 517 524 571 576 528 519 568 569 514 516 570 578 577 566 518 529 564 315 776 472 348 379 441 410 665 663 667 661 658 650 646 643 648 652 218 219 215 217 216 213 212 214 210 211 504 221 505 220 224 506 222 508 507 223 582 263 581 264 262 583 567 261 260 580 237 523 239 522 236 515 234 521 235 520 276 590 275 591 277 589 278 593 279 592 561 250 257 550 256 251 560 555 254 558 258 562 556 252 559 255 259 253 557 563 574 268 575 267 565 266 269 573 572 265 232 525 233 533 231 530 238 532 230 531 605 613 600 610 611 225 226 227 229 612 588 228 272 273 584 586 587 595 601 603 274 280 281 502 503 510 509 511 585 602 270 271 512 513 535 246 545 240 247 244 546 543 245 544 241 540 542 243 547 248 242 249 541 548 476 474 475 473 486 138 759 10 1042 6 44 116 157 812 722 969 1050 22 97 141 144 749 854 1014 57 63 94 103 91 100 839 147 743 754 35 106 835 845 849 859 923 938 988 768 134 644 656 655 305 653 654 173 172 178 170 171 671 670 659 668 669 182 183 192 639 190 191 316 198 201 203 625 627 631 640 641 202 208 616 626 200 628 181 188 180 383 352 321 414 445 717 736 793 819 872 884 892 927 949 975 998 1006 767 868 871 877 1001 1023 1029 789 804 824 913 801 865 883 902 921 943 960 985 1009 1036 791 825 903 805 961 933 729 1019 973 1038 725 964 1060 740 1024 782 785 952 955 816 762 878 931 991 778 1046 808 796 1010 832 1031 896 918 982 888 910 1058 945 732 719 727 730 738 741 764 765 780 783 786 787 792 795 798 799 802 807 810 818 821 822 827 863 866 869 874 875 880 881 886 894 900 905 911 919 929 932 935 941 951 954 957 958 963 966 974 977 983 993 999 1007 1012 1020 1021 1026 1027 1037 1040 1048 1061 735 831 891 899 909 917 948 981 994 1002 1034 1057 774 720 747 752 757 833 843 936 967 986 746 862 852 857 1017 1045 815 926 842 1053 777 724 745 751 814 841 756 847 851 856 861 971 761 837 925 940 990 1016 1044 1052 283 477 489 282
WARNING: Warning : 14 intersection(s) may be still present in the resulting mesh
WARNING: You may have overlapping surfaces you are trying to mesh.  Meshgems does not mesh overlapping surfaces in the same meshing operation.  Consider doing a 'find overlap' check and meshing these surfaces separately.
Completed trimeshing 1157 surfaces
ERROR: (-9000001): An error occurred
ERROR: unable to generate mesh with hpc tetra
ERROR: Volume 1 meshing unsuccessful using scheme: tetmesh
Meshing time: 104.656250 

ERROR: 1 volume did not mesh : Volume 1

Although some entities failed to mesh, Cubit will log the command in the journal file anyway, for future use.
Journaled Command: mesh part_1

ERROR: Found edge with nodes 135453 1946 intersects tri with nodes 1 79614 126345 near (47.949219 -42.178215 11.898842)
ERROR: Found edge with nodes 1 79614 intersects tri with nodes 1946 1945 1950 near (47.949788 -42.178999 11.897541)
ERROR: Found edge with nodes 5 6761 intersects tri with nodes 1954 1955 1952 near (25.296648 -58.636071 11.898845)
ERROR: Found edge with nodes 1952 1953 intersects tri with nodes 125211 5 6622 near (25.296817 -58.636304 11.899007)
ERROR: (-9008480): Cannot insert required entities
ERROR: The constrained edge with nodes 5 6761 cannot be enforced.
ERROR: The constrained edge with nodes 1 79614 cannot be enforced.
ERROR: A constrained tri with nodes 134776 70462 134101 cannot be enforced.
ERROR: A constrained tri with nodes 134779 134101 70462 cannot be enforced.
ERROR: A constrained tri with nodes 125134 70462 134776 cannot be enforced.
ERROR: A constrained tri with nodes 56153 29804 124722 cannot be enforced.
ERROR: A constrained tri with nodes 29804 56153 68304 cannot be enforced.
ERROR: A constrained tri with nodes 131079 130863 130083 cannot be enforced.
ERROR: A constrained tri with nodes 75914 75913 14729 cannot be enforced.```

In an attempt to find the overlaps I tried the following.

Cubit>find overlap surface all tolerance 1e-6
Finding surface overlap...
Found 0 overlapping surface pairs

Any ideas on how to check this so I can clean it up in my CAD model. Thank you.

Have you already made use of the power tools?

Can you share your .cub5?

Dear Norbert,

Thank you for getting back to me. I have not tried this power tools option. I don’t see a .cub5 file. How do I generate this file?

Chad

The .cub5 is one of two save file formats from Cubit. So you just need to save your session as .cub5.