|
35 | 35 | # Set a parameter for the axial load
|
36 | 36 | P = 180.0; # 10% of axial capacity of columns
|
37 | 37 |
|
38 |
| -# create a Linear TimeSeries (load factor varies linearly with time) - command: timeSeries Linear $tag |
39 |
| -model.timeSeries("Linear", 1) |
40 |
| - |
41 | 38 | # create a Plain load pattern - command: pattern Plain $tag $timeSeriesTag { $loads }
|
42 |
| -model.pattern("Plain", 1, 1, "-fact", 1.0) |
| 39 | +model.pattern("Plain", 1, "Linear") |
43 | 40 |
|
44 | 41 | # create the nodal load - command: load nodeID xForce yForce zMoment
|
45 |
| -model.load(3, 0.0, -P, 0.0) |
46 |
| -model.load(4, 0.0, -P, 0.0) |
| 42 | +model.load(3, (0.0, -P, 0.0), pattern=1) |
| 43 | +model.load(4, (0.0, -P, 0.0), pattern=1) |
47 | 44 |
|
48 |
| -# ------------------------------ |
49 |
| -# End of model generation |
50 |
| -# ------------------------------ |
51 | 45 |
|
52 | 46 |
|
53 |
| -# ------------------------------ |
| 47 | +# |
54 | 48 | # Start of analysis generation
|
55 |
| -# ------------------------------ |
| 49 | +# |
56 | 50 |
|
57 | 51 | # create the system of equation
|
58 | 52 | model.system("BandGeneral")
|
|
73 | 67 | # create the integration scheme, the LoadControl scheme using steps of 0.1
|
74 | 68 | model.integrator("LoadControl", 0.1)
|
75 | 69 |
|
76 |
| -# create the analysis object |
77 | 70 | model.analysis("Static")
|
78 | 71 |
|
79 |
| -# ------------------------------ |
80 |
| -# End of analysis generation |
81 |
| -# ------------------------------ |
82 |
| - |
83 | 72 |
|
84 | 73 | # ------------------------------
|
85 | 74 | # Finally perform the analysis
|
|
91 | 80 | print("Gravity load analysis completed\n")
|
92 | 81 |
|
93 | 82 | # Set the gravity loads to be constant & reset the time in the domain
|
94 |
| -model.loadConst("-time", 0.0) |
95 |
| - |
96 |
| -# ---------------------------------------------------- |
97 |
| -# End of Model Generation & Initial Gravity Analysis |
98 |
| -# ---------------------------------------------------- |
| 83 | +model.loadConst(time=0.0) |
99 | 84 |
|
100 | 85 |
|
101 | 86 | # ----------------------------------------------------
|
|
105 | 90 | # Define nodal mass in terms of axial load on columns
|
106 | 91 | m = P/g
|
107 | 92 |
|
108 |
| -# tag MX MY RZ |
109 |
| -model.mass(3, m, m, 0.0) |
110 |
| -model.mass(4, m, m, 0.0) |
| 93 | +# tag MX MY RZ |
| 94 | +model.mass(3, (m, m, 0.0)) |
| 95 | +model.mass(4, (m, m, 0.0)) |
111 | 96 |
|
112 | 97 | # Define dynamic loads
|
113 | 98 | # --------------------
|
|
125 | 110 | # Set the rayleigh damping factors for nodes & elements
|
126 | 111 | model.rayleigh(0.0, 0.0, 0.0, 0.000625)
|
127 | 112 |
|
128 |
| -# ---------------------------------------------------- |
129 |
| -# End of additional modeling for dynamic loads |
130 |
| -# ---------------------------------------------------- |
131 |
| - |
132 | 113 |
|
133 | 114 | # ---------------------------------------------------------
|
134 | 115 | # Start of modifications to analysis for transient analysis
|
|
137 | 118 | # delete the old analysis and all its component objects
|
138 | 119 | model.wipeAnalysis()
|
139 | 120 |
|
140 |
| -# create the system of equation, a banded general storage scheme |
141 | 121 | model.system("BandGeneral")
|
142 |
| - |
143 |
| -# create the DOF numberer, the reverse Cuthill-McKee algorithm |
144 | 122 | model.numberer("RCM")
|
145 |
| - |
146 |
| -# create the constraint handler, a plain handler as homogeneous boundary |
147 | 123 | model.constraints("Plain")
|
148 |
| - |
149 |
| -# create the convergence test, the norm of the residual with a tolerance of |
150 |
| -# 1e-12 and a max number of iterations of 10 |
151 | 124 | model.test("NormDispIncr", 1.0e-12, 10)
|
152 | 125 |
|
153 | 126 | # create the solution algorithm, a Newton-Raphson algorithm
|
|
156 | 129 | # create the integration scheme, the Newmark with gamma=0.5 and beta=0.25
|
157 | 130 | model.integrator("Newmark", 0.5, 0.25)
|
158 | 131 |
|
159 |
| -# create the analysis object |
160 | 132 | model.analysis("Transient")
|
161 | 133 |
|
162 |
| -# --------------------------------------------------------- |
163 |
| -# End of modifications to analysis for transient analysis |
164 |
| -# --------------------------------------------------------- |
165 | 134 |
|
166 | 135 |
|
167 | 136 | # ------------------------------
|
168 | 137 | # Start of recorder generation
|
169 | 138 | # ------------------------------
|
170 | 139 |
|
171 | 140 | # Create a recorder to monitor nodal displacements
|
172 |
| -model.recorder("Node", "-time", "-file", "disp.out", "-node", 3, 4, "-dof", 1, 2, 3, "disp") |
173 |
| -model.recorder("Node", "-time", "-file", "accel.out", "-node", 3, 4, "-dof", 1, 2, 3, "accel") |
174 |
| -model.recorder("Node", "-time", "-file", "totAccel.out", "-timeSeries", 2, 0, 0, "-node", 3, 4, "-dof", 1, 2, 3, "accel") |
| 141 | +model.recorder("Node", "disp", "-time", "-file", "disp.out", "-node", 3, 4, "-dof", 1, 2, 3) |
| 142 | +model.recorder("Node", "accel", "-time", "-file", "accel.out", "-node", 3, 4, "-dof", 1, 2, 3) |
| 143 | +model.recorder("Node", "accel", "-time", "-file", "totAccel.out", "-timeSeries", 2, 0, 0, "-node", 3, 4, "-dof", 1, 2, 3) |
175 | 144 |
|
176 | 145 | # Create recorders to monitor section forces and deformations
|
177 | 146 | # at the base of the left column
|
178 | 147 | model.recorder("Element", "-time", "-file", "ele1secForce.out", "-ele", 1, "section", 1, "force")
|
179 | 148 | model.recorder("Element", "-time", "-file", "ele1secDef.out", "-ele", 1, "section", 1, "deformation")
|
180 | 149 |
|
181 |
| -# -------------------------------- |
182 |
| -# End of recorder generation |
183 |
| -# --------------------------------- |
184 |
| - |
185 | 150 |
|
186 | 151 | # ------------------------------
|
187 | 152 | # Finally perform the analysis
|
|
0 commit comments