-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain_for_Final_Testing.py
More file actions
61 lines (44 loc) · 1.81 KB
/
Main_for_Final_Testing.py
File metadata and controls
61 lines (44 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 14 08:51:30 2021
@author: kendrick shepherd
"""
import sys
from ImportCSVData import LoadData
from Method_of_Joints import IterateUsingMethodOfJoints
from Structure_Operations import StaticallyDeterminate
from Structure_Operations import ComputeReactions
# from Master.Method_of_Joints_Master import IterateUsingMethodOfJoints
# from Master.Structure_Operations_Master import StaticallyDeterminate
# from Master.Structure_Operations_Master import ComputeReactions
# perform the method of joints on a statically
# determinate truss
def MethodOfJoints( input_geometry):
# load the input data
[nodes, bars] = LoadCSV(input_geometry)
# determine if the truss is statically determinate barring parallel or
# concurrent reactions
if not StaticallyDeterminate(nodes,bars):
sys.exit("Cannot operate on a truss that is not statically determinate")
# Compute reaction forces at the supports from external loads
ComputeReactions(nodes)
# Iterate through all bars using the method of joints
# to compute internal member loads
IterateUsingMethodOfJoints(nodes,bars)
# return the answer
return [nodes, bars]
def LoadCSV(input_geometry):
# load the input data only
[nodes, bars] = LoadData(input_geometry)
return nodes,bars
def LoadAndComputeReactions(input_geometry):
# load the input data
[nodes, bars] = LoadCSV(input_geometry)
# determine if the truss is statically determinate barring parallel or
# concurrent reactions
if not StaticallyDeterminate(nodes,bars):
sys.exit("Cannot operate on a truss that is not statically determinate")
# Compute reaction forces at the supports from external loads
ComputeReactions(nodes)
return nodes,bars