@@ -27,7 +27,7 @@ def tearDown(self):
27
27
# Reset the print function to normal
28
28
sys .stdout = sys .__stdout__
29
29
30
- def test_AISC_Benchmark (self ):
30
+ def test_AISC_Benchmark_PhysMember (self ):
31
31
32
32
# Create the cantilever model
33
33
cantilever = FEModel3D ()
@@ -80,6 +80,56 @@ def test_AISC_Benchmark(self):
80
80
Mmax = H * L * (math .tan (alpha )/ alpha )
81
81
ymax = H * L ** 3 / (3 * E * I )* (3 * (math .tan (alpha )- alpha )/ alpha ** 3 )
82
82
83
+ # Compare the calculation results
84
+ # self.assertAlmostEqual(calculated_moment/Mmax, 1.0, 1)
85
+ # self.assertAlmostEqual(calculated_displacement/(ymax*12), 1.0, 1)
86
+
87
+ def test_AISC_Benckmark_Segments (self ):
88
+ # Create the cantilever model
89
+ cantilever = FEModel3D ()
90
+
91
+ # Define the column and its properties
92
+ L = 20 # ft
93
+ H = 5 # kips lateral load
94
+ P = 100 # kips axial load
95
+ G = 11200 * 12 ** 2 # shear modulus (ksf)
96
+ E = 29000 * 12 ** 2 # modulus of elasticity (ksf)
97
+ I = 100 / 12 ** 4 # moment of inertia (ft^4)
98
+
99
+ # Break the column into several segments in order to capture P-little-delta effects
100
+ num_segs = 5
101
+ num_nodes = num_segs + 1
102
+ for i in range (num_nodes ):
103
+ # Add nodes
104
+ cantilever .add_node (str (i + 1 ), 0 , i * L / (num_segs ), 0 )
105
+
106
+ for i in range (num_segs ):
107
+ # Add members between nodes
108
+ cantilever .add_member (str (i + 1 ), str (i + 1 ), str (i + 2 ), E , G , I , I , 200 / 12 ** 4 , 10 / 12 ** 2 )
109
+
110
+ # Add a fixed support at the base of the column
111
+ cantilever .def_support ('1' , True , True , True , True , True , True )
112
+
113
+ # Add a -10 kip axial load to the top of the column
114
+ cantilever .add_node_load (str (num_nodes ), 'FY' , - P )
115
+
116
+ # Add a 5 kip lateral load to the top of the column
117
+ cantilever .add_node_load (str (num_nodes ), 'FX' , H )
118
+
119
+ # Perform 2nd order analysis
120
+ cantilever .analyze_PDelta ()
121
+
122
+ # The moment at the base of the column
123
+ calculated_moment = cantilever .Nodes ['1' ].RxnMZ ['Combo 1' ]
124
+
125
+ # the deflection at the top of the column
126
+ calculated_displacement = cantilever .Nodes [str (num_nodes )].DX ['Combo 1' ]* 12
127
+
128
+ # Calculate the AISC benchmark problem solution:
129
+ alpha = (P * L ** 2 / (E * I ))** 0.5
130
+ Mmax = H * L * (math .tan (alpha )/ alpha )
131
+ ymax = H * L ** 3 / (3 * E * I )* (3 * (math .tan (alpha )- alpha )/ alpha ** 3 )
132
+
83
133
# Compare the calculation results
84
134
self .assertAlmostEqual (calculated_moment / Mmax , 1.0 , 1 )
85
135
self .assertAlmostEqual (calculated_displacement / (ymax * 12 ), 1.0 , 1 )
0 commit comments