Coder Social home page Coder Social logo

openseespydoc's Introduction

OpenSeesPy Documentation

OpenSeesPy is a Python 3 interpreter of OpenSees.

The documentation records all Python commands and some examples for how to use OpenSeesPy, and can be viewed at here.

Any modeling issues and bugs in should be reported on the OpenSeesPy Forum.

openseespydoc's People

Contributors

amirhosseinnamadchi avatar bigeconomy avatar cslotboom avatar dborello avatar ebrahimraeyat avatar frqc avatar gaaraujo avatar gtorrisi77 avatar harshmistry96 avatar jchatkinson avatar jfayaz avatar juanrengifo9314 avatar kkolozvari avatar mbbatukan avatar mgrubisic avatar mhscott avatar millen1m avatar ntosic87 avatar otaithleigh avatar qizhanggithub avatar s-m-amin-ghasemi avatar sewkokot avatar shishitao avatar sumeetsinha avatar u-anurag avatar zhuminjie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openseespydoc's Issues

PVD recorder fails when using relative path

Not a serious bug though. When running recorder('PVD', "../log/pvd_result") it fails due to the path concating:
WARNING: Failed to open file ../log/pvd_result/../log/pvd_result_T1.0000000000e+00_P0.vtu

Shouldn't be on the first priority since there are ways to work around.
Thanks

reliability analysis

How can you call the commands for reliability analysis like performance funtion in python
and I would like to know if it's necessary the comand sensitivityIntegrator command for sensitivity analisis due to I can't find it.

Opensees.py website bug

Dr. Zhu-
I've encountered a small bug with the opensees.py website where whenever searching for a command (in this example I searched for the layer command) the command will display twice and the first result will issue an error page, while the second will show the actual page for the command. I've attached some screenshots below:

Thank you,
-Amedeo

search
dne

Running Dam Break Example for OpenSeesPy

Good afternoon,

I recently attempted to use OpenSeesPy for fluid structures interactions using the installation procedure suggested on the OpenSeesPy Wiki. I tried the dam-break problem, however, the code works okay until the analysis portion and the analyze function kicks back a "-1". All of the other OpenSeesPy examples seem to work (except for the Elastic obstacle in a dam-break).

Thank you for any help you can give.

ZeroLengthSection Element errors

Dr. Zhu,
I was attempting to implement the ZeroLengthSection element into a code, however I was unable to get it to work. I have written a simple code which attempts to implement it in a lateral load analysis, however I get the error that the “-factorization failed, matrix singular U(i,i) = 0, i= 7”

Additionally, on the openseespy website the command structure is as follows:
element('zeroLengthSection', eleTag, *eleNodes, secTag[, '-orient', *vecx, *vecyp][, '-doRayleigh', rFlag])
however I think some of the commas are misplaced and it should be:
element('zeroLengthSection', eleTag, *eleNodes, secTag, [ '-orient', *vecx, *vecyp], [ '-doRayleigh', rFlag])
where the commas are outside the brackets. (similarly for elasticbeamcolumn and other element types)

Thank you,
Amedeo Hirata

ZLS test.zip

FSI

Hi all,
I run this code but it has no output and error.
Any help would be greatly appreciated!

Many thanks

import sys
sys.path.append('G:\install\Anaconda\Lib\site-packages\openseespy')
from opensees import *

import numpy as np
import matplotlib.pyplot as plt

------------------------------

Start of model generation

-----------------------------

remove existing model

wipe()

set modelbuilder

model('basic', '-ndm', 2, '-ndf', 3)

geometric

L = 0.15
H = 0.08
H2 = 0.1
h = 0.0025
alpha = 1.2
tw = 3*h

material

rho = 1000.0
mu = 0.0001
b1 = 0.0
b2 = -9.81
thk = 0.012
kappa = -1.0

rhos = 2500.0
A = thkthk
E = 1e6
Iz = thk
thkthkthk/12.0
#b = 0.012
bmass = A20H/3*rhos

time steps

dtmax = 1e-3
dtmin = 1e-6
totaltime = 1.0

filename

filename = 'dambreak'

recorder

recorder('PVD', filename, 'disp', 'vel', 'pressure')

nodes

node(1, 0.0, 0.0)
node(2, L, 0.0)
node(3, L, H)
node(4, L, H2)
node(5, 0.0, H2)
node(6, -tw, H2)
node(7, -tw,-tw)
node(8, L, -tw)
node(9, 0.0, H)

