TexGen
RotatedPeriodicBoundaries.cpp
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2018 Louise Brown
4
5This program is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License
7as published by the Free Software Foundation; either version 2
8of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18=============================================================================*/
19
20#include "PrecompiledHeaders.h"
21#include "TexGen.h"
23
24
25using namespace TexGen;
26using namespace std;
27
28CRotatedPeriodicBoundaries::CRotatedPeriodicBoundaries(void)
29{
30}
31
33{
34}
35
37{
38 XYZ DomSize;
39
40 XYZ StartPoint = Mesh.GetNode(0);
41 XYZ Node1 = Mesh.GetNode(1);
42 XYZ Node2 = Mesh.GetNode(2);
43 XYZ Node4 = Mesh.GetNode(4);
44
45 m_DomSize.x = GetLength( StartPoint, Node4 );
46 m_DomSize.y = GetLength( StartPoint, Node2 );
47 m_DomSize.z = GetLength( StartPoint, Node1 );
48
49 m_DispVec[0] = Node4 - StartPoint;
50 m_DispVec[1] = Node2 - StartPoint;
51 m_DispVec[2] = Node1 - StartPoint;
52}
53
54void CRotatedPeriodicBoundaries::OutputEquations( ostream& Output, int iBoundaryConditions )
55{
56 Output << "***************************" << endl;
57 Output << "*** BOUNDARY CONDITIONS ***" << endl;
58 Output << "***************************" << endl;
59
60 Output << "*** Name: Translation stop Vertex 1 Type: Displacement/Rotation" << endl;
61 Output << "*Boundary" << endl;
62 Output << "MasterNode1, 1, 1" << endl;
63 Output << "MasterNode1, 2, 2" << endl;
64 Output << "MasterNode1, 3, 3" << endl;
65 Output << endl;
66
67 Output << "*****************" << endl;
68 Output << "*** EQUATIONS ***" << endl;
69 Output << "*****************" << endl;
70 Output << "*parameter" << endl;
71 // Multiply all parameters by -1 to avoid getting -- in equation after abaqus has parsed it
72 // Then put eg <xx> in equations rather than -<xx>
73 Output << "***unit cell X axis displacements" << endl;
74 Output << "xx=" << -m_DispVec[0].x << endl;
75 Output << "xy=" << -m_DispVec[0].y << endl;
76 Output << "xz=" << -m_DispVec[0].z << endl;
77
78 Output << "***Unit cell Y axis displacements" << endl;
79 Output << "yx=" << -m_DispVec[1].x << endl;
80 Output << "yy=" << -m_DispVec[1].y << endl;
81 Output << "yz=" << -m_DispVec[1].z << endl;
82
83 Output << "***Unit cell Z axis displacements" << endl;
84 Output << "zx=" << -m_DispVec[2].x << endl;
85 Output << "zy=" << -m_DispVec[2].y << endl;
86 Output << "zz=" << -m_DispVec[2].z << endl;
87
88 Output << "*Equation" << endl;
89 Output << "5" << endl;
90 Output << "FaceA, 1, 1.0, FaceB, 1, -1.0, ConstraintsDriver0, 1, <xx>" << endl;
91 Output << "ConstraintsDriver3, 1, <xy>, ConstraintsDriver4, 1, <xz>" << endl;
92 Output << "*Equation" << endl;
93 Output << "4" << endl;
94 Output << "FaceA, 2, 1.0, FaceB, 2, -1.0" << endl;
95 Output << "ConstraintsDriver1, 1, <xy>, ConstraintsDriver5, 1, <xz>" << endl;
96 Output << "*Equation" << endl;
97 Output << "3" << endl;
98 Output << "FaceA, 3, 1.0, FaceB, 3, -1.0" << endl;
99 Output << "ConstraintsDriver2, 1, <xz>" << endl;
100
101 Output << "*Equation" << endl;
102 Output << "5" << endl;
103 Output << "FaceC, 1, 1.0, FaceD, 1, -1.0, ConstraintsDriver0, 1, <yx>" << endl;
104 Output << "ConstraintsDriver3, 1, <yy>, ConstraintsDriver4, 1, <yz>" << endl;
105 Output << "*Equation" << endl;
106 Output << "4" << endl;
107 Output << "FaceC, 2, 1.0, FaceD, 2, -1.0" << endl;
108 Output << "ConstraintsDriver1, 1, <yy>, ConstraintsDriver5, 1, <yz>" << endl;
109 Output << "*Equation" << endl;
110 Output << "3" << endl;
111 Output << "FaceC, 3, 1.0, FaceD, 3, -1.0" << endl;
112 Output << "ConstraintsDriver2, 1, <yz>" << endl;
113
114 Output << "*Equation" << endl;
115 Output << "5" << endl;
116 Output << "FaceE, 1, 1.0, FaceF, 1, -1.0, ConstraintsDriver0, 1, <zx>" << endl;
117 Output << "ConstraintsDriver3, 1, <zy>, ConstraintsDriver4, 1, <zz>" << endl;
118 Output << "*Equation" << endl;
119 Output << "4" << endl;
120 Output << "FaceE, 2, 1.0, FaceF, 2, -1.0" << endl;
121 Output << "ConstraintsDriver1, 1, <zy>, ConstraintsDriver5, 1, <zz>" << endl;
122 Output << "*Equation" << endl;
123 Output << "3" << endl;
124 Output << "FaceE, 3, 1.0, FaceF, 3, -1.0" << endl;
125 Output << "ConstraintsDriver2, 1, <zz>" << endl;
126
127 Output << "************************************************" << endl;
128 Output << "*** There seems to be an issue with using parameterised variables for repeated constraints " << endl;
129 Output << "*** ABAQUS should be able to combine these but it generates a system error, reported in the .dat file " << endl;
130 Output << "*** Only solution for this found is to add the values before exporting to the .inp file " << endl;
131 Output << "*** Comments in following sections show which parameters have been added " << endl;
132 Output << "*Equation" << endl;
133 Output << "5" << endl;
134 Output << "Edge2, 1, 1.0, Edge1, 1, -1.0, ConstraintsDriver0, 1, <xx>, ConstraintsDriver3, 1, <xy>" << endl;
135 Output << "ConstraintsDriver4, 1, <xz>" << endl;
136 Output << "*Equation" << endl;
137 Output << "4" << endl;
138 Output << "Edge2, 2, 1.0, Edge1, 2, -1.0, ConstraintsDriver1, 1, <xy>, ConstraintsDriver5, 1, <xz>" << endl;
139 Output << "*Equation" << endl;
140 Output << "3" << endl;
141 Output << "Edge2, 3, 1.0, Edge1, 3, -1.0, ConstraintsDriver2, 1, <xz>" << endl;
142
143 Output << "*** ConstraintsDriver0 <xx> + <yx>" << endl;
144 Output << "*** ConstraintsDriver3 <xy> + <yy>" << endl;
145 Output << "*** ConstraintsDriver4 <xz> + <yz>" << endl;
146 Output << "*Equation" << endl;
147 Output << "5" << endl;
148 Output << "Edge3, 1, 1.0, Edge1, 1, -1.0, ConstraintsDriver0, 1, " << -1.0*(m_DispVec[0].x + m_DispVec[1].x) << ", ConstraintsDriver3, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[1].y) << endl;
149 Output << "ConstraintsDriver4, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[1].z) << endl;
150
151 Output << "*** ConstraintsDriver1 <xy> + <yy>" << endl;
152 Output << "*** ConstraintsDriver5 <xz> + <yz>" << endl;
153 Output << "*Equation" << endl;
154 Output << "4" << endl;
155 Output << "Edge3, 2, 1.0, Edge1, 2, -1.0, ConstraintsDriver1, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[1].y) << ", ConstraintsDriver5, 1, "<< -1.0*(m_DispVec[0].z + m_DispVec[1].z) << endl;
156 Output << "*Equation" << endl;
157 Output << "3" << endl;
158 Output << "Edge3, 3, 1.0, Edge1, 3, -1.0, ConstraintsDriver2, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[1].z) << endl;
159
160 Output << "*Equation" << endl;
161 Output << "5" << endl;
162 Output << "Edge4, 1, 1.0, Edge1, 1, -1.0, ConstraintsDriver0, 1, <yx>, ConstraintsDriver3, 1, <yy>" << endl;
163 Output << "ConstraintsDriver4, 1, <yz>" << endl;
164 Output << "*Equation" << endl;
165 Output << "4" << endl;
166 Output << "Edge4, 2, 1.0, Edge1, 2, -1.0, ConstraintsDriver1, 1, <yy>, ConstraintsDriver5, 1, <yz>" << endl;
167 Output << "*Equation" << endl;
168 Output << "3" << endl;
169 Output << "Edge4, 3, 1.0, Edge1, 3, -1.0, ConstraintsDriver2, 1, <yz>" << endl;
170
171 Output << "*Equation" << endl;
172 Output << "5" << endl;
173 Output << "Edge6, 1, 1.0, Edge5, 1, -1.0, ConstraintsDriver0, 1, <xx>" << endl;
174 Output << "ConstraintsDriver3, 1, <xy>, ConstraintsDriver4, 1, <xz>" << endl;
175 Output << "*Equation" << endl;
176 Output << "4" << endl;
177 Output << "Edge6, 2, 1.0, Edge5, 2, -1.0" << endl;
178 Output << "ConstraintsDriver1, 1, <xy>, ConstraintsDriver5, 1, <xz>" << endl;
179 Output << "*Equation" << endl;
180 Output << "3" << endl;
181 Output << "Edge6, 3, 1.0, Edge5, 3, -1.0" << endl;
182 Output << "ConstraintsDriver2, 1, <xz>" << endl;
183
184 Output << "*** ConstraintsDriver0 <xx> + <zx>" << endl;
185 Output << "*** ConstraintsDriver3 <xy> + <zy>" << endl;
186 Output << "*** ConstraintsDriver4 <xz> + <zz>" << endl;
187 Output << "*Equation" << endl;
188 Output << "5" << endl;
189 Output << "Edge7, 1, 1.0, Edge5, 1, -1.0, ConstraintsDriver0, 1, " << -1.0*(m_DispVec[0].x + m_DispVec[2].x) << endl;
190 Output << "ConstraintsDriver3, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[2].y) << ", ConstraintsDriver4, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[2].z) << endl;
191
192 Output << "*** ConstraintsDriver1 <xy> + <zy>" << endl;
193 Output << "*** ConstraintsDriver5 <xz> + <zz>" << endl;
194 Output << "*Equation" << endl;
195 Output << "4" << endl;
196 Output << "Edge7, 2, 1.0, Edge5, 2, -1.0" << endl;
197 Output << "ConstraintsDriver1, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[2].y) << ", ConstraintsDriver5, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[2].z) << endl;
198 Output << "*Equation" << endl;
199 Output << "3" << endl;
200 Output << "Edge7, 3, 1.0, Edge5, 3, -1.0" << endl;
201 Output << "ConstraintsDriver2, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[2].z) << endl;
202
203 Output << "*Equation" << endl;
204 Output << "5" << endl;
205 Output << "Edge8, 1, 1.0, Edge5, 1, -1.0, ConstraintsDriver0, 1, <zx>" << endl;
206 Output << "ConstraintsDriver3, 1, <zy>, ConstraintsDriver4, 1, <zz>" << endl;
207 Output << "*Equation" << endl;
208 Output << "4" << endl;
209 Output << "Edge8, 2, 1.0, Edge5, 2, -1.0" << endl;
210 Output << "ConstraintsDriver1, 1, <zy>, ConstraintsDriver5, 1, <zz>" << endl;
211 Output << "*Equation" << endl;
212 Output << "3" << endl;
213 Output << "Edge8, 3, 1.0, Edge5, 3, -1.0" << endl;
214 Output << "ConstraintsDriver2, 1, <zz>" << endl;
215
216 Output << "*Equation" << endl;
217 Output << "5" << endl;
218 Output << "Edge10, 1, 1.0, Edge9, 1, -1.0, ConstraintsDriver0, 1, <yx>" << endl;
219 Output << "ConstraintsDriver3, 1, <yy>, ConstraintsDriver4, 1, <yz>" << endl;
220 Output << "*Equation" << endl;
221 Output << "4" << endl;
222 Output << "Edge10, 2, 1.0, Edge9, 2, -1.0" << endl;
223 Output << "ConstraintsDriver1, 1, <yy>, ConstraintsDriver5, 1, <yz>" << endl;
224 Output << "*Equation" << endl;
225 Output << "3" << endl;
226 Output << "Edge10, 3, 1.0, Edge9, 3, -1.0" << endl;
227 Output << "ConstraintsDriver2, 1, <yz>" << endl;
228
229 Output << "*** ConstraintsDriver0 <yx> + <zx>" << endl;
230 Output << "*** ConstraintsDriver3 <yy> + <zy>" << endl;
231 Output << "*** ConstraintsDriver4 <yz> + <zz>" << endl;
232 Output << "*Equation" << endl;
233 Output << "5" << endl;
234 Output << "Edge11, 1, 1.0, Edge9, 1, -1.0, ConstraintsDriver0, 1, " << -1.0*(m_DispVec[1].x + m_DispVec[2].x) << endl;
235 Output << "ConstraintsDriver3, 1, " << -1.0*(m_DispVec[1].y + m_DispVec[2].y) << ", ConstraintsDriver4, 1, " << -1.0*(m_DispVec[1].z + m_DispVec[2].z) << endl;
236
237 Output << "*** ConstraintsDriver1 <yy> + <zy>" << endl;
238 Output << "*** ConstraintsDriver5 <yz> + <zz>" << endl;
239 Output << "*Equation" << endl;
240 Output << "4" << endl;
241 Output << "Edge11, 2, 1.0, Edge9, 2, -1.0" << endl;
242 Output << "ConstraintsDriver1, 1, " << -1.0*(m_DispVec[1].y + m_DispVec[2].y) << ", ConstraintsDriver5, 1, " << -1.0*(m_DispVec[1].z + m_DispVec[2].z) << endl;
243 Output << "*Equation" << endl;
244 Output << "3" << endl;
245 Output << "Edge11, 3, 1.0, Edge9, 3, -1.0" << endl;
246 Output << "ConstraintsDriver2, 1, " << -1.0*(m_DispVec[1].z + m_DispVec[2].z) << endl;
247
248 Output << "*Equation" << endl;
249 Output << "5" << endl;
250 Output << "Edge12, 1, 1.0, Edge9, 1, -1.0, ConstraintsDriver0, 1, <zx>" << endl;
251 Output << "ConstraintsDriver3, 1, <zy>, ConstraintsDriver4, 1, <zz>" << endl;
252 Output << "*Equation" << endl;
253 Output << "4" << endl;
254 Output << "Edge12, 2, 1.0, Edge9, 2, -1.0" << endl;
255 Output << "ConstraintsDriver1, 1, <zy>, ConstraintsDriver5, 1, <zz>" << endl;
256 Output << "*Equation" << endl;
257 Output << "3" << endl;
258 Output << "Edge12, 3, 1.0, Edge9, 3, -1.0" << endl;
259 Output << "ConstraintsDriver2, 1, <zz>" << endl;
260
261 Output << "******************************************************" << endl;
262 Output << "*Equation" << endl;
263 Output << "5" << endl;
264 Output << "MasterNode2, 1, 1.0, MasterNode1, 1, -1.0, ConstraintsDriver0, 1, <xx>, ConstraintsDriver3, 1, <xy>" << endl;
265 Output << "ConstraintsDriver4, 1, <xz>" << endl;
266 Output << "*Equation" << endl;
267 Output << "4" << endl;
268 Output << "MasterNode2, 2, 1.0, MasterNode1, 2, -1.0, ConstraintsDriver1, 1, <xy>, ConstraintsDriver5, 1, <xz>" << endl;
269 Output << "*Equation" << endl;
270 Output << "3" << endl;
271 Output << "MasterNode2, 3, 1.0, MasterNode1, 3, -1.0, ConstraintsDriver2, 1, <xz>" << endl;
272
273 Output << "*** ConstraintsDriver0 <xx> + <yx>" << endl;
274 Output << "*** ConstraintsDriver3 <xy> + <yy>" << endl;
275 Output << "*** ConstraintsDriver4 <xz> + <yz>" << endl;
276 Output << "*Equation" << endl;
277 Output << "5" << endl;
278 Output << "MasterNode3, 1, 1.0, MasterNode1, 1, -1.0, ConstraintsDriver0, 1, " << -1.0*(m_DispVec[0].x + m_DispVec[1].x) << ", ConstraintsDriver3, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[1].y) << endl;
279 Output << "ConstraintsDriver4, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[1].z) << endl;
280 Output << "*Equation" << endl;
281 Output << "4" << endl;
282 Output << "MasterNode3, 2, 1.0, MasterNode1, 2, -1.0, ConstraintsDriver1, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[1].y) << ", ConstraintsDriver5, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[1].z) << endl;
283 Output << "*Equation" << endl;
284 Output << "4" << endl;
285 Output << "MasterNode3, 3, 1.0, MasterNode1, 3, -1.0, ConstraintsDriver2, 1, <xz>" << endl;
286 Output << "ConstraintsDriver2, 1, <yz>" << endl;
287
288 Output << "*Equation" << endl;
289 Output << "5" << endl;
290 Output << "MasterNode4, 1, 1.0, MasterNode1, 1, -1.0, ConstraintsDriver0, 1, <yx>, ConstraintsDriver3, 1, <yy>" << endl;
291 Output << "ConstraintsDriver4, 1, <yz>" << endl;
292 Output << "*Equation" << endl;
293 Output << "4" << endl;
294 Output << "MasterNode4, 2, 1.0, MasterNode1, 2, -1.0, ConstraintsDriver1, 1, <yy>, ConstraintsDriver5, 1, <yz>" << endl;
295 Output << "*Equation" << endl;
296 Output << "3" << endl;
297 Output << "MasterNode4, 3, 1.0, MasterNode1, 3, -1.0, ConstraintsDriver2, 1, <yz>" << endl;
298
299 Output << "*Equation" << endl;
300 Output << "5" << endl;
301 Output << "MasterNode5, 1, 1.0, MasterNode1, 1, -1.0, ConstraintsDriver0, 1, <zx>" << endl;
302 Output << "ConstraintsDriver3, 1, <zy>, ConstraintsDriver4, 1, <zz>" << endl;
303 Output << "*Equation" << endl;
304 Output << "4" << endl;
305 Output << "MasterNode5, 2, 1.0, MasterNode1, 2, -1.0" << endl;
306 Output << "ConstraintsDriver1, 1, <zy>, ConstraintsDriver5, 1, <zz>" << endl;
307 Output << "*Equation" << endl;
308 Output << "3" << endl;
309 Output << "MasterNode5, 3, 1.0, MasterNode1, 3, -1.0" << endl;
310 Output << "ConstraintsDriver2, 1, <zz>" << endl;
311
312 Output << "*** ConstraintsDriver0 <xx> + <zx>" << endl;
313 Output << "*** ConstraintsDriver3 <xy> + <zy>" << endl;
314 Output << "*** ConstraintsDriver4 <xz> + <zz>" << endl;
315 Output << "*Equation" << endl;
316 Output << "5" << endl;
317 Output << "MasterNode6, 1, 1.0, MasterNode1, 1, -1.0, ConstraintsDriver0, 1, " << -1.0*(m_DispVec[0].x + m_DispVec[2].x) << endl;
318 Output << "ConstraintsDriver3, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[2].y) << ", ConstraintsDriver4, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[2].z) << endl;
319
320 Output << "*** ConstraintsDriver1 <xy> + <zy>" << endl;
321 Output << "*** ConstraintsDriver5 <xz> + <zz>" << endl;
322 Output << "*Equation" << endl;
323 Output << "4" << endl;
324 Output << "MasterNode6, 2, 1.0, MasterNode1, 2, -1.0" << endl;
325 Output << "ConstraintsDriver1, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[2].y) << ", ConstraintsDriver5, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[2].z) << endl;
326
327 Output << "*** ConstraintsDriver2 <xz> + <zz>" << endl;
328 Output << "*Equation" << endl;
329 Output << "3" << endl;
330 Output << "MasterNode6, 3, 1.0, MasterNode1, 3, -1.0" << endl;
331 Output << "ConstraintsDriver2, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[2].z) << endl;
332
333 Output << "*** ConstraintsDriver0 <xx> + <yx> +<zx>" << endl;
334 Output << "*** ConstraintsDriver3 <xy> + <yy> + <zy>" << endl;
335 Output << "*** ConstraintsDriver4 <xz> + <yz> + <zz>" << endl;
336 Output << "*Equation" << endl;
337 Output << "5" << endl;
338 Output << "MasterNode7, 1, 1.0, MasterNode1, 1, -1.0, ConstraintsDriver0, 1, " << -1.0*(m_DispVec[0].x + m_DispVec[1].x + m_DispVec[2].x) << " , ConstraintsDriver3, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[1].y + m_DispVec[2].y) << endl;
339 Output << "ConstraintsDriver4, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[1].z + m_DispVec[2].z)<< endl;
340
341 Output << "*** ConstraintsDriver1 <xy> + <yy> + <zy>" << endl;
342 Output << "*** ConstraintsDriver5 <xz> + <yz> + <zz>" << endl;
343 Output << "*Equation" << endl;
344 Output << "4" << endl;
345 Output << "MasterNode7, 2, 1.0, MasterNode1, 2, -1.0, ConstraintsDriver1, 1, " << -1.0*(m_DispVec[0].y + m_DispVec[1].y + m_DispVec[2].y) << ", ConstraintsDriver5, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[1].z + m_DispVec[2].z)<< endl;
346
347 Output << "*** ConstraintsDriver2 <xz> + <yz> + <zz>" << endl;
348 Output << "*Equation" << endl;
349 Output << "3" << endl;
350 Output << "MasterNode7, 3, 1.0, MasterNode1, 3, -1.0, ConstraintsDriver2, 1, " << -1.0*(m_DispVec[0].z + m_DispVec[1].z + m_DispVec[2].z) << endl;
351
352 Output << "*** ConstraintsDriver0 <yx> + <zx>" << endl;
353 Output << "*** ConstraintsDriver3 <yy> + <zy>" << endl;
354 Output << "*** ConstraintsDriver4 <yz> + <zz>" << endl;
355 Output << "*Equation" << endl;
356 Output << "5" << endl;
357 Output << "MasterNode8, 1, 1.0, MasterNode1, 1, -1.0, ConstraintsDriver0, 1, " << -1.0*(m_DispVec[1].x + m_DispVec[2].x) << endl;
358 Output << "ConstraintsDriver3, 1, " << -1.0*(m_DispVec[1].y + m_DispVec[2].y) << ", ConstraintsDriver4, 1, " << -1.0*(m_DispVec[1].z + m_DispVec[2].z) << endl;
359
360 Output << "*** ConstraintsDriver1 <yy> + <zy>" << endl;
361 Output << "*** ConstraintsDriver5 <yz> + <zz>" << endl;
362 Output << "*Equation" << endl;
363 Output << "4" << endl;
364 Output << "MasterNode8, 2, 1.0, MasterNode1, 2, -1.0" << endl;
365 Output << "ConstraintsDriver1, 1, " << -1.0*(m_DispVec[1].y + m_DispVec[2].y) << " , ConstraintsDriver5, 1, " << -1.0*(m_DispVec[1].z + m_DispVec[2].z) << endl;
366
367 Output << "*** ConstraintsDriver2 <yz> + <zz>" << endl;
368 Output << "*Equation" << endl;
369 Output << "3" << endl;
370 Output << "MasterNode8, 3, 1.0, MasterNode1, 3, -1.0" << endl;
371 Output << "ConstraintsDriver2, 1, " << -1.0*(m_DispVec[1].z + m_DispVec[2].z) << endl;
372}
Defines the nodes and elements of a surface or volume mesh.
Definition: Mesh.h:58
const XYZ & GetNode(int iIndex) const
Get the node with given ID.
Definition: Mesh.cpp:2636
void OutputEquations(ostream &Output, int iBoundaryConditions)
Output equations for rotated domain boundary conditions.
XYZ m_DispVec[3]
Displacement vectors for the three axes.
void SetDomainSize(const CMesh &Mesh)
Set up the domain size parameters used in the equations.
Namespace containing a series of customised math operations not found in the standard c++ library.
double GetLength(const XYZ &Point1, const XYZ &Point2)
Get the length between two points.
Definition: mymath.h:540
Struct for representing points in 3D space.
Definition: mymath.h:56
double z
Definition: mymath.h:57
double x
Definition: mymath.h:57
double y
Definition: mymath.h:57