Page 1 of 1

opensees runs the STKO code

Posted: Thu Dec 12, 2019 1:49 pm
by Yulu Liu
After STKO produces the 7 .tcl files, I try to run the main.tcl file in the opensees window, but it can't run.
How to run the 7 files correctly in opensees?
Please!

Re: opensees runs the STKO code

Posted: Thu Dec 12, 2019 2:08 pm
by GianmarcoManzo
Probably because in the analysis_steps.tcl file you have left the MPCO recorder instructions.

If you want to start opensees manually by doing 'source main.tcl' you have to change the recorder instructions in the analysis_Steps.tcl file and use the opensees own ones:

https://opensees.berkeley.edu/wiki/inde ... er_Command

If instead you want to start opensees manually by making some manual changes to the code and you want to take advantage of the MPCO recorders and the STKO post processor, you should follow the instructions that have been given here:
viewtopic.php?f=27&t=73

Re: opensees runs the STKO code

Posted: Thu Dec 12, 2019 2:37 pm
by Yulu Liu
Oh, I see.
Can opensees or STKO get the [M] matrix and [K] matrix of the built model? How to do it?

Re: opensees runs the STKO code

Posted: Thu Dec 12, 2019 2:53 pm
by MassimoPetracca
Unfortunately you cannot get K and M easily... the opensees function printA , will print the systema global matrix, but using a full matrix, i.e. you cannot use a sparse solver, thus it's limited to small models.
For the mass, you cannot get the whole M matrix at once, but you can ask for maasses each nodel

Re: opensees runs the STKO code

Posted: Wed Mar 20, 2024 3:39 pm
by StavrosP
Hello,

coming back to this query, would you agree with the attached Analysis settings to derive the full stiffness matrix (K) from STKO? Then K is derived via this custom command: printA -print -file "K_matrix.txt"
AnalysesCommand_Kmatrix.jpg
AnalysesCommand_Kmatrix.jpg (44.34 KiB) Viewed 8699 times
If the settings above are correct, then to derive the modal stiffness matrix of mode x (k_x), I should assemble the translational and rotational eigenvectors in the following form for each node (3D, so 6dof), per mode x:
phi_x = [phi_trans_node_1, phi_rot_node_1, phi_trans_node_2, phi_rot_node_2, ...].

where: phi_trans_node_i = [ux, uy, uz] & phi_rot_node_i = [rotx, roty, rotz]; as given in the mpco file.

After that: k_x = phi_x.T * K * phi_x

Could you please comment on the validity of the above?

I understand that for the mass matrix (M), there is no equivalent to the "printA" command, however Prof. Scott suggests the following in this post:
Let’s suppose you’re doing a dynamic analysis and want to get {\bf M}, {\bf C}, and {\bf K} from your model. You can get {\bf K} by first doing a static analysis, then calling printA. Easy. And, I recently learned that you can get {\bf M} by calling printA after switching to the NewmarkExplicit integrator with \gamma=0. Also easy. If you are using Rayleigh damping where {\bf C} is a linear combination of {\bf M} and {\bf K}, you’re done.
I couldn't get this work with STKO, could you please advise?

Thanks a lot,
Stavros

Re: opensees runs the STKO code

Posted: Wed Mar 27, 2024 9:02 am
by STKO Team
This post was very old, before the GimmeMCK was implemented by Prof. Scott.
Did you try the GimmeMCK integrator using a custom Tcl command in STKO?

Re: opensees runs the STKO code

Posted: Sat Mar 30, 2024 5:09 pm
by StavrosP
I have tried the following but I cannot get the M/K matrices. I only get a matrix full of zeros if Transient is used as advised by Prof. Scott. This is what I am using in the custom command. What am I missing? Note that I have changed the OS solver to the version recently released, 3.6.0 (built 15/2/24).

Code: Select all

set N [systemSize]
puts "Number of equations in the model: $N"
domainChange
system FullGeneral
analysis Transient
integrator GimmeMCK 0.0 0.0 1.0
analyze 1 0.0
set K [printA -ret]
puts "Stiffness matrix: $K"
Thanks for your support,
Stavros

Re: opensees runs the STKO code

Posted: Wed Apr 03, 2024 3:03 pm
by kesavapraba
You can try after putting analysis Transient after GimmeMCK integrator. Transient integrator will assume Newmark as the default integrator if there is no integrator definition before its call. Attached is a minimal working example for a cantilevel column - the solution works fine for this case. I also verified it in OS 3.6 version.

Re: opensees runs the STKO code

Posted: Wed Apr 03, 2024 6:21 pm
by StavrosP
Works great - thank you very much! :)

Stavros

Re: opensees runs the STKO code

Posted: Thu Apr 04, 2024 5:23 am
by kesavapraba
You are welcome