transformation

transfTag = 1
geomTransf('Corotational', transfTag)

section

secTag = 1
section( 'Elastic', secTag, E, A, Iz)

beam integration

inteTag = 1
numpts = 2
beamIntegration( 'Legendre', inteTag, secTag, numpts)

beam mesh

beam = 8
id = 1
ndf = 3
mesh('line', beam, 3, 2,3,4, id, ndf, h, 'dispBeamColumn', transfTag, inteTag)

fluid mesh

ndf = 2
id = -1
mesh('line', 1, 6, 2,8,7,6,5,9, id, ndf, h)
mesh('line', 2, 2, 1,2, id, ndf, h)
mesh('line', 3, 2, 2,3, id, ndf, h)
mesh('line', 4, 2, 3,9, id, ndf, h)
mesh('line', 5, 2, 3,4, id, ndf, h)
mesh('line', 6, 2, 1,9, id, ndf, h)

fluid = 7
ndf = 2
id = -1
eleArgs = ['PFEMElementBubble',rho,mu,b1,b2,thk,kappa]
mesh('tri', fluid, 4, 6,4,2,3, id, ndf, h, *eleArgs)

transformation

#transfTag = 1
#geomTransf('Corotational', transfTag)

wall mesh

wall = 9
id = 1
ndf= 2
mesh('tri', wall, 3, 1,2,6, id, ndf, h)

for nd in getNodeTags('-mesh', wall):
fix(nd, 1,1,1)

save the original modal

record()

create constraint object

constraints('Plain')

create numberer object

numberer('Plain')

create convergence test object

test('PFEM', 1e-5, 1e-5, 1e-5, 1e-5, 1e-15, 1e-15, 100, 3, 1, 2)

create algorithm object

algorithm('Newton')

create integrator object

integrator('PFEM')

create SOE object

system('PFEM')

create analysis object

analysis('PFEM', dtmax, dtmin, b2)

analysis

while getTime() < totaltime:

# analysis
if analyze() < 0:
    break

remesh(alpha)

printA is not working

When I add printA() at the bottom of this example script, nothing happens regardless using '-file' option.

I'm not sure I used it in the right way. Is this a bug or could you illustrate the correct usage of this command in openseespy document? Thank you!

How to select element and material

Dear Dr. Zhu,
I am trying to simulate a stay-cable using OpenSeesPy, but i am not sure what element and materials are suitable for it.

Could you please provide some suggestions as to what should I do?
Thanks a lot for your time!

Load with displacements

Is it possible to load a structure in opensees with displacements instead of loads?
for example I would like to give settlements in the bases of the columns of a structure, to carry out an analysis of the affectations of differential settlements to the structure.

Openseespy and Matlab

Hi,
I would like to link MATLAB to OpenSeespy. Please help me how to do this?

Thanks,

The way to construct as truss element is confused

The fifth param in the element('Truss', eleTag, *eleNodes, A, matTag[, '-rho', rho][, '-cMass', cFlag][, '-doRayleigh', rFlag]) is matTag or secTag, but if matTag and secTag has a same identifier, it will be confused. Will the fifth param be set into a keyword?

Node Recorder Command

Dear Dr Zhu,

How are you? I am trying to use the Node Recorder Command, a file was created but the response was not recorded in the file, can you please have a look, is there an error with the command?

Thank you.

(Linux) OpenSeesPy Import Error: Invalid ELF Header

I am trying to setup OpenSeesPy on Linux Mint 18.3 Xfce 64-bit system with Python3.6.5. When I try to run the example "ElasticTruss.py", it gives me error

