Search found 4 matches

by azamabdollahi
Thu Mar 28, 2019 11:59 am
Forum: Framework
Topic: Tsunami force
Replies: 1
Views: 8877

Tsunami force

Hello,
I want to simulate the interaction of fluid and structure. I don’t know how to define the tsunami force in Opensees. This force should be imply in nodes or elements? For example we have 3 stories, and the maximum of high of water surge is about 1.5 stories. How to define the tsunami force in this case? If there is any reference that explained how to model tsunami in Opensees, please let me know.
Thanks,
by azamabdollahi
Mon Mar 18, 2019 11:44 pm
Forum: OpenSees.exe Users
Topic: Openseespy link to Matlab
Replies: 4
Views: 4374

Re: Openseespy link to Matlab

imansalehi wrote:
> Hi
> if you want to use directly OpenSees framework in Matlab environment you
> can use OpenSees.NET
> https://www.youtube.com/watch?v=rEDNtXR9RwY
>
>
> http://opensees.net/
> http://opensees.net/blog

Hi Iman,
Thank you so much for good point.
by azamabdollahi
Sat Mar 16, 2019 6:53 am
Forum: OpenSees.exe Users
Topic: Openseespy link to Matlab
Replies: 4
Views: 4374

Re: Openseespy link to Matlab

gswarup wrote:
> Hello,
>
> You can save the matlab variables in a *.mat file, say it's a matrix (or
> array) myvar = (p1, p2, p3, p4, p5) and saved in 'myvar.mat'. From python
> you can then load this mat file
>
> from scipy.io import loadmat, savemat
> var = loadmat('myvar.mat')
> # 'var' will be a 'dict' {}, so extract your matrix
> myvar=var['myvar']
>
> then you can extract p1,p2,... by python indexing and run opensees using
> those.
>
> and after analysis you can save them back in a mat file. say 'out' is your
> output variable,
>
> D={} #define a 'dict'
> D['out']=out
>
> savemat('D',out)
>
> output variable will be saved in 'D.mat' file. Now you can use that in
> matlab. you can perform this task just by switching between matlab and
> python windows.
>
> or otherwise you can call matlab engine from python. see 'Matlab API for
> Python' in Matlab help. But the easiest way would be the previous one.

Thank you so much. I installed OpenseesPy via Anaconda. I wrote in Spyder:

import sys
import numpy as np
print("hello")

also wrote in Matlab :

system('python test.py')

when I run Matlab, I have an error:

Traceback (most recent call last):
File "test.py", line 2, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'

I don't know why this error was appeared.
by azamabdollahi
Fri Mar 15, 2019 11:30 am
Forum: OpenSees.exe Users
Topic: Openseespy link to Matlab
Replies: 4
Views: 4374

Openseespy link to Matlab

Hi,

I work with OpenSeesPy recently.I would like to link MATLAB to OpenSeespy. There are 5 parameters in Openseespy that they should read from Matlab and then the output from OpenSeespy import to Matlab. Could you help me how to call from Matlab and OpenSeespy? If you have any sample program that you do in this issue please let me know.

p1,p2,p3,p4,p5 (Matlab)------->OpenseesPy
output(OpenSeesPy)--------->Matlab

Thanks,