Skip to content

Commit 0265227

Browse files
author
PatrickRoel
committed
added mass distribution
1 parent 3fcea88 commit 0265227

File tree

2 files changed

+176
-58
lines changed

2 files changed

+176
-58
lines changed

data/TUDELFT_V3_KITE/struc_geometry_all_in_surfplan.yaml

Lines changed: 110 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ kcu_mass: 8.4
88
# properties kite
99
pressure: 0.3 #[bar]
1010
canopy_stiffness: 5000
11+
canopy_density: 170 #g/m2
12+
mass_without_bridles: 11 #kg
13+
1114
## Material properties':
1215
dyneema:
1316
density: 724
1417
youngs_modulus: 550000000
1518
damping_per_stiffness: 0.0
1619

20+
21+
1722
fixed_point_indices: !!seq [0] # node indices that are fixed in space (0-based)
1823

1924
###########################':
@@ -100,42 +105,42 @@ strut_tubes:
100105
- 0.11049
101106
- 0.098064
102107
- 0.178254
103-
- [13, 96, 99, 112, 122, 14]
108+
- [13, 96, 99,133, 112, 122, 14]
104109
- - strut_3
105110
- 19
106111
- 20
107112
- 0.131981
108113
- 0.106299
109114
- 0.19406
110-
- [19, 92, 97, 111, 123, 20]
115+
- [19, 92, 97,132, 111, 123, 20]
111116
- - strut_4
112117
- 25
113118
- 26
114119
- 0.140834
115120
- 0.105972
116121
- 0.201615
117-
- [25, 91, 94, 110, 124, 26]
122+
- [25, 91, 94,131, 110, 124, 26]
118123
- - strut_5
119124
- 31
120125
- 32
121126
- 0.140834
122127
- 0.105972
123128
- 0.201615
124-
- [31, 57, 60, 76, 90, 32]
129+
- [31, 57, 60,128, 76, 90, 32]
125130
- - strut_6
126131
- 37
127132
- 38
128133
- 0.131981
129134
- 0.106299
130135
- 0.19406
131-
- [37, 58, 63, 77, 89, 38]
136+
- [37, 58, 63, 129,77, 89, 38]
132137
- - strut_7
133138
- 43
134139
- 44
135140
- 0.11049
136141
- 0.098064
137142
- 0.178254
138-
- [43, 62, 65, 78, 88, 44]
143+
- [43, 62, 65, 130,78, 88, 44]
139144
- - strut_8
140145
- 49
141146
- 50
@@ -203,7 +208,7 @@ bridle_particles:
203208
- [68, -0.711827, -1.113164, 7.054963]
204209
- [69, -0.692391, -3.921859, 9.027294]
205210
- [70, -0.633144, -0.941442, 3.348039]
206-
- [71, 0.547410, -3.802240, 7.614964] #chang eor remove
211+
- [71, 0.247410, -3.802240, 7.614964] #chang eor remove -0.3x
207212
- [72, -0.618402, -2.172485, 6.506305]
208213
- [73, -0.616812, -3.825134, 8.898422]
209214
- [74, -0.607355, -2.644934, 8.26555]
@@ -237,7 +242,7 @@ bridle_particles:
237242
- [102, -0.711827, 1.113164, 7.054963]
238243
- [103, -0.692391, 3.921859, 9.027294]
239244
- [104, -0.633144, 0.941442, 3.348039]
240-
- [105, 0.547410, 3.802240, 7.614964] #change or remove
245+
- [105, 0.247410, 3.802240, 7.614964] #change or remove
241246
- [106, -0.618402, 2.172485, 6.506305]
242247
- [107, -0.616812, 3.825134, 8.898422]
243248
- [108, -0.607355, 2.644934, 8.26555]
@@ -260,27 +265,71 @@ bridle_particles:
260265
##############################
261266
### Additional ###################
262267
##############################
263-
- [125, 0.28625931, 0.0, 3.19030736]
264-
- [126, 0.13269336, 0.23394851, 1.48060245]
265-
- [127, 0.13269336, -0.23394851, 1.48060245]
268+
- [125, 0.28625931, 0.0, 2.000]
269+
- [126, 0.13269336, 0.23394851, 1.000]
270+
- [127, 0.13269336, -0.23394851, 1.000]
271+
- [128, -0.741091103507477, -0.673776946680759, 11.0302941121239]
272+
- [129, -0.699915730604499, -1.99208185170321, 10.7401629888476]
273+
- [130, -0.556715089835926, -3.1661181363632, 10.0871727169221]
274+
- [131, -0.741091103507477, 0.673776946680759, 11.0302941121239]
275+
- [132, -0.699915730604499, 1.99208185170321, 10.7401629888476]
276+
- [133, -0.556715089835926, 3.1661181363632, 10.0871727169221]
277+
- [134, -0.5516016, -0.6719445, 10.4569251]
278+
- [135, -0.5130279, -1.9849414, 10.2199650]
279+
- [136, -0.4067750, -3.1573406, 9.5759379]
280+
- [137, -0.5516016, 0.6719445, 10.4569251]
281+
- [138, -0.5130279, 1.9849414, 10.2199650]
282+
- [139, -0.4067750, 3.1573406, 9.5759379]
283+
284+
285+
266286

