Salome HOME
Corrections of examples path after install with scbi
[modules/hydro.git] / doc / salome / tutorial / english / english_manipsPolys.rst
1 ..
2    Copyright (C) 2015-2016 EDF
3
4    This file is part of SALOME HYDRO module.
5
6    SALOME HYDRO module is free software: you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation, either version 3 of the License, or
9    (at your option) any later version.
10
11    SALOME HYDRO module is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with SALOME HYDRO module.  If not, see <http://www.gnu.org/licenses/>.
18
19 #########################################
20 Polyline manipulation
21 #########################################
22
23 .. |deuxSections| image:: ../_static/deuxSections.png
24    :align: middle
25
26 .. |deuxExtremites| image:: ../_static/deuxExtremites.png
27    :align: middle
28
29 .. |bringTogether| image:: ../_static/bringTogether.png
30    :align: middle
31
32 .. |deuxPointsConfondus| image:: ../_static/deuxPointsConfondus.png
33    :align: middle
34
35 .. |contourFermeDeuxSections| image:: ../_static/contourFermeDeuxSections.png
36    :align: middle
37
38 .. |domaineMaritime| image:: ../_static/domaineMaritime.png
39    :align: middle
40
41 .. |zonePont| image:: ../_static/zonePont.png
42    :align: middle
43
44 .. |raffinement| image:: ../_static/raffinement.png
45    :align: middle
46
47 .. |completeSplitDialog| image:: ../_static/completeSplitDialog.png
48    :align: middle
49
50 .. |zonesSplitCreees| image:: ../_static/zonesSplitCreees.png
51    :align: middle
52
53 .. |zonePontSplit| image:: ../_static/zonePontSplit.png
54    :align: middle
55
56 .. |zoneAmontSplit| image:: ../_static/zoneAmontSplit.png
57    :align: middle
58
59 .. |zoneAvalSplit| image:: ../_static/zoneAvalSplit.png
60    :align: middle
61
62 .. |mergeZonesPont| image:: ../_static/mergeZonesPont.png
63    :align: middle
64
65 .. |pilesDePont| image:: ../_static/pilesDePont.png
66    :align: middle
67
68 .. |objetsPont| image:: ../_static/objetsPont.png
69    :align: middle
70
71 Only single section polylines have thus far been addressed.
72 The use of several sections in polylines enables, for example, the combination of splines
73 and broken lines in a single contour.
74 Polyline operations (merge, split, copy, paste) can be used, for instance,
75 to create contours that share an edge before the calculation case is created.
76
77 Maritime domain boundaries
78 ==========================
79
80 A maritime domain is often bounded by a coastline, described in detail,
81 and by the simplest possible broken line offshore.
82
83 Details of the coastline are captured and entered in the form of an open polyline spline.
84
85 The sea boundary is captured in a second section of the same polyline.
86
87 To create a second section, you need to edit the polyline that represents the coastline:
88 click on *insert new section* and choose a line of the open *polyline* type,
89 then use the *Add* button to validate the section creation.
90
91 As section 2 is already selected, use the *Addition mode* button to start adding points.
92 The aim when creating the broken line is to place the first and last points in the approximate
93 vicinity of the coast line endpoints.
94
95   |deuxSections|
96
97 The endpoints of the two sections must now be made to correspond exactly so as to obtain a closed contour.
98
99 To do so, select both sections simultaneously (shift key)
100 and switch to *modification mode* (modification mode button).
101
102 Next, in the view window, select both of the first two endpoints to be brought together
103 by dragging a selection box around them with the mouse (after having zoomed in, if necessary).
104
105   |deuxExtremites|
106
107 The coordinates of the two points are displayed, as well as the distance between the two points,
108 in the distance column.
109
110 Note that the right hand button has become active (two sections must be selected).
111
112   |bringTogether|
113
114 When the button is clicked, the two points are superimposed, their coordinates are updated
115 and the displayed distance changes to zero.
116
117   |deuxPointsConfondus|
118
119 The same procedure needs to be applied to the other two endpoints, then validate with *Apply and close*.
120
121 The polyline now represents a closed contour consisting of 2 sections of different types.
122
123   |contourFermeDeuxSections|
124
125  * **Note**: When the points are superimposed, one moves to the coordinates of the other.
126    Controlling which of the points remains fixed is not an easy task;
127    therefore it is best to avoid having too much distance between them in order to prevent
128    any deformation of the coastline.
129
130 The contour must then be converted into a natural object, providing the maritime domain.
131
132   |domaineMaritime|
133
134 Creating sections on a minor bed: dams, bridges
135 ===============================================
136
137 A minor river bed can be divided into several sections to which specific treatment options can be applied.
138 For example:
139
140  * The zone around a bridge, where explicit description of the bridge piers is likely to impose a specific mesh,
141    if the rest of the minor bed is meshed in stretched triangles in the direction of the flow path.
142
143  * A dam for which one wants to write, for example, the boundary conditions describing its operation.
144    The dam will then be defined as a "non floodable" or "insubmersible" zone across the minor bed.
145
146  * A zone for which the user wants to tailor the mesh.
147
148 Creating a specific zone around a bridge over the minor bed
149 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150
151 Taking the previous example on the Garonne, begin by drawing a rectangle across the *garonne* minor bed,
152 extending clearly beyond the riverbanks on both sides. Name the polyline rectangle *zonePont* (zoneBridge).
153
154   |zonePont|
155
156 **The polyline of the minor bed needs to be sufficiently refined for the cutting to be precise
157 and to avoid problems when creating the calculation case afterwards.**
158 If necessary, the polyline of the minor bed should be edited to add points on both sides
159 of the cross-section lines.
160 **There must always be at least one point between two cut lines of a spline curve**.
161
162   |raffinement|
163
164 Use the *Split polylines* command from the *garonne* polyline context menu and open the *Complete split* tab.
165 Select the *zonePont* polyline then click on the *include* button to have both polylines in the dialog list view.
166
167   |completeSplitDialog|
168
169 After validating with *Apply and close*, four new polylines are obtained to describe the minor bed
170 and four to describe the bridge zone.
171
172   |zonesSplitCreees|
173
174 The new zones will be reconstructed by joining the polylines together, set by set,
175 with the *Merge polylines* command.
176
177 The bridge zone is composed of the following four polylines:
178
179   |zonePontSplit|
180
181 The upstream minor bed zone is composed of two polylines:
182
183   |zoneAmontSplit|
184
185 The downstream minor bed zone is composed of two polylines:
186
187   |zoneAvalSplit|
188
189 To join the polylines, select any one of them and click on the *Merge polylines* command in the context menu.
190 You now need to select the four polylines, click on the *include* button, assign a name to the new polyline, *litMineurPont* ("minorBedBridge") and confirm the command by clicking on *Apply and close*.
191
192   |mergeZonesPont|
193
194 The *litMineurAmont* ("upstreamMinorBed") and *litMineurAval* ("downstreamMinorBed") polylines are created
195 in the same way. The three new polylines serve to define three immersible zones: *litMineur_aval*,
196 *litMineur_amont* and *litMineur_pont*.
197
198 If one wants to have bridge piers modelled in the mesh, these need to be represented as polylines
199 and non-submersible zones defined.
200
201   |pilesDePont|
202
203   |objetsPont|
204
205 Creating a specific zone around a dam on the minor bed
206 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
207
208 The principle is exactly the same as for the bridge, but without the piers.
209
210 .. only:: html
211
212    :ref:`ref_english_casParticuliers`