Reinforced Concrete Shear Wall with Special Boundary Elements¶
The original code was written for OpenSees Tcl by Lu X.Z. et al. (2015) <http://www.luxinzheng.net/download/OpenSEES/Examples_of_NLDKGQ_element.htm>.
The source code is converted to OpenSeesPy by Anurag Upadhyay from University of Utah.
Four node shell elements with LayeredShell sections are used to model the shear wall.
The source code is shown below, which can be downloaded
here
.Download the cyclic test load input and output files,
RCshearwall_Load_input
,RCshearwall_TestOutput
.The details of the shear wall specimen are shown in the figure below, along with the finite element mesh.
Run the source code and you should see the cyclic test plot overlaid by a pushover curve, shown at the end.
1
2# Converted to openseespy by: Anurag Upadhyay, University of Utah.
3# Units: N and m to follow the originally published code.
4
5from openseespy.opensees import *
6
7import numpy as np
8import matplotlib.pyplot as plt
9import os
10import math
11
12pi = 3.1415
13
14AnalysisType = "Pushover" # Cyclic Pushover Gravity
15
16wipe()
17
18model('basic','-ndm',3,'-ndf',6)
19
20###################################
21## Define Material
22###################################
23
24# Define PSUMAT and convert it to plane stress material
25nDMaterial('PlaneStressUserMaterial',1,40,7,20.7e6,2.07e6,-4.14e6,-0.002,-0.01,0.001,0.3)
26nDMaterial('PlateFromPlaneStress',4,1,1.25e10)
27
28# Define material for rebar
29uniaxialMaterial('Steel02',7,379e6,202.7e9,0.01,18.5,0.925,0.15)
30uniaxialMaterial('Steel02',8,392e6,200.6e9,0.01,18.5,0.925,0.15)
31
32# Convert rebar material to plane stress/plate rebar
33# Angle 0 is for vertical rebar and 90 is for horizontal rebar
34nDMaterial('PlateRebar',9,7,90.0)
35nDMaterial('PlateRebar',10,8,90.0)
36nDMaterial('PlateRebar',11,8,0.0)
37
38# Define LayeredShell sections. Section 1 is used for the special boundary elements and section 2 is used for the unconfined interior wall portion
39section('LayeredShell',1,10,4,0.0125,11,0.0002403,11,0.0003676,4,0.024696,4,0.024696,4,0.024696,4,0.024696,11,0.0003676,11,0.0002403,4,0.0125)
40section('LayeredShell',2,8,4,0.0125,11,0.0002403,10,0.0002356,4,0.0495241,4,0.0495241,10,0.0002356,11,0.0002403,4,0.0125)
41
42# ##################
43# NODES
44# ##################
45#define nodes
46node(1,0.0,0,0)
47node(2,0.2,0,0)
48node(3,0.5,0,0)
49node(4,0.8,0,0)
50node(5,1.0,0,0)
51
52node(6,0.0,0.2,0)
53node(7,0.2,0.2,0)
54node(8,0.5,0.2,0)
55node(9,0.8,0.2,0)
56node(10,1.0,0.2,0)
57
58node(11,0.0,0.4,0)
59node(12,0.2,0.4,0)
60node(13,0.5,0.4,0)
61node(14,0.8,0.4,0)
62node(15,1.0,0.4,0)
63
64node(16,0.0,0.6,0)
65node(17,0.2,0.6,0)
66node(18,0.5,0.6,0)
67node(19,0.8,0.6,0)
68node(20,1.0,0.6,0)
69
70node(21,0.0,0.8,0)
71node(22,0.2,0.8,0)
72node(23,0.5,0.8,0)
73node(24,0.8,0.8,0)
74node(25,1.0,0.8,0)
75
76node(26,0.0,1.0,0)
77node(27,0.2,1.0,0)
78node(28,0.5,1.0,0)
79node(29,0.8,1.0,0)
80node(30,1.0,1.0,0)
81
82node(31,0.0,1.2,0)
83node(32,0.2,1.2,0)
84node(33,0.5,1.2,0)
85node(34,0.8,1.2,0)
86node(35,1.0,1.2,0)
87
88node(36,0.0,1.4,0)
89node(37,0.2,1.4,0)
90node(38,0.5,1.4,0)
91node(39,0.8,1.4,0)
92node(40,1.0,1.4,0)
93
94node(41,0.0,1.6,0)
95node(42,0.2,1.6,0)
96node(43,0.5,1.6,0)
97node(44,0.8,1.6,0)
98node(45,1.0,1.6,0)
99
100node(46,0.0,1.8,0)
101node(47,0.2,1.8,0)
102node(48,0.5,1.8,0)
103node(49,0.8,1.8,0)
104node(50,1.0,1.8,0)
105
106node(51,0.0,2.0,0)
107node(52,0.2,2.0,0)
108node(53,0.5,2.0,0)
109node(54,0.8,2.0,0)
110node(55,1.0,2.0,0)
111
112##########################
113# ELEMENTS
114##########################
115
116ShellType = "ShellNLDKGQ"
117# ShellType = "ShellMITC4"
118
119element(ShellType,1,1,2,7,6,1)
120element(ShellType,2,2,3,8,7,2)
121element(ShellType,3,3,4,9,8,2)
122element(ShellType,4,4,5,10,9,1)
123
124element(ShellType,5,6,7,12,11,1)
125element(ShellType,6,7,8,13,12,2)
126element(ShellType,7,8,9,14,13,2)
127element(ShellType,8,9,10,15,14,1)
128
129element(ShellType,9,11,12,17,16,1)
130element(ShellType,10,12,13,18,17,2)
131element(ShellType,11,13,14,19,18,2)
132element(ShellType,12,14,15,20,19,1)
133
134element(ShellType,13,16,17,22,21,1)
135element(ShellType,14,17,18,23,22,2)
136element(ShellType,15,18,19,24,23,2)
137element(ShellType,16,19,20,25,24,1)
138
139element(ShellType,17,21,22,27,26,1)
140element(ShellType,18,22,23,28,27,2)
141element(ShellType,19,23,24,29,28,2)
142element(ShellType,20,24,25,30,29,1)
143
144element(ShellType,21,26,27,32,31,1)
145element(ShellType,22,27,28,33,32,2)
146element(ShellType,23,28,29,34,33,2)
147element(ShellType,24,29,30,35,34,1)
148
149element(ShellType,25,31,32,37,36,1)
150element(ShellType,26,32,33,38,37,2)
151element(ShellType,27,33,34,39,38,2)
152element(ShellType,28,34,35,40,39,1)
153
154element(ShellType,29,36,37,42,41,1)
155element(ShellType,30,37,38,43,42,2)
156element(ShellType,31,38,39,44,43,2)
157element(ShellType,32,39,40,45,44,1)
158
159element(ShellType,33,41,42,47,46,1)
160element(ShellType,34,42,43,48,47,2)
161element(ShellType,35,43,44,49,48,2)
162element(ShellType,36,44,45,50,49,1)
163
164element(ShellType,37,46,47,52,51,1)
165element(ShellType,38,47,48,53,52,2)
166element(ShellType,39,48,49,54,53,2)
167element(ShellType,40,49,50,55,54,1)
168
169# P-delta columns
170
171element('truss',41,1,6,223.53e-6,7)
172element('truss',42,6,11,223.53e-6,7)
173element('truss',43,11,16,223.53e-6,7)
174element('truss',44,16,21,223.53e-6,7)
175element('truss',45,21,26,223.53e-6,7)
176element('truss',46,26,31,223.53e-6,7)
177element('truss',47,31,36,223.53e-6,7)
178element('truss',48,36,41,223.53e-6,7)
179element('truss',49,41,46,223.53e-6,7)
180element('truss',50,46,51,223.53e-6,7)
181
182element('truss',51,2,7,223.53e-6,7)
183element('truss',52,7,12,223.53e-6,7)
184element('truss',53,12,17,223.53e-6,7)
185element('truss',54,17,22,223.53e-6,7)
186element('truss',55,22,27,223.53e-6,7)
187element('truss',56,27,32,223.53e-6,7)
188element('truss',57,32,37,223.53e-6,7)
189element('truss',58,37,42,223.53e-6,7)
190element('truss',59,42,47,223.53e-6,7)
191element('truss',60,47,52,223.53e-6,7)
192
193element('truss',61,4,9,223.53e-6,7)
194element('truss',62,9,14,223.53e-6,7)
195element('truss',63,14,19,223.53e-6,7)
196element('truss',64,19,24,223.53e-6,7)
197element('truss',65,24,29,223.53e-6,7)
198element('truss',66,29,34,223.53e-6,7)
199element('truss',67,34,39,223.53e-6,7)
200element('truss',68,39,44,223.53e-6,7)
201element('truss',69,44,49,223.53e-6,7)
202element('truss',70,49,54,223.53e-6,7)
203
204element('truss',71,5,10,223.53e-6,7)
205element('truss',72,10,15,223.53e-6,7)
206element('truss',73,15,20,223.53e-6,7)
207element('truss',74,20,25,223.53e-6,7)
208element('truss',75,25,30,223.53e-6,7)
209element('truss',76,30,35,223.53e-6,7)
210element('truss',77,35,40,223.53e-6,7)
211element('truss',78,40,45,223.53e-6,7)
212element('truss',79,45,50,223.53e-6,7)
213element('truss',80,50,55,223.53e-6,7)
214
215# Fix all bottom nodes
216fixY(0.0,1,1,1,1,1,1)
217
218recorder('Node','-file','ReactionPY.txt','-time','-node',1,2,3,4,5,'-dof',1,'reaction')
219
220############################
221# Gravity Analysis
222############################
223
224print("running gravity")
225
226timeSeries("Linear", 1) # create TimeSeries for gravity analysis
227pattern('Plain',1,1)
228load(53,0,-246000.0,0.0,0.0,0.0,0.0) # apply vertical load
229
230recorder('Node','-file','Disp.txt','-time','-node',53,'-dof',1,'disp')
231
232constraints('Plain')
233numberer('RCM')
234system('BandGeneral')
235test('NormDispIncr',1.0e-4,200)
236algorithm('BFGS','-count',100)
237integrator('LoadControl',0.1)
238analysis('Static')
239analyze(10)
240
241print("gravity analysis complete...")
242
243loadConst('-time',0.0) # Keep the gravity loads for further analysis
244
245wipeAnalysis()
246
247###############################
248### Cyclic ANALYSIS
249###############################
250
251if(AnalysisType=="Cyclic"):
252
253 # This is a load controlled analysis. The input load file "RCshearwall_Load_input.txt" should be in the
254 # .. same folder as the model file.
255
256 print("<<<< Running Cyclic Analysis >>>>")
257
258 timeSeries('Path',2,'-dt',0.1,'-filePath','RCshearwall_Load_input.txt')
259 pattern('Plain',2,2)
260 sp(53,1,1) # construct a single-point constraint object added to the LoadPattern.
261
262 constraints('Penalty',1e20,1e20)
263 numberer('RCM')
264 system('BandGeneral')
265 test('NormDispIncr',1e-05, 100, 1)
266 algorithm('KrylovNewton')
267 integrator('LoadControl',0.1)
268 analysis('Static')
269 analyze(700)
270
271
272#######################
273# PUSHOVER ANALYSIS
274#######################
275
276if(AnalysisType=="Pushover"):
277
278 print("<<<< Running Pushover Analysis >>>>")
279
280 # create a plain load pattern for pushover analysis
281 pattern("Plain", 2, 1)
282
283 ControlNode=53
284 ControlDOF=1
285 MaxDisp= 0.020
286 DispIncr=0.00001
287 NstepsPush=int(MaxDisp/DispIncr)
288
289 load(ControlNode, 1.00, 0.0, 0.0, 0.0, 0.0, 0.0) # Apply a unit reference load in DOF=1
290
291 system("BandGeneral")
292 numberer("RCM")
293 constraints('Penalty',1e20,1e20)
294 integrator("DisplacementControl", ControlNode, ControlDOF, DispIncr)
295 algorithm('KrylovNewton')
296 test('NormDispIncr',1e-05, 1000, 2)
297 analysis("Static")
298
299 # Create a folder to put the output
300 PushDataDir = r'PushoverOut'
301 if not os.path.exists(PushDataDir):
302 os.makedirs(PushDataDir)
303 recorder('Node', '-file', "PushoverOut/React.out", '-closeOnWrite', '-node', 1, 2, 3, 4, 5, '-dof',1, 'reaction')
304 recorder('Node', '-file', "PushoverOut/Disp.out", '-closeOnWrite', '-node', ControlNode, '-dof',1, 'disp')
305
306 # Perform pushover analysis
307 dataPush = np.zeros((NstepsPush+1,5))
308 for j in range(NstepsPush):
309 analyze(1)
310 dataPush[j+1,0] = nodeDisp(ControlNode,1)*1000 # Convert to mm
311 dataPush[j+1,1] = -getLoadFactor(2)*0.001 # Convert to kN
312
313 # Read test output data to plot
314 Test = np.loadtxt("RCshearwall_TestOutput.txt", delimiter="\t", unpack="False")
315
316 ## Set parameters for the plot
317 plt.rcParams.update({'font.size': 7})
318 plt.figure(figsize=(4,3), dpi=100)
319 plt.rc('font', family='serif')
320 plt.plot(Test[0,:], Test[1,:], color="black", linewidth=0.8, linestyle="--", label='Test')
321 plt.plot(dataPush[:,0], -dataPush[:,1], color="red", linewidth=1.2, linestyle="-", label='Pushover')
322 plt.axhline(0, color='black', linewidth=0.4)
323 plt.axvline(0, color='black', linewidth=0.4)
324 plt.xlim(-25, 25)
325 plt.xticks(np.linspace(-20,20,11,endpoint=True))
326 plt.grid(linestyle='dotted')
327 plt.xlabel('Displacement (mm)')
328 plt.ylabel('Base Shear (kN)')
329 plt.legend()
330 plt.savefig("PushoverOut/RCshearwall_PushoverCurve.png",dpi=1200)
331 plt.show()
332
333
334 print("Pushover analysis complete")