1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 """The nacelle definition"""
23 import numpy as N
24 from windSimSuite.common import ObjectWithNodesAndElems, Angle
25 from windSimSuite.references import REFERENCE_FRAME, ReferenceFrames
26
27
29 """A nacelle for unsteady BEM calculations.
30 """
31
40
48
50 """Set the yaw angle for the nacelle and recalculate
51 the corresponding reference frame.
52
53 @type value: a float
54 @param value: the yaw value
55
56 @type unit_key: a string
57 @param unit_key: the 'rad' or 'deg' value"""
58 self.angle["yaw"][unit_key] = value
59 self.references["yaw"].calculate()
60
62 """Set the tilt angle for the nacelle and recalculate
63 the corresponding reference frame.
64
65 @type value: a float
66 @param value: the tilt value
67
68 @type unit_key: a string
69 @param unit_key: the 'rad' or 'deg' value"""
70 self.angle["tilt"][unit_key] = value
71 self.references["tilt"].calculate()
72
74 """Set the nacelle length in M{m}"""
75 self.length = value
76 self.local_vector = N.array([ [-self.length],
77 [0.],
78 [0.] ])
79
81 """Return the nacelle vector in the absolute reference frame"""
82 matrix = self.references.get_matrix_from("tilt")
83 return matrix * self.local_vector
84
85
86 -class Nacelle(AerodynamicsNacelle, ObjectWithNodesAndElems):
87 """The nacelle class. Gather the aerodynamics calculations
88 and the nodes and elements of MBDyn.
89 """
90
94