h2lib-tests 13.1.901__py3-none-any.whl → 13.1.1701__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- h2lib_tests/conftest.py +9 -1
- h2lib_tests/test_ellipsys_couplings.py +4 -4
- h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT.htc +2 -2
- h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT_no_aerodrag.htc +670 -0
- h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT_yaw_acturator.htc +1 -1
- h2lib_tests/test_h2lib.py +23 -0
- h2lib_tests/test_h2rotor.py +108 -2
- h2lib_tests/test_mpi.py +1 -1
- h2lib_tests/test_topology_h2lib.py +95 -9
- {h2lib_tests-13.1.901.dist-info → h2lib_tests-13.1.1701.dist-info}/METADATA +2 -3
- {h2lib_tests-13.1.901.dist-info → h2lib_tests-13.1.1701.dist-info}/RECORD +13 -12
- {h2lib_tests-13.1.901.dist-info → h2lib_tests-13.1.1701.dist-info}/WHEEL +1 -1
- {h2lib_tests-13.1.901.dist-info → h2lib_tests-13.1.1701.dist-info}/top_level.txt +0 -0
h2lib_tests/conftest.py
CHANGED
@@ -115,7 +115,7 @@ def write_dtu10mw_only_blade():
|
|
115
115
|
|
116
116
|
@pytest.fixture(scope="session")
|
117
117
|
def write_dtu10mw_only_blade_low_max_iter(write_dtu10mw_only_blade):
|
118
|
-
# Start from the write_dtu10mw_only_blade and
|
118
|
+
# Start from the write_dtu10mw_only_blade and then reduce the number of max iterations,
|
119
119
|
# so that the static solver will not have time to converge.
|
120
120
|
htc = write_dtu10mw_only_blade.copy()
|
121
121
|
htc.set_name("DTU_10MW_RWT_only_blade_low_max_iter")
|
@@ -291,6 +291,7 @@ def h2_dtu_10mw_only_tower(write_dtu10mw_only_tower):
|
|
291
291
|
model_path = f"{tfp}DTU_10_MW/"
|
292
292
|
htc_path = "htc/DTU_10MW_RWT_only_tower.htc"
|
293
293
|
h2.init(htc_path=htc_path, model_path=model_path)
|
294
|
+
h2.stop_on_error(False)
|
294
295
|
yield h2
|
295
296
|
h2.close()
|
296
297
|
|
@@ -301,6 +302,7 @@ def h2_dtu_10mw_only_tower_rotated(write_dtu10mw_only_tower_rotated):
|
|
301
302
|
model_path = f"{tfp}DTU_10_MW/"
|
302
303
|
htc_path = "htc/DTU_10MW_RWT_only_tower_rotated.htc"
|
303
304
|
h2.init(htc_path=htc_path, model_path=model_path)
|
305
|
+
h2.stop_on_error(False)
|
304
306
|
yield h2
|
305
307
|
h2.close()
|
306
308
|
|
@@ -311,6 +313,7 @@ def h2_dtu_10mw_only_tower_encrypted(write_dtu10mw_only_tower_encrypted):
|
|
311
313
|
model_path = f"{tfp}DTU_10_MW/"
|
312
314
|
htc_path = "htc/DTU_10MW_RWT_only_tower_encrypted.htc"
|
313
315
|
h2.init(htc_path=htc_path, model_path=model_path)
|
316
|
+
h2.stop_on_error(False)
|
314
317
|
yield h2
|
315
318
|
h2.close()
|
316
319
|
|
@@ -321,6 +324,7 @@ def h2_dtu_10mw_only_blade(write_dtu10mw_only_blade):
|
|
321
324
|
model_path = f"{tfp}DTU_10_MW/"
|
322
325
|
htc_path = "htc/DTU_10MW_RWT_only_blade.htc"
|
323
326
|
h2.init(htc_path=htc_path, model_path=model_path)
|
327
|
+
h2.stop_on_error(False)
|
324
328
|
yield h2
|
325
329
|
h2.close()
|
326
330
|
|
@@ -331,6 +335,7 @@ def h2_dtu10mw_only_blade_low_max_iter(write_dtu10mw_only_blade_low_max_iter):
|
|
331
335
|
model_path = f"{tfp}DTU_10_MW/"
|
332
336
|
htc_path = "htc/DTU_10MW_RWT_only_blade_low_max_iter.htc"
|
333
337
|
h2.init(htc_path=htc_path, model_path=model_path)
|
338
|
+
h2.stop_on_error(False)
|
334
339
|
yield h2
|
335
340
|
h2.close()
|
336
341
|
|
@@ -341,6 +346,7 @@ def h2_dtu_10mw_only_blade_rotate_base(write_dtu10mw_only_blade_rotate_base):
|
|
341
346
|
model_path = f"{tfp}DTU_10_MW/"
|
342
347
|
htc_path = "htc/DTU_10MW_RWT_only_blade_rotate_base.htc"
|
343
348
|
h2.init(htc_path=htc_path, model_path=model_path)
|
349
|
+
h2.stop_on_error(False)
|
344
350
|
yield h2
|
345
351
|
h2.close()
|
346
352
|
|
@@ -351,6 +357,7 @@ def h2_dtu_10mw_only_blade_rotate_relative(write_dtu10mw_only_blade_rotate_relat
|
|
351
357
|
model_path = f"{tfp}DTU_10_MW/"
|
352
358
|
htc_path = "htc/DTU_10MW_RWT_only_blade_rotate_relative.htc"
|
353
359
|
h2.init(htc_path=htc_path, model_path=model_path)
|
360
|
+
h2.stop_on_error(False)
|
354
361
|
yield h2
|
355
362
|
h2.close()
|
356
363
|
|
@@ -361,5 +368,6 @@ def h2_dtu_10mw_only_blade_rotate_bearing3(write_dtu10mw_only_blade_rotate_beari
|
|
361
368
|
model_path = f"{tfp}DTU_10_MW/"
|
362
369
|
htc_path = "htc/DTU_10MW_RWT_only_blade_rotate_bearing3.htc"
|
363
370
|
h2.init(htc_path=htc_path, model_path=model_path)
|
371
|
+
h2.stop_on_error(False)
|
364
372
|
yield h2
|
365
373
|
h2.close()
|
@@ -19,7 +19,7 @@ class Ellipsys():
|
|
19
19
|
return self.time
|
20
20
|
|
21
21
|
def set_fxyz(self, pos_xyz, fxyz):
|
22
|
-
print(self.time, np.shape(pos_xyz), np.shape(fxyz))
|
22
|
+
# print(self.time, np.shape(pos_xyz), np.shape(fxyz))
|
23
23
|
pass
|
24
24
|
|
25
25
|
|
@@ -28,7 +28,7 @@ def test_ellipsys_dummy_workflow_1wt():
|
|
28
28
|
N = 1
|
29
29
|
with MultiH2Lib(N, suppress_output=True) as h2:
|
30
30
|
el = Ellipsys()
|
31
|
-
htc = HTCFile(tfp + 'DTU_10_MW/htc/
|
31
|
+
htc = HTCFile(tfp + 'DTU_10_MW/htc/DTU_10MW_RWT_no_aerodrag.htc')
|
32
32
|
for i in range(N):
|
33
33
|
htc.set_name(f'wt{i}')
|
34
34
|
htc.save()
|
@@ -41,7 +41,7 @@ def test_ellipsys_dummy_workflow_1wt():
|
|
41
41
|
pos_gl_xyz = np.array(h2.get_aerosections_position(), order='F') + wt_pos[na, na, :]
|
42
42
|
uvw = np.asfortranarray(el.get_uvw(pos_gl_xyz))
|
43
43
|
h2.set_aerosections_windspeed(uvw)
|
44
|
-
h2.run(t) # run after set_aero_windspeed requires
|
44
|
+
h2.run(t) # run after set_aero_windspeed requires initialize of bem before disabling
|
45
45
|
frc_gl_xyz = h2.get_aerosections_forces()
|
46
46
|
el.set_fxyz(pos_gl_xyz, frc_gl_xyz)
|
47
47
|
if t == 1:
|
@@ -53,7 +53,7 @@ def test_ellipsys_dummy_workflow():
|
|
53
53
|
N = 4
|
54
54
|
with MultiH2Lib(N, suppress_output=True) as h2:
|
55
55
|
el = Ellipsys()
|
56
|
-
htc = HTCFile(tfp + 'DTU_10_MW/htc/
|
56
|
+
htc = HTCFile(tfp + 'DTU_10_MW/htc/DTU_10MW_RWT_no_aerodrag.htc')
|
57
57
|
for i in range(N):
|
58
58
|
htc.set_name(f'wt{i}')
|
59
59
|
htc.save()
|
@@ -6,7 +6,7 @@ begin simulation;
|
|
6
6
|
on_no_convergence continue ;
|
7
7
|
convergence_limits 1E3 1.0 1E-7 ;
|
8
8
|
;logfile ./log/DTU_10MW_RWT_ver09.log ;
|
9
|
-
log_deltat
|
9
|
+
log_deltat 1;
|
10
10
|
begin newmark;
|
11
11
|
deltat 0.01;
|
12
12
|
end newmark;
|
@@ -599,7 +599,7 @@ end dll;
|
|
599
599
|
;
|
600
600
|
begin output;
|
601
601
|
filename ./res/DTU_10MW_RWT_ver09 ;
|
602
|
-
data_format
|
602
|
+
data_format gtsdf64;
|
603
603
|
buffer 500 ;
|
604
604
|
;
|
605
605
|
general time;
|
@@ -0,0 +1,670 @@
|
|
1
|
+
;DTU_10MW_RWT, version 9, 25-09-2017, mhha
|
2
|
+
;
|
3
|
+
begin simulation;
|
4
|
+
time_stop 1000.0;
|
5
|
+
solvertype 1 ; (newmark)
|
6
|
+
on_no_convergence continue ;
|
7
|
+
convergence_limits 1E3 1.0 1E-7 ;
|
8
|
+
;logfile ./log/DTU_10MW_RWT_ver09.log ;
|
9
|
+
log_deltat 1;
|
10
|
+
begin newmark;
|
11
|
+
deltat 0.01;
|
12
|
+
end newmark;
|
13
|
+
end simulation;
|
14
|
+
;
|
15
|
+
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
16
|
+
begin new_htc_structure;
|
17
|
+
; beam_output_file_name ./log/DTU_10MW_RWT_beam.dat; Optional - Calculated beam properties of the bodies are written to file
|
18
|
+
; body_output_file_name ./log/DTU_10MW_RWT_body.dat; Optional - Body initial position and orientation are written to file
|
19
|
+
; body_eigenanalysis_file_name ./eig/DTU_10MW_RWT_body_eigen.dat;
|
20
|
+
; structure_eigenanalysis_file_name ./eig/DTU_10MW_RWT_strc_eigen.dat ;
|
21
|
+
;-------------------------------------------------------------------------------------------------------------------------------
|
22
|
+
;-------------------------------------------------------------------------------------------------------------------------------
|
23
|
+
begin main_body; tower 115m
|
24
|
+
name tower ;
|
25
|
+
type timoschenko ;
|
26
|
+
nbodies 1 ;
|
27
|
+
node_distribution c2_def ;
|
28
|
+
damping_posdef 0.0 0.0 0.0 4.12E-03 4.12E-03 4.5E-04 ; Mx My Mz Kx Ky Kz , M´s raises overall level, K´s raises high freguency level "tuned by Larh"
|
29
|
+
begin timoschenko_input;
|
30
|
+
filename ./data/DTU_10MW_RWT_Tower_st.dat;
|
31
|
+
set 1 1 ;
|
32
|
+
end timoschenko_input;
|
33
|
+
begin c2_def; Definition of centerline (main_body coordinates)
|
34
|
+
nsec 11;
|
35
|
+
sec 1 0 0 0.00 0 ; x,y,z,twist
|
36
|
+
sec 2 0 0 -11.50 0 ;
|
37
|
+
sec 3 0 0 -23.00 0 ;
|
38
|
+
sec 4 0 0 -34.50 0 ;
|
39
|
+
sec 5 0 0 -46.00 0 ;
|
40
|
+
sec 6 0 0 -57.50 0 ;
|
41
|
+
sec 7 0 0 -69.00 0 ;
|
42
|
+
sec 8 0 0 -80.50 0 ;
|
43
|
+
sec 9 0 0 -92.00 0 ;
|
44
|
+
sec 10 0 0 -103.50 0 ;
|
45
|
+
sec 11 0 0 -115.63 0 ;
|
46
|
+
end c2_def ;
|
47
|
+
end main_body;
|
48
|
+
;
|
49
|
+
begin main_body;
|
50
|
+
name towertop ;
|
51
|
+
type timoschenko ;
|
52
|
+
nbodies 1 ;
|
53
|
+
node_distribution c2_def ;
|
54
|
+
damping_posdef 0.0 0.0 0.0 7.00E-03 7.00E-03 7.00E-03 ; "changed by Larh"
|
55
|
+
concentrated_mass 2.0 0.0 2.6870E+00 3.0061E-01 4.4604E+05 4.1060E+06 4.1060E+05 4.1060E+06 ; Nacelle mass and inertia "corrected by Anyd 25/4/13"
|
56
|
+
begin timoschenko_input;
|
57
|
+
filename ./data/DTU_10MW_RWT_Towertop_st.dat ;
|
58
|
+
set 1 2 ;
|
59
|
+
end timoschenko_input;
|
60
|
+
begin c2_def; Definition of centerline (main_body coordinates)
|
61
|
+
nsec 2;
|
62
|
+
sec 1 0.0 0.0 0.0 0.0 ; x,y,z,twist
|
63
|
+
sec 2 0.0 0.0 -2.75 0.0 ;
|
64
|
+
end c2_def ;
|
65
|
+
end main_body;
|
66
|
+
;
|
67
|
+
begin main_body;
|
68
|
+
name shaft ;
|
69
|
+
type timoschenko ;
|
70
|
+
nbodies 1 ;
|
71
|
+
node_distribution c2_def ;
|
72
|
+
damping_posdef 0.0 0.0 0.0 4.65E-04 4.65E-04 3.983E-03 ; "tuned by Anyd 23/5/13 to 31.45 log decr. damping for free free with stiff rotor and tower"
|
73
|
+
concentrated_mass 1.0 0.0 0.0 0.0 0.0 0.0 0.0 3.751E+06 ; generator equivalent slow shaft "re_tuned by Anyd 20/2/13"
|
74
|
+
concentrated_mass 5.0 0.0 0.0 0.0 1.0552E+05 0.0 0.0 3.257E+05 ; hub mass and inertia; "re_tuned by Anyd 20/2/13"
|
75
|
+
begin timoschenko_input;
|
76
|
+
filename ./data/DTU_10MW_RWT_Shaft_st.dat ;
|
77
|
+
set 1 1 ;
|
78
|
+
end timoschenko_input;
|
79
|
+
begin c2_def; Definition of centerline (main_body coordinates)
|
80
|
+
nsec 5;
|
81
|
+
sec 1 0.0 0.0 0.0 0.0 ; Tower top x,y,z,twist
|
82
|
+
sec 2 0.0 0.0 1.5 0.0 ;
|
83
|
+
sec 3 0.0 0.0 3.0 0.0 ;
|
84
|
+
sec 4 0.0 0.0 4.4 0.0 ; Main bearing
|
85
|
+
sec 5 0.0 0.0 7.1 0.0 ; Rotor centre
|
86
|
+
end c2_def ;
|
87
|
+
end main_body;
|
88
|
+
;
|
89
|
+
begin main_body;
|
90
|
+
name hub1 ;
|
91
|
+
type timoschenko ;
|
92
|
+
nbodies 1 ;
|
93
|
+
node_distribution c2_def ;
|
94
|
+
damping_posdef 0.0 0.0 0.0 3.00E-06 3.00E-06 2.00E-05; "changed by Larh"
|
95
|
+
begin timoschenko_input;
|
96
|
+
filename ./data/DTU_10MW_RWT_Hub_st.dat ;
|
97
|
+
set 1 2 ;
|
98
|
+
end timoschenko_input;
|
99
|
+
begin c2_def; Definition of centerline (main_body coordinates)
|
100
|
+
nsec 2;
|
101
|
+
sec 1 0.0 0.0 0.0 0.0 ; x,y,z,twist
|
102
|
+
sec 2 0.0 0.0 2.8 0.0 ;
|
103
|
+
end c2_def ;
|
104
|
+
end main_body;
|
105
|
+
;
|
106
|
+
begin main_body;
|
107
|
+
name hub2 ;
|
108
|
+
copy_main_body hub1;
|
109
|
+
end main_body;
|
110
|
+
;
|
111
|
+
begin main_body;
|
112
|
+
name hub3 ;
|
113
|
+
copy_main_body hub1 ;
|
114
|
+
end main_body;
|
115
|
+
;
|
116
|
+
begin main_body;
|
117
|
+
name blade1 ;
|
118
|
+
type timoschenko ;
|
119
|
+
nbodies 10 ;
|
120
|
+
node_distribution c2_def;
|
121
|
+
damping_posdef 0.0 0.0 0.0 1.53e-3 2.55e-3 3.3e-4 ; " 3% damping tuned by tkim 23/03/13 unable to fit 3rd and higher mode"
|
122
|
+
begin timoschenko_input ;
|
123
|
+
filename ./data/DTU_10MW_RWT_Blade_st.dat;
|
124
|
+
set 1 1 ; set subset
|
125
|
+
end timoschenko_input;
|
126
|
+
begin c2_def; Definition of centerline (main_body coordinates)
|
127
|
+
nsec 27 ;
|
128
|
+
sec 1 0.00000E+00 7.00600E-05 4.44089E-16 -1.45000E+01 ;
|
129
|
+
sec 2 -2.06477E-05 -1.22119E-02 3.00000E+00 -1.45000E+01 ;
|
130
|
+
sec 3 -7.28810E-03 -2.49251E-02 6.00000E+00 -1.44851E+01 ;
|
131
|
+
sec 4 -1.89235E-02 -2.73351E-02 7.00004E+00 -1.44610E+01 ;
|
132
|
+
sec 5 -5.41282E-02 -2.82163E-02 8.70051E+00 -1.43388E+01 ;
|
133
|
+
sec 6 -1.26633E-01 -2.13210E-02 1.04020E+01 -1.40201E+01 ;
|
134
|
+
sec 7 -2.25666E-01 -1.28378E-02 1.22046E+01 -1.33904E+01 ;
|
135
|
+
sec 8 -2.88563E-01 -7.70659E-03 1.32065E+01 -1.29371E+01 ;
|
136
|
+
sec 9 -3.99194E-01 -4.88317E-03 1.50100E+01 -1.19445E+01 ;
|
137
|
+
sec 10 -5.76634E-01 -1.80296E-02 1.82151E+01 -9.98243E+00 ;
|
138
|
+
sec 11 -7.07136E-01 -5.01772E-02 2.14178E+01 -8.45147E+00 ;
|
139
|
+
sec 12 -7.91081E-01 -9.41228E-02 2.46189E+01 -7.46417E+00 ;
|
140
|
+
sec 13 -8.37195E-01 -1.48880E-01 2.78193E+01 -6.72916E+00 ;
|
141
|
+
sec 14 -8.53948E-01 -2.14514E-01 3.10194E+01 -6.08842E+00 ;
|
142
|
+
sec 15 -8.49367E-01 -2.90618E-01 3.42197E+01 -5.49322E+00 ;
|
143
|
+
sec 16 -7.93920E-01 -4.62574E-01 4.02204E+01 -4.39222E+00 ;
|
144
|
+
sec 17 -7.16284E-01 -6.88437E-01 4.66217E+01 -3.09315E+00 ;
|
145
|
+
sec 18 -6.34358E-01 -9.60017E-01 5.30232E+01 -1.75629E+00 ;
|
146
|
+
sec 19 -5.53179E-01 -1.28424E+00 5.94245E+01 -5.00650E-01 ;
|
147
|
+
sec 20 -4.75422E-01 -1.66402E+00 6.58255E+01 6.01964E-01 ;
|
148
|
+
sec 21 -4.03180E-01 -2.10743E+00 7.22261E+01 1.55560E+00 ;
|
149
|
+
sec 22 -3.30085E-01 -2.65630E+00 7.90266E+01 2.51935E+00 ;
|
150
|
+
sec 23 -3.10140E-01 -2.78882E+00 8.05267E+01 2.72950E+00 ;
|
151
|
+
sec 24 -2.86719E-01 -2.92517E+00 8.20271E+01 2.93201E+00 ;
|
152
|
+
sec 25 -2.55823E-01 -3.06577E+00 8.35274E+01 3.11874E+00 ;
|
153
|
+
sec 26 -2.07891E-01 -3.20952E+00 8.50277E+01 3.28847E+00 ;
|
154
|
+
sec 27 -8.98940E-02 -3.33685E+00 8.63655E+01 3.42796E+00 ;
|
155
|
+
end c2_def ;
|
156
|
+
end main_body;
|
157
|
+
;
|
158
|
+
begin main_body;
|
159
|
+
name blade2 ;
|
160
|
+
copy_main_body blade1;
|
161
|
+
end main_body;
|
162
|
+
;
|
163
|
+
begin main_body;
|
164
|
+
name blade3 ;
|
165
|
+
copy_main_body blade1 ;
|
166
|
+
end main_body;
|
167
|
+
;-------------------------------------------------------------------------------------------------------------------------------
|
168
|
+
;
|
169
|
+
begin orientation;
|
170
|
+
begin base;
|
171
|
+
body tower;
|
172
|
+
inipos 0.0 0.0 0.0 ; initial position of node 1
|
173
|
+
body_eulerang 0.0 0.0 0.0;
|
174
|
+
end base;
|
175
|
+
;
|
176
|
+
begin relative;
|
177
|
+
body1 tower last;
|
178
|
+
body2 towertop 1;
|
179
|
+
body2_eulerang 0.0 0.0 0.0;
|
180
|
+
end relative;
|
181
|
+
;
|
182
|
+
begin relative;
|
183
|
+
body1 towertop last;
|
184
|
+
body2 shaft 1;
|
185
|
+
body2_eulerang 90.0 0.0 0.0;
|
186
|
+
body2_eulerang 5.0 0.0 0.0; 5 deg tilt angle
|
187
|
+
mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 0.2 ; mbdy2_ini_rotvec_d1 0.0 0.0 -1.0 [init_wr];
|
188
|
+
end relative;
|
189
|
+
;
|
190
|
+
begin relative;
|
191
|
+
body1 shaft last;
|
192
|
+
body2 hub1 1;
|
193
|
+
body2_eulerang -90.0 0.0 0.0;
|
194
|
+
body2_eulerang 0.0 180.0 0.0;
|
195
|
+
body2_eulerang 2.5 0.0 0.0; 2.5deg cone angle
|
196
|
+
end relative;
|
197
|
+
;
|
198
|
+
begin relative;
|
199
|
+
body1 shaft last;
|
200
|
+
body2 hub2 1;
|
201
|
+
body2_eulerang -90.0 0.0 0.0;
|
202
|
+
body2_eulerang 0.0 60.0 0.0;
|
203
|
+
body2_eulerang 2.5 0.0 0.0; 2.5deg cone angle
|
204
|
+
end relative;
|
205
|
+
;
|
206
|
+
begin relative;
|
207
|
+
body1 shaft last;
|
208
|
+
body2 hub3 1;
|
209
|
+
body2_eulerang -90.0 0.0 0.0;
|
210
|
+
body2_eulerang 0.0 -60.0 0.0;
|
211
|
+
body2_eulerang 2.5 0.0 0.0; 2.5deg cone angle
|
212
|
+
end relative;
|
213
|
+
;
|
214
|
+
begin relative;
|
215
|
+
body1 hub1 last;
|
216
|
+
body2 blade1 1;
|
217
|
+
body2_eulerang 0.0 0.0 0;
|
218
|
+
end relative;
|
219
|
+
;
|
220
|
+
begin relative;
|
221
|
+
body1 hub2 last;
|
222
|
+
body2 blade2 1;
|
223
|
+
body2_eulerang 0.0 0.0 0.0;
|
224
|
+
end relative;
|
225
|
+
;
|
226
|
+
begin relative;
|
227
|
+
body1 hub3 last;
|
228
|
+
body2 blade3 1;
|
229
|
+
body2_eulerang 0.0 0.0 0.0;
|
230
|
+
end relative;
|
231
|
+
;
|
232
|
+
end orientation;
|
233
|
+
;-------------------------------------------------------------------------------------------------------------------------------
|
234
|
+
begin constraint;
|
235
|
+
;
|
236
|
+
begin fix0; fixed to ground in translation and rotation of node 1
|
237
|
+
body tower;
|
238
|
+
end fix0;
|
239
|
+
;
|
240
|
+
begin fix1;
|
241
|
+
body1 tower last ;
|
242
|
+
body2 towertop 1;
|
243
|
+
end fix1;
|
244
|
+
;
|
245
|
+
begin bearing1; free bearing
|
246
|
+
name shaft_rot;
|
247
|
+
body1 towertop last;
|
248
|
+
body2 shaft 1;
|
249
|
+
bearing_vector 2 0.0 0.0 -1.0; x=coo (0=global.1=body1.2=body2) vector in body2 coordinates where the free rotation is present
|
250
|
+
end bearing1;
|
251
|
+
;
|
252
|
+
begin fix1;
|
253
|
+
body1 shaft last ;
|
254
|
+
body2 hub1 1;
|
255
|
+
end fix1;
|
256
|
+
;
|
257
|
+
begin fix1;
|
258
|
+
body1 shaft last ;
|
259
|
+
body2 hub2 1;
|
260
|
+
end fix1;
|
261
|
+
;
|
262
|
+
begin fix1;
|
263
|
+
body1 shaft last ;
|
264
|
+
body2 hub3 1;
|
265
|
+
end fix1;
|
266
|
+
;
|
267
|
+
begin bearing2;
|
268
|
+
name pitch1;
|
269
|
+
body1 hub1 last;
|
270
|
+
body2 blade1 1;
|
271
|
+
bearing_vector 2 0.0 0.0 -1.0;
|
272
|
+
end bearing2;
|
273
|
+
;
|
274
|
+
begin bearing2;
|
275
|
+
name pitch2;
|
276
|
+
body1 hub2 last;
|
277
|
+
body2 blade2 1;
|
278
|
+
bearing_vector 2 0.0 0.0 -1.0;
|
279
|
+
end bearing2;
|
280
|
+
;
|
281
|
+
begin bearing2;
|
282
|
+
name pitch3;
|
283
|
+
body1 hub3 last;
|
284
|
+
body2 blade3 1;
|
285
|
+
bearing_vector 2 0.0 0.0 -1.0;
|
286
|
+
end bearing2;
|
287
|
+
end constraint;
|
288
|
+
;
|
289
|
+
end new_htc_structure;
|
290
|
+
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
291
|
+
begin wind ;
|
292
|
+
density 1.225 ;
|
293
|
+
wsp 6.0 ;
|
294
|
+
tint 0.1 ;
|
295
|
+
horizontal_input 1 ;
|
296
|
+
windfield_rotations 0.0 0.0 0.0 ; yaw, tilt, rotation
|
297
|
+
center_pos0 0.0 0.0 -119 ; hub heigth
|
298
|
+
shear_format 1 0.2 ;
|
299
|
+
turb_format 0 ; 0=none, 1=mann,2=flex
|
300
|
+
tower_shadow_method 0 ; 0=none, 1=potential flow, 2=jet
|
301
|
+
scale_time_start 0.0 ;
|
302
|
+
;wind_ramp_factor 0.0 40.0 0.6 1.0 ;
|
303
|
+
;
|
304
|
+
begin mann;
|
305
|
+
create_turb_parameters 33.6 .1 3.9 1 0;
|
306
|
+
filename_u /turb/turb_u.bin;
|
307
|
+
filename_v /turb/turb_v.bin;
|
308
|
+
filename_w /turb/turb_w.bin;
|
309
|
+
box_dim_u 4096 2;
|
310
|
+
box_dim_v 32 3;
|
311
|
+
box_dim_w 16 4;
|
312
|
+
dont_scale 1;
|
313
|
+
end mann;
|
314
|
+
;
|
315
|
+
end wind;
|
316
|
+
;
|
317
|
+
;
|
318
|
+
begin aero ;
|
319
|
+
nblades 3;
|
320
|
+
hub_vec shaft -3 ; rotor rotation vector (normally shaft composant directed from pressure to sustion side)
|
321
|
+
link 1 mbdy_c2_def blade1;
|
322
|
+
link 2 mbdy_c2_def blade2;
|
323
|
+
link 3 mbdy_c2_def blade3;
|
324
|
+
ae_filename ./data/DTU_10MW_RWT_ae.dat ;
|
325
|
+
pc_filename ./data/DTU_10MW_RWT_pc.dat ;
|
326
|
+
induction_method 1 ; 0=none, 1=normal
|
327
|
+
aerocalc_method 1 ; 0=ingen aerodynamic, 1=med aerodynamic
|
328
|
+
aerosections 50 ; def. 50
|
329
|
+
ae_sets 1 1 1;
|
330
|
+
tiploss_method 1 ; 0=none, 1=prandtl
|
331
|
+
dynstall_method 2; 0=none, 1=stig øye method,2=mhh method
|
332
|
+
;
|
333
|
+
end aero ;
|
334
|
+
;-------------------------------------------------------------------------------------------------
|
335
|
+
begin dll;
|
336
|
+
;
|
337
|
+
begin type2_dll;
|
338
|
+
name dtu_we_controller ;
|
339
|
+
filename ./control/dtu_we_controller.dll ;
|
340
|
+
dll_subroutine_init init_regulation_advanced ;
|
341
|
+
dll_subroutine_update update_regulation ;
|
342
|
+
arraysizes_init 100 1 ;
|
343
|
+
arraysizes_update 100 100 ;
|
344
|
+
begin init ;
|
345
|
+
; Overall parameters
|
346
|
+
constant 1 10000.0 ; Rated power [kW]
|
347
|
+
constant 2 0.628 ; Minimum rotor (LSS) speed [rad/s]
|
348
|
+
constant 3 1.005 ; Rated rotor (LSS) speed [rad/s]
|
349
|
+
constant 4 15.6E+06 ; Maximum allowable generator torque [Nm]
|
350
|
+
constant 5 100.0 ; Minimum pitch angle, theta_min [deg],
|
351
|
+
; if |theta_min|>90, then a table of <wsp,theta_min> is read ;
|
352
|
+
; from a file named 'wptable.n', where n=int(theta_min)
|
353
|
+
constant 6 82.0 ; Maximum pitch angle [deg]
|
354
|
+
constant 7 10.0 ; Maximum pitch velocity operation [deg/s]
|
355
|
+
constant 8 0.4 ; Frequency of generator speed filter [Hz]
|
356
|
+
constant 9 0.7 ; Damping ratio of speed filter [-]
|
357
|
+
constant 10 1.80 ; Frequency of free-free DT torsion mode [Hz], if zero no notch filter used
|
358
|
+
; Partial load control parameters
|
359
|
+
constant 11 13013100.0 ; Optimal Cp tracking K factor [Nm/(rad/s)^2], ;
|
360
|
+
; Qg=K*Omega^2, K=eta*0.5*rho*A*Cp_opt*R^3/lambda_opt^3
|
361
|
+
constant 12 0.683456e8 ; Proportional gain of torque controller [Nm/(rad/s)]
|
362
|
+
constant 13 0.153367e8 ; Integral gain of torque controller [Nm/rad]
|
363
|
+
constant 14 0.0 ; Differential gain of torque controller [Nm/(rad/s^2)]
|
364
|
+
; Full load control parameters
|
365
|
+
constant 15 1 ; Generator control switch [1=constant power, 0=constant torque]
|
366
|
+
constant 16 1.06713 ; Proportional gain of pitch controller [rad/(rad/s)]
|
367
|
+
constant 17 0.242445 ; Integral gain of pitch controller [rad/rad]
|
368
|
+
constant 18 0.0 ; Differential gain of pitch controller [rad/(rad/s^2)]
|
369
|
+
constant 19 0.4e-8 ; Proportional power error gain [rad/W]
|
370
|
+
constant 20 0.4e-8 ; Integral power error gain [rad/(Ws)]
|
371
|
+
constant 21 11.4 ; Coefficient of linear term in aerodynamic gain scheduling, KK1 [deg]
|
372
|
+
constant 22 402.9 ; Coefficient of quadratic term in aerodynamic gain scheduling, KK2 [deg^2] &
|
373
|
+
; (if zero, KK1 = pitch angle at double gain)
|
374
|
+
constant 23 1.3 ; Relative speed for double nonlinear gain [-]
|
375
|
+
; Cut-in simulation parameters
|
376
|
+
constant 24 -1 ; Cut-in time [s], no cut-in is simulated if zero or negative
|
377
|
+
constant 25 1.0 ; Time delay for soft start of torque [1/1P]
|
378
|
+
; Cut-out simulation parameters
|
379
|
+
constant 26 -1 ; Shut-down time [s], no shut-down is simulated if zero or negative
|
380
|
+
constant 27 5.0 ; Time of linear torque cut-out during a generator assisted stop [s]
|
381
|
+
constant 28 1 ; Stop type [1=normal, 2=emergency]
|
382
|
+
constant 29 1.0 ; Time delay for pitch stop after shut-down signal [s]
|
383
|
+
constant 30 3 ; Maximum pitch velocity during initial period of stop [deg/s]
|
384
|
+
constant 31 3.0 ; Time period of initial pitch stop phase [s] (maintains pitch speed specified in constant 30)
|
385
|
+
constant 32 4 ; Maximum pitch velocity during final phase of stop [deg/s]
|
386
|
+
; Expert parameters (keep default values unless otherwise given)
|
387
|
+
constant 33 2.0 ; Time for the maximum torque rate = Maximum allowable generator torque/(constant 33 + 0.01s) [s]
|
388
|
+
constant 34 2.0 ; Upper angle above lowest minimum pitch angle for switch [deg], if equal then hard switch
|
389
|
+
constant 35 95.0 ; Percentage of the rated speed when the torque limits are fully opened [%]
|
390
|
+
constant 36 2.0 ; Time constant of 1st order filter on wind speed used for minimum pitch [1/1P]
|
391
|
+
constant 37 1.0 ; Time constant of 1st order filter on pitch angle used for gain scheduling [1/1P]
|
392
|
+
; Drivetrain damper
|
393
|
+
constant 38 0.0 ; Proportional gain of active DT damper [Nm/(rad/s)], requires frequency in input 10
|
394
|
+
; Over speed
|
395
|
+
constant 39 25.0 ; Overspeed percentage before initiating turbine controller alarm (shut-down) [%]
|
396
|
+
; Additional non-linear pitch control term (not used when all zero)
|
397
|
+
constant 40 0.0 ; Rotor speed error scaling factor [rad/s]
|
398
|
+
constant 41 0.0 ; Rotor acceleration error scaling factor [rad/s^2]
|
399
|
+
constant 42 0.0 ; Pitch rate gain [rad/s]
|
400
|
+
; Storm control command
|
401
|
+
constant 43 28.0 ; Wind speed 'Vstorm' above which derating of rotor speed is used [m/s]
|
402
|
+
constant 44 28.0 ; Cut-out wind speed (only used for derating of rotor speed in storm) [m/s]
|
403
|
+
; Safety system parameters
|
404
|
+
constant 45 30.0 ; Overspeed percentage before initiating safety system alarm (shut-down) [%]
|
405
|
+
constant 46 1.5 ; Max low-pass filtered tower top acceleration level [m/s^2]
|
406
|
+
; Turbine parameter
|
407
|
+
constant 47 178.0 ; Nominal rotor diameter [m]
|
408
|
+
; Parameters for rotor inertia reduction in variable speed region
|
409
|
+
constant 48 0.0 ; Proportional gain on rotor acceleration in variable speed region [Nm/(rad/s^2)] (not used when zero)
|
410
|
+
; Parameters for alternative partial load controller with PI regulated TSR tracking
|
411
|
+
constant 49 7.8 ; Optimal tip speed ratio [-] (only used when K=constant 11 = 0 otherwise Qg=K*Omega^2 is used)
|
412
|
+
; Parameters for adding aerodynamic drivetrain damping on gain scheduling
|
413
|
+
constant 50 0.0 ; Aerodynamic DT damping coefficient at the operational point of zero pitch angle [Nm/(rad/s)] (not used when zero)
|
414
|
+
constant 51 0.0 ; Coefficient of linear term in aerodynamic DT damping scheduling, KK1 [deg]
|
415
|
+
constant 52 0.0 ; Coefficient of quadratic term in aerodynamic DT damping scheduling, KK2 [deg^2]
|
416
|
+
; Torque exclusion zone
|
417
|
+
constant 53 0.0 ; Exclusion zone: Lower speed limit [rad/s] (Default 0 used if zero)
|
418
|
+
constant 54 0.0 ; Exclusion zone: Generator torque at lower limit [Nm] (Default 0 used if zero)
|
419
|
+
constant 55 0.0 ; Exclusion zone: Upper speed limit [rad/s] (if =< 0 then exclusion zone functionality is inactive)
|
420
|
+
constant 56 0.0 ; Exclusion zone: Generator torque at upper limit [Nm] (Default 0 used if zero)
|
421
|
+
constant 57 0.0 ; Time constant of reference switching at exclusion zone [s] (Default 0 used if zero)
|
422
|
+
; DT torsion mode damper
|
423
|
+
constant 58 0.0 ; Frequency of notch filter [Hz] (Default 10 x input 10 used if zero)
|
424
|
+
constant 59 0.0 ; Damping of BP filter [-] (Default 0.02 used if zero)
|
425
|
+
constant 60 0.0 ; Damping of notch filter [-] (Default 0.01 used if zero)
|
426
|
+
constant 61 0.0 ; Phase lag of damper [s] => max 40*dt (Default 0 used if zero)
|
427
|
+
; Fore-aft Tower mode damper
|
428
|
+
constant 62 0.0 ; Frequency of BP filter [Hz] (Default 10 used if zero)\\
|
429
|
+
constant 63 0.0 ; Frequency of notch fiter [Hz] (Default 10 used if zero)\\
|
430
|
+
constant 64 0.0 ; Damping of BP filter [-] (Default 0.02 used if zero)\\
|
431
|
+
constant 65 0.0 ; Damping of notch filter [-] (Default 0.01 used if zero)\\
|
432
|
+
constant 66 0.0 ; Gain of damper [-] (Default 0 used if zero)\\
|
433
|
+
constant 67 0.0 ; Phase lag of damper [s] => max 40*dt (Default 0 used if zero)\\
|
434
|
+
constant 68 0.0 ; Time constant of 1st order filter on PWR used for fore-aft Tower mode damper GS [Hz] (Default 10 used if zero)
|
435
|
+
constant 69 0.0 ; Lower PWR limit used for fore-aft Tower mode damper GS [-] (Default 0 used if zero)
|
436
|
+
constant 70 0.0 ; Upper PWR limit used for fore-aft Tower mode damper GS [-] (Default 0 used if zero)
|
437
|
+
; Side-to-side Tower mode filter
|
438
|
+
constant 71 0.0 ; Frequency of Tower side-to-sede notch filter [Hz] (Default 100 used if zero)
|
439
|
+
constant 72 0.0 ; Damping of notch filter [-] (Default 0.01 used if zero)
|
440
|
+
constant 73 0.0 ; Max low-pass filtered tower top acceleration level before initiating safety system alarm (shut-down) [m/s^2] (Default 1.1 x input 46 used if zero)
|
441
|
+
constant 74 0.0 ; Time constant of 1st order filter on tower top acceleration [1/1P] (Default 1 used if zero)
|
442
|
+
; Pitch deviation monitor parameters
|
443
|
+
constant 75 1005020 ; Parameters for pitch deviation monitoring. The format is 1,nnn,mmm
|
444
|
+
; where 'nnn' [s] is the period of the moving average and 'mmm' is threshold of the deviation [0.1 deg] (functionality is inactive if value $<$ 1,000,000)
|
445
|
+
; Gear ratio
|
446
|
+
constant 76 0.0 ; Gear ratio used for the calculation of the LSS rotational speeds and the HSS generator torque reference [-] (Default 1 if zero)
|
447
|
+
end init ;
|
448
|
+
;
|
449
|
+
begin output ;
|
450
|
+
general time ; [s]
|
451
|
+
constraint bearing1 shaft_rot 1 only 2 ; Drivetrain speed [rad/s]
|
452
|
+
constraint bearing2 pitch1 1 only 1; [rad]
|
453
|
+
constraint bearing2 pitch2 1 only 1; [rad]
|
454
|
+
constraint bearing2 pitch3 1 only 1; [rad]
|
455
|
+
wind free_wind 1 0.0 0.0 -119 ; Global coordinates at hub height
|
456
|
+
dll inpvec 2 2 ; Elec. power from generator servo .dll
|
457
|
+
dll inpvec 2 8 ; Grid state flag from generator servo .dll
|
458
|
+
mbdy state acc towertop 1 1.0 global only 1 ; Tower top x-acceleration [m/s^2]
|
459
|
+
mbdy state acc towertop 1 1.0 global only 2 ; Tower top y-acceleration [m/s^2]
|
460
|
+
end output;
|
461
|
+
end type2_dll;
|
462
|
+
;
|
463
|
+
begin type2_dll;
|
464
|
+
name generator_servo ;
|
465
|
+
filename ./control/generator_servo.dll ;
|
466
|
+
dll_subroutine_init init_generator_servo ;
|
467
|
+
dll_subroutine_update update_generator_servo ;
|
468
|
+
arraysizes_init 100 1 ;
|
469
|
+
arraysizes_update 100 100 ;
|
470
|
+
begin init ;
|
471
|
+
constant 1 20.0 ; Frequency of 2nd order servo model of generator-converter system [Hz]
|
472
|
+
constant 2 0.9 ; Damping ratio 2nd order servo model of generator-converter system [-]
|
473
|
+
constant 3 15.6E+06 ; Maximum allowable LSS torque (pull-out torque) [Nm]
|
474
|
+
constant 4 0.94 ; Generator efficiency [-]
|
475
|
+
constant 5 1.0 ; Gearratio [-]
|
476
|
+
constant 6 0.0 ; Time for half value in softstart of torque [s]
|
477
|
+
constant 7 -1 ; Time for grid loss [s] (never if lower than zero)
|
478
|
+
end init ;
|
479
|
+
;
|
480
|
+
begin output;
|
481
|
+
general time ; Time [s]
|
482
|
+
dll inpvec 1 1 ; Electrical torque reference [Nm]
|
483
|
+
constraint bearing1 shaft_rot 1 only 2; Generator LSS speed [rad/s]
|
484
|
+
mbdy momentvec shaft 1 1 shaft only 3 ; Shaft moment [kNm] (Qshaft)
|
485
|
+
end output;
|
486
|
+
;
|
487
|
+
begin actions;
|
488
|
+
mbdy moment_int shaft 1 -3 shaft towertop 2 ; Generator LSS torque [Nm]
|
489
|
+
end actions;
|
490
|
+
end type2_dll;
|
491
|
+
;
|
492
|
+
begin type2_dll;
|
493
|
+
name mech_brake ;
|
494
|
+
filename ./control/mech_brake.dll ;
|
495
|
+
dll_subroutine_init init_mech_brake ;
|
496
|
+
dll_subroutine_update update_mech_brake ;
|
497
|
+
arraysizes_init 100 1 ;
|
498
|
+
arraysizes_update 100 100 ;
|
499
|
+
begin init ;
|
500
|
+
constant 1 9.36E+06 ; Fully deployed maximum brake torque [Nm] (0.6*max torque)
|
501
|
+
constant 2 100.0 ; Parameter alpha used in Q = tanh(omega*alpha), typically 1e2/Omega_nom
|
502
|
+
constant 3 0.5 ; Delay time for before brake starts to deploy [s]
|
503
|
+
constant 4 0.6 ; Time for brake to become fully deployed [s]
|
504
|
+
end init ;
|
505
|
+
;
|
506
|
+
begin output;
|
507
|
+
general time ; Time [s]
|
508
|
+
constraint bearing1 shaft_rot 1 only 2 ; Generator LSS speed [rad/s]
|
509
|
+
dll inpvec 1 25 ; Command to deploy mechanical disc brake [0,1]
|
510
|
+
end output;
|
511
|
+
;
|
512
|
+
begin actions;
|
513
|
+
mbdy moment_int shaft 1 -3 shaft towertop 2 ; Brake LSS torque [Nm]
|
514
|
+
end actions;
|
515
|
+
end type2_dll;
|
516
|
+
;
|
517
|
+
begin type2_dll;
|
518
|
+
name servo_with_limits ;
|
519
|
+
filename ./control/servo_with_limits.dll ;
|
520
|
+
dll_subroutine_init init_servo_with_limits ;
|
521
|
+
dll_subroutine_update update_servo_with_limits ;
|
522
|
+
arraysizes_init 100 1 ;
|
523
|
+
arraysizes_update 100 100 ;
|
524
|
+
begin init ;
|
525
|
+
constant 1 3 ; Number of blades [-]
|
526
|
+
constant 2 1.0 ; Frequency of 2nd order servo model of pitch system [Hz]
|
527
|
+
constant 3 0.7 ; Damping ratio 2nd order servo model of pitch system [-]
|
528
|
+
constant 4 10.0 ; Max. pitch speed [deg/s]
|
529
|
+
constant 5 15.0 ; Max. pitch acceleration [deg/s^2]
|
530
|
+
constant 6 -5.0 ; Min. pitch angle [deg]
|
531
|
+
constant 7 90.0 ; Max. pitch angle [deg]
|
532
|
+
constant 8 -1 ; Time for pitch runaway [s]
|
533
|
+
constant 9 -1 ; Time for stuck blade 1 [s]
|
534
|
+
constant 10 0.0 ; Angle of stuck blade 1 [deg] (if > 90 deg then blade is stuck at instantaneous angle)
|
535
|
+
end init ;
|
536
|
+
begin output;
|
537
|
+
general time ; Time [s]
|
538
|
+
dll inpvec 1 2 ; Pitch1 demand angle [rad]
|
539
|
+
dll inpvec 1 3 ; Pitch2 demand angle [rad]
|
540
|
+
dll inpvec 1 4 ; Pitch3 demand angle [rad]
|
541
|
+
dll inpvec 1 26 ; Flag for emergency pitch stop [0=off/1=on]
|
542
|
+
end output;
|
543
|
+
;
|
544
|
+
begin actions;
|
545
|
+
constraint bearing2 angle pitch1 ; Angle pitch1 bearing [rad]
|
546
|
+
constraint bearing2 angle pitch2 ; Angle pitch2 bearing [rad]
|
547
|
+
constraint bearing2 angle pitch3 ; Angle pitch3 bearing [rad]
|
548
|
+
end actions;
|
549
|
+
end type2_dll;
|
550
|
+
;
|
551
|
+
; --- DLL for tower-blade tip distance -- ;
|
552
|
+
;-------------------------------------------
|
553
|
+
begin type2_dll;
|
554
|
+
name towerclearance_mblade ;
|
555
|
+
filename ./control/towerclearance_mblade.dll ;
|
556
|
+
dll_subroutine_init initialize ;
|
557
|
+
dll_subroutine_update update ;
|
558
|
+
arraysizes_init 3 1 ;
|
559
|
+
arraysizes_update 15 6 ;
|
560
|
+
begin init ; Variables passed into initialization function
|
561
|
+
constant 1 4.15 ; Tower radius at tower bottom [m]
|
562
|
+
constant 2 2.75 ; Tower radius at tower top [m]
|
563
|
+
constant 3 3 ; Number of points to check [-]
|
564
|
+
end init ;
|
565
|
+
begin output; Variables passed into update function
|
566
|
+
mbdy state pos tower 1 0.0 global ; [1,2,3] global coordinates of tower base
|
567
|
+
mbdy state pos tower 10 1.0 global ; [4,5,6] global coordinates of tower top
|
568
|
+
mbdy state pos blade1 26 1.0 global ; [7,8,9] global coordinates of point 1 (blade 1 tip)
|
569
|
+
mbdy state pos blade2 26 1.0 global ; [10,11,12] global coordinates of point 2 (blade 2 tip)
|
570
|
+
mbdy state pos blade3 26 1.0 global ; [13,14,15] global coordinates of point 3 (blade 3 tip)
|
571
|
+
end output;
|
572
|
+
end type2_dll;
|
573
|
+
;
|
574
|
+
end dll;
|
575
|
+
;----------------------------------------------------------------------------------------------------------------------------------------------------------------
|
576
|
+
;
|
577
|
+
begin output;
|
578
|
+
filename ./res/DTU_10MW_RWT_ver09 ;
|
579
|
+
data_format gtsdf64;
|
580
|
+
buffer 500 ;
|
581
|
+
;
|
582
|
+
general time;
|
583
|
+
constraint bearing1 shaft_rot 2; angle and angle velocity
|
584
|
+
constraint bearing2 pitch1 5; angle and angle velocity
|
585
|
+
constraint bearing2 pitch2 5; angle and angle velocity
|
586
|
+
constraint bearing2 pitch3 5; angle and angle velocity
|
587
|
+
aero omega ;
|
588
|
+
aero torque;
|
589
|
+
aero power;
|
590
|
+
aero thrust;
|
591
|
+
wind free_wind 1 0.0 0.0 -119; local wind at fixed position: coo (1=global,2=non-rotation rotor coo.), pos x, pos y, pos z
|
592
|
+
mbdy state pos shaft 4 1 global # rotor position;
|
593
|
+
; Moments:
|
594
|
+
mbdy momentvec tower 1 1 tower # tower base ;
|
595
|
+
mbdy momentvec tower 10 2 tower # tower yaw bearing ;
|
596
|
+
mbdy momentvec shaft 4 1 shaft # main bearing ;
|
597
|
+
mbdy momentvec blade1 2 2 blade1 # blade 1 root ;
|
598
|
+
mbdy momentvec blade2 2 2 blade2 # blade 2 root ;
|
599
|
+
mbdy momentvec blade3 2 2 blade3 # blade 3 root ;
|
600
|
+
mbdy momentvec blade1 13 1 local # blade 1 50% local e coo ;
|
601
|
+
mbdy momentvec blade2 13 1 local # blade 2 50% local e coo ;
|
602
|
+
mbdy momentvec blade3 13 1 local # blade 3 50% local e coo ;
|
603
|
+
; Displacements and accellerations
|
604
|
+
mbdy state pos tower 10 1.0 global only 1 # Tower top FA displ;
|
605
|
+
mbdy state pos tower 10 1.0 global only 2 # Tower top SS displ;
|
606
|
+
mbdy state acc tower 10 1.0 global only 1 # Tower top FA acc;
|
607
|
+
mbdy state acc tower 10 1.0 global only 2 # Tower top SS acc;
|
608
|
+
;
|
609
|
+
mbdy state pos blade1 26 1.0 blade1 # blade 1 tip pos ;
|
610
|
+
mbdy state pos blade2 26 1.0 blade2 # blade 2 tip pos ;
|
611
|
+
mbdy state pos blade3 26 1.0 blade3 # blade 3 tip pos ;
|
612
|
+
mbdy state pos blade1 26 1.0 global # gl blade 1 tip pos ;
|
613
|
+
; - Monitor Aerodynamics - ;
|
614
|
+
aero windspeed 3 1 1 72.5;
|
615
|
+
aero alfa 1 72.5;
|
616
|
+
aero alfa 2 72.5;
|
617
|
+
aero alfa 3 72.5;
|
618
|
+
aero cl 1 72.5;
|
619
|
+
aero cl 2 72.5;
|
620
|
+
aero cl 3 72.5;
|
621
|
+
aero cd 1 72.5;
|
622
|
+
aero cd 2 72.5;
|
623
|
+
aero cd 3 72.5;
|
624
|
+
; DLL outputs and into HAWC2
|
625
|
+
dll inpvec 1 1 # Generator torque reference [Nm] ;
|
626
|
+
dll inpvec 1 2 # Pitch angle reference of blade 1 [rad] ;
|
627
|
+
dll inpvec 1 3 # Pitch angle reference of blade 2 [rad] ;
|
628
|
+
dll inpvec 1 4 # Pitch angle reference of blade 3 [rad] ;
|
629
|
+
dll inpvec 1 5 # Power reference [W] ;
|
630
|
+
dll inpvec 1 6 # Filtered wind speed [m/s] ;
|
631
|
+
dll inpvec 1 7 # Filtered rotor speed [rad/s];
|
632
|
+
dll inpvec 1 8 # Filtered rotor speed error for torque [rad/s];
|
633
|
+
dll inpvec 1 9 # Bandpass filtered rotor speed [rad/s];
|
634
|
+
dll inpvec 1 10 # Proportional term of torque contr. [Nm] ;
|
635
|
+
dll inpvec 1 11 # Integral term of torque controller [Nm] ;
|
636
|
+
dll inpvec 1 12 # Minimum limit of torque [Nm] ;
|
637
|
+
dll inpvec 1 13 # Maximum limit of torque [Nm] ;
|
638
|
+
dll inpvec 1 14 # Torque limit switch based on pitch [-] ;
|
639
|
+
dll inpvec 1 15 # Filtered rotor speed error for pitch [rad/s];
|
640
|
+
dll inpvec 1 16 # Power error for pitch [W] ;
|
641
|
+
dll inpvec 1 17 # Proportional term of pitch controller [rad] ;
|
642
|
+
dll inpvec 1 18 # Integral term of pitch controller [rad] ;
|
643
|
+
dll inpvec 1 19 # Minimum limit of pitch [rad] ;
|
644
|
+
dll inpvec 1 20 # Maximum limit of pitch [rad] ;
|
645
|
+
dll inpvec 1 21 # Torque reference from DT dammper [Nm] ;
|
646
|
+
dll inpvec 1 22 # Status signal [-] ;
|
647
|
+
dll inpvec 1 23 # Total added pitch rate [rad/s] ;
|
648
|
+
dll inpvec 1 24 # Filtered Mean pitch for gain sch [rad] ;
|
649
|
+
dll inpvec 1 25 # Flag for mechnical brake [0=off/1=on] ;
|
650
|
+
dll inpvec 1 26 # Flag for emergency pitch stop [0=off/1=on] ;
|
651
|
+
dll inpvec 1 27 # LP filtered acceleration level [m/s^2] ;
|
652
|
+
dll inpvec 1 31 # Monitored average of reference pitch [rad] ;
|
653
|
+
dll inpvec 1 32 # Monitored ave. of actual pitch (blade 1) [rad] ;
|
654
|
+
; Input from generator model
|
655
|
+
dll inpvec 2 1 # Mgen LSS [Nm] ;
|
656
|
+
dll inpvec 2 2 # Pelec [W] ;
|
657
|
+
dll inpvec 2 3 # Mframe [Nm] ;
|
658
|
+
dll inpvec 2 4 # Mgen HSS [Nm] ;
|
659
|
+
dll inpvec 2 8 # Grid flag [0=run/1=stop];
|
660
|
+
; Input from mechanical brake
|
661
|
+
dll inpvec 3 1 # Brake torque [Nm] ;
|
662
|
+
; Input from pitch servo
|
663
|
+
dll inpvec 4 1 # pitch 1 [rad];
|
664
|
+
dll inpvec 4 2 # pitch 2 [rad];
|
665
|
+
dll inpvec 4 3 # pitch 3 [rad];
|
666
|
+
; Check tower clearence
|
667
|
+
dll inpvec 5 1 # Bltip tow min d [m];
|
668
|
+
end output;
|
669
|
+
;
|
670
|
+
exit;
|
@@ -723,7 +723,7 @@ begin output;
|
|
723
723
|
dll inpvec 4 2 # pitch 2 [rad];
|
724
724
|
dll inpvec 4 3 # pitch 3 [rad];
|
725
725
|
; yaw set point
|
726
|
-
general variable 1 0 yaw_setpoint rad;
|
726
|
+
general variable 1 0 $name(yaw_setpoint) $unit(rad);
|
727
727
|
dll inpvec 5 1 # yaw angle [rad];
|
728
728
|
; Check tower clearence
|
729
729
|
dll inpvec 6 1 # Bltip tow min d [m];
|
h2lib_tests/test_h2lib.py
CHANGED
@@ -328,3 +328,26 @@ def test_fail():
|
|
328
328
|
# , match=re.escape('H2LibThread process died before or while executing fail(...)')):
|
329
329
|
with pytest.raises(Exception):
|
330
330
|
h2.fail('MyError')
|
331
|
+
|
332
|
+
|
333
|
+
def test_dont_stop(capfd):
|
334
|
+
# This test is the same as test_error(), but instead we disable stop.
|
335
|
+
model_path = tfp + "minimal/"
|
336
|
+
htc = HTCFile(model_path + 'htc/minimal_mann_turb.htc')
|
337
|
+
htc.wind.scale_time_start = 200
|
338
|
+
htc.wind.turb_format = 1
|
339
|
+
htc.wind.mann.dont_scale = 0
|
340
|
+
htc.set_name('tmp')
|
341
|
+
htc.save()
|
342
|
+
|
343
|
+
with H2Lib() as h2:
|
344
|
+
h2.stop_on_error(False)
|
345
|
+
h2.init('htc/tmp.htc', model_path)
|
346
|
+
out, err = capfd.readouterr()
|
347
|
+
assert "*** ERROR *** Turbulence scale_time_start >= simulation length" in out
|
348
|
+
|
349
|
+
with MultiH2Lib(2) as h2:
|
350
|
+
h2.stop_on_error(False)
|
351
|
+
h2.init('htc/tmp.htc', model_path)
|
352
|
+
out, err = capfd.readouterr()
|
353
|
+
assert "*** ERROR *** Turbulence scale_time_start >= simulation length" in out
|
h2lib_tests/test_h2rotor.py
CHANGED
@@ -4,10 +4,11 @@ from numpy import testing as npt
|
|
4
4
|
import pytest
|
5
5
|
from wetb.gtsdf import gtsdf
|
6
6
|
|
7
|
-
from h2lib_tests.dtu10mw import DTU10MW
|
7
|
+
from h2lib_tests.dtu10mw import DTU10MW, DTU10MWRotor, DTU10MWSimple
|
8
8
|
from h2lib_tests.test_files import tfp
|
9
9
|
import matplotlib.pyplot as plt
|
10
10
|
import numpy as np
|
11
|
+
from wetb.hawc2.at_time_file import AtTimeFile
|
11
12
|
|
12
13
|
|
13
14
|
def get_h2(htc_path='htc/DTU_10MW_RWT.htc'):
|
@@ -115,7 +116,7 @@ def test_rotor_avg_windspeed():
|
|
115
116
|
|
116
117
|
def test_aerosections():
|
117
118
|
plot = False
|
118
|
-
h2 = get_h2()
|
119
|
+
h2 = get_h2(htc_path='htc/DTU_10MW_RWT_no_aerodrag.htc')
|
119
120
|
# blade 1, global coo, r>30
|
120
121
|
pos_ids = [h2.add_sensor(f'aero position 3 1 {xyz} 30')[0] for xyz in [1, 2, 3]]
|
121
122
|
wsp_ids = [h2.add_sensor(f'aero windspeed 3 1 {xyz} 30')[0] for xyz in [1, 2, 3]]
|
@@ -173,6 +174,111 @@ def test_aerosections():
|
|
173
174
|
h2.close()
|
174
175
|
|
175
176
|
|
177
|
+
def test_compare_aerosection_coupling():
|
178
|
+
"""Compare simulations with 1) htc wind and 2) similar wind set to aerodynamic sections
|
179
|
+
|
180
|
+
- yaw=20, tilt=10, cone=5
|
181
|
+
- two blades (to check that xyz/uvw are not mixed up with number of blades)
|
182
|
+
- stiff structure, fixed rotor speed and pitch
|
183
|
+
- linear shear and no turb
|
184
|
+
- aero_calc=1, induction=0, tiploss=0, dynstall=2
|
185
|
+
- aerodrag turned off (requires wind speed at aerodrag sections, not implemented yet)
|
186
|
+
"""
|
187
|
+
dtu10 = DTU10MWSimple(rotor_speed=.6, pitch=0, nbodies=1)
|
188
|
+
dtu10.set_stiff()
|
189
|
+
|
190
|
+
dtu10.set_wind(8, tint=0, turb_format=0, shear=(4, .01))
|
191
|
+
dtu10.set_tilt_cone_yaw(tilt=10, cone=5, yaw=20)
|
192
|
+
# remove third blade
|
193
|
+
dtu10.aero.nblades = 2
|
194
|
+
dtu10.aero.link__3.delete()
|
195
|
+
|
196
|
+
dtu10.aerodrag.delete()
|
197
|
+
|
198
|
+
T = 20
|
199
|
+
dtu10.set_time(0, T)
|
200
|
+
dtu10.set_aero(aero_calc=1, induction=0, tiploss=0, dynstall=2)
|
201
|
+
|
202
|
+
for coo in [3, 4]:
|
203
|
+
for xyz in [1, 2, 3]:
|
204
|
+
dtu10.output.add_sensor('aero', 'windspeed', [coo, 1, xyz, 72, 1])
|
205
|
+
for coo in [3]:
|
206
|
+
for xyz in [1, 2, 3]:
|
207
|
+
dtu10.output.add_sensor('aero', 'position', [coo, 1, xyz, 72, 1])
|
208
|
+
|
209
|
+
# At time sensors
|
210
|
+
at = dtu10.add_section(f'output_at_time aero {T}')
|
211
|
+
at.filename = "tmp1_at"
|
212
|
+
for sensor in ['vrel', 'alfa', 'alfadot', 'cl', 'cd', 'cm', 'lift', 'drag', 'moment', 'ct_local', 'cq_local', 'tiploss_f',
|
213
|
+
'chord', 'inflow_angle', 'dcldalfa', 'dcddalfa', 'twist']:
|
214
|
+
at.add_sensor('', sensor, [1])
|
215
|
+
|
216
|
+
for sensor in ['inipos']:
|
217
|
+
for xyz in [1, 2, 3]:
|
218
|
+
at.add_sensor('', sensor, [1, xyz])
|
219
|
+
for sensor in ['secforce', 'secmoment', 'int_moment', 'int_force', 'position', 'velocity', 'acceleration', 'induc',
|
220
|
+
'windspeed']:
|
221
|
+
for coo in [1, 2, 3, 4]:
|
222
|
+
for xyz in [1, 2, 3]:
|
223
|
+
at.add_sensor('', sensor, [1, xyz, coo])
|
224
|
+
|
225
|
+
dtu10.set_name('tmp1')
|
226
|
+
dtu10.save()
|
227
|
+
with H2Lib(suppress_output=True) as h2:
|
228
|
+
h2.init(dtu10.filename, dtu10.modelpath)
|
229
|
+
h2.run(T)
|
230
|
+
|
231
|
+
dtu10.wind.wsp = 20 # ensure htc wind speed is different and induction is large in case it by mistake is not turned off
|
232
|
+
at.filename = "tmp2_at"
|
233
|
+
dtu10.set_name('tmp2')
|
234
|
+
dtu10.save()
|
235
|
+
|
236
|
+
with H2Lib(suppress_output=True) as h2:
|
237
|
+
h2.init(dtu10.filename, dtu10.modelpath)
|
238
|
+
last_pos_gl_xyz = np.array(h2.get_aerosections_position(), order='F')
|
239
|
+
while h2.time < T:
|
240
|
+
pos_gl_xyz = np.array(h2.get_aerosections_position(), order='F')
|
241
|
+
uvw = np.asfortranarray(pos_gl_xyz * 0)
|
242
|
+
dpos_gl_xyz = (pos_gl_xyz - last_pos_gl_xyz)
|
243
|
+
next_pos_gl_xyz = pos_gl_xyz + dpos_gl_xyz
|
244
|
+
uvw[:, :, 0] = (-next_pos_gl_xyz[:, :, 2] - 119) * .01 + 8
|
245
|
+
last_pos_gl_xyz = pos_gl_xyz.copy()
|
246
|
+
h2.set_aerosections_windspeed(uvw)
|
247
|
+
h2.step()
|
248
|
+
|
249
|
+
time, data1, info = gtsdf.load(tfp + 'DTU_10_MW/res/tmp1.hdf5')
|
250
|
+
time, data2, info = gtsdf.load(tfp + 'DTU_10_MW/res/tmp2.hdf5')
|
251
|
+
# exclude first time step where position extrapolation is not active
|
252
|
+
for n, c1, c2 in zip(info['attribute_names'], data1[1:].T, data2[1:].T):
|
253
|
+
if n not in ['WSP gl. coo.,Vx', 'WSP gl. coo.,Vy', 'WSP gl. coo.,Vz']: # nan
|
254
|
+
max_rel_err = np.abs(c2 - c1).max() / np.maximum(np.abs(c2).max(), 1)
|
255
|
+
try:
|
256
|
+
assert max_rel_err < 0.00001, n
|
257
|
+
except BaseException:
|
258
|
+
if 0:
|
259
|
+
plt.title(n)
|
260
|
+
plt.plot(c1)
|
261
|
+
plt.plot(c2)
|
262
|
+
plt.plot((c1 - c2))
|
263
|
+
plt.show()
|
264
|
+
raise
|
265
|
+
|
266
|
+
at1 = AtTimeFile(tfp + 'DTU_10_MW/tmp1_at.dat')
|
267
|
+
at2 = AtTimeFile(tfp + 'DTU_10_MW/tmp2_at.dat')
|
268
|
+
for n, c1, c2 in zip(at1.attribute_names, at1.data.T, at2.data.T):
|
269
|
+
npt.assert_allclose(c2, c1, atol=1e-6, rtol=0.0001, err_msg=n)
|
270
|
+
try:
|
271
|
+
assert max_rel_err < 0.00001, n
|
272
|
+
except BaseException:
|
273
|
+
if 1:
|
274
|
+
plt.title(n)
|
275
|
+
plt.plot(c1)
|
276
|
+
plt.plot(c2)
|
277
|
+
plt.plot(c1 - c2)
|
278
|
+
plt.show()
|
279
|
+
raise
|
280
|
+
|
281
|
+
|
176
282
|
def test_iea15MW():
|
177
283
|
with H2Lib(suppress_output=True) as h2:
|
178
284
|
h2.read_input(htc_path='htc/IEA_15MW_RWT_Onshore.htc', model_path=tfp + 'IEA-15-240-RWT-Onshore')
|
h2lib_tests/test_mpi.py
CHANGED
@@ -110,7 +110,7 @@ def ellipsys_mpi_dummy_workflow():
|
|
110
110
|
|
111
111
|
with MultiH2Lib(N, suppress_output=True) as h2:
|
112
112
|
el = Ellipsys()
|
113
|
-
htc = HTCFile(tfp + 'DTU_10_MW/htc/
|
113
|
+
htc = HTCFile(tfp + 'DTU_10_MW/htc/DTU_10MW_RWT_no_aerodrag.htc')
|
114
114
|
for i in range(N):
|
115
115
|
htc.set_name(f'wt{i}')
|
116
116
|
htc.save()
|
@@ -118,7 +118,7 @@ def test_get_body_rotation_tensor_encrypted(h2_dtu_10mw_only_tower_encrypted):
|
|
118
118
|
|
119
119
|
def test_set_orientation_base_not_found(h2_dtu_10mw_only_tower):
|
120
120
|
with pytest.raises(ValueError, match="MAIN_BODY_NOT_FOUND"):
|
121
|
-
h2_dtu_10mw_only_tower.set_orientation_base(
|
121
|
+
h2_dtu_10mw_only_tower.set_orientation_base(main_body="blade")
|
122
122
|
|
123
123
|
|
124
124
|
def test_set_orientation_base_1(
|
@@ -127,7 +127,7 @@ def test_set_orientation_base_1(
|
|
127
127
|
# Start from h2_dtu_10mw_only_tower and rotate the base.
|
128
128
|
# See if it matches h2_dtu_10mw_only_tower_rotated.
|
129
129
|
h2_dtu_10mw_only_tower.set_orientation_base(
|
130
|
-
|
130
|
+
main_body="tower", mbdy_eulerang_table=np.array([30.0, 0.0, 0.0])
|
131
131
|
)
|
132
132
|
amat_desired = h2_dtu_10mw_only_tower_rotated.get_body_rotation_tensor(
|
133
133
|
ibdy=0
|
@@ -135,14 +135,14 @@ def test_set_orientation_base_1(
|
|
135
135
|
amat_actual = h2_dtu_10mw_only_tower.get_body_rotation_tensor(ibdy=0)
|
136
136
|
npt.assert_array_almost_equal_nulp(amat_actual, amat_desired)
|
137
137
|
# Reset orientation.
|
138
|
-
h2_dtu_10mw_only_tower.set_orientation_base(
|
138
|
+
h2_dtu_10mw_only_tower.set_orientation_base(main_body="tower")
|
139
139
|
|
140
140
|
|
141
141
|
def test_set_orientation_base_with_reset_orientation(
|
142
142
|
h2_dtu_10mw_only_tower_rotated,
|
143
143
|
):
|
144
144
|
h2_dtu_10mw_only_tower_rotated.set_orientation_base(
|
145
|
-
|
145
|
+
main_body="tower", reset_orientation=True
|
146
146
|
)
|
147
147
|
amat_actual = h2_dtu_10mw_only_tower_rotated.get_body_rotation_tensor(
|
148
148
|
ibdy=0
|
@@ -150,7 +150,7 @@ def test_set_orientation_base_with_reset_orientation(
|
|
150
150
|
npt.assert_array_almost_equal_nulp(amat_actual, np.eye(3))
|
151
151
|
# Reset orientation.
|
152
152
|
h2_dtu_10mw_only_tower_rotated.set_orientation_base(
|
153
|
-
|
153
|
+
main_body="tower", mbdy_eulerang_table=np.array([30.0, 0.0, 0.0])
|
154
154
|
)
|
155
155
|
|
156
156
|
|
@@ -158,7 +158,7 @@ def test_set_orientation_base_without_reset_orientation(
|
|
158
158
|
h2_dtu_10mw_only_tower_rotated,
|
159
159
|
):
|
160
160
|
h2_dtu_10mw_only_tower_rotated.set_orientation_base(
|
161
|
-
|
161
|
+
main_body="tower",
|
162
162
|
mbdy_eulerang_table=np.array([-30.0, 0.0, 0.0]),
|
163
163
|
reset_orientation=False,
|
164
164
|
)
|
@@ -168,7 +168,7 @@ def test_set_orientation_base_without_reset_orientation(
|
|
168
168
|
npt.assert_array_almost_equal_nulp(amat_actual, np.eye(3))
|
169
169
|
# Reset orientation.
|
170
170
|
h2_dtu_10mw_only_tower_rotated.set_orientation_base(
|
171
|
-
|
171
|
+
main_body="tower", mbdy_eulerang_table=np.array([30.0, 0.0, 0.0])
|
172
172
|
)
|
173
173
|
|
174
174
|
|
@@ -177,13 +177,99 @@ def test_set_orientation_base_speed(
|
|
177
177
|
):
|
178
178
|
# Set speed.
|
179
179
|
h2_dtu_10mw_only_blade.set_orientation_base(
|
180
|
-
|
180
|
+
main_body="blade1",
|
181
181
|
reset_orientation=False,
|
182
182
|
mbdy_ini_rotvec_d1=np.array([0.0, 1.0, 0.0, 1.0]),
|
183
183
|
)
|
184
184
|
# TODO: check against h2_dtu_10mw_only_blade_rotate_base.
|
185
185
|
# Reset speed.
|
186
186
|
h2_dtu_10mw_only_blade.set_orientation_base(
|
187
|
-
|
187
|
+
main_body="blade1",
|
188
188
|
reset_orientation=False,
|
189
189
|
)
|
190
|
+
|
191
|
+
|
192
|
+
def test_set_orientation_relative_main_body_not_found(h2_dtu_10mw_only_blade_rotate_relative):
|
193
|
+
h2_dtu_10mw_only_blade_rotate_relative.stop_on_error(False)
|
194
|
+
with pytest.raises(ValueError, match="MAIN_BODY_NOT_FOUND"):
|
195
|
+
h2_dtu_10mw_only_blade_rotate_relative.set_orientation_relative("hub1", "last", "blade", 0)
|
196
|
+
|
197
|
+
|
198
|
+
def test_set_orientation_relative_rot_not_found(h2_dtu_10mw_only_blade_rotate_relative):
|
199
|
+
with pytest.raises(ValueError, match="RELATIVE_ROTATION_NOT_FOUND"):
|
200
|
+
h2_dtu_10mw_only_blade_rotate_relative.set_orientation_relative("hub1", "last", "blade1", "last")
|
201
|
+
|
202
|
+
|
203
|
+
def test_set_orientation_relative_reset(
|
204
|
+
h2_dtu_10mw_only_blade_rotate_relative,
|
205
|
+
):
|
206
|
+
# Reset orientation.
|
207
|
+
# Now the blade is aligned with the hub, which is vertical.
|
208
|
+
h2_dtu_10mw_only_blade_rotate_relative.set_orientation_relative(
|
209
|
+
main_body_1="hub1",
|
210
|
+
node_1="last",
|
211
|
+
main_body_2="blade1",
|
212
|
+
node_2=0,
|
213
|
+
reset_orientation=True,
|
214
|
+
)
|
215
|
+
# Get orientation of blade root.
|
216
|
+
amat_actual = (
|
217
|
+
h2_dtu_10mw_only_blade_rotate_relative.get_body_rotation_tensor(ibdy=1)
|
218
|
+
)
|
219
|
+
# It must be the same as the hub.
|
220
|
+
amat_desired = (
|
221
|
+
h2_dtu_10mw_only_blade_rotate_relative.get_body_rotation_tensor(ibdy=0)
|
222
|
+
)
|
223
|
+
npt.assert_array_almost_equal_nulp(amat_actual, amat_desired)
|
224
|
+
# This matches a rotation around x by 180 deg.
|
225
|
+
# angle = np.deg2rad(180.0)
|
226
|
+
# s = np.sin(angle)
|
227
|
+
# c = np.cos(angle)
|
228
|
+
# amat_test = np.array(
|
229
|
+
# [[1.0, 0.0, 0.0], [0.0, c, -s], [0.0, s, c]],
|
230
|
+
# )
|
231
|
+
# Reset to original value.
|
232
|
+
h2_dtu_10mw_only_blade_rotate_relative.set_orientation_relative(
|
233
|
+
main_body_1="hub1",
|
234
|
+
node_1="last",
|
235
|
+
main_body_2="blade1",
|
236
|
+
node_2=0,
|
237
|
+
mbdy2_eulerang_table=np.array([-90.0, 0.0, 0.0]),
|
238
|
+
reset_orientation=True,
|
239
|
+
mbdy2_ini_rotvec_d1=np.array([0.0, 1.0, 0.0, 1.0]),
|
240
|
+
)
|
241
|
+
|
242
|
+
|
243
|
+
def test_set_orientation_relative_2(
|
244
|
+
h2_dtu_10mw_only_blade_rotate_relative,
|
245
|
+
):
|
246
|
+
# Get orientation of blade root.
|
247
|
+
amat_desired = (
|
248
|
+
h2_dtu_10mw_only_blade_rotate_relative.get_body_rotation_tensor(ibdy=1)
|
249
|
+
)
|
250
|
+
# Change orientation a few times.
|
251
|
+
rng = np.random.default_rng(seed=123)
|
252
|
+
for _ in range(5):
|
253
|
+
h2_dtu_10mw_only_blade_rotate_relative.set_orientation_relative(
|
254
|
+
main_body_1="hub1",
|
255
|
+
node_1="last",
|
256
|
+
main_body_2="blade1",
|
257
|
+
node_2=0,
|
258
|
+
mbdy2_eulerang_table=rng.uniform(0.0, 360.0, (7, 3)),
|
259
|
+
reset_orientation=0,
|
260
|
+
)
|
261
|
+
# Reset to original value.
|
262
|
+
h2_dtu_10mw_only_blade_rotate_relative.set_orientation_relative(
|
263
|
+
main_body_1="hub1",
|
264
|
+
node_1="last",
|
265
|
+
main_body_2="blade1",
|
266
|
+
node_2=0,
|
267
|
+
mbdy2_eulerang_table=np.array([-90.0, 0.0, 0.0]),
|
268
|
+
reset_orientation=True,
|
269
|
+
mbdy2_ini_rotvec_d1=np.array([0.0, 1.0, 0.0, 1.0]),
|
270
|
+
)
|
271
|
+
# Check.
|
272
|
+
amat_actual = (
|
273
|
+
h2_dtu_10mw_only_blade_rotate_relative.get_body_rotation_tensor(ibdy=1)
|
274
|
+
)
|
275
|
+
npt.assert_array_almost_equal_nulp(amat_actual, amat_desired)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: h2lib-tests
|
3
|
-
Version: 13.1.
|
4
|
-
Summary: Tests and test_files for test h2lib (13.1.
|
3
|
+
Version: 13.1.1701
|
4
|
+
Summary: Tests and test_files for test h2lib (13.1.17)
|
5
5
|
Download-URL:
|
6
6
|
Author: Mads M Pedersen
|
7
7
|
Author-email:
|
@@ -13,4 +13,3 @@ Requires-Dist: pytest-cov
|
|
13
13
|
Requires-Dist: hipersim
|
14
14
|
Requires-Dist: wetb
|
15
15
|
Requires-Dist: h2lib
|
16
|
-
|
@@ -1,15 +1,15 @@
|
|
1
1
|
h2lib_tests/__init__.py,sha256=VjSqfGg8BzdmSjfSFhJh4hZbYZ_cME7xp9EWFKHQphA,61
|
2
|
-
h2lib_tests/conftest.py,sha256=
|
2
|
+
h2lib_tests/conftest.py,sha256=uJrYYp-R7bVpBhfdzJH0CUrshS-S1_hAzST36JJZNbo,14559
|
3
3
|
h2lib_tests/dtu10mw.py,sha256=a7SXfyDwDQPastYKb5CgghOQcYfgO1eTwGrd-H3Enok,4374
|
4
4
|
h2lib_tests/test_calc.py,sha256=VNLfr2J9R2Jy9xTbdZ9dfbQ4dCwr7H7nbZRI3yP69fQ,2152
|
5
|
-
h2lib_tests/test_ellipsys_couplings.py,sha256=
|
6
|
-
h2lib_tests/test_h2lib.py,sha256=
|
7
|
-
h2lib_tests/test_h2rotor.py,sha256=
|
5
|
+
h2lib_tests/test_ellipsys_couplings.py,sha256=GUvO43QF2YKxXby7eoBObv6Iu0rgMhtOXGcuCHO2JtM,2424
|
6
|
+
h2lib_tests/test_h2lib.py,sha256=opgVOkZWOD9CrnTDfwRrBaD-weBsNnutm6FeOijDa88,14197
|
7
|
+
h2lib_tests/test_h2rotor.py,sha256=SP4NTByJGJDc9yezR9QdijYlsJjMJ4BwItbhksijL1U,10597
|
8
8
|
h2lib_tests/test_lin.py,sha256=FxuDvPuu1MjWE4B7dIWC3qR-9NtjqodGPO1aurUDBwY,6362
|
9
|
-
h2lib_tests/test_mpi.py,sha256=
|
9
|
+
h2lib_tests/test_mpi.py,sha256=sDiUMnZ5j-3y7fOpUy5-s624guTejKwlP-NHRZet3iY,6847
|
10
10
|
h2lib_tests/test_multiprocessinterface.py,sha256=h2o4havtK6IuMXsplNjGUa3VxOnbpEYGxdrrAKQilj0,1470
|
11
11
|
h2lib_tests/test_static_solver.py,sha256=OiabTF7IwIskkvBslp32c5o4v53YHQNTTV3vOU5vVb8,4679
|
12
|
-
h2lib_tests/test_topology_h2lib.py,sha256=
|
12
|
+
h2lib_tests/test_topology_h2lib.py,sha256=AIPgO6ePVoZbjX_ECmlQu8Iog1dIBzd192hkXBvg1V0,9651
|
13
13
|
h2lib_tests/test_files/__init__.py,sha256=9e6ZUPb42e0wf2E1rutdcTM8hROcWFRVPXtZriU3ySw,50
|
14
14
|
h2lib_tests/test_files/my_test_cls.py,sha256=7ZDsFkxrLfOY6q00U5Y-daxfuhATK-K5H04RP-VmQdE,850
|
15
15
|
h2lib_tests/test_files/DTU_10_MW/control/dtu_we_controller.dll,sha256=C5T_CuAFtIuDgCXSYAoNu24yKPwj2nWOeORacJbLN9s,1134592
|
@@ -40,10 +40,11 @@ h2lib_tests/test_files/DTU_10_MW/data/DTU_10MW_RWT_Towertop_st.dat,sha256=iW8Rzj
|
|
40
40
|
h2lib_tests/test_files/DTU_10_MW/data/DTU_10MW_RWT_ae.dat,sha256=LkAlElRW_Fl1V4GD8hQZIgLD4IW0o3uxXL2olnEU3dI,1531
|
41
41
|
h2lib_tests/test_files/DTU_10_MW/data/DTU_10MW_RWT_pc.dat,sha256=2Nc_ofcqfCB3iu8dSFRj8Ub6AhaQADdW0O8BXBWj5Uk,26888
|
42
42
|
h2lib_tests/test_files/DTU_10_MW/data/operation.dat,sha256=QH3ULApoKiZJfT4Z65aGNuqKln0fMCcbgN2GX6H1XSM,1262
|
43
|
-
h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT.htc,sha256=
|
43
|
+
h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT.htc,sha256=gBDcGmlmm9UWpYE1fvqc5tKcla82aSBLsgqG6YwOb-0,32314
|
44
44
|
h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT_mann_turb.htc,sha256=-jFK-ra64GeY3fQrP8FxeZ25DkQMdS8yQ9sO78SS9G8,32006
|
45
|
+
h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT_no_aerodrag.htc,sha256=ELZNcQWlUdOsfSFq9iryvolbYgu5sd241lTfnyD8cS4,31705
|
45
46
|
h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT_no_output.htc,sha256=PxkaacH8iVp0ewk6x8fIjkITPUkiVar5bxZCWqZSoP4,25887
|
46
|
-
h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT_yaw_acturator.htc,sha256=
|
47
|
+
h2lib_tests/test_files/DTU_10_MW/htc/DTU_10MW_RWT_yaw_acturator.htc,sha256=WMxUTE_EJo39AjPfNm3zhjNkSyGli-qwcc0GRauTkw4,33790
|
47
48
|
h2lib_tests/test_files/IEA-15-240-RWT/IEA_15MW_RWT_Blade_st_FPM.st,sha256=ytwFSx1cFSF25vZ8WZpYFiV2aL3DTvetPrR7oEqFYpc,16605
|
48
49
|
h2lib_tests/test_files/IEA-15-240-RWT/IEA_15MW_RWT_Blade_st_noFPM.st,sha256=Pdb8rfJoV7zOAmbPn_xUyGgQk-xIjQ5fCZPRzsu9Q-M,20945
|
49
50
|
h2lib_tests/test_files/IEA-15-240-RWT/IEA_15MW_RWT_Dummy_st.dat,sha256=fJGn9bFdMwCV1ceoxT2SUbuDMuNJGCaeqHWUqFlyfKE,532
|
@@ -88,7 +89,7 @@ h2lib_tests/test_files/minimal/res/minimal_mann_turb.hdf5,sha256=Q3cs3bZyplZjBpo
|
|
88
89
|
h2lib_tests/test_files/minimal/turb/hawc2_mann_l33.6_ae0.1000_g3.9_h0_512xd32xd16_2.000x3.00x4.00_s0001_u,sha256=byiorJmXDL6uKFbyfXthHTjJdm6ELvLR2lS202KrhRI,1048576
|
89
90
|
h2lib_tests/test_files/minimal/turb/hawc2_mann_l33.6_ae0.1000_g3.9_h0_512xd32xd16_2.000x3.00x4.00_s0001_v,sha256=cxK5Rfgfm3gyJsEYi_KlmYY8DIIl_G0aizN2jt18Glc,1048576
|
90
91
|
h2lib_tests/test_files/minimal/turb/hawc2_mann_l33.6_ae0.1000_g3.9_h0_512xd32xd16_2.000x3.00x4.00_s0001_w,sha256=xs61jAwhP3fIR1P5Oa8ovEt2baLoF8uCNs6pKIT8L4o,1048576
|
91
|
-
h2lib_tests-13.1.
|
92
|
-
h2lib_tests-13.1.
|
93
|
-
h2lib_tests-13.1.
|
94
|
-
h2lib_tests-13.1.
|
92
|
+
h2lib_tests-13.1.1701.dist-info/METADATA,sha256=1tLVPkKby2An0pyGcag6URmy27CMnDpb2dpYfCx_0kk,349
|
93
|
+
h2lib_tests-13.1.1701.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
94
|
+
h2lib_tests-13.1.1701.dist-info/top_level.txt,sha256=WufAL3LO35YJBhWg1AfgTjSld-6l_WuRkXAkNKczUrM,12
|
95
|
+
h2lib_tests-13.1.1701.dist-info/RECORD,,
|
File without changes
|