Global Mass and Stiffness Matrices?

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
ffilippi
Posts: 8
Joined: Wed Jun 13, 2018 3:31 pm
Location: California

Global Mass and Stiffness Matrices?

Post by ffilippi »

Hi everybody,

I was wondering is there a simple way to get the global mass-M and stiffness-K matrices that the "eigen" command uses (http://opensees.berkeley.edu/wiki/index ... en_Command).
I saw you can get some kind of K and M from running a one-step analysis and using "printA" but using those to solve the eigenproblem in matlab gives me different results.

There has to be a way to get the global K and M without doing any analysis, otherwise how does eigen get them..
I tried to search dr. McKeena's dissertation but the only thing I found is that the "EigenvalueIntegrator" class provides methods to form K and M, and I lack some object oriented programming skills tbh...

Furthermore any way to get connectivity matrix? i.e. to what node and which DoF an entry of K and M corresponds.
Makes sense that it is in order: Node1-Dof1, Node1-Dof2, ... , Node2-Dof1, Node2-Dof2, ... but in case there are constraints this can be hard to interpret as some entries will be missing.

Any help answering the above questions would be greatly appreciated.
Thank you for your time reading this.
selimgunay
Posts: 916
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: Global Mass and Stiffness Matrices?

Post by selimgunay »

When you use a static integrator, you can get K with printA command.

When you use central difference integrator and no damping, you can get M with the printA command.
ffilippi
Posts: 8
Joined: Wed Jun 13, 2018 3:31 pm
Location: California

Re: Global Mass and Stiffness Matrices?

Post by ffilippi »

Thank you for your reply.

This is what I currently do; however the central difference gives warnings:
"WARNING: CentralDifference::domainChanged() - assuming Ut-1 = Ut
WARNING FullGenLinLapackSolver::solve() - lapack solver failed - 2 returned
WARNING NewtonRaphson::solveCurrentStep() -the LinearSysOfEqn failed in solve()
DirectIntegrationAnalysis::analyze() - the Algorithm failed at time 0
OpenSees > analyze failed, returned: -3 error flag
"
However this does give a mass matrix.

Q1: Any input on this warnings? I know I do have 0s on the M diagonal elements because of rotational DOFs.
If I use "integrator Newmark 0.5 0.25" (Δt = 1) there are no warnings but of course the matrix I get is no longer the desired M (nor it is singular). But you can get it: if the output tangent is A -> M = 1/4(A-K).
So the warnings seem strange.

Q2: Furthermore Newmark with γ=0 and β=1/2 (identical to the central difference method) gives an error:
"Newmark::newStep() - error in variable". I tried a smaller step, Not sure what might be wrong.

Again sorry for the long post and all these questions questions. This is interesting, I appreciate any input.

P.S. It seems strange that there is no simple way to get K, and M without performing an one step analysis.
selimgunay
Posts: 916
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: Global Mass and Stiffness Matrices?

Post by selimgunay »

Finite difference and Explicit Newmark are conditionally stable. When you have 0s in the diagonal of the mass matrix, some of your periods are zero, so the stability criterion is not satisfied. I think you should be able to get the M matrix though.
yululiu
Posts: 2
Joined: Tue Dec 17, 2019 11:43 pm

Re: Global Mass and Stiffness Matrices?

Post by yululiu »

Hi
I get the K and M matrix of my 3D frame model by printA, but I don't know what the elements mean in the matrix.
Could you please tell me how the element of the matrix matches with the model's dof ?
Thanks a lot.
peterfakhry
Posts: 1
Joined: Wed Dec 18, 2019 6:11 am

Re: Global Mass and Stiffness Matrices?

Post by peterfakhry »

i got the same problem. i am modelling a 20 story 2D frame with 138 nodes however when i used the printA command the stiffness matrix is a square matrix of 775X775. can someone please adivse on how to understand the printed matrix
Post Reply