Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSeesPy Reliability Analysis and Parameter problem. #115

Open
erkanbicici opened this issue May 29, 2023 · 10 comments
Open

OpenSeesPy Reliability Analysis and Parameter problem. #115

erkanbicici opened this issue May 29, 2023 · 10 comments

Comments

@erkanbicici
Copy link

erkanbicici commented May 29, 2023

Previously, in tcl, I was adding parameters in the following way.

randomVariable $rndmVar1 lognormal  -mean -3.503  -stdv 0.5254
randomVariable $rndmVar2 lognormal  -mean $fy  -stdv 3.225

parameter $param1 randomVariable $rndmVar1 element 10 fc
parameter $param2 randomVariable $rndmVar2 element 10 fy

However, now in python, the following code is not working. I have been working on it for a long time but I could not figure what I am missing. Any help will be great.

ops.randomVariable(1, "lognormal", "-mean", 20, "-stdv", 0.52)
ops.randomVariable(2, "lognormal", "-mean", 420, "-stdv", 0.52)

ops.parameter(1,"randomVariable",1, "element",1, "material",Conctag,'fc')
ops.parameter(2,"randomVariable",2, "element",1, "material",Steeltag, 'fy')

The code gives the following error. Even I have check the source code, I dont understand the problem.

Parameter::addComponent 1 -- no objects were able to identify parameter material 1 fc 
Parameter::addComponent 2 -- no objects were able to identify parameter material 3 fy 

Thank you

@mhscott
Copy link
Collaborator

mhscott commented May 29, 2023

Can you provide a short working script that reproduces the error? The commands you show in Tcl and Python are not consistent with each other.

@abtin139
Copy link

However, now in python, the following code is not working. I have been working on it for a long time but I could not figure what I am missing. Any help will be great.

@mhscott
Copy link
Collaborator

mhscott commented Apr 24, 2024

Please post the code

@abtin139
Copy link

i sent my code to your email

@mhscott
Copy link
Collaborator

mhscott commented Apr 25, 2024

I have not received an email. Please post the script here, in this thread.

@abtin139
Copy link

Sure. I want to know how to do reliability analysis with opensees? Because I enter the randomVariable command, but I can't get an answer for any variable or even in beam modeling. For example, with the Latin Hypercube Sampling simulation method, what is the shape of this concrete structure? In general, if it is an example, I need help in this field.
It's write in spyder(python 3.11).
reliability.zip

@mhscott
Copy link
Collaborator

mhscott commented Apr 26, 2024

I'm looking for a simple script, like 20 lines of code, that demonstrates the error. I am not going to look through multiple files in the zip you posted. I only want to know the error so that it can be fixed.

@abtin139
Copy link

abtin139 commented Apr 26, 2024

i'm sorry.

from openseespy.opensees import * 
from scipy.stats import norm 
wipe()
model('basic', '-ndm', 2, '-ndf', 3)
node(1,0,0)
node(2,3,0)
geomTransf('Linear', 1)
meanR = 2000; sigR = 135  # for E_Steel
randomVariable(200, 'normal', '-mean', 2000, '-stdv', 135)
element('elasticBeamColumn', 1, 1,2, 0.08, 2e11, 0.001, 1)
fix(1,1,1,1 ) 
timeSeries('Linear', 1 )
pattern('Plain', 1 , 1 )
load(2, 0,-5e6,0)

@mhscott
Copy link
Collaborator

mhscott commented Apr 26, 2024

This code does not produce an error on the latest version of OpenSeesPy (3.5.1.12).

@abtin139
Copy link

Therefore, for more complex models, there is no longer a need to connect opensees to MATLAB, and with this library (openseespy), the Latin Hypercube Sampling (LHS) or mcmc or mc method can be implemented?
thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants