Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/OpenSees/OpenSees into cbdi3d
Browse files Browse the repository at this point in the history
  • Loading branch information
mhscott committed Sep 26, 2020
2 parents 998788a + 655e82f commit d7b11d6
Show file tree
Hide file tree
Showing 33 changed files with 6,905 additions and 419 deletions.
3 changes: 3 additions & 0 deletions DEVELOPER/core/classTags.h
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,9 @@
#define ELE_TAG_PFEMElement2DQuasi 187
#define ELE_TAG_MINI 188
#define ELE_TAG_PFEMElement3DBubble 189
#define ELE_TAG_NineNodeQuad 207
#define ELE_TAG_EightNodeQuad 208
#define ELE_TAG_SixNodeTri 209

#define FRN_TAG_Coulomb 1
#define FRN_TAG_VelDependent 2
Expand Down
52 changes: 52 additions & 0 deletions EXAMPLES/ExamplePython/bending_quad9n.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import openseespy.opensees as ops
# import opensees as ops

ops.wipe()

ops.model('basic', '-ndm', 2, '-ndf', 2)

L = 5.
H = 1.

thk = 0.01

P = 100.
E = 200.e6
nu = 0.3

ops.nDMaterial('ElasticIsotropic', 1, E, nu)

ops.node(1, 0., 0.)
ops.node(2, 5., 0.)
ops.node(3, 5., 1.)
ops.node(4, 0., 1.)
ops.node(5, 2.5, 0.)
ops.node(6, 5., .5)
ops.node(7, 2.5, 1.)
ops.node(8, 0., .5)
ops.node(9, 2.5, .5) # comment for quad8n element

ops.element('quad9n', 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, thk, 'PlaneStress', 1)
# ops.element('quad8n', 1, 1, 2, 3, 4, 5, 6, 7, 8, thk, 'PlaneStress', 1)

ops.fix(1, 1, 1)
ops.fix(4, 1, 0)
ops.fix(8, 1, 0)

ops.timeSeries('Linear', 1)
ops.pattern('Plain', 1, 1)
ops.load(2, P, 0.)
ops.load(3, -P, 0.)

ops.analysis('Static')

ops.analyze(1)

ops.printModel()

# verification:
# tip vertical displacement (node 2 and 3) = 0.0075
# bottom Gauss Point stress_xx = 46475.8
# bottom extrem stress_xx (extrapolated) = 60000.0

exit()
56 changes: 56 additions & 0 deletions EXAMPLES/ExamplePython/bending_tri6n.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import openseespy.opensees as ops
# import opensees as ops

ops.wipe()

ops.model('basic', '-ndm', 2, '-ndf', 2)

L = 5.
H = 1.

thk = 0.01

P = 100.
E = 200.e6
nu = 0.3

ops.nDMaterial('ElasticIsotropic', 1, E, nu)

ops.node(1, 0., 0.)
ops.node(2, 5., 0.)
ops.node(3, 5., 1.)
ops.node(4, 0., 1.)
ops.node(5, 2.5, 0.)
ops.node(6, 5., .5)
ops.node(7, 2.5, 1.)
ops.node(8, 0., .5)
ops.node(9, 2.5, .5) # comment for quad8n element

ops.element('tri6n', 1, 1, 2, 3, 5, 6, 9, thk, 'PlaneStress', 1)
ops.element('tri6n', 2, 1, 3, 4, 9, 7, 8, thk, 'PlaneStress', 1)

ops.fix(1, 1, 1)
ops.fix(4, 1, 0)
ops.fix(8, 1, 0)

ops.timeSeries('Linear', 1)
ops.pattern('Plain', 1, 1)
ops.load(2, P, 0.)
ops.load(3, -P, 0.)

ops.analysis('Static')

ops.analyze(1)

ops.printModel()

stressAtNodes_ele1 = ops.eleResponse(1, 'stressAtNodes')

print(f'\nTip vertical displacement (node 2) is {ops.nodeDisp(2, 2):.4f}')
print(f'Stress sigma_xx at node 1 is {stressAtNodes_ele1[0]:.1f}')

# verification:
# tip vertical displacement (node 2 and 3) = 0.0075
# bottom extreme stress_xx (extrapolated) = 60000.0

exit()
48 changes: 48 additions & 0 deletions EXAMPLES/ExampleScripts/bending_quad9n.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
model Basic -ndm 2 -ndf 2

set thk 0.01
set L 5.0
set H 1.0

set P 100.
set E 200.e6
set nu 0.3

node 1 0. 0.
node 2 5. 0.
node 3 5. 1.
node 4 0. 1.
node 5 2.5 0.
node 6 5. .5
node 7 2.5 1.
node 8 0. .5
# node 9 2.5 .5; # comment for quad8n element

nDMaterial ElasticIsotropic 1 $E $nu

# element quad9n 1 1 2 3 4 5 6 7 8 9 $thk "PlaneStress" 1
element quad8n 1 1 2 3 4 5 6 7 8 $thk "PlaneStress" 1

fix 1 1 1
fix 4 1 0
fix 8 1 0

timeSeries Linear 1

pattern Plain 1 1 {
load 2 $P 0.
load 3 -$P 0.
}

analysis Static

analyze 1

print

# verification:
# tip vertical displacement (node 2 and 3) = 0.0075
# bottom Gauss Point stress_xx = 46475.8
# bottom extrem stress_xx (extrapolated) = 60000.0

exit
Loading

0 comments on commit d7b11d6

Please sign in to comment.