sikandarciv101 commited on
Commit
32e1d75
·
verified ·
1 Parent(s): 42d66a7

Create utils/beam_analysis.py

Browse files
Files changed (1) hide show
  1. utils/utils/beam_analysis.py +29 -0
utils/utils/beam_analysis.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Example placeholder for analyze_beam function
2
+
3
+ def analyze_beam(beam_type, span_lengths, supports, load_type):
4
+ # Dummy calculations for shear forces and bending moments
5
+ shear_forces = []
6
+ bending_moments = []
7
+
8
+ # Simplified assumptions for UDL and other load types
9
+ total_length = sum(span_lengths)
10
+
11
+ if load_type == "Uniformly Distributed Load (UDL)":
12
+ for span in span_lengths:
13
+ shear_forces.append(span * 1) # Assume load intensity w=1 kN/m for simplicity
14
+ bending_moments.append(span**2 / 8) # Moment at the mid-span for UDL: M = w*L^2/8
15
+
16
+ elif load_type == "Point Load":
17
+ for span in span_lengths:
18
+ shear_forces.append(5) # Dummy shear force values for simplicity
19
+ bending_moments.append(10) # Dummy moment values for simplicity
20
+
21
+ elif load_type == "Uniformly Varying Load (UVL)":
22
+ for span in span_lengths:
23
+ shear_forces.append(3) # Dummy shear force values for simplicity
24
+ bending_moments.append(7) # Dummy moment values for simplicity
25
+
26
+ return {
27
+ 'shear_forces': shear_forces,
28
+ 'bending_moments': bending_moments
29
+ }