Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/OpenSees/OpenSees
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Sep 22, 2020
2 parents 7c603ae + b5db714 commit 94234d5
Show file tree
Hide file tree
Showing 79 changed files with 15,599 additions and 810 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
11 changes: 9 additions & 2 deletions SCRIPTS/toOpenSeesPy.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ def toOpenSeesPy(infile, outfile):
secTag = info[6]
eleTag = info[2]
Np = info[5]
Np = 3
outfile.write('ops.beamIntegration(\'Legendre\',%s,%s,%s)\n' % (eleTag,secTag,Np))
if info[1] == 'dispBeamColumn':
outfile.write('ops.beamIntegration(\'Legendre\',%s,%s,%s)\n' % (eleTag,secTag,Np))
if info[1] == 'forceBeamColumn':
outfile.write('ops.beamIntegration(\'Lobatto\',%s,%s,%s)\n' % (eleTag,secTag,Np))
outfile.write('ops.element(\'%s\',%s,%s,%s,%s,%s)\n' % (info[1],eleTag,info[3],info[4],info[7],eleTag))
continue

Expand All @@ -100,6 +102,11 @@ def toOpenSeesPy(infile, outfile):
if info[i] == '}':
writeClose = False
break
if info[0] == 'recorder':
# If it's a recorder, make everything immediately after material, section, or fiber a string
if info[i-1] in ['material','section','fiber'] and isfloat(info[i]):
outfile.write(',str(%s)' % info[i])
continue
if isfloat(info[i]):
outfile.write(',%s' % info[i])
else:
Expand Down
5 changes: 5 additions & 0 deletions SRC/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ REMO_LIBS = $(FE)/element/nonlinearBeamColumn/matrixutil/MatrixUtil.o \
$(FE)/element/forceBeamColumn/ForceBeamColumnCBDI2d.o \
$(FE)/element/forceBeamColumn/ForceBeamColumnWarping2d.o \
$(FE)/element/forceBeamColumn/ForceBeamColumn3d.o \
$(FE)/element/forceBeamColumn/ForceBeamColumnCBDI3d.o \
$(FE)/element/forceBeamColumn/ElasticForceBeamColumn2d.o \
$(FE)/element/forceBeamColumn/ElasticForceBeamColumnWarping2d.o \
$(FE)/element/forceBeamColumn/ElasticForceBeamColumn3d.o \
Expand Down Expand Up @@ -536,6 +537,9 @@ ELE_LIBS = $(FE)/element/Element.o \
$(FE)/element/fourNodeQuad/EnhancedQuad.o \
$(FE)/element/componentElement/ComponentElement2d.o \
$(FE)/element/fourNodeQuad/NineNodeMixedQuad.o \
$(FE)/element/fourNodeQuad/NineNodeQuad.o \
$(FE)/element/fourNodeQuad/EightNodeQuad.o \
$(FE)/element/fourNodeQuad/SixNodeTri.o \
$(FE)/element/shell/ShellMITC4.o \
$(FE)/element/shell/ShellMITC4Thermal.o \
$(FE)/element/shell/ShellMITC9.o \
Expand Down Expand Up @@ -800,6 +804,7 @@ MATERIAL_LIBS = $(FE)/material/Material.o \
$(FE)/material/uniaxial/TDConcreteMC10NL.o \
$(FE)/material/uniaxial/TDConcreteMC10NL.o \
$(FE)/material/uniaxial/DegradingPinchedBW.o \
$(FE)/material/uniaxial/SLModel.o \
$(FE)/material/uniaxial/MaterialState.o \
$(FE)/material/uniaxial/backbone/HystereticBackbone.o \
$(FE)/material/uniaxial/backbone/ArctangentBackbone.o \
Expand Down
8 changes: 8 additions & 0 deletions SRC/actor/objectBroker/FEM_ObjectBrokerAllClasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@
#include "fourNodeQuad/FourNodeQuad.h"
#include "fourNodeQuad/EnhancedQuad.h"
#include "fourNodeQuad/NineNodeMixedQuad.h"
#include "fourNodeQuad/NineNodeQuad.h"
#include "fourNodeQuad/EightNodeQuad.h"
#include "fourNodeQuad/ConstantPressureVolumeQuad.h"
#include "elasticBeamColumn/ElasticBeam2d.h"
#include "elasticBeamColumn/ElasticBeam3d.h"
Expand Down Expand Up @@ -699,6 +701,12 @@ FEM_ObjectBrokerAllClasses::getNewElement(int classTag)
case ELE_TAG_NineNodeMixedQuad:
return new NineNodeMixedQuad();

