c839e94b9750a478d8284bd934005dbcc9b77301
1 .. _tui_defining_hypotheses_page:
3 **********************************
4 Defining Hypotheses and Algorithms
5 **********************************
7 This page provides example codes of :ref:`defining algorithms <tui_defining_meshing_algos>`
8 and hypotheses.
10 * Wire discretisation 1D algorithm
13     * :ref:`Arithmetic Progression <tui_1d_arithmetic>` hypothesis
14     * :ref:`Geometric Progression <tui_1d_arithmetic>` hypothesis
15     * :ref:`Deflection and Number of Segments <tui_deflection_1d>` hypotheses
16     * :ref:`Start and End Length <tui_start_and_end_length>` hypothesis
17     * :ref:`tui_average_length` hypothesis
19     * :ref:`Fixed Points 1D <tui_fixed_points>` hypothesis
22 * Triangle: Mefisto 2D algorithm
24     * :ref:`tui_max_element_area` hypothesis
25     * :ref:`tui_length_from_edges` hypothesis
27 * Quadrangle: Mapping 2D algorithm
32 * NETGEN 3D algorithm
34     *  :ref:`tui_max_element_volume` hypothesis
35     *  :ref:`Viscous layers <tui_viscous_layers>` hypotheses
37 * :ref:`tui_projection`
38 * :ref:`Extrusion 3D <tui_prism_3d_algo>` algorithm
40 * :ref:`Body Fitting <tui_cartesian_algo>` algorithm
41 * :ref:`Import 1D-2D Elements from Another Mesh <tui_import>` algorithm
42 * :ref:`Use Faces to be Created Manually <tui_use_existing_faces>` algorithm
43 * :ref:`Segments around Vertex <tui_segments_around_vertex>` algorithm
47 Defining 1D Hypotheses
48 ######################
50 .. _tui_1d_arithmetic:
52 Arithmetic Progression and Geometric Progression
53 ================================================
55 .. literalinclude:: ../../../examples/defining_hypotheses_ex01.py
56     :linenos:
57     :language: python
64 ========
67     :linenos:
68     :language: python
73 .. _tui_deflection_1d:
75 Deflection and Number of Segments
76 =================================
78 .. literalinclude:: ../../../examples/defining_hypotheses_ex02.py
79     :linenos:
80     :language: python
85 .. _tui_start_and_end_length:
87 Start and End Length
88 ====================
90 .. literalinclude:: ../../../examples/defining_hypotheses_ex03.py
91     :linenos:
92     :language: python
97 .. _tui_average_length:
99 Local Length
100 ============
102 .. literalinclude:: ../../../examples/defining_hypotheses_ex04.py
103     :linenos:
104     :language: python
108 Defining 2D and 3D hypotheses
109 #############################
112 .. _tui_max_element_area:
114 Maximum Element Area
115 ====================
117 .. literalinclude:: ../../../examples/defining_hypotheses_ex05.py
118     :linenos:
119     :language: python
124 .. _tui_max_element_volume:
126 Maximum Element Volume
127 ======================
129 .. literalinclude:: ../../../examples/defining_hypotheses_ex06.py
130     :linenos:
131     :language: python
136 .. _tui_length_from_edges:
138 Length from Edges
139 =================
141 .. literalinclude:: ../../../examples/defining_hypotheses_ex07.py
142     :linenos:
143     :language: python
148 ##############################
150 .. _tui_propagation:
152 Propagation
153 ===========
155 .. literalinclude:: ../../../examples/defining_hypotheses_ex08.py
156     :linenos:
157     :language: python
162 .. _tui_defining_meshing_algos:
164 Defining Meshing Algorithms
165 ###########################
167 .. literalinclude:: ../../../examples/defining_hypotheses_ex09.py
168     :linenos:
169     :language: python
174 .. _tui_projection:
176 Projection Algorithms
177 =====================
179 .. literalinclude:: ../../../examples/defining_hypotheses_ex10.py
180     :linenos:
181     :language: python
185 Projection 1D2D
186 ===============
188 .. literalinclude:: ../../../examples/defining_hypotheses_ex11.py
189     :linenos:
190     :language: python
194 .. _tui_fixed_points:
196 1D Mesh with Fixed Points example
197 #################################
199 .. literalinclude:: ../../../examples/defining_hypotheses_ex12.py
200     :linenos:
201     :language: python
208 ###############################
210 .. literalinclude:: ../../../examples/defining_hypotheses_ex13.py
211     :linenos:
212     :language: python
218 Quadrangle Parameters example 1 (meshing a face with 3 edges)
219 ##############################################################
221 .. literalinclude:: ../../../examples/defining_hypotheses_ex14.py
222     :linenos:
223     :language: python
227 Quadrangle Parameters example 2 (using different types)
228 #######################################################
230 .. literalinclude:: ../../../examples/defining_hypotheses_ex15.py
231     :linenos:
232     :language: python
236 .. _tui_import:
238 "Import 1D-2D Elements from Another Mesh" example
239 #################################################
241 .. literalinclude:: ../../../examples/defining_hypotheses_ex16.py
242     :linenos:
243     :language: python
247 .. _tui_viscous_layers:
249 Viscous layers construction
250 ###########################
252 .. literalinclude:: ../../../examples/defining_hypotheses_ex17.py
253     :linenos:
254     :language: python
261 ####################
264     :linenos:
265     :language: python
269 .. _tui_cartesian_algo:
271 Usage of Body Fitting algorithm
272 ###############################
274 .. literalinclude:: ../../../examples/cartesian_algo.py
275     :linenos:
276     :language: python
280 .. _tui_use_existing_faces:
282 Usage of "Use Faces to be Created Manually" algorithm
283 #####################################################
285 This sample demonstrates how to use **Use Faces to be Created Manually** algorithm,
286 which is actually just a stub allowing to use your own 2D algorithm
287 implemented in Python.
289 .. literalinclude:: ../../../examples/use_existing_faces.py
290     :linenos:
291     :language: python
295 Resulting mesh:
297 .. image:: ../images/use_existing_face_sample_mesh.png
298         :align: center
301 .. _tui_prism_3d_algo:
303 Usage of Extrusion 3D meshing algorithm
304 ########################################
306 .. literalinclude:: ../../../examples/prism_3d_algo.py
307     :linenos:
308     :language: python
312 The result geometry and mesh is shown below
314 .. image:: ../images/prism_tui_sample.png
315         :align: center
320 Usage of Medial Axis Projection algorithm
321 #########################################
324     :linenos:
325     :language: python
330 .. _tui_segments_around_vertex:
332 Usage of Segments around Vertex algorithm
333 #########################################
335 .. literalinclude:: ../../../examples/defining_hypotheses_len_near_vertex.py
336     :linenos:
337     :language: python