@@ -1751,15 +1751,14 @@ def Km(self, combo_name='Combo 1', push_combo='Push', step_num=1, log=False, spa
1751
1751
Km = zeros ((len (self .nodes )* 6 , len (self .nodes )* 6 ))
1752
1752
1753
1753
# Add stiffness terms for each physical member in the model
1754
- if log : print ('- Calculating the plastic reduction matrix' )
1755
1754
for phys_member in self .members .values ():
1756
-
1755
+
1757
1756
# Check to see if the physical member is active for the given load combination
1758
1757
if phys_member .active [combo_name ] is True :
1759
1758
1760
1759
# Step through each sub-member in the physical member and add terms
1761
1760
for member in phys_member .sub_members .values ():
1762
-
1761
+
1763
1762
# Get the member's global plastic reduction matrix
1764
1763
# Storing it as a local variable eliminates the need to rebuild it every time a term is needed
1765
1764
member_Km = member .Km (combo_name )
@@ -1768,25 +1767,25 @@ def Km(self, combo_name='Combo 1', push_combo='Push', step_num=1, log=False, spa
1768
1767
# 'a' & 'b' below are row/column indices in the member's matrix
1769
1768
# 'm' & 'n' are corresponding row/column indices in the structure's global matrix
1770
1769
for a in range (12 ):
1771
-
1770
+
1772
1771
# Determine if index 'a' is related to the i-node or j-node
1773
1772
if a < 6 :
1774
1773
# Find the corresponding index 'm' in the global plastic reduction matrix
1775
1774
m = member .i_node .ID * 6 + a
1776
1775
else :
1777
1776
# Find the corresponding index 'm' in the global plastic reduction matrix
1778
1777
m = member .j_node .ID * 6 + (a - 6 )
1779
-
1778
+
1780
1779
for b in range (12 ):
1781
-
1780
+
1782
1781
# Determine if index 'b' is related to the i-node or j-node
1783
1782
if b < 6 :
1784
1783
# Find the corresponding index 'n' in the global plastic reduction matrix
1785
1784
n = member .i_node .ID * 6 + b
1786
1785
else :
1787
1786
# Find the corresponding index 'n' in the global plastic reduction matrix
1788
1787
n = member .j_node .ID * 6 + (b - 6 )
1789
-
1788
+
1790
1789
# Now that 'm' and 'n' are known, place the term in the global plastic reduction matrix
1791
1790
if sparse is True :
1792
1791
row .append (m )
@@ -1810,7 +1809,7 @@ def Km(self, combo_name='Combo 1', push_combo='Push', step_num=1, log=False, spa
1810
1809
# else: Analysis._check_stability(self, Km)
1811
1810
1812
1811
# Return the global plastic reduction matrix
1813
- return Km
1812
+ return Km
1814
1813
1815
1814
def FER (self , combo_name = 'Combo 1' ) -> NDArray [float64 ]:
1816
1815
"""Assembles and returns the global fixed end reaction vector for any given load combo.
@@ -2235,7 +2234,7 @@ def analyze(self, log=False, check_stability=True, check_statics=False, max_iter
2235
2234
2236
2235
# Identify which load combinations have the tags the user has given
2237
2236
combo_list = Analysis ._identify_combos (self , combo_tags )
2238
-
2237
+
2239
2238
# Get the auxiliary list used to determine how the matrices will be partitioned
2240
2239
D1_indices , D2_indices , D2 = Analysis ._partition_D (self )
2241
2240
@@ -2469,23 +2468,25 @@ def _not_ready_yet_analyze_pushover(self, log=False, check_stability=True, push_
2469
2468
# Apply the pushover load in steps, summing deformations as we go, until the full pushover load has been analyzed
2470
2469
while load_factor <= 1 :
2471
2470
2472
- print (f'load_factor { load_factor } ' )
2473
-
2474
2471
# Inform the user which pushover load step we're on
2475
2472
if log :
2476
2473
print ('- Beginning pushover load step #' + str (step_num ))
2474
+ print (f'- Load_factor = { load_factor } ' )
2477
2475
2478
2476
# Run the next pushover load step
2479
2477
Analysis ._pushover_step (self , combo .name , push_combo , step_num , P1_push , FER1_push , D1_indices , D2_indices , D2 , log , sparse , check_stability )
2480
2478
2481
2479
# Update nonlinear material member end forces for each member
2482
- for member in self .members .values ():
2483
- member ._fxi = member .f (combo .name , push_combo , step_num )[0 , 0 ]
2484
- member ._myi = member .f (combo .name , push_combo , step_num )[4 , 0 ]
2485
- member ._mzi = member .f (combo .name , push_combo , step_num )[5 , 0 ]
2486
- member ._fxj = member .f (combo .name , push_combo , step_num )[6 , 0 ]
2487
- member ._myj = member .f (combo .name , push_combo , step_num )[10 , 0 ]
2488
- member ._mzj = member .f (combo .name , push_combo , step_num )[11 , 0 ]
2480
+ for phys_member in self .members .values ():
2481
+
2482
+ for member in phys_member .sub_members .values ():
2483
+
2484
+ member ._fxi = member .f (combo .name , push_combo , step_num )[0 , 0 ]
2485
+ member ._myi = member .f (combo .name , push_combo , step_num )[4 , 0 ]
2486
+ member ._mzi = member .f (combo .name , push_combo , step_num )[5 , 0 ]
2487
+ member ._fxj = member .f (combo .name , push_combo , step_num )[6 , 0 ]
2488
+ member ._myj = member .f (combo .name , push_combo , step_num )[10 , 0 ]
2489
+ member ._mzj = member .f (combo .name , push_combo , step_num )[11 , 0 ]
2489
2490
2490
2491
# Move on to the next load step
2491
2492
step_num += 1
0 commit comments