|
1 | 1 | """ |
2 | 2 | .. _ref_saddle_thin_hex: |
3 | 3 |
|
4 | | -======================================================== |
| 4 | +================================================== |
5 | 5 | Meshing a saddle bracket for a structural analysis |
6 | | -======================================================== |
| 6 | +================================================== |
7 | 7 |
|
8 | 8 | **Summary**: This example demonstrates how to mesh a thin |
9 | | -solid with hexahedral elements. |
| 9 | +solid with hexahedral and prism cells. |
10 | 10 |
|
11 | 11 | Objective |
12 | 12 | ~~~~~~~~~ |
|
26 | 26 | * Surface mesh the remaining unmeshed TopoFaces with tri. |
27 | 27 | * Delete the topology. |
28 | 28 | * Define volume meshing controls to use thin volume meshing. |
29 | | -* Volume mesh with hexahedral cells. |
| 29 | +* Volume mesh with hexahedral and prism cells. |
30 | 30 | * Write a CDB file for use in the APDL solver. |
31 | 31 | * Exit the PyPrimeMesh session. |
32 | 32 |
|
|
91 | 91 | ############################################################################### |
92 | 92 | # Surface mesh unmeshed faces |
93 | 93 | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
94 | | -# Mesh unmeshed faces with tri elements. |
| 94 | +# Mesh unmeshed faces with tri surface mesh. Tri surface mesh on the target |
| 95 | +# and side faces is used to show more clearly that the result of the thin |
| 96 | +# volume control is a hex mesh that is imprinted up to the side faces. |
| 97 | +# All quads could be used for the surface mesh to simplify the process. |
95 | 98 |
|
96 | 99 | part = model.parts[0] |
97 | 100 |
|
|
124 | 127 | ############################################################################### |
125 | 128 | # Delete topology |
126 | 129 | # ~~~~~~~~~~~~~~~ |
127 | | -# Delete topology to leave only the surface mesh. |
| 130 | +# Delete topology to leave only the surface mesh. This is necessary for the |
| 131 | +# thin volume control to be used. |
128 | 132 |
|
129 | 133 | part.delete_topo_entities( |
130 | 134 | prime.DeleteTopoEntitiesParams( |
|
140 | 144 | # Define volume meshing controls to use thin volume meshing. |
141 | 145 | # Specify source and target faces for the thin volume using imported labels. |
142 | 146 | # Set the number of layers of cells through the thickness of the thin solid to be 4. |
143 | | -# To request a fully hexahedral mesh the side faces must be imprinted. |
| 147 | +# To create a fully hexahedral and prism mesh the side faces must be imprinted on |
| 148 | +# the side faces. If needed, a buffer region at the sides of the volume can be |
| 149 | +# defined where the volume fill type used for the volume mesh parameters will be |
| 150 | +# used to infill. This is useful on more complex geometries, where it provides |
| 151 | +# more robustness of the method. To create a buffer region set ``imprint_sides`` |
| 152 | +# to False and specify how many rings of cells to ignore at the sides |
| 153 | +# using ``n_ignore_rings``. |
144 | 154 |
|
145 | 155 | auto_mesh_params = prime.AutoMeshParams(model=model) |
146 | 156 | thin_vol_ctrls_ids = [] |
|
163 | 173 | thin_params = prime.ThinVolumeMeshParams( |
164 | 174 | model=model, |
165 | 175 | n_layers=4, |
166 | | - no_side_imprint=False, |
| 176 | + imprint_sides=True, |
167 | 177 | ) |
168 | 178 |
|
169 | 179 | thin_vol_ctrl.set_thin_volume_mesh_params(thin_volume_mesh_params=thin_params) |
|
174 | 184 | ############################################################################### |
175 | 185 | # Generate volume mesh |
176 | 186 | # ~~~~~~~~~~~~~~~~~~~~ |
177 | | -# Volume mesh to obtain hexahedral cells. |
| 187 | +# Volume mesh to obtain hexahedral and prism mesh. |
178 | 188 | # Print mesh summary. |
179 | 189 | # Display volume mesh. |
180 | 190 |
|
|
0 commit comments