parameters optimization in MATLAB with OPENSEES
Moderators: silvia, selimgunay, Moderators
parameters optimization in MATLAB with OPENSEES
These days I encounter some difficult problems ,so I need your help eagerly.
I want to set up an OpenSees structure model in MatLab circumstances with MatLab commands,like setting up the model in the opensees Tcl interface by hands.
So I can put the element length as the parameters to be optimize in MATLAB using the OpenSees analysis results of the structure model.
The only apparent difference is that this process is finished by inputing MatLab commands in the matlab interfaced.
Of course ,in Matlab ,this process is more difficulty,because this process invloves not only inputing commands in matlab(like the fprintf commands) but also the invoking "openSees.exe" with the words added by those input commands in matlab previously.
I have made many calls for help ,but none responses. Can you help me? I will appreciate any reply.
I want to set up an OpenSees structure model in MatLab circumstances with MatLab commands,like setting up the model in the opensees Tcl interface by hands.
So I can put the element length as the parameters to be optimize in MATLAB using the OpenSees analysis results of the structure model.
The only apparent difference is that this process is finished by inputing MatLab commands in the matlab interfaced.
Of course ,in Matlab ,this process is more difficulty,because this process invloves not only inputing commands in matlab(like the fprintf commands) but also the invoking "openSees.exe" with the words added by those input commands in matlab previously.
I have made many calls for help ,but none responses. Can you help me? I will appreciate any reply.
simple
Hi,
I am not sure what exactly is your question, but I usualy connect matlab with opensees in the following way:
1) write and save the tcl input file by matlab...
eg.
file = fopen('matlabinput.tcl', 'w+');
fprintf(file,'model BasicBuilder -ndm 3 -ndf 6 \n');
fprintf(file,'...
fclose(file);
2) run opensees with that tcl
eval(['!openseespath.exe',' ','matlabinput.tcl']);
(NOTE: it's a good idea to pause matlab before loading the results using the command pause(1); )
3) load the results back to matlab
forces=load(...);
displacements=load(...);
4) do the postprocessing
plot(displacements,forces)...
or perform some optimisation ... change parameters, save new tcl sile ... repeat 1-4
But if you don't need matlab sophistication you can do many things by tcl...
I am not sure what exactly is your question, but I usualy connect matlab with opensees in the following way:
1) write and save the tcl input file by matlab...
eg.
file = fopen('matlabinput.tcl', 'w+');
fprintf(file,'model BasicBuilder -ndm 3 -ndf 6 \n');
fprintf(file,'...
fclose(file);
2) run opensees with that tcl
eval(['!openseespath.exe',' ','matlabinput.tcl']);
(NOTE: it's a good idea to pause matlab before loading the results using the command pause(1); )
3) load the results back to matlab
forces=load(...);
displacements=load(...);
4) do the postprocessing
plot(displacements,forces)...
or perform some optimisation ... change parameters, save new tcl sile ... repeat 1-4
But if you don't need matlab sophistication you can do many things by tcl...
Zlatko Vidrih
Institute of Structural Engineering, earthquake Engineering and Construction IT
Faculty of Civil and Geodetic Engineering
University of Ljubljana, Slovenia
Institute of Structural Engineering, earthquake Engineering and Construction IT
Faculty of Civil and Geodetic Engineering
University of Ljubljana, Slovenia
Thanks very a lot
Your advice is very important.
Under your instruction,I make the analysis successfully.
Thank you very very a lot.
Under your instruction,I make the analysis successfully.
Thank you very very a lot.
Re: parameters optimization in MATLAB with OPENSEES
Dear zvidrih thank you . but i have a problem with this code. When i use eval(['!openseespath.exe',' ','matlabinput.tcl']); it works but i have another sourced file (records.tcl) in “matlabinput.tcl” file and must be executed; but it get out this error
couldn't read file "records.tcl": no such file or directory
I would appreciate if you help me
couldn't read file "records.tcl": no such file or directory
I would appreciate if you help me
Re: parameters optimization in MATLAB with OPENSEES
Dear Alima, I'm reading now your post, it seems to be a path problem. You should check where is your OpenSees working and where it expects to find the records.tcl file.
Hope this helps.
Hope this helps.