267287
bridle_connections:
268288
headers: [name, ci, cj]
269289
data:
270-
- [a1, 57, 59]
271-
- [a1, 91, 93]
272-
- [a2, 58, 61]
273-
- [a2, 92, 95]
274-
- [a3, 62, 64]
275-
- [a3, 96, 98]
276-
- [a4, 69, 73]
277-
- [a4, 103, 107] #a1-4 correct
278-
- [ab1, 59, 66]
279-
- [ab1, 93, 100]
280-
- [ab2, 61, 67]
281-
- [ab2, 95, 101]
282-
- [ab3, 64, 74]
283-
- [ab3, 98, 108]
290+
- [ab1, 57, 59, 60]
291+
- [ab1, 91, 93, 94]
292+
- [ab2, 58, 61, 63]
293+
- [ab2, 92, 95, 97]
294+
- [ab3, 62, 64, 65]
295+
- [ab3, 96, 98, 99]
296+
- [ab4, 69, 73, 75]
297+
- [ab4, 103, 107, 109]
298+
- [c1, 128, 134]
299+
- [c1, 131, 137]
300+
- [d1, 134, 76]
301+
- [d1, 137, 110]
302+
- [c2, 129, 135]
303+
- [c2, 132, 138]
304+
- [d2, 135, 77]
305+
- [d2, 138, 111]
306+
- [c3, 130, 136]
307+
- [c3, 133, 139]
308+
- [d3, 136, 78]
309+
- [d3, 139, 112]
310+
311+
312+
- [abcd1, 59, 66, 134]
313+
- [abcd1, 93, 100, 137]
314+
- [abcd2, 61, 67, 135]
315+
- [abcd2, 95, 101, 138]
316+
- [abcd3, 64, 74, 136]
317+
- [abcd3, 98, 108, 139]
318+
319+
# - [ab1, 59, 66]
320+
# - [ab1, 93, 100]
321+
# - [ab2, 61, 67]
322+
# - [ab2, 95, 101]
323+
# - [ab3, 64, 74]
324+
# - [ab3, 98, 108]
325+
# - [cd1, 76, 66]
326+
# - [cd1, 110, 100]
327+
# - [cd2, 77, 67]
328+
# - [cd2, 111, 101]
329+
# - [cd3, 78, 74]
330+
# - [cd3, 112, 108]
331+
332+
284333
- [A1, 66, 68]
285334
- [A1, 100, 102]
286335
- [A2, 67, 68]
@@ -295,20 +344,10 @@ bridle_connections:
295344
- [AII, 106, 104]
296345
# - [a5.1, 70, 71] #merge to node 70
297346
# - [a5.1, 104, 105] #merge to node 104
298-
- [b1, 60, 59]
299-
- [b1, 94, 93]
300-
- [b2, 63, 61]
301-
- [b2, 97, 95]
302-
- [b3, 65, 64]
303-
- [b3, 99, 98]
304-
- [b4, 75, 73]
305-
- [b4, 109, 107]
306-
- [cd1, 76, 66]
307-
- [cd1, 110, 100]
308-
- [cd2, 77, 67]
309-
- [cd2, 111, 101]
310-
- [cd3, 78, 74]
311-
- [cd3, 112, 108]
347+
348+
349+
350+
312351
- [br1, 90, 83]
313352
- [br1, 124, 117]
314353
- [br2, 89, 83]
@@ -337,8 +376,8 @@ bridle_connections:
337376
# front lines
338377
- [AIII,70,71,80] # pulley
339378
- [AIII,104,105,114] # pulley
340-
- [a5,71,84]
341-
- [a5,105,118]
379+
- [a5,71,53] #84
380+
- [a5,105,3] #118
342381
- [amain,70,0]
343382
- [amain,104,0]
344383
- [amain,104,0]
@@ -360,21 +399,35 @@ bridle_lines:
360399
headers: [name, rest_length, diameter, material, linktype]
361400
data:
362401
#front
363-
- [a1, 0.165, 0.002, dyneema, "noncompressive"]
364-
- [a2, 0.165, 0.002, dyneema, "noncompressive"] #update with measurement
365-
- [a3, 0.1625, 0.002, dyneema, "noncompressive"]
366-
- [a4, 0.1625, 0.002, dyneema, "noncompressive"] #update with measurement
402+
- [ab1, 0.330, 0.002, dyneema, "pulley"]
403+
- [ab2, 0.260, 0.002, dyneema, "pulley"]
404+
- [ab3, 0.260, 0.002, dyneema, "pulley"]
405+
- [ab4, 0.220, 0.002, dyneema, "pulley"]
406+
- [abcd1, 3.261, 0.002, dyneema, "pulley"]
407+
- [abcd2, 3.3180, 0.002, dyneema, "pulley"]
408+
- [abcd3, 3.3076, 0.002, dyneema, "pulley"]
409+
# - [a1, 0.165, 0.002, dyneema, "noncompressive"]
410+
# - [a2, 0.165, 0.002, dyneema, "noncompressive"] #update with measurement
411+
# - [a3, 0.1625, 0.002, dyneema, "noncompressive"]
412+
# - [a4, 0.1625, 0.002, dyneema, "noncompressive"] #update with measurement
367413
- [a5, 0.234, 0.002, dyneema, "noncompressive"]
368-
- [b1, 0.165, 0.002, dyneema, "noncompressive"]
369-
- [b2, 0.165, 0.002, dyneema, "noncompressive"]
370-
- [b3, 0.1625, 0.002, dyneema, "noncompressive"]
371-
- [b4, 0.1625, 0.002, dyneema, "noncompressive"]
372-
- [ab1, 1.833, 0.002, dyneema, "noncompressive"]
373-
- [ab2, 1.79, 0.002, dyneema, "noncompressive"]
374-
- [ab3, 1.723, 0.002, dyneema, "noncompressive"]
375-
- [cd1, 1.833, 0.002, dyneema, "noncompressive"]
376-
- [cd2, 1.79, 0.002, dyneema, "noncompressive"]
377-
- [cd3, 1.723, 0.002, dyneema, "noncompressive"]
414+
# - [b1, 0.165, 0.002, dyneema, "noncompressive"]
415+
# - [b2, 0.165, 0.002, dyneema, "noncompressive"]
416+
# - [b3, 0.1625, 0.002, dyneema, "noncompressive"]
417+
# - [b4, 0.1625, 0.002, dyneema, "noncompressive"]
418+
# - [ab1, 1.833, 0.002, dyneema, "noncompressive"]
419+
# - [ab2, 1.79, 0.002, dyneema, "noncompressive"]
420+
# - [ab3, 1.723, 0.002, dyneema, "noncompressive"]
421+
# - [cd1, 1.833, 0.002, dyneema, "noncompressive"]
422+
# - [cd2, 1.79, 0.002, dyneema, "noncompressive"]
423+
# - [cd3, 1.723, 0.002, dyneema, "noncompressive"]
424+
- [c1, 0.445, 0.002, dyneema, "noncompressive"]
425+
- [d1, 0.405, 0.002, dyneema, "noncompressive"]
426+
- [c2, 0.400, 0.002, dyneema, "noncompressive"]
427+
- [d2, 0.375, 0.002, dyneema, "noncompressive"]
428+
- [c3, 0.400, 0.002, dyneema, "noncompressive"]
429+
- [d3, 0.370, 0.002, dyneema, "noncompressive"]
430+
378431
- [A1, 1.860, 0.002, dyneema, "noncompressive"]
379432
- [A2, 1.798, 0.002, dyneema, "noncompressive"]
380433
- [A3, 1.791, 0.002, dyneema, "noncompressive"]
@@ -390,7 +443,7 @@ bridle_lines:
390443
#rear
391444
- [br1, 4.407, 0.002, dyneema, "noncompressive"]
392445
- [br2, 4.180, 0.002, dyneema, "noncompressive"]
393-
- [br3, 4.4094, 0.002, dyneema, "noncompressive"]
446+
- [br3, 4.094, 0.002, dyneema, "noncompressive"]
394447
- [br4, 3.550, 0.002, dyneema, "noncompressive"]
395448
- [br5, 0.825, 0.002, dyneema, "noncompressive"]
396449

