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     :language: python
63 ========
66     :language: python
71 .. _tui_deflection_1d:
73 Deflection and Number of Segments
74 =================================
76 .. literalinclude:: ../../../examples/defining_hypotheses_ex02.py
77     :language: python
82 .. _tui_start_and_end_length:
84 Start and End Length
85 ====================
87 .. literalinclude:: ../../../examples/defining_hypotheses_ex03.py
88     :language: python
93 .. _tui_average_length:
95 Local Length
96 ============
98 .. literalinclude:: ../../../examples/defining_hypotheses_ex04.py
99     :language: python
103 Defining 2D and 3D hypotheses
104 #############################
107 .. _tui_max_element_area:
109 Maximum Element Area
110 ====================
112 .. literalinclude:: ../../../examples/defining_hypotheses_ex05.py
113     :language: python
118 .. _tui_max_element_volume:
120 Maximum Element Volume
121 ======================
123 .. literalinclude:: ../../../examples/defining_hypotheses_ex06.py
124     :language: python
129 .. _tui_length_from_edges:
131 Length from Edges
132 =================
134 .. literalinclude:: ../../../examples/defining_hypotheses_ex07.py
135     :language: python
140 ##############################
142 .. _tui_propagation:
144 Propagation
145 ===========
147 .. literalinclude:: ../../../examples/defining_hypotheses_ex08.py
148     :language: python
153 .. _tui_defining_meshing_algos:
155 Defining Meshing Algorithms
156 ###########################
158 .. literalinclude:: ../../../examples/defining_hypotheses_ex09.py
159     :language: python
164 .. _tui_projection:
166 Projection Algorithms
167 =====================
169 .. literalinclude:: ../../../examples/defining_hypotheses_ex10.py
170     :language: python
174 Projection 1D2D
175 ===============
177 .. literalinclude:: ../../../examples/defining_hypotheses_ex11.py
178     :language: python
182 .. _tui_fixed_points:
184 1D Mesh with Fixed Points example
185 #################################
187 .. literalinclude:: ../../../examples/defining_hypotheses_ex12.py
188     :language: python
195 ###############################
197 .. literalinclude:: ../../../examples/defining_hypotheses_ex13.py
198     :language: python
204 Quadrangle Parameters example 1 (meshing a face with 3 edges)
205 ##############################################################
207 .. literalinclude:: ../../../examples/defining_hypotheses_ex14.py
208     :language: python
212 Quadrangle Parameters example 2 (using different types)
213 #######################################################
215 .. literalinclude:: ../../../examples/defining_hypotheses_ex15.py
216     :language: python
220 .. _tui_import:
222 "Import 1D-2D Elements from Another Mesh" example
223 #################################################
225 .. literalinclude:: ../../../examples/defining_hypotheses_ex16.py
226     :language: python
230 .. _tui_viscous_layers:
232 Viscous layers construction
233 ###########################
235 .. literalinclude:: ../../../examples/defining_hypotheses_ex17.py
236     :language: python
243 ####################
246     :language: python
250 .. _tui_cartesian_algo:
252 Usage of Body Fitting algorithm
253 ###############################
255 .. literalinclude:: ../../../examples/cartesian_algo.py
256     :language: python
260 .. _tui_use_existing_faces:
262 Usage of "Use Faces to be Created Manually" algorithm
263 #####################################################
265 This sample demonstrates how to use **Use Faces to be Created Manually** algorithm,
266 which is actually just a stub allowing to use your own 2D algorithm
267 implemented in Python.
269 .. literalinclude:: ../../../examples/use_existing_faces.py
270     :language: python
274 Resulting mesh:
276 .. image:: ../images/use_existing_face_sample_mesh.png
277         :align: center
280 .. _tui_prism_3d_algo:
282 Usage of Extrusion 3D meshing algorithm
283 ########################################
285 .. literalinclude:: ../../../examples/prism_3d_algo.py
286     :language: python
290 The result geometry and mesh is shown below
292 .. image:: ../images/prism_tui_sample.png
293         :align: center