You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Performs second order (P-Delta) analysis. This type of analysis is appropriate for most models using beams, columns and braces. Second order analysis is usually required by material-specific codes. The analysis is iterative and takes longer to solve. Models with slender members and/or members with combined bending and axial loads will generally have more significant P-Delta effects. P-Delta effects in plates/quads are not considered.
149
150
150
-
:param combo_name: The name of the load combination to evaluate P-Delta effects for.
151
+
:param model: The finite element model to be solved.
152
+
:type: FEModel3D
153
+
:param combo_name: The name of the load combination to evaluate.
151
154
:type combo_name: string
155
+
:param Delta_P1: An array of the loads to apply for the load step.
156
+
:type Delta_P1: numpy array
157
+
:param Delta_FER1: An array of the fixed end reactions for the load step.
158
+
:type Delta_FER1: numpy array
152
159
:param log: Prints updates to the console if set to True. Default is False.
153
160
:type log: bool, optional
154
161
:param check_stability: When set to True, checks the stiffness matrix for any unstable degrees of freedom and reports them back to the console. This does add to the solution time. Defaults to True.
# Calculate the partitioned global stiffness matrices
186
193
ifsparseisTrue:
187
194
188
-
# Calculate the initial stiffness matrix
195
+
# Calculate the initial stiffness matrix. This matrix must be recalculated on each iteration due to tension/compression-only members deactivating or reactivating.
# Calculate the initial stiffness matrix. This matrix must be recalculated on each iteration due to tension/compression-only members deactivating or reactivating.
# TODO: Adjust the code below to allow elements to reactivate on subsequent iterations if deformations at element nodes indicate the member goes back into an active state. This will lead to a less conservative and more realistic analysis. Nodal springs (above) already do this.
523
533
524
534
# Check tension/compression-only springs
525
-
iflog: print('- Checking for tension/compression-only spring convergence')
535
+
iflog:
536
+
print('- Checking for tension/compression-only spring convergence')
537
+
526
538
forspringinmodel.springs.values():
527
539
528
-
ifspring.active[combo_name] ==True:
540
+
ifspring.active[combo_name] isTrue:
541
+
529
542
# Check if tension-only conditions exist
530
-
if (
531
-
spring.tension_only==True
532
-
andspring.axial(combo_name) >spring_tolerance
533
-
):
543
+
if (spring.tension_onlyisTrue) and (spring.axial(combo_name) >spring_tolerance):
534
544
spring.active[combo_name] =False
535
545
convergence=False
536
546
537
547
# Check if compression-only conditions exist
538
-
elif (
539
-
spring.comp_only==True
540
-
andspring.axial(combo_name) <-spring_tolerance
541
-
):
548
+
elif (spring.comp_onlyisTrue) and (spring.axial(combo_name) <-spring_tolerance):
542
549
spring.active[combo_name] =False
543
550
convergence=False
544
551
545
552
# Check tension/compression only members
546
-
iflog: print('- Checking for tension/compression-only member convergence')
553
+
iflog:
554
+
print('- Checking for tension/compression-only member convergence')
547
555
forphys_memberinmodel.members.values():
548
556
549
557
# Only run the tension/compression only check if the member is still active
"""Builds a list with known nodal displacements and with the positions in global stiffness matrix of known and unknown nodal displacements
953
964
954
965
:return: A list of the global matrix indices for the unknown nodal displacements (D1_indices). A list of the global matrix indices for the known nodal displacements (D2_indices). A list of the known nodal displacements (D2).
955
966
:rtype: list, list, list
956
967
"""
957
968
958
-
D1_indices= [] # A list of the indices for the unknown nodal displacements
959
-
D2_indices= [] # A list of the indices for the known nodal displacements
960
-
D2= [] # A list of the values of the known nodal displacements
969
+
D1_indices= [] # A list of the indices for the unknown nodal displacements
970
+
D2_indices= [] # A list of the indices for the known nodal displacements
971
+
D2= [] # A list of the values of the known nodal displacements
0 commit comments