Salome HOME
Synchronize adm files
[modules/homard.git] / doc / en / tui_create_zone.rst
1 .. _tui_create_zone:
2
3 The zone
4 ########
5
6 .. index:: single: zone
7 .. index:: single: box
8 .. index:: single: sphere
9 .. index:: single: cylinder
10 .. index:: single: pipe
11 .. index:: single: disk
12 .. index:: single: disk with a hole
13 .. index:: single: 2D
14
15 The variables are described in :ref:`gui_create_zone`.
16
17 Methods of the class homard
18 ***************************
19
20 These methods returns an instance of the class zone.
21
22 +----------------------------------------------------------------------------------+
23 +----------------------------------------------------------------------------------+
24 | .. module:: CreateZoneBox                                                        |
25 |                                                                                  |
26 | **CreateZoneBox(zone_name, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax)**                 |
27 |     Returns an instance of the class ``zone`` of type box                        |
28 |     after its creation                                                           |
29 |                                                                                  |
30 |     - ``zone_name``: the name of the zone based on a box                         |
31 |     - ``Xmin``, ``Xmax``: min/max coordinates extrêmes along X                   |
32 |     - ``Ymin``, ``Ymax``: min/max coordinates extrêmes along Y                   |
33 |     - ``Zmin``, ``Zmax``: min/max coordinates extrêmes along Z                   |
34 +----------------------------------------------------------------------------------+
35 | .. module:: CreateZoneCylinder                                                   |
36 |                                                                                  |
37 | **CreateZoneCylinder(zone_name, Xbase, Ybase, Zbase, Xaxe, Yaxe, Zaxe, R, H)**   |
38 |     Returns an instance of the class ``zone`` of type cylinder                   |
39 |     after its creation                                                           |
40 |                                                                                  |
41 |     - ``zone_name``: the name of the zone based on a cylinder                    |
42 |     - ``Xbase``, ``Ybase``, ``Zbase``: coordinates of a point on the axis        |
43 |     - ``Xaxe``, ``Yaxe``, ``Zaxe``: vector of the axis                           |
44 |     - ``R``: radius of the cylinder                                              |
45 |     - ``H``: height of the cylinder                                              |
46 +----------------------------------------------------------------------------------+
47 | .. module:: CreateZonePipe                                                       |
48 |                                                                                  |
49 | **CreateZonePipe(zone_name, Xbase, Ybase, Zbase, Xaxe, Yaxe, Zaxe, R, H, Rint)** |
50 |     Returns an instance of the class ``zone`` of type pipe                       |
51 |     after its creation                                                           |
52 |                                                                                  |
53 |     - ``zone_name``: the name of the zone based on a pipe                        |
54 |     - ``Xbase``, ``Ybase``, ``Zbase``: coordinates of a point on the axis        |
55 |     - ``Xaxe``, ``Yaxe``, ``Zaxe``: vector of the axis                           |
56 |     - ``R``: external radius of the pipe                                         |
57 |     - ``H``: height of the pipe                                                  |
58 |     - ``R``: internal radius of the pipe                                         |
59 +----------------------------------------------------------------------------------+
60 | .. module:: CreateZoneSphere                                                     |
61 |                                                                                  |
62 | **CreateZoneSphere(zone_name, Xcen, Ycen, Zcen, R)**                             |
63 |     Returns an instance of the class ``zone`` of type sphere                     |
64 |     after its creation                                                           |
65 |                                                                                  |
66 |     - ``zone_name``: the name of the zone based on a sphere                      |
67 |     - ``Xcen``, ``Ycen``, ``Zcen``: coordinates of the center of the sphere      |
68 |     - ``R``: radius of the sphere                                                |
69 +----------------------------------------------------------------------------------+
70 | .. module:: CreateZoneBox2D                                                      |
71 |                                                                                  |
72 | **CreateZoneBox2D(zone_name, Umin, Umax, Vmin, Vmax, Orient)**                   |
73 |     Returns an instance of the class ``zone`` of type rectangle                  |
74 |     after its creation                                                           |
75 |                                                                                  |
76 |     - ``zone_name``: the name of the zone based on a rectangle                   |
77 |     - ``Umin``, ``Umax``: min/max coordinates for the 1st dimension              |
78 |     - ``Vmin``, ``Vmax``: min/max coordinates for the 2nd dimension              |
79 |     - ``Orient``: integer that defines the convention for the plane              |
80 +----------------------------------------------------------------------------------+
81 | .. module:: CreateZoneDisk                                                       |
82 |                                                                                  |
83 | **CreateZoneDisk(zone_name, Ucen, Vcen, R, Orient)**                             |
84 |     Returns an instance of the class ``zone`` of type disk                       |
85 |     after its creation                                                           |
86 |                                                                                  |
87 |     - ``zone_name``: the name of the zone based on a full disk                   |
88 |     - ``Ucen``, ``Vcen``: coordinates of the center of the disk                  |
89 |     - ``R``: radius of the disk                                                  |
90 |     - ``Orient``: integer that defines the convention for the plane              |
91 +----------------------------------------------------------------------------------+
92 | .. module:: CreateZoneDiskWithHole                                               |
93 |                                                                                  |
94 | **CreateZoneDiskWithHole(zone_name, Ucen, Vcen, R, Rint, Orient)**               |
95 |     Returns an instance of the class ``zone`` of type disk with a hole           |
96 |     after its creation                                                           |
97 |                                                                                  |
98 |     - ``zone_name``: the name of the zone based on a disk with a hole            |
99 |     - ``Ucen``, ``Vcen``: coordinates of the center of the disk                  |
100 |     - ``R``: external radius of the disk                                         |
101 |     - ``Rint``: internal radius of the disk                                      |
102 |     - ``Orient``: integer that defines the convention for the plane              |
103 +----------------------------------------------------------------------------------+
104
105
106
107 +---------------------------------------------------------------+
108 +---------------------------------------------------------------+
109 |   The convention of the orientation of the plane is the same  |
110 |   as the one that is applied in the other modules of SALOME,  |
111 |   in particular GEOM:                                         |
112 |                                                               |
113 |     1. plane XY ; U <==> X and V <==> Y                       |
114 |     2. plane YZ ; U <==> Y and V <==> Z                       |
115 |     3. plane ZX ; U <==> Z and V <==> X                       |
116 +---------------------------------------------------------------+
117
118
119 .. note::
120   The functions that define 2D zones should be used only of the whole mesh is 2D into a plane of coordinates.
121
122
123
124
125 +---------------------------------------------------------------+
126 +---------------------------------------------------------------+
127 | .. module:: GetZone                                           |
128 |                                                               |
129 | **GetZone(zone_name)**                                        |
130 |     Returns an instance of the class ``zone``                 |
131 |     known by its name                                         |
132 |                                                               |
133 |     - ``zone_name``: the name of the zone                     |
134 +---------------------------------------------------------------+
135 | .. module:: GetAllZonesName                                   |
136 |                                                               |
137 | **GetAllZonesName()**                                         |
138 |     Returns the liste of the name of all the existing zones   |
139 |                                                               |
140 +---------------------------------------------------------------+
141
142
143 Methods of the class zone
144 *************************
145
146 +---------------------------------------------------------------+
147 +---------------------------------------------------------------+
148 | .. module:: GetName                                           |
149 |                                                               |
150 | **GetName()**                                                 |
151 |     Returns the name of the zone                              |
152 +---------------------------------------------------------------+
153 | .. module:: GetType                                           |
154 |                                                               |
155 | **GetType()**                                                 |
156 |     Returns the type of the zone                              |
157 |                                                               |
158 |         * 2: box                                              |
159 |         * 3: sphere                                           |
160 |         * 5: cylinder                                         |
161 |         * 7: pipe                                             |
162 |         * 11, 12, 13: rectangle and orientation 1, 2 ou 3     |
163 |         * 31, 32, 33: disk and orientation 1, 2 ou 3          |
164 |         * 61, 62, 63: disk with a hole and orientation 1, 2   |
165 |           ou 3                                                |
166 +---------------------------------------------------------------+
167 | .. module:: GetCoords                                         |
168 |                                                               |
169 | **GetCoords()**                                               |
170 |     Returns the array of the coordinates of the zone          |
171 |     with the same order as in its definition with             |
172 |     CreateZoneXXXX                                            |
173 +---------------------------------------------------------------+
174 | .. module:: Delete                                            |
175 |                                                               |
176 | **Delete()**                                                  |
177 |     Deletes the zone                                          |
178 |                                                               |
179 |     Returns an integer:                                       |
180 |         * 0: the destruction is done                          |
181 |         * other value: problem                                |
182 +---------------------------------------------------------------+
183
184
185 Example
186 *******
187 The creation of a 3D box is done as follows:
188 ::
189
190     zone_1 = homard.CreateZoneBox ("BLOC", -1., 1., -30., 40., 10.5, 20.8)
191
192
193 The creation of a disk in the plane XY is done as follows:
194 ::
195
196     zone_2 = homard.CreateZoneDisk ("disk", 1., 3., 43.25, 1)
197
198
199 Similar graphical input
200 ***********************
201 Look at :ref:`gui_create_zone`
202
203 .. warning::
204   With the graphical input mode, if a zone is edited and if one of the dimensions is modified, all the iterations that were computed with this zone are unvalidated. In python mode, that is not true: the iterations stay as they are.