I am using this as the documentation states to import ops_vis: import openseespy.postprocessing.ops_vis as opsv
But I am getting an error: No module named 'openseespy.postprocessing.ops_vis'.
Has anyone had this issue?
Search found 12 matches
- Fri Apr 26, 2024 1:25 am
- Forum: OpenSeesPy
- Topic: Importing OP_vis
- Replies: 1
- Views: 309
- Fri Apr 26, 2024 1:22 am
- Forum: OpenSeesPy
- Topic: Importing Mesh from external software
- Replies: 1
- Views: 9760
Re: Importing Mesh from external software
gmsh2opensees is working on your system??
- Thu Nov 09, 2023 6:36 am
- Forum: OpenSeesPy
- Topic: Different Section.
- Replies: 0
- Views: 78410
Different Section.
I am trying to model a 2D concreate wall with different thickness and an arc with a different thickness.
I wanted to know if I inputted my section in this way below is the correct way:
# Concrete Wall
LWallsecTag = 3
SWallsecTag = 4
ArcsecTag = 5
# Dimensions of wall that will be made as a column
# large width
LcolWidth = 1.1*m
# smaller width
ScolWidth = 0.9*m
# Arc Width
ArcWidth = 0.55*m
colDepth = 2*m
cover = 4*cm
# Area of steel for bar phi 18 mm
As = math.pi*(18*mm)**2/4
# some variables derived from the parameters for column partitioning
y1 = colDepth / 2.0
z1 = LcolWidth / 2.0
op.section('Fiber', LWallsecTag)
# Create the concrete core fibers
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
op.patch('rect', CoreConcmatTag, 14, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
# Create the concrete cover fibers (top, bottom, left, right)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, z1 - cover, y1, z1)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, -z1, y1, cover - z1)
op.patch('rect', CoverConcmatTag, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
op.patch('rect', CoverConcmatTag, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)
# Create the reinforcing fibers (left, middle, right)
# layer('straight', matTag, numFiber, areaFiber, *start, *end)
op.layer('straight', SteelReinmatTag, 14, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
op.layer('straight', SteelReinmatTag, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
op.layer('straight', SteelReinmatTag, 14, As, cover - y1, z1 - cover, cover - y1, cover - z1)
# some variables derived from the parameters for column partitioning smaller wall
y1 = colDepth / 2.0
z1 = ScolWidth / 2.0
op.section('Fiber', SWallsecTag)
# Create the concrete core fibers
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
op.patch('rect', CoreConcmatTag, 14, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
# Create the concrete cover fibers (top, bottom, left, right)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, z1 - cover, y1, z1)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, -z1, y1, cover - z1)
op.patch('rect', CoverConcmatTag, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
op.patch('rect', CoverConcmatTag, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)
# Create the reinforcing fibers (left, middle, right)
# layer('straight', matTag, numFiber, areaFiber, *start, *end)
op.layer('straight', SteelReinmatTag, 14, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
op.layer('straight', SteelReinmatTag, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
op.layer('straight', SteelReinmatTag, 14, As, cover - y1, z1 - cover, cover - y1, cover - z1)
# some variables derived from the parameters for Arc
y1 = colDepth / 2.0
z1 = ArcWidth / 2.0
op.section('Fiber', ArcsecTag)
# Create the concrete core fibers
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
op.patch('rect', CoreConcmatTag, 14, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
# Create the concrete cover fibers (top, bottom, left, right)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, z1 - cover, y1, z1)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, -z1, y1, cover - z1)
op.patch('rect', CoverConcmatTag, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
op.patch('rect', CoverConcmatTag, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)
# Create the reinforcing fibers (left, middle, right)
# layer('straight', matTag, numFiber, areaFiber, *start, *end)
op.layer('straight', SteelReinmatTag, 14, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
op.layer('straight', SteelReinmatTag, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
op.layer('straight', SteelReinmatTag, 14, As, cover - y1, z1 - cover, cover - y1, cover - z1)
I wanted to know if I inputted my section in this way below is the correct way:
# Concrete Wall
LWallsecTag = 3
SWallsecTag = 4
ArcsecTag = 5
# Dimensions of wall that will be made as a column
# large width
LcolWidth = 1.1*m
# smaller width
ScolWidth = 0.9*m
# Arc Width
ArcWidth = 0.55*m
colDepth = 2*m
cover = 4*cm
# Area of steel for bar phi 18 mm
As = math.pi*(18*mm)**2/4
# some variables derived from the parameters for column partitioning
y1 = colDepth / 2.0
z1 = LcolWidth / 2.0
op.section('Fiber', LWallsecTag)
# Create the concrete core fibers
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
op.patch('rect', CoreConcmatTag, 14, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
# Create the concrete cover fibers (top, bottom, left, right)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, z1 - cover, y1, z1)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, -z1, y1, cover - z1)
op.patch('rect', CoverConcmatTag, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
op.patch('rect', CoverConcmatTag, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)
# Create the reinforcing fibers (left, middle, right)
# layer('straight', matTag, numFiber, areaFiber, *start, *end)
op.layer('straight', SteelReinmatTag, 14, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
op.layer('straight', SteelReinmatTag, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
op.layer('straight', SteelReinmatTag, 14, As, cover - y1, z1 - cover, cover - y1, cover - z1)
# some variables derived from the parameters for column partitioning smaller wall
y1 = colDepth / 2.0
z1 = ScolWidth / 2.0
op.section('Fiber', SWallsecTag)
# Create the concrete core fibers
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
op.patch('rect', CoreConcmatTag, 14, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
# Create the concrete cover fibers (top, bottom, left, right)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, z1 - cover, y1, z1)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, -z1, y1, cover - z1)
op.patch('rect', CoverConcmatTag, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
op.patch('rect', CoverConcmatTag, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)
# Create the reinforcing fibers (left, middle, right)
# layer('straight', matTag, numFiber, areaFiber, *start, *end)
op.layer('straight', SteelReinmatTag, 14, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
op.layer('straight', SteelReinmatTag, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
op.layer('straight', SteelReinmatTag, 14, As, cover - y1, z1 - cover, cover - y1, cover - z1)
# some variables derived from the parameters for Arc
y1 = colDepth / 2.0
z1 = ArcWidth / 2.0
op.section('Fiber', ArcsecTag)
# Create the concrete core fibers
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
op.patch('rect', CoreConcmatTag, 14, 1, cover - y1, cover - z1, y1 - cover, z1 - cover)
# patch('quad', matTag, numSubdivIJ, numSubdivJK, *crdsI, *crdsJ, *crdsK, *crdsL)
# Create the concrete cover fibers (top, bottom, left, right)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, z1 - cover, y1, z1)
op.patch('rect', CoverConcmatTag, 14, 1, -y1, -z1, y1, cover - z1)
op.patch('rect', CoverConcmatTag, 2, 1, -y1, cover - z1, cover - y1, z1 - cover)
op.patch('rect', CoverConcmatTag, 2, 1, y1 - cover, cover - z1, y1, z1 - cover)
# Create the reinforcing fibers (left, middle, right)
# layer('straight', matTag, numFiber, areaFiber, *start, *end)
op.layer('straight', SteelReinmatTag, 14, As, y1 - cover, z1 - cover, y1 - cover, cover - z1)
op.layer('straight', SteelReinmatTag, 2, As, 0.0, z1 - cover, 0.0, cover - z1)
op.layer('straight', SteelReinmatTag, 14, As, cover - y1, z1 - cover, cover - y1, cover - z1)
- Wed Nov 01, 2023 2:49 am
- Forum: OpenSeesPy
- Topic: Apply a triangular load on elements
- Replies: 4
- Views: 8044
Re: Apply a triangular load on elements
No, I am applying soil load concrete elements, and now shell elements (Trying to).
- Tue Oct 31, 2023 5:15 am
- Forum: OpenSeesPy
- Topic: Reinforced Concrete Shell Section
- Replies: 0
- Views: 77851
Reinforced Concrete Shell Section
Hello, I have been trying to implement a reinforced concrete shell similar to a 2d fibre element with patch. But, I am unable to find anything similar. Does anyone know how to implement it?
- Tue Oct 24, 2023 1:39 am
- Forum: OpenSeesPy
- Topic: Graphical User Interface
- Replies: 1
- Views: 6909
Graphical User Interface
Does anyone know if there is a GUI that works with Openseespy? or is just TCL. Such as Opensees Navigator
- Mon Oct 23, 2023 5:36 am
- Forum: OpenSeesPy
- Topic: Apply a triangular load on elements
- Replies: 4
- Views: 8044
Re: Apply a triangular load on elements
Thank you, much appreciated.
- Mon Oct 23, 2023 3:48 am
- Forum: OpenSeesPy
- Topic: Apply a triangular load on elements
- Replies: 4
- Views: 8044
Apply a triangular load on elements
I am building a structure on openseespy. Everything is in order, I have been able to apply a distributed load:
op.eleLoad('-ele', 1, '-type', '-beamUniform', -Wx, 0.0, 0.0).
I wanted to know how can I apply a Triangular distributed load. For example, Load experienced by soil.
op.eleLoad('-ele', 1, '-type', '-beamUniform', -Wx, 0.0, 0.0).
I wanted to know how can I apply a Triangular distributed load. For example, Load experienced by soil.
- Mon Oct 16, 2023 2:12 am
- Forum: OpenSeesPy
- Topic: could not invert flexibility for element with tag: 151
- Replies: 5
- Views: 9498
Re: could not invert flexibility for element with tag: 151
I changed it with this but i am getting error from the section:
Es = 200000.0
v=0.2
Gs = Es/(1+v)
WA = 0.0361
J = 2.0*10**-6
Iy = 0.00000041998
Iz = 0.00000041998
ops.section('Elastic', beamSecTag1, Es, WA, Iz, Iy,Gs, J)
Is there something I am missing?
- Mon Oct 16, 2023 1:40 am
- Forum: OpenSeesPy
- Topic: could not invert flexibility for element with tag: 151
- Replies: 5
- Views: 9498
Re: could not invert flexibility for element with tag: 151
Regarding VFO, It just worked flawlessly, I just did pip install and it worked.
- Fri Oct 13, 2023 7:21 am
- Forum: OpenSeesPy
- Topic: could not invert flexibility for element with tag: 151
- Replies: 5
- Views: 9498
could not invert flexibility for element with tag: 151
I keep getting this issue and I am unable to solve it.
Please note I have 2 files 1 is called Main_Analysis.py which calls the functions from Model_Functions.py
-------------------------------- Start Main_Analysis.py------------------------------------------
import openseespy.opensees as ops
from Model_Function import *
# ---------------
# Input Variables
# ---------------
ESteel = 200000.0 # Young's Modulus (MPa)
Steel_Tag = 1
# ---------------
# Run Analysis
# ---------------
shellSecTag,beamSecTag1 = GetSections(Steel_Tag,ESteel)
mid, side1, side2 = GetModel(shellSecTag,beamSecTag1)
#GetRecorders()
loads(mid, side1, side2)
RunAnalysis()
-------------------------------- End Main_Analysis.py------------------------------------------
-------------------------------- Start Model_Functions.py------------------------------------------
import numpy as np
import openseespy.opensees as ops
import vfo.vfo as vfo
import math
# ---------------
# Opensees Anaylsis
# ---------------
def GetSections(SMat_Tag,E):
# Remove existing model
ops.wipe()
# Set the default units to metric units
ops.defaultUnits("-force", "N", "-length", "m", "-time", "sec", "-temp", "C")
####################
# Section Tags
####################
shellSecTag = 1
beamSecTag1 = 2
####################
### Steel02 Material
####################
matConnAx=2;
matConnRot=3;
Fy = 420; # Yield stress
Es = E; # Modulus of Elasticity of Steel
v=0.2; # Poisson's ratio
Gs=Es/(1+v); # Shear modulus
b=0.10; # Strain hardening ratio
params=[18.0,0.925,0.15] # R0,cR1,cR2
R0=18.0
cR1=0.925
cR2=0.15
a1=0.05
a2=1.00
a3=0.05
a4=1.0
sigInit=0.0
alpha=0.05
# uniaxialMaterial('Steel02', matTag, Fy, E0, b, *params, a1=a2*Fy/E0, a2=1.0, a3=a4*Fy/E0, a4=1.0, sigInit=0.0)
ops.uniaxialMaterial('Steel02', SMat_Tag, Fy, Es, b, R0, cR1, cR2, a1, a2, a3, a4, sigInit)
#######################
### Concrete02 Material
#######################
####################
# Beam Sections
####################
# section('WFSection2d', secTag, matTag, d, tw, bf, tf, Nfw, Nff)
ops.section('WFSection2d', beamSecTag1, SMat_Tag, 8.2, 0.40, 8.01, 0.650, 15, 15)
####################
# Shell Sections
####################
# secTag E nu h rho
ops.section("ElasticMembranePlateSection", shellSecTag, 3.0E3, 0.25, 1.175, 1.27)
# set modelbuilder
ops.model("BasicBuilder", "-ndm",3, "-ndf",6)
return shellSecTag,beamSecTag1
def GetModel(shellSecTag,beamSecTag1):
A = 169.0
# Define geometry
# ---------------
# these should both be even
# For Walls & arc
nx = 10
ny = 4
fnstep = (nx+1)*(ny+1)
snwall2 = (nx+1)*(ny+1) + 1
snarc = 2*(nx+1)*(ny+1) + 1
fnx = 3*(nx+1)*(ny+1)
# loaded nodes
mid = int(((nx+1)*(ny+1) + 1)/2)
side1 = int((nx+2)/2)
side2 = int((nx+1)*(ny+1) - side1 + 1)
# generate the nodes and elements
# numX numY startNode startEle eleType eleArgs? coords?
# Wall 1
ops.block2D(nx, ny, 1, 1,
"ShellMITC4", 1,
1, 0.0, 0.0, 0.0,
2, 0.0, 0.0, 7.0,
3, 40.0, 0.0, 7.0,
4, 40.0, 0.0, 0.0)
# Wall 2
ops.block2D(nx, ny, snwall2, snwall2,
"ShellMITC4", 1,
1, 0.0, 17.1, 0.0,
2, 0.0, 17.1, 7.0,
3, 40.0, 17.1, 7.0,
4, 40.0, 17.1, 0.0)
# Arc
ops.block2D(nx, ny, snarc, snarc,
"ShellMITC4", 1,
1, 0.0, 0.0, 7.0,
2, 0.0, 17.1, 7.0,
3, 40.0, 17.1, 7.0,
4, 40.0, 0.0, 7.0,
5, 0.0, 8.55, 10.275,
7, 40.0, 8.55, 10.275,
9, 20.0, 8.55, 10.275)
# Add Beam Elemet
# Define the beam element
# geomTransf('Linear', transfTag, *vecxz, '-jntOffset', *dI, *dJ)
ops.geomTransf('Linear', 1, 0, 0, 1)
ops.beamIntegration('Lobatto', 1, beamSecTag1, 4)
# element('forceBeamColumn', eleTag, *eleNodes, transfTag, integrationTag,'-mass', mass=0.0)
ops.element('forceBeamColumn', 151, 11, 66, 1, 1, '-iter', 10, 1e-12, '-mass', 0.0, '-L', 17.1)
# Truss
# element('Truss', eleTag, *eleNodes, A, matTag)
#ops.element('Truss', 151, 11, 66, A, 1)
# Connect Arc with Walls
# Connect Wall 1 with Arc
cwall1 = snarc
for i in range(nx + 1, snwall2, nx + 1):
ops.equalDOF(i, cwall1, 1, 2, 3, 4, 5, 6)
cwall1 += nx + 1
# Connect Wall 2 with Arc
cwall2 = snarc + nx
for i in range(snwall2 + nx, snarc, nx + 1):
ops.equalDOF(i, cwall2, 1, 2, 3, 4, 5, 6)
cwall2 += nx + 1
# define the boundary conditions
ops.fixZ( 0.0, 1, 1, 1, 1, 1, 1)
# mass??
ops.mass(20, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0)
return mid, side1, side2
def GetRecorders():
# Record Results
# op.recorder('Node', '-file', filename, '-xml', filename, '-binary', filename, '-tcp', inetAddress, port, '-precision', nSD=6, '-timeSeries', tsTag, '-time', '-dT', deltaT=0.0, '-closeOnWrite', '-node', *nodeTags=[], '-nodeRange', startNode, endNode, '-region', regionTag, '-dof', *dofs=[], respType)
ops.recorder('Node', '-file', "NodeDisp.out",'-time','-node', 94, '-dof', 1, 2, 3, 'disp')
# ops.recorder('Node', '-file', "Reaction.out",'-time','-node', 1, '-dof', 1, 2, 3, 'reaction')
# ops.recorder('Element', '-file', "Elements.out",'-time','-ele', 1, 'forces')
def loads(mid, side1, side2):
# ------------------------
# Loads
# ------------------------
# create a Linear time series
ops.timeSeries("Linear", 1)
# add some loads
ops.pattern("Plain", 1, 1, "-fact", 1.0)
ops.load(mid , 0.0, -5.0, 0.0, 0.0, 0.0, 0.0)
ops.load(side1, 0.0, -0.25, 0.0, 0.0, 0.0, 0.0)
ops.load(side2, 0.0, -0.25, 0.0, 0.0, 0.0, 0.0)
# ops.load(45, 0.0, 0.0, -0.25, 0.0, 0.0, 0.0)
def RunAnalysis():
# Create Visual data for model
ModelName = '3D_Shell'
LoadCaseName = 'Static'
vfo.createODB(ModelName, LoadCaseName, Nmodes = 3)
LoadCaseName2 = 'Static'
vfo.createODB(ModelName, LoadCaseName2, deltaT = 1/24, Nmodes = 3)
# ------------------------
# Start of static analysis
# ------------------------
# Load control with variable load steps
# create integrator
# init Jd min max
ops.integrator("LoadControl", 1.0)
ops.test('NormDispIncr',1.0e-4,200)
# create algorithm
ops.algorithm("Newton")
# create DOF number
ops.numberer("RCM")
# create constraint handler
ops.constraints("Plain")
# create SOE
ops.system("BandGeneral")
# create analysis object
ops.analysis("Static")
# perform the analysis
ops.analyze(1)
vfo.plot_model(ModelName,show_nodetags="yes",show_eletags="yes")
#vfo.plot_modeshape(modenumber=2, scale=200)
vfo.plot_deformedshape(ModelName, LoadCaseName, scale = 50, tstep= .5, overlap='yes')
ops.wipe()
-------------------------------- End Model_Functions.py------------------------------------------
Please note I have 2 files 1 is called Main_Analysis.py which calls the functions from Model_Functions.py
-------------------------------- Start Main_Analysis.py------------------------------------------
import openseespy.opensees as ops
from Model_Function import *
# ---------------
# Input Variables
# ---------------
ESteel = 200000.0 # Young's Modulus (MPa)
Steel_Tag = 1
# ---------------
# Run Analysis
# ---------------
shellSecTag,beamSecTag1 = GetSections(Steel_Tag,ESteel)
mid, side1, side2 = GetModel(shellSecTag,beamSecTag1)
#GetRecorders()
loads(mid, side1, side2)
RunAnalysis()
-------------------------------- End Main_Analysis.py------------------------------------------
-------------------------------- Start Model_Functions.py------------------------------------------
import numpy as np
import openseespy.opensees as ops
import vfo.vfo as vfo
import math
# ---------------
# Opensees Anaylsis
# ---------------
def GetSections(SMat_Tag,E):
# Remove existing model
ops.wipe()
# Set the default units to metric units
ops.defaultUnits("-force", "N", "-length", "m", "-time", "sec", "-temp", "C")
####################
# Section Tags
####################
shellSecTag = 1
beamSecTag1 = 2
####################
### Steel02 Material
####################
matConnAx=2;
matConnRot=3;
Fy = 420; # Yield stress
Es = E; # Modulus of Elasticity of Steel
v=0.2; # Poisson's ratio
Gs=Es/(1+v); # Shear modulus
b=0.10; # Strain hardening ratio
params=[18.0,0.925,0.15] # R0,cR1,cR2
R0=18.0
cR1=0.925
cR2=0.15
a1=0.05
a2=1.00
a3=0.05
a4=1.0
sigInit=0.0
alpha=0.05
# uniaxialMaterial('Steel02', matTag, Fy, E0, b, *params, a1=a2*Fy/E0, a2=1.0, a3=a4*Fy/E0, a4=1.0, sigInit=0.0)
ops.uniaxialMaterial('Steel02', SMat_Tag, Fy, Es, b, R0, cR1, cR2, a1, a2, a3, a4, sigInit)
#######################
### Concrete02 Material
#######################
####################
# Beam Sections
####################
# section('WFSection2d', secTag, matTag, d, tw, bf, tf, Nfw, Nff)
ops.section('WFSection2d', beamSecTag1, SMat_Tag, 8.2, 0.40, 8.01, 0.650, 15, 15)
####################
# Shell Sections
####################
# secTag E nu h rho
ops.section("ElasticMembranePlateSection", shellSecTag, 3.0E3, 0.25, 1.175, 1.27)
# set modelbuilder
ops.model("BasicBuilder", "-ndm",3, "-ndf",6)
return shellSecTag,beamSecTag1
def GetModel(shellSecTag,beamSecTag1):
A = 169.0
# Define geometry
# ---------------
# these should both be even
# For Walls & arc
nx = 10
ny = 4
fnstep = (nx+1)*(ny+1)
snwall2 = (nx+1)*(ny+1) + 1
snarc = 2*(nx+1)*(ny+1) + 1
fnx = 3*(nx+1)*(ny+1)
# loaded nodes
mid = int(((nx+1)*(ny+1) + 1)/2)
side1 = int((nx+2)/2)
side2 = int((nx+1)*(ny+1) - side1 + 1)
# generate the nodes and elements
# numX numY startNode startEle eleType eleArgs? coords?
# Wall 1
ops.block2D(nx, ny, 1, 1,
"ShellMITC4", 1,
1, 0.0, 0.0, 0.0,
2, 0.0, 0.0, 7.0,
3, 40.0, 0.0, 7.0,
4, 40.0, 0.0, 0.0)
# Wall 2
ops.block2D(nx, ny, snwall2, snwall2,
"ShellMITC4", 1,
1, 0.0, 17.1, 0.0,
2, 0.0, 17.1, 7.0,
3, 40.0, 17.1, 7.0,
4, 40.0, 17.1, 0.0)
# Arc
ops.block2D(nx, ny, snarc, snarc,
"ShellMITC4", 1,
1, 0.0, 0.0, 7.0,
2, 0.0, 17.1, 7.0,
3, 40.0, 17.1, 7.0,
4, 40.0, 0.0, 7.0,
5, 0.0, 8.55, 10.275,
7, 40.0, 8.55, 10.275,
9, 20.0, 8.55, 10.275)
# Add Beam Elemet
# Define the beam element
# geomTransf('Linear', transfTag, *vecxz, '-jntOffset', *dI, *dJ)
ops.geomTransf('Linear', 1, 0, 0, 1)
ops.beamIntegration('Lobatto', 1, beamSecTag1, 4)
# element('forceBeamColumn', eleTag, *eleNodes, transfTag, integrationTag,'-mass', mass=0.0)
ops.element('forceBeamColumn', 151, 11, 66, 1, 1, '-iter', 10, 1e-12, '-mass', 0.0, '-L', 17.1)
# Truss
# element('Truss', eleTag, *eleNodes, A, matTag)
#ops.element('Truss', 151, 11, 66, A, 1)
# Connect Arc with Walls
# Connect Wall 1 with Arc
cwall1 = snarc
for i in range(nx + 1, snwall2, nx + 1):
ops.equalDOF(i, cwall1, 1, 2, 3, 4, 5, 6)
cwall1 += nx + 1
# Connect Wall 2 with Arc
cwall2 = snarc + nx
for i in range(snwall2 + nx, snarc, nx + 1):
ops.equalDOF(i, cwall2, 1, 2, 3, 4, 5, 6)
cwall2 += nx + 1
# define the boundary conditions
ops.fixZ( 0.0, 1, 1, 1, 1, 1, 1)
# mass??
ops.mass(20, 0.0, 0.0, 10.0, 0.0, 0.0, 0.0)
return mid, side1, side2
def GetRecorders():
# Record Results
# op.recorder('Node', '-file', filename, '-xml', filename, '-binary', filename, '-tcp', inetAddress, port, '-precision', nSD=6, '-timeSeries', tsTag, '-time', '-dT', deltaT=0.0, '-closeOnWrite', '-node', *nodeTags=[], '-nodeRange', startNode, endNode, '-region', regionTag, '-dof', *dofs=[], respType)
ops.recorder('Node', '-file', "NodeDisp.out",'-time','-node', 94, '-dof', 1, 2, 3, 'disp')
# ops.recorder('Node', '-file', "Reaction.out",'-time','-node', 1, '-dof', 1, 2, 3, 'reaction')
# ops.recorder('Element', '-file', "Elements.out",'-time','-ele', 1, 'forces')
def loads(mid, side1, side2):
# ------------------------
# Loads
# ------------------------
# create a Linear time series
ops.timeSeries("Linear", 1)
# add some loads
ops.pattern("Plain", 1, 1, "-fact", 1.0)
ops.load(mid , 0.0, -5.0, 0.0, 0.0, 0.0, 0.0)
ops.load(side1, 0.0, -0.25, 0.0, 0.0, 0.0, 0.0)
ops.load(side2, 0.0, -0.25, 0.0, 0.0, 0.0, 0.0)
# ops.load(45, 0.0, 0.0, -0.25, 0.0, 0.0, 0.0)
def RunAnalysis():
# Create Visual data for model
ModelName = '3D_Shell'
LoadCaseName = 'Static'
vfo.createODB(ModelName, LoadCaseName, Nmodes = 3)
LoadCaseName2 = 'Static'
vfo.createODB(ModelName, LoadCaseName2, deltaT = 1/24, Nmodes = 3)
# ------------------------
# Start of static analysis
# ------------------------
# Load control with variable load steps
# create integrator
# init Jd min max
ops.integrator("LoadControl", 1.0)
ops.test('NormDispIncr',1.0e-4,200)
# create algorithm
ops.algorithm("Newton")
# create DOF number
ops.numberer("RCM")
# create constraint handler
ops.constraints("Plain")
# create SOE
ops.system("BandGeneral")
# create analysis object
ops.analysis("Static")
# perform the analysis
ops.analyze(1)
vfo.plot_model(ModelName,show_nodetags="yes",show_eletags="yes")
#vfo.plot_modeshape(modenumber=2, scale=200)
vfo.plot_deformedshape(ModelName, LoadCaseName, scale = 50, tstep= .5, overlap='yes')
ops.wipe()
-------------------------------- End Model_Functions.py------------------------------------------
- Fri Oct 13, 2023 7:13 am
- Forum: OpenSeesPy
- Topic: Error with ForceBeamColumn3d
- Replies: 1
- Views: 13994
Re: Error with ForceBeamColumn3d
Where you able to solve the problem?