@@ -412,7 +465,7 @@ bridle_lines:
412465
# rear lines
413466
- [brmain 3, 12.168, 0.002, dyneema, "pulley"]
414467
- [M-line, 4.856, 0.005, dyneema, "pulley"]
415-
- [Steering Tape, 1.800, 0.005, dyneema, "noncompressive"]
468+
- [Steering Tape, 1.8, 0.005, dyneema, "noncompressive"]
416469
- [Power Tape, 3.335, 0.005, dyneema, "noncompressive"]
417470

418471
# # front lines

src/kitesim/read_struc_geometry_level_2_yaml.py

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,72 @@ def initialize_wing_structure(
263263
c_arr.append(0)
264264
linktype_arr.append("noncompressive")
265265

266-
266+
#assign masses canopy
267+
def triangle_area(p1, p2, p3):
268+
# Vectors for two sides of the triangle
269+
v1 = p2 - p1
270+
v2 = p3 - p1
271+
# Cross product magnitude gives 2 * triangle area
272+
return 0.5 * np.linalg.norm(np.cross(v1, v2))
273+
274+
def quad_area(A, B, C, D):
275+
A = np.array(A)
276+
B = np.array(B)
277+
C = np.array(C)
278+
D = np.array(D)
279+
280+
# Split quad into triangles ABC and ACD
281+
area1 = triangle_area(A, B, C)
282+
area2 = triangle_area(A, C, D)
283+
return area1 + area2
284+
285+
for i in range(len(canopy_sections) - 1):
286+
section_a = canopy_sections[i]
287+
section_b = canopy_sections[i + 1]
288+
# Create quads by connecting adjacent nodes in consecutive sections
289+
for j in range(len(section_a) - 1):
290+
quad = [section_a[j], section_a[j+1], section_b[j+1], section_b[j]]
291+
# Get coordinates and calculate area
292+
corners = [struc_nodes[node] for node in quad]
293+
area = quad_area(corners[0], corners[1], corners[2], corners[3])
294+
# Distribute quad mass to its 4 nodes (each gets 1/4 of quad mass)
295+
quad_mass = area * struc_geometry["canopy_density"] / 1000 # Convert g/m^2 to kg/m^2
296+
for node in quad:
297+
m_arr[node] += quad_mass / 4
298+
299+
mass_canopy = np.sum(m_arr)
300+
301+
le_indices = np.array(all_sections)[:,0]
302+
303+
# Calculate total length of inflatable tubes
304+
total_inflatable_length = 0
305+
306+
# Add up lengths in leading edge
307+
for i in range(len(le_indices) - 1):
308+
total_inflatable_length += np.linalg.norm(struc_nodes[le_indices[i]] - struc_nodes[le_indices[i+1]])
309+
310+
# Add up lengths in strut sections
311+
for section in strut_sections:
312+
for j in range(len(section) - 1):
313+
total_inflatable_length += np.linalg.norm(struc_nodes[section[j]] - struc_nodes[section[j+1]])
314+
315+
# Calculate target mass for inflatable tubes
316+
target_mass_inflatable = struc_geometry["mass_without_bridles"] - mass_canopy
317+
318+
# Distribute mass along leading edge based on segment lengths
319+
for i in range(len(le_indices) - 1):
320+
segment_length = np.linalg.norm(struc_nodes[le_indices[i]] - struc_nodes[le_indices[i+1]])
321+
segment_mass = target_mass_inflatable * (segment_length / total_inflatable_length)
322+
m_arr[le_indices[i]] += segment_mass / 2
323+
m_arr[le_indices[i+1]] += segment_mass / 2
324+
325+
# Distribute mass along strut sections based on segment lengths
326+
for section in strut_sections:
327+
for j in range(len(section) - 1):
328+
segment_length = np.linalg.norm(struc_nodes[section[j]] - struc_nodes[section[j+1]])
329+
segment_mass = target_mass_inflatable * (segment_length / total_inflatable_length)
330+
m_arr[section[j]] += segment_mass / 2
331+
m_arr[section[j+1]] += segment_mass / 2
267332

268333
return (
269334
# node level

0 commit comments

Comments
 (0)