File` "ElasticTruss.py", line 3, in <module> from opensees import * ImportError: /home/anurag/OpenSeesPy/opensees.so: invalid ELF header

I repeated the installation procedure but still got the same error. Does anyone know about this issue?

screenshot_openseespy

setParameter command

Hi, can you help with calling the setParameter command - I can't find reference to it for controlling the frictional behavior of the contact elements? See docs 1.2.64 note 2.5. Apologies if I have overlooked anything. Many thanks.

FSI

Hello,

I have one problem with the cantilever beam that you modeled in your paper:
"Direct Differentiation of the Particle Finite-Element Method for Fluid–Structure Interaction"
My question is related the part of beam. This part is a part of boundary of fluid and structure at the same time. how to define this part? if my question is not clear, I attached some figures and sent an email.

Thanks

Section DOF for sectionForce

When I'm using sectionForce, I notice that the force is return at given dof of section, which nowhere can I find its definition.

I'm using a system with ndf=6 and sections are created with fiber section to simulate a W or a box sections. I am expecting the dof of section to be 1 to 6, but the script fails when section dof is more than 4.

To get the expected result (axial force, two shear forces, two moments and one torsion), how to define the section and how to use sectionForce correctly? And what's the meaning of the returned values considering its order?

Thanks!

Moment Curvature Recorder Example

Hi,
I am found discrepancy between opensees and openseespy examples regarding recorder. Opensees recorder recorder Node -file section$secTag.out -time -node 2 -dof 3 disp return moment and corresponding curvature into the output file.

image
Whereas openseespy recorder recorder('Node', '-file', "M-C/section1.txt", '-closeOnWrite', '-node', 2, '-dof',3, 'disp') does not return moment into the output file.

image

I wonder has anybody experience the same discrepancy.

Best regards from Istanbul.

SEYHAN

openseespy not running in centos linux

I have been using openeespy in my linux system (Fedora OS) and it is running fine. Presently I am trying to use openseespy in our campus central server machine which is having Centos OS. I tried running openseespy there, but it is failing with some errors.
Initial error was :
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found

I solved this by installing glibc-2.14 and then i ran. But it is showing the following error :
ImportError: /usr/lib64/libgfortran.so.3: version `GFORTRAN_1.4' not found

Our campus central server personnel told that this opensees.so file is not compatible with the architecture of the server. I am more interested in running openseespy in this server as it is having many cores and more cpu memory allowing me to run many openseespy executables for performing many analysis cases simultaneously saving a huge amount of time.
Since the opensees.so file is not compatible with this server, could you kindly provide an opensees.so file compatible with Centos OS.

Hoping for your kind help and time in this regard.

Thank You.

Regards

Nithin V.L
PhD Structural Engineering
IIT Guwahati
India

Module Not Found Error

Dear Dr. Zhu,
When I tried to import the openseespy package using the following code:

`import sys
sys.path.append('E:\OpenseesFile\openseespy\win') #this is my directory

import numpy as np

import matplotlib.pyplot as plt

from opensees import *`

I got the following error:

`ModuleNotFoundError Traceback (most recent call last)
in ()
7 import matplotlib.pyplot as plt
8
----> 9 from opensees import *

ModuleNotFoundError: No module named 'opensees'`

I also tried "pip install openseespy" and "import openseespy.opensees as ops", but it did't make much difference: it still couldn't find "opensees".

I am using Win10 (x64)+ Anaconda 3.5.3.1. My Python version is 3.7.0. I have ActiveTcl 8.5.18.0 installed and the Opensees binary works fine.

Could you please provide some suggestions as to what should I do? Is the Anaconda version a problem? (But why would the version issue cause trouble in finding the module?)

Thanks a lot for your time!

Inconsistency of nonlinearBeamColumn

When creating element in type of nonlinearBeamColumn, the python interpreter expects "eleTag,iNode,jNode,transfTag,integrationTag", which is not the same in the manual v2.0.

I think the primary reason is in SRC/interpreter/OpenSeesElementCommands.cpp, the "nonlinearBeamColumn" is directly aligned with &OPS_ForceBeamColumn

functionMap.insert(std::make_pair("nonlinearBeamColumn", &OPS_ForceBeamColumn));

Considering many tcl examples use this command, will this be fixed soon?

Fail to start

Dr. Zhu:
I want to use openseespy. However, it fails to start with the message as follows:

"Traceback (most recent call last):
from openseespy.opensees.winpy37.opensees import *
ImportError: DLL load failed"

I've reinstall the openseespy for several times, but it doesn't work. So what should i do to solve the problem.

My openseespy version is 0.2.0.

Thanks,
Robin

Inputting load factor values in Path TimeSeries not working

Hi
I have written a code for timehistory analysis which reads each ground motion from a text file containing the list of ground motion filenames. The ground motion files are in a two column format. I am reading the data from the ground motion file as
import numpy as np
data = np.loadtxt(filename)
shape = np.shape(data)
data_length = shape[0]
time = data[0:data_length,0]
acceleration = data[0:data_length,1]

and then assigning it to the timeseries as
timeSeries('Path', accelseries_timetag, '-dt', dt, '-values',[1.0,1.0,1.0], '-factor', GMfatt)