case ELE_TAG_NineNodeQuad:
return new NineNodeQuad();

case ELE_TAG_EightNodeQuad:
return new EightNodeQuad();

case ELE_TAG_ConstantPressureVolumeQuad:
return new ConstantPressureVolumeQuad();

Expand Down
6 changes: 6 additions & 0 deletions SRC/classTags.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@
#define MAT_TAG_ElasticPowerFunc 102
#define MAT_TAG_UVCuniaxial 103
#define MAT_TAG_IMKBilin 104
#define MAT_TAG_IMKPeakOriented 105
#define MAT_TAG_IMKPinching 106
#define MAT_TAG_SLModel 107
#define MAT_TAG_PySimple1 205
#define MAT_TAG_TzSimple1 206
#define MAT_TAG_QzSimple1 207
Expand Down Expand Up @@ -761,6 +764,9 @@
#define ELE_TAG_ASDShellT3 204 // Massimo Petracca (ASDEA)
#define ELE_TAG_WheelRail 205
#define ELE_TAG_DispBeamColumn3dID 206 // Jose Abell the Chileno added
#define ELE_TAG_NineNodeQuad 207
#define ELE_TAG_EightNodeQuad 208
#define ELE_TAG_SixNodeTri 209
#define ELE_TAG_ExternalElement 99990


Expand Down
18 changes: 18 additions & 0 deletions SRC/coordTransformation/LinearCrdTransf2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1553,3 +1553,21 @@ LinearCrdTransf2d::getBasicDisplSensitivity(int gradNumber, int flag)

return ub;
}

int
LinearCrdTransf2d::getLocalAxes(Vector &xAxis, Vector &yAxis, Vector &zAxis)
{
xAxis(0) = cosTheta;
xAxis(1) = sinTheta;
xAxis(2) = 0;

yAxis(0) = -sinTheta;
yAxis(1) = cosTheta;
yAxis(2) = 0;

zAxis(0) = 0.0;
zAxis(1) = 0.0;
zAxis(2) = 1.0;

return 0;
}
2 changes: 2 additions & 0 deletions SRC/coordTransformation/LinearCrdTransf2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ class LinearCrdTransf2d: public CrdTransf
// methods used in post-processing only
const Vector &getPointGlobalCoordFromLocal(const Vector &localCoords);
const Vector &getPointGlobalDisplFromBasic(double xi, const Vector &basicDisps);

int getLocalAxes(Vector &xAxis, Vector &yAxis, Vector &zAxis);

private:
int computeElemtLengthAndOrient(void);
Expand Down
18 changes: 18 additions & 0 deletions SRC/coordTransformation/PDeltaCrdTransf2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,3 +1235,21 @@ PDeltaCrdTransf2d::Print(OPS_Stream &s, int flag)
s << "}";
}
}

int
PDeltaCrdTransf2d::getLocalAxes(Vector &xAxis, Vector &yAxis, Vector &zAxis)
{
xAxis(0) = cosTheta;
xAxis(1) = sinTheta;
xAxis(2) = 0;

yAxis(0) = -sinTheta;
yAxis(1) = cosTheta;
yAxis(2) = 0;

zAxis(0) = 0.0;
zAxis(1) = 0.0;
zAxis(2) = 1.0;

return 0;
}
2 changes: 2 additions & 0 deletions SRC/coordTransformation/PDeltaCrdTransf2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class PDeltaCrdTransf2d: public CrdTransf
// methods used in post-processing only
const Vector &getPointGlobalCoordFromLocal(const Vector &localCoords);
const Vector &getPointGlobalDisplFromBasic(double xi, const Vector &basicDisps);

int getLocalAxes(Vector &xAxis, Vector &yAxis, Vector &zAxis);

private:
int computeElemtLengthAndOrient(void);
Expand Down
Loading

0 comments on commit 94234d5

Please sign in to comment.