Subversion Repositories OpenSees

Rev

Rev 4675 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4675 fmk 1
# OpenSees Example: Simple supported beam modeled with 2D solid elements
2
 
3
# Units: kips, in, sec
4
# ----------------------------
5
 
6
wipe; # clear opensees model
7
 
8
 
9
#-----------------------------
10
# Define the model
11
# ----------------------------
12
 
13
# Create ModelBuilder with 2 dimensions and 2 DOF/node
14
model BasicBuilder -ndm 2 -ndf 2
15
 
16
# create the material
17
nDMaterial elasticPlaneStressC 1 30000 0.25
18
 
19
# set type of quadrilateral element (uncomment one of the three #options)
20
set Quad quad
21
#set Quad bbarQuad
22
#set Quad enhancedQuad
23
 
24
# set up the arguments for the three considered elements
25
if {$Quad == "enhancedQuad" } {
26
        set eleArgs "PlaneStrain2D 1"
27
}
28
if {$Quad == "quad" } {
29
        set eleArgs "1 PlaneStrain2D 1"
30
}
31
if {$Quad == "bbarQuad" } {
32
        set eleArgs "1"
33
}
34
 
35
#define nodes
36
node 1  0.0             0.0    
37
node 2  100.0   0.0            
38
node 3  100.0   100.0  
39
node 4  0.0             100.0  
40
 
41
#define element
42
element quad 1 1 2 3 4 1.0 "PlaneStress" 1
43
 
44
# define boundary conditions
45
fix   1 1 1
46
fix   4 1 1
47
 
48
# define the recorder
49
#---------------------
4682 fmk 50
recorder Node -file RCUniaxialCompression.out -time -node 2 -dof disp
4675 fmk 51
 
52
# define load pattern
53
#---------------------
54
pattern Plain 1 Linear {
55
load 2 1.0 0.0
56
load 3 1.0 0.0
57
}
58
# --------------------------------------------------------------------
59
# Start of static analysis (creation of the analysis & analysis itself)
60
# --------------------------------------------------------------------
61
 
62
# Load control with variable load steps
63
#                      init Jd min max
64
integrator LoadControl 1.0   1 1.0 100.0
65
 
66
# Convergence test
67
#              tolerance maxIter displayCode
68
test EnergyIncr 1.0e-12    10         0
69
 
70
# Solution algorithm
71
algorithm Newton
72
 
73
# DOF numberer
74
numberer RCM
75
 
76
# Cosntraint handler
77
constraints Plain
78
 
79
# System of equations solver
80
system ProfileSPD
81
 
82
# Type of analysis analysis
83
analysis Static
84
 
85
# Perform the analysis
86
analyze 10
87
 
88
# --------------------------
89
# End of static analysis
90
# --------------------------
91
 
92
print ele