Dear OpenSees Community
I know about the possibility to run an OpenSees analysis from Matlab by
simply using the command "!OpenSees.exe ANALYSIS.tcl".
My question is: is there any way to make Matlab and OpenSees interact step
by step during an analysis?
To better explain: is it possible to control the Output of OpenSees through
Matlab at each Step, and, based on this output, to modify for example the
load conditions on the structure (or the velocity of certain DOFs or so on)
from the ith step to the i+1th step, and then make the analysis to proceed
from the i+1th step.
I'm thinking about some Matlab code like:
for i=1:numStep
-- RUN STEP_i IN OPENSEES --
if (StructureDisplacement(i) > 1)
-- MODIFY INPUT LOAD --
end
end
I hope I was able to explain myself.
I ask if anybody knows how to do such a thing or an alternative for obtaining the same result.
If not possible with Matlab, python might be useful as well.
Thanks in advance!
Roberto
OpenSees Matlab Interaction
Moderators: silvia, selimgunay, Moderators
-
- Posts: 916
- Joined: Mon Sep 09, 2013 8:50 pm
- Location: University of California, Berkeley
Re: OpenSees Matlab Interaction
This is probably possible as everything stays in the Opensees memory as long as you don't run the wipe command. To see if it would work, I would just try it without Matlab first. For that purpose, you can create a tcl with your analysis that runs only several steps. Then you can prepare another tcl file with only the updated loads and run this file and see how it works. You can automate the process with Matlab if this runs fine.