opensees runs the STKO code

Post Reply
Yulu Liu
Posts: 22
Joined: Fri Nov 15, 2019 6:31 am

opensees runs the STKO code

Post by Yulu Liu » Thu Dec 12, 2019 1:49 pm

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!
Attachments
393fe141bab7de74583dca5990d1bc5.png
393fe141bab7de74583dca5990d1bc5.png (87.27 KiB) Viewed 5051 times

GianmarcoManzo
Posts: 19
Joined: Tue Sep 17, 2019 2:38 pm

Re: opensees runs the STKO code

Post by GianmarcoManzo » Thu Dec 12, 2019 2:08 pm

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

Yulu Liu
Posts: 22
Joined: Fri Nov 15, 2019 6:31 am

Re: opensees runs the STKO code

Post by Yulu Liu » Thu Dec 12, 2019 2:37 pm

Oh, I see.
Can opensees or STKO get the [M] matrix and [K] matrix of the built model? How to do it?

MassimoPetracca
Posts: 37
Joined: Wed Jul 24, 2019 11:10 am

Re: opensees runs the STKO code

Post by MassimoPetracca » Thu Dec 12, 2019 2:53 pm

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

StavrosP
Posts: 21
Joined: Sat Oct 22, 2022 2:48 pm

Re: opensees runs the STKO code

Post by StavrosP » Wed Mar 20, 2024 3:39 pm

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 464 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

STKO Team
Posts: 2181
Joined: Tue Oct 29, 2019 8:45 am

Re: opensees runs the STKO code

Post by STKO Team » Wed Mar 27, 2024 9:02 am

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?

StavrosP
Posts: 21
Joined: Sat Oct 22, 2022 2:48 pm

Re: opensees runs the STKO code

Post by StavrosP » Sat Mar 30, 2024 5:09 pm

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

kesavapraba
Posts: 271
Joined: Sat Mar 28, 2020 2:25 pm

Re: opensees runs the STKO code

Post by kesavapraba » Wed Apr 03, 2024 3:03 pm

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.
Attachments
GimmeMCK_v1.zip
(24.19 KiB) Downloaded 4 times
:: With best wishes ::
Prabakaran Kesavan

StavrosP
Posts: 21
Joined: Sat Oct 22, 2022 2:48 pm

Re: opensees runs the STKO code

Post by StavrosP » Wed Apr 03, 2024 6:21 pm

Works great - thank you very much! :)

Stavros

kesavapraba
Posts: 271
Joined: Sat Mar 28, 2020 2:25 pm

Re: opensees runs the STKO code

Post by kesavapraba » Thu Apr 04, 2024 5:23 am

You are welcome
:: With best wishes ::
Prabakaran Kesavan

Post Reply