Salome HOME
Updated copyright comment
[modules/homard.git] / doc / en / tui_create_boundary.rst
1 .. _tui_create_boundary:
2
3 The boundary
4 ############
5
6 .. index:: single: boundary
7 .. index:: single: cylinder
8 .. index:: single: sphere
9
10 The variables are described in :doc:`gui_create_boundary`.
11
12 Methods of the class homard
13 ***************************
14 These methods returns an instance of the class boundary.
15
16 +----------------------------------------------------------------------------------------+
17 +----------------------------------------------------------------------------------------+
18 | .. module:: CreateBoundaryCAO                                                          |
19 |                                                                                        |
20 | **CreateBoundaryCAO(boundary_name, xao_file)**                                         |
21 |     Returns an instance of the class ``boundary``, type CAO after its creation         |
22 |                                                                                        |
23 |     - ``boundary_name``: the name of the CAO boundary                                  |
24 |     - ``xao_file``: the name of the file for this CAO, with format XAO                 |
25 +----------------------------------------------------------------------------------------+
26 | .. module:: CreateBoundaryDi                                                           |
27 |                                                                                        |
28 | **CreateBoundaryDi(boundary_name, mesh_name, mesh_file)**                              |
29 |     Returns an instance of the class ``boundary``, type discrete after its creation    |
30 |                                                                                        |
31 |     - ``boundary_name``: the name of the discrete boundary                             |
32 |     - ``mesh_name``: the name of the mesh of the boundary                              |
33 |     - ``mesh_file``: the name of the file for this mesh, with format MED               |
34 +----------------------------------------------------------------------------------------+
35 | .. module:: CreateBoundaryCylinder                                                     |
36 |                                                                                        |
37 | **CreateBoundaryCylinder(boundary_name, Xcen, Ycen, Zcen, Xaxe, Yaxe, Zaxe, R)**       |
38 |     Returns an instance of the class ``boundary`` analytical type cylindrical          |
39 |     after its creation                                                                 |
40 |                                                                                        |
41 |     - ``boundary_name``: the name of the analytical boundary based on a cylinder       |
42 |     - ``Xcen``, ``Ycen``, ``Zcen``: coordinates of a point on the axis of the cylinder |
43 |     - ``Xaxe``, ``Yaxe``, ``Zaxe``: vector of the axis                                 |
44 |     - ``R``: radius of the cylinder                                                    |
45 +----------------------------------------------------------------------------------------+
46 | .. module:: CreateBoundarySphere                                                       |
47 |                                                                                        |
48 | **CreateBoundarySphere(boundary_name, Xcen, Ycen, Zcen, R)**                           |
49 |     Returns an instance of the class ``boundary`` analytical type spherical            |
50 |     after its creation                                                                 |
51 |                                                                                        |
52 |     - ``boundary_name``: the name of the boundary analytique based on a sphere         |
53 |     - ``Xcen``, ``Ycen``, ``Zcen``: coordinates of the centre of the sphere            |
54 |     - ``R``: radius of the sphere                                                      |
55 +----------------------------------------------------------------------------------------+
56 | .. module:: CreateBoundaryConeA                                                        |
57 |                                                                                        |
58 | **CreateBoundaryConeA(boundary_name, Xaxe, Yaxe, Zaxe, Angle, Xcen, Ycen, Zcen)**      |
59 |     Returns an instance of the class ``boundary`` analytical type conical              |
60 |     after its creation                                                                 |
61 |                                                                                        |
62 |     - ``boundary_name``: the name of the boundary analytique based on a cone           |
63 |     - ``Xaxe``, ``Yaxe``, ``Zaxe``: vector of the axis                                 |
64 |     - ``Angle``: opening angle of the cone in degree (between 0 and 90)                |
65 |     - ``Xcen``, ``Ycen``, ``Zcen``: coordinates of the centre of the cone              |
66 +----------------------------------------------------------------------------------------+
67 | .. module:: CreateBoundaryConeR                                                        |
68 |                                                                                        |
69 | **CreateBoundaryConeR(boundary_name, Xc1, Yc1, Zc1, R1, Xc2, Yc2, Zc2, R2)**           |
70 |     Returns an instance of the class ``boundary`` analytical type conical              |
71 |     after its creation                                                                 |
72 |                                                                                        |
73 |     - ``boundary_name``: the name of the boundary analytique based on a cone           |
74 |     - ``Xc1``, ``Yc1``, ``Zc1``: coordinates of the first centre of the cone           |
75 |     - ``R1``: radius of the cone at the first centre of the cone                       |
76 |     - ``Xc2``, ``Yc2``, ``Zc2``: coordinates of the second centre of the cone          |
77 |     - ``R2``: radius of the cone at the second centre of the cone                      |
78 +----------------------------------------------------------------------------------------+
79 | .. module:: CreateBoundaryTorus                                                        |
80 |                                                                                        |
81 | **CreateBoundaryTorus(boundary_name, Xcen, Ycen, Zcen, Xaxe, Yaxe, Zaxe, RRev, RPri)** |
82 |     Returns an instance of the class ``boundary`` analytical type torus                |
83 |     after its creation                                                                 |
84 |                                                                                        |
85 |     - ``boundary_name``: the name of the analytical boundary based on a torus          |
86 |     - ``Xcen``, ``Ycen``, ``Zcen``: coordinates of the centre of the torus             |
87 |     - ``Xaxe``, ``Yaxe``, ``Zaxe``: vector of the axis                                 |
88 |     - ``RRev``: revolution radius of the torus                                         |
89 |     - ``RPri``: primary radius of the torus                                            |
90 +----------------------------------------------------------------------------------------+
91
92 +---------------------------------------------------------------+
93 +---------------------------------------------------------------+
94 | .. module:: GetBoundary                                       |
95 |                                                               |
96 | **GetBoundary(boundary_name)**                                |
97 |     Returns the instance of the class classe ``boundary``     |
98 |     known by its name                                         |
99 |                                                               |
100 |     - ``boundary_name``: the name of the boundary             |
101 +---------------------------------------------------------------+
102 | .. module:: GetAllBoundarysName                               |
103 |                                                               |
104 | **GetAllBoundarysName()**                                     |
105 |     Returns the list of the names of all the existing         |
106 |     boundaries                                                |
107 |                                                               |
108 +---------------------------------------------------------------+
109
110 Methods of the class cas
111 ************************
112 See also in :doc:`tui_create_case`.
113
114 +---------------------------------------------------------------+
115 +---------------------------------------------------------------+
116 | .. module:: AddBoundary                                       |
117 |                                                               |
118 | **AddBoundary(boundary)**                                     |
119 |     Add a boundary to the definition of a case                |
120 |                                                               |
121 |     - ``boundary``: name of the curved boundary               |
122 +---------------------------------------------------------------+
123 | .. module:: AddBoundaryGroup                                  |
124 |                                                               |
125 | **AddBoundaryGroup(boundary, group)**                         |
126 |     Add a boundary to the definition of a case with a         |
127 |     filtering by groups                                       |
128 |                                                               |
129 |     - ``boundary``: name of the curved boundary               |
130 |                                                               |
131 |     Discrete or CAO boundary:                                 |
132 |                                                               |
133 |     - ``group``: the name of a group of meshes                |
134 |                                                               |
135 |     Analytical boundary:                                      |
136 |                                                               |
137 |     - ``group``: name of the groups of faces located on the   |
138 |       boundary                                                |
139 +---------------------------------------------------------------+
140
141 Methods of the class boundary
142 *****************************
143
144 +---------------------------------------------------------------+
145 +---------------------------------------------------------------+
146 | .. module:: GetName                                           |
147 |                                                               |
148 | **GetName()**                                                 |
149 |     Returns the name of the boundary                          |
150 +---------------------------------------------------------------+
151 | .. module:: GetType                                           |
152 |                                                               |
153 | **GetType()**                                                 |
154 |     Returns the type of the boundary:                         |
155 |                                                               |
156 |         * -1: CAO                                             |
157 |         * 0: discrete                                         |
158 |         * 1: cylinder                                         |
159 |         * 2: sphere                                           |
160 |         * 3: cone defined by an axis and an angle             |
161 |         * 4: cone defined by 2 radius                         |
162 |         * 5: torus                                            |
163 +---------------------------------------------------------------+
164 | .. module:: GetCoords                                         |
165 |                                                               |
166 | **GetCoords()**                                               |
167 |     Returns the array of the coordinates of the boundary      |
168 |     with the same order as in its definition with             |
169 |     CreateBoundaryXXXX                                        |
170 +---------------------------------------------------------------+
171 | .. module:: Delete                                            |
172 |                                                               |
173 | **Delete()**                                                  |
174 |     Deletes the boundary.                                     |
175 |     If the boundary is discrete, the file of the mesh is kept.|
176 |     If the boundary is CAO, the xao file of the geometry is   |
177 |     kept.                                                     |
178 |                                                               |
179 |     Returns an integer:                                       |
180 |         * 0: the destruction is done                          |
181 |         * other value: problem                                |
182 +---------------------------------------------------------------+
183
184
185 Example
186 *******
187 Creation of a CAO boundary: ::
188
189     la_cao = homard.CreateBoundaryCAO("BLOC", dircase+'/tutorial_6.xao')
190
191 Creation of a discrete boundary, a spherical boundary, and a cylindrical boundary:
192 ::
193
194     inter = homard.CreateBoundaryDi("INTERSECTION", 'PIQUAGE', dircase+'/tutorial_4.fr.med')
195     fron_1 = homard.CreateBoundarySphere("FRON_1", 12.3, 3.4, .56, 6.5)
196     fron_2 = homard.CreateBoundaryCylinder('CYL_1', 0.0, 25., -25., 25., 50., 75., 100.)
197
198
199 Similar graphical input
200 ***********************
201 Look at :doc:`gui_create_boundary`