1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 """The general interface of MBDyn elements. For each element group,
23 a general class is defined in that module. However most of
24 the elements do not have yet any SWIG interface. In case of
25 development, this is the first place to look for
26 establishing a first communication with Python.
27 This module is then used by L{mbdyn.bindings.groups}, all the classes
28 being contained in the C{ELEM_CLASS} dictionary.
29 """
30 import mbdyn.bindings.swigModule as swigModule
31 from mbdyn.bindings.basic_objects import Element
32
33
35 """General class of the "ROTOR" group"""
36
38 Element.__init__(self)
39 self.protor = protor
40 self.rotor = swigModule.convert_to_rotor(protor)
41 self.force = {"x" : [], "y" : [], "z" : []}
42 self.torque = {"x" : [], "y" : [], "z" : []}
43 self.omega = []
44 self.flist = swigModule.FloatList(3)
45
46
48 """The general class for the "AUTOMATICSTRUCTURAL" group"""
49 pass
50
52 """The general class for the "GRAVITY" group"""
53 pass
54
56 """The general class for the "BODY" group"""
57 pass
58
60 """The general class for the "JOINT" group"""
61 pass
62
64 """The general class for the "BEAM" group"""
65 pass
66
68 """The general class for the "PLATE" group"""
69 pass
70
72 """The general class of the "FORCE" group
73 """
74
77
79 """Return the type of force, a string set on the MBDyn object"""
80 return self.c_inst.get_force_type()
81
83 mess = "Force pointer with label %s in MBDyn"
84 return mess % str(self.label)
85
87 """The general class for the "ELECTRICBULK" group"""
88 pass
89
91 """The general class for the "ELECTRIC" group"""
92 pass
93
95 """The general class for the "HYDRAULIC" group"""
96 pass
97
99 """The general class for the "BULK" group"""
100 pass
101
103 """The general class for the "LOADABLE" group"""
104 pass
105
107 """The general class for the "DRIVEN" group"""
108 pass
109
111 """The general class for the "EXTERNAL" group"""
112 pass
113
115 """The general class for the "AIRPROPERTIES" group"""
116 pass
117
119 """The general class for the "AEROMODAL" group"""
120 pass
121
123 """The general class for the "AERODYNAMIC" group"""
124 pass
125
127 """The general class for the "GENEL" group"""
128 pass
129
131 """The general class for the "SOCKETSTREAM_OUTPUT" group"""
132 pass
133
134
135 ELEM_CLASS_TABLE = [
136 ("ROTOR", Rotor),
137 ("AUTOMATICSTRUCTURAL", AutomaticStructural),
138 ("GRAVITY", Gravity),
139 ("BODY", Body),
140
141 ("BEAM", Beam),
142 ("PLATE", Plate),
143
144 ("ELECTRICBULK", ElectricBulk),
145 ("ELECTRIC", Electric),
146 ("HYDRAULIC", Hydraulic),
147 ("BULK", Bulk),
148 ("LOADABLE", Loadable),
149 ("DRIVEN", Driven),
150 ("EXTERNAL", External),
151 ("AIRPROPERTIES", AirProperties),
152 ("AEROMODAL", Aeromodal),
153 ("AERODYNAMIC", Aerodynamic),
154 ("GENEL", Genel),
155 ("SOCKETSTREAM_OUTPUT", SocketStreamOutput)
156 ]
157
158 ELEM_CLASS = {}
159
160 for group_key, general_class in ELEM_CLASS_TABLE:
161 ELEM_CLASS[group_key] = {"general" : general_class}
162
163
164 del group_key
165 del general_class
166