Closed Sadia328 closed 4 years ago
Use the following commands in the Anaconda command prompt,
conda create --name py38 python=3.8 numpy scipy matplotlib
The above command creates a virtual environment named "py38" with python 3.8 and other packages. Now activate the environment,
conda activate py38
Now, install OpenSeesPy using the following command,
python -m pip install openseespy
Thank you so much, sir, I did it by simply giving command of pip install openseespy in command prompt. but its giving the following error.
I think I should have upgraded numpy, math, metplotlib, before installing opensees? Do I Still need a separate environment for running openseespy?
What does the following warning sign mean? Picture1: picture2:
Sir, fortunately, it is your code that I am trying to run and understand. I want it to run and give me results like you have uploaded. Previously I run this code in Python shell and the results were as below. The figure was not complete.
The example script was updated recently to reflect the changes in the plotting style and code. Use the updated example script. The figure you are showing is the complete structure. If you want to show node and element tags on it, read the description of the command plot_model()
. Once you close this plot window, the program will plot the mode shape for you. It does not plot the mode shape in red color anymore.
I tried running the updated code as well. But is again giving some error: Can you please tell me why am I getting the warning message on numpy and metplotlib?
The plotting problem is solved by: Go to tools>>I python console>Graphics>Graphic backend=automatic then restart spyder.
Hi, Mr. Anurag, I am working to change this example file of simply supported beam from tcl to python is there any simple way to do so,? any already available beam example in opeenseespy? https://opensees.berkeley.edu/wiki/index.php/Simply_supported_beam_modeled_with_two_dimensional_solid_elements
On Tue, Sep 15, 2020 at 9:56 PM Anurag Upadhyay notifications@github.com wrote:
The example script was updated recently to reflect the changes in the plotting style and code. Use the updated example script. The figure you are showing is the complete structure. If you want to show node and element tags on it, read the description of the command plot_model(). Once you close this plot window, the program will plot the mode shape for you. It does not plot the mode shape in red color anymore.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zhuminjie/OpenSeesPyDoc/issues/207#issuecomment-692843826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5EZPGRP3RK5ZQHPXK4YMLSF6MDRANCNFSM4RNHRTGA .
--
Regards Sadia Umer Khayam Structural Engineer
It is probably better to ask questions in the community forum. GitHub is primarily for communicating the problems in the code.
Its tricky to covert tcl to python, so I tried to use create a code to run beam analysis but it seems difficult to get displacement at mid of a simply supported beam using element as bemanColumnElement, my code is giving error as:WARNING element type elasticBeamColumn' is unknown Traceback (most recent call last):
File "D:\sadia\PHD\Lab work\beams\beam1.py", line 70, in
OpenSeesError: See stderr output,
Following is my code:
""" Created on Wed Oct 28 14:07:17 2020
@author:Sadia """
import openseespy.opensees as op import numpy as np import matplotlib.pyplot as plt from openseespy.postprocessing.Get_Rendering import*
x1 = 0. y1 = 0.
x2 = 10. y2 = 0.
x3 = 10. y3 = 0. E1 =1.99948e+11#steel in N/m2 E2= 24821126255.52 #concrete n=E1/E2 #8.055557106540777 h=0.5 b=0.3
elastic modulus. A=0.718
Py = -25000
massX = 0.49 M = 0. coordTransf = "Linear" # Linear, PDelta, Corotational massType = "-lMass" # -lMass, -cMass
op.wipe()
op.model('basic', '-ndm', 2, '-ndf', 2)
op.uniaxialMaterial("Elastic", 1, E2)
op.node(1, x1, y1) op.node(2, x2, y2) op.node(3, x3, y3)
op.fix(1, 1, 1) op.fix(2, 0, 0) op.fix(3, 0, 1)
'-cMass', cFlag][, '-doRayleigh', rFlag]) op.element("elasticBeamColumn'", 1, 1, 2, A,1000., 1000., 2150., 2150., 1, '-mass', M, massType) op.element("elasticBeamColumn'", 2, 2, 3, A,1000., 1000., 2150., 2150., 1, '-mass', M, massType)
op.timeSeries("Linear", 1)
op.pattern("Plain", 1, 1)
op.load(2, Px, Py,)
op.recorder('Node', '-file', "NodeDisp.out", '-time', '-node', 2, '-dof', 1,2,'disp') op.recorder('Node', '-file', "Reaction.out", '-time', '-node', 1,2,3, '-dof', 1,2,'reaction') op.recorder('Element', '-file', "Elements.out",'-time','-ele', 1,2, 'forces')
op.system("BandSPD")
op.numberer("RCM")
op.constraints("Plain")
op.integrator("LoadControl", 1.0)
op.algorithm("Linear")
op.analysis("Static")
op.initialize() ok = op.analyze(1)
ux2 = op.nodeDisp(2,1) uy2 = op.nodeDisp(2,2)
print("Nodal Displacements") print("ux2") print(ux2) print("uy2") print(uy2) plot_model()
op.wipe()
On Thu, Oct 29, 2020 at 4:15 AM Anurag Upadhyay notifications@github.com wrote:
It is probably better to ask questions in the community forum. GitHub is primarily for communicating the problems in the code.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/zhuminjie/OpenSeesPyDoc/issues/207#issuecomment-718261721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5EZPCQFA57IV2EB2HQGKDSNCQ2JANCNFSM4RNHRTGA .
--
Regards Sadia Umer Khayam Structural Engineer
Sir would you plz help me with the beam code. Should I add a pitch command? But I saw your code of frame where you have used beam elements as well and you didn't use any pitch command to use Quad. Property. I am in much need of your help.
On Thu, Oct 29, 2020, 10:01 AM Sadia Umer sadiakhayam319@gmail.com wrote:
Its tricky to covert tcl to python, so I tried to use create a code to run beam analysis but it seems difficult to get displacement at mid of a simply supported beam using element as bemanColumnElement, my code is giving error as:WARNING element type elasticBeamColumn' is unknown Traceback (most recent call last):
File "D:\sadia\PHD\Lab work\beams\beam1.py", line 70, in
op.element("elasticBeamColumn'", 1, 1, 2, A,1000., 1000., 2150., 2150., 1, '-mass', M, massType) OpenSeesError: See stderr output,
Following is my code:
-- coding: utf-8 --
""" Created on Wed Oct 28 14:07:17 2020
@author:Sadia """
import openseespy.opensees as op import numpy as np import matplotlib.pyplot as plt from openseespy.postprocessing.Get_Rendering import*
#
Units
#
m, N/m2,
# #
Input Variables
#
x1 = 0. y1 = 0.
x2 = 10. y2 = 0.
x3 = 10. y3 = 0. E1 =1.99948e+11#steel in N/m2 E2= 24821126255.52 #concrete n=E1/E2 #8.055557106540777 h=0.5 b=0.3
As=0.08
A1 = h*b
A2=As(n-1)
A=A1+A2# overall tranformed area into concrete so we will use concrete
elastic modulus. A=0.718
Py = -25000
massX = 0.49 M = 0. coordTransf = "Linear" # Linear, PDelta, Corotational massType = "-lMass" # -lMass, -cMass
u=(P(L^3)/(48E*I)
===================================================================
OpenSees Analysis
#
op.wipe()
set modelbuilder
op.model('basic', '-ndm', 2, '-ndf', 2)
define materials
op.uniaxialMaterial("Elastic", 1, E2)
create nodes
op.node(1, x1, y1) op.node(2, x2, y2) op.node(3, x3, y3)
set boundary condition
op.fix(1, 1, 1) op.fix(2, 0, 0) op.fix(3, 0, 1)
define elements
op.element('Truss', eleTag, *eleNodes, A, matTag[, '-rho', rho][,
'-cMass', cFlag][, '-doRayleigh', rFlag]) op.element("elasticBeamColumn'", 1, 1, 2, A,1000., 1000., 2150., 2150., 1, '-mass', M, massType) op.element("elasticBeamColumn'", 2, 2, 3, A,1000., 1000., 2150., 2150., 1, '-mass', M, massType)
create TimeSeries
op.timeSeries("Linear", 1)
create a plain load pattern
op.pattern("Plain", 1, 1)
Create the nodal load - command: load nodeID xForce yForce
op.load(2, Px, Py,)
Record Results
op.recorder('Node', '-file', "NodeDisp.out", '-time', '-node', 2, '-dof', 1,2,'disp') op.recorder('Node', '-file', "Reaction.out", '-time', '-node', 1,2,3, '-dof', 1,2,'reaction') op.recorder('Element', '-file', "Elements.out",'-time','-ele', 1,2, 'forces')
create SOE
op.system("BandSPD")
create DOF number
op.numberer("RCM")
create constraint handler
op.constraints("Plain")
create integrator
op.integrator("LoadControl", 1.0)
create algorithm
op.algorithm("Linear")
create analysis object
op.analysis("Static")
perform the analysis
op.initialize() ok = op.analyze(1)
ux2 = op.nodeDisp(2,1) uy2 = op.nodeDisp(2,2)
print("Failed!")
print("Nodal Displacements") print("ux2") print(ux2) print("uy2") print(uy2) plot_model()
op.wipe()
On Thu, Oct 29, 2020 at 4:15 AM Anurag Upadhyay notifications@github.com wrote:
It is probably better to ask questions in the community forum. GitHub is primarily for communicating the problems in the code.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/zhuminjie/OpenSeesPyDoc/issues/207#issuecomment-718261721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5EZPCQFA57IV2EB2HQGKDSNCQ2JANCNFSM4RNHRTGA .
--
Regards Sadia Umer Khayam Structural Engineer
The "elasticBeamColumn" should work. Can you post in the forum instead of here?
On git hub I can't figure out the icon for create new issue. Because of that I wrote here. Anyway I'll repost it. And thank you very much for replying. I have some how understood to conversation of tcl to python. And it seems I for the quard. Command I need to use pitch.
On Thu, Oct 29, 2020, 11:08 PM Minjie Zhu, Ph.D. notifications@github.com wrote:
The "elasticBeamColumn" should work. Can you post in the forum instead of here?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/zhuminjie/OpenSeesPyDoc/issues/207#issuecomment-718928993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5EZPFE2UQIZCYBA2IZMYTSNGVR3ANCNFSM4RNHRTGA .
Hi, I even posted my problem but no reply till now, I know the problem is simple for the experts and as I am a bigger I am clueless, A little help would mean a lot.
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Fri, Oct 30, 2020 at 2:07 AM Sadia Umer sadiakhayam319@gmail.com wrote:
On git hub I can't figure out the icon for create new issue. Because of that I wrote here. Anyway I'll repost it. And thank you very much for replying. I have some how understood to conversation of tcl to python. And it seems I for the quard. Command I need to use pitch.
On Thu, Oct 29, 2020, 11:08 PM Minjie Zhu, Ph.D. notifications@github.com wrote:
The "elasticBeamColumn" should work. Can you post in the forum instead of here?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/zhuminjie/OpenSeesPyDoc/issues/207#issuecomment-718928993, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ5EZPFE2UQIZCYBA2IZMYTSNGVR3ANCNFSM4RNHRTGA .
--
Regards Sadia Umer Khayam Structural Engineer
Can anyone guide me on how to install Openseespy to use it in Anaconda>> Spyder environment? on windows.
Originally posted by @Sadia328 in https://github.com/zhuminjie/OpenSeesPyDoc/issues/182#issuecomment-692756745