But when I run, I am getting the following error :
WARNING choice of options for path series is invalid
Traceback (most recent call last):
File "run_wo.py", line 69, in
exec(open('building1.py').read())
File "", line 34, in
File "", line 53, in
SystemError: returned NULL without setting an error

In the manual, it is written that the load factor values should be inputted as list(float) values, I tried some ways to input as list, but not working, Is there any specific format in which I should input the values ?

Note: The same script I had written in tcl and it is working successfully, I had used many times before for my analyses.

Regards
Nithin

importing problem

Dear Zhu:
I have a question about import openseespy after installing it by Pypi. I am trying to setup OpenSeesPy on Win7 64-bit system with Python3.6. When I try to run the example "ElasticTruss.py", it gives me error, The fllowing methods are all not right:
from openseespy import *
from openseespy.opensees import *
from openseesp import *

And the error include:
NameError: name 'opensees' is not defined
ImportError: DLL load failed

connection between CatenaryCable and beam

I need to connect a column-beam with a Catenary cable(3 freedoms of 1,2,3 for each node). I set two nodes at the same position for the two element, and use equalDOF to couple the 1 2 3 freedom of these two points. However, the analysis throws out the warning of " WARNING FE_Element::setID() - numDOF and number of dof at the DOF_Groups " . I think there must some freedoms singular in the model. Can you help to tell me how to fix this problem?

(Windows) pvd recorder - 'wrap by vector' error with 6 degrees of freedom

When I use pvd recorder in order to display the model and the deformed shape all the paraview feature work except the "wrap by vector" function. This happens only if the model is defined with 6 DOF because paraview doesn't recognize the displacement as a vector given that the displacement has 6 elements instead of 3.

pathseries::pathseries()

Dear Dr.Zhu:
When I was running my program, I encountered a problem that the showed "WARNING - PathSeries::PathSeries() - could not open file A10000.dat". I installed tcl and also set all environment like numpy, matplotlib before I called the opensees, I do not know what happened, can you give me some advice?

Problem with nDMaterial('PressureIndependMultiYield')

Hello Dr. Zhu:
It still has a problem with system error when I use the PressureIndependMultiYield material in the new openseespy version(0.1.1).
I use Anaconda in Windows and installed the openseespy package by pip command. A model works well with the ElasticIsotropic material, but when I use the PressureIndependMultiYield material, it has the problem as before (the test scrip as follow fig.).
Thank you very much~
lizaixian | BJUT
2019/03/26

image

Analysis can't run in Linux Bash for Windows 10

Hello everyone, I'm sorry in advance if the problems I'm exposing here are obvious for someone, but I'm quite new to Python language, and I can't find useful informations in the web. I'm having some issues in running OpenSeesPy in Ubuntu bash for Windows 10. Particularly, I'm trying to run the elastic truss analysis example found in the official documentation (https://openseespydoc.readthedocs.io/en/latest/truss.html) . Python 3.7.0 is installed. I've installed the interpreter in both the way explained in the guideline:

  1. through the library file opensses.so file, and I appended the path where the .so file is located; in my case it is:

    sys.path.append('/home/luca/openseespylinux/nfs/stak/users/zhum/public_html/linux')

  2. though PyPi (https://openseespydoc.readthedocs.io/en/latest/pypi.html)

Anyway, it seems that Python isn't able to recognize the OpenSees library, since when i launch the analysis, the following error appears:

NameError: name 'wipe' is not defined

So it means that the typical OpenSees command to build models aren't recognized by Python.

Thanks in advance for any help, since I've no idea of how to solve the problem.

secType and beamIntegration

I need to create a forceBeamColumn element with plastic hinges (fiber section + HingeRadau) at the ends and elastic section in the interior. Following the tcl examples I used this script:

"[...]
secType = 0
if secType =='Fiber':
section('Fiber', colSecTag1)
patch('quad', matTag,15,16, y1,z4, y1,z1, y2,z1, y2,z4)
patch('quad', matTag2,15,16, y2,z3, y2,z2, y3,z2, y3,z3)
patch('quad', matTag,16,15, y3,z4, y3,z1, y4,z1, y4,z4)
elif secType =='Elastic':
EsecTag = 2
thk = 0.012
section('Elastic', EsecTag, E, A, Iz, Iy, G, J)
beamIntegration('HingeRadau', ColIntTag1, colSecTag1, hingeLength, colSecTag1, hingeLength, EsecTag)
geomTransf('PDelta', ColTransfTag, 0.0, 0.0, -1.0)
element('forceBeamColumn', 1, 1, 11, ColTransfTag, ColIntTag1, '-mass', 0.0)
[...]"
The interpreter show this error message "built in function forceBeamColumn return NULL....", I think that the problem is in defining two secType and in using hingeRadau command, because if I use only one secType with Lobatto integration method the script runs with right results. How I can solve this problem?

Difference in timeperiod values by very small decimal values for the same model analyzed in tcl and python versions

Hi
I modeled a vertical cantilever with rectangular section (Depth=0.4m and Width=0.2m) of height 1.0m. Steel01 material was assigned to the whole section using fiber patch command. I modeled in OpenSees (tcl version) and OpenSeesPy.
The timeperiod for model in OpenSeespy is 0.24884085015825474 s and for model in OpenSees (Tcl) is 0.2488408433834686 s. They are differing from eight decimal place. Could you explain the reason behind this ?

(Linux) OpenSeesPy Import Error: libgfortran.so.3 Error

I'm trying to install OpenSeesPy and added the path

sys.path.append('/home/gautham/Documents/openseespylinux/opensees.so')

from opensees import *

and it shows the following

ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory

Can someone help me with the problem?

Difference between results of same model from Python and Tcl

Hi
I modelled an RC column in OpenSees in Tcl and Python and compared the results. For monononic pushover, the pushover curves are exactly same. But for cyclic analyses, the curves are different.
monotonic
cyclic

The initial timeperiod of the model from OpenSees Tcl and Python are different by very small decimal values (a query I had posted earlier). The eigen values after monotonic analysis using Tcl and Python are same (difference by very small decimal values). But, the timeperiods after cyclic analysis using Tcl and Python are very different.
Also when the script in Python is run, i am getting the following warning message (can be seen in the screenshots i have attached) :
"WARNING can't set handler after analysis is created"
Screenshot of OpenSees Tcl
opensees_tcl
Screenshot of OpenSees Python
opensees_python

I am attaching Tcl and python scripts for the model.
tcl_python_opensees_compare.zip

Kindly look into this issue.

Regards
Nithin

dam break+openseespy

Hello,

I run Dam Break example but the program doesn't have any output. I changed only second line what is written in user guide. Can you explain how to record the output (Pressure, Velocity and Displacement)? it seems this command " recorder('PVD', filename, 'disp', 'vel', 'pressure')" doesn't work.

Thanks

Notebook Azure

Dear all,
OpensSeesPy is great. I've been using in my computer locally.
image

I want to run OpenSeesPy in Azure Notebooks. Azure Notebooks is a free cloud service that runs Python.

However, the following is the screenshot where I have not proceeded any further :(

image

Has anybody tried or tested OpenSeesPy in Notebooks Azure?

Regards from Istanbul.

++Ahmet

SystemError: <built-in function node> returned NULL without setting an error

Dear Dr. Zhu,
When I tried to use the node command in for loop using the following code:
import sys
from openseespy.opensees import *
from bin.gen_node_y import gen_node_y

wipe()
model('Basic','-ndm',3,'-ndf',6)

for node_i in range(101):
print("Node...")
# print(node_i117.5)
# print(gen_node_y(node_i
117.5,2))
node(node_i, (node_i117.5,gen_node_y(node_i117.5,1),0.0))
I got the following error:
Node...
insufficient number of arguments
Traceback (most recent call last):
File "F:/OPENSEES/bin/stable_cables.py", line 17, in
node(node_i, (node_i117.5,gen_node_y(node_i117.5,1),0.0))
SystemError: returned NULL without setting an error
Could you please provide some suggestions as to what should I do?
Thanks a lot for your time!

mesh ('part',...)

Hello Dr.Zhu,

I want to model the tsunami impact on coastal structures which you modeled in your paper and thesis.
1- I have problem in modeling particles. Is there any example that shows: how to use mesh('part', ...) and mesh ('bg',...)?
If you have any model related to interaction of fluid and structures which shows how to use these commands, I interested to know.

I have an error with this command:

mesh('part', tag, type, *pArgs, eleType='', *eleArgs=[], '-vel', *vel0, '-pressure', p0)

pArgs=[-2.0, -0.3, -2.0, 4.0, -20.0, 4.0, -20.0, -0.3, 40.0, 10.0]

mesh('part', 21,'quad',*pArgs,'PFEMElementBubble', '-vel', 2.0, 0.0)

Thanks,
Azam

shellDKGT element cannot use

Hello Dr. Zhu:
I want to use shellDKGT element through openseespy.
However, my program code wouldn't move with the message as follows:

"opensees.msg: WARNING element type shellDKGT is unknown"

My openseespy version is 0.2.0 (It's latest as of today).

How can I use shellDKGT element through openseespy?

Thanks,
FUJITA

How to save the output of dam break+opensees.py

Good afternoon,

I have a question about the output of "dambreak" file. how to save only pressure or velocity of one point in specific time? I changed the value of "dT" but I didn't see any changes in my results.
recorder('PVD', filename, 'precision=4.0','dT=0.5', 'pressure')

thanks,

Uniaxial materials - PySimple1 Material and QzSimple1 Material

Hello Dr. Zhu,

I hope you are doing good. The syntax for PySimple1 material is incomplete in the Openseespy page (https://openseespydoc.readthedocs.io/en/latest/PySimple1.html#pysimple1-material). I have used the syntax in a similar form available in Opensees and it works. Can you please update the syntax for this material.

The QzSimple1 Material has some issues I guess, I was trying to run the code using the syntax from https://openseespydoc.readthedocs.io/en/latest/QzSimple1.html. It always returns an error as "returned NULL without setting an error". Can you please take a look into this and fix the issue. I really appreciate the help.

Thank you,
Pavan

Problem with Single-Point Constraint Load Pattern

Dear Dr. Zhu,
I tried to apply a displacement pattern to one node using the single-point constraint sp(nodeTag, dof, *dofValues) command. However, the output I got using the nodeDisp() and the eleForce() commands were all zeros. When I applied a load using the load(nodeTag, *loadValues) command, I got what seemed to be a correct result. What is wrong with my use of the single-point constraint command? Thank you so much!

Here is the model:

import sys
sys.path.append('E:/OpenseesFile/openseespy/win')
from opensees import *
import numpy as np
import matplotlib.pyplot as plt

# ------------------------------
# Start of model generation
# -----------------------------

# set modelbuilder
wipe()
model('basic', '-ndm', 2, '-ndf', 2)

# variables
A = 1.0
Nsteps = 1000
Px = 400.0
Py = 0.0

#material
fy=300.0
E0=200000.0
b=0.05
R0=10.0
cR1=0.925
cR2=0.15
params=[R0,cR1,cR2]

# create nodes
node(1, 0.0, 1.0)
node(2, 1.0, 0.0)
node(3, 1.0, 1.0)

# set boundary condition
fix(1, 1, 1)
fix(2, 1, 1)

# define materials
uniaxialMaterial("Steel02", 1, fy, E0, b, *params)

# define elements
element("Truss",1,1,3,A,1)
element("Truss",2,2,3,A,1)

# create TimeSeries
timeSeries("Linear", 1)

# create a plain load pattern
pattern("Plain", 1, 1)

# Create the nodal load
#load(3, Px, Py)
u_ref=1.0
sp(3, 1, u_ref)

# ------------------------------
# Start of analysis generation
# ------------------------------

# create SOE
system("ProfileSPD")

# create DOF number
numberer("Plain")

# create constraint handler
constraints("Plain")

# create integrator
integrator("LoadControl", 1.0/Nsteps)

# create algorithm
algorithm("Newton")

# create test
test('NormUnbalance',1e-8, 10)

# create analysis object
analysis("Static")

# ------------------------------
# Finally perform the analysis
# ------------------------------

# perform the analysis
data = np.zeros((Nsteps+1,2))
for j in range(Nsteps):
analyze(1)
data[j+1,0] = nodeDisp(3,1)
data[j+1,1] =-eleForce(1,1)

plt.plot(data[:,0], data[:,1])
plt.xlabel('Horizontal Displacement')
plt.ylabel('Horizontal Load')
plt.show()

pFlag function in test command

Hello Dr. Zhu,

Then pFlag option in test command is not working when I select it. Can you please let me know if I am making any mistake in the way I am using the command?
The example script for it is:
test('NormDispIncr', 1e-5, 20, 1)

Also, in Opensees tcl, we have LogFile command, is the same command or anything similar available in Openseespy?

Thank you,
Pavan.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.