How to Export Stiffness and Mass Matrices in COMSOL Eigenfrequency Study

Please login with a confirmed email address before reporting spam

Hello,

I'm using COMSOL Multiphysics to perform an eigenfrequency analysis of a cryogenic suspension beam for a gravitational-wave detector project. I want to export the stiffness matrix (K) and mass matrix (M) for each mode, so I can compute the energy using the quadratic form:

externally.

Issue: I followed these steps:

  • Created an Eigenfrequency study (with or without prestress).

  • Added a Matrix Export node under "Derived Values."

  • Selected “Stiffness Matrix” and “Mass Matrix” with options "Global" and "Sparse."

However, when I try to export, COMSOL gives the error:

"K is not stored."

I’ve also tried switching to frequency-domain or stationary studies and adding Input Matrix nodes under the solver configuration, but nothing has worked so far.

My Questions:

  1. Is there a correct way to configure the eigenfrequency study so that the stiffness and mass matrices are stored and exportable?

  2. Does this feature require enabling something before solving?

  3. Is there any workaround if I don’t have LiveLink for MATLAB or Java API access?

Any guidance would be very appreciated


2 Replies Last Post 22 apr 2025, 13:05 CEST

Please login with a confirmed email address before reporting spam

Posted: 13 hours ago 22 apr 2025, 12:32 CEST
Updated: 13 hours ago 22 apr 2025, 12:37 CEST

Is there a correct way to configure the eigenfrequency study so that the stiffness and mass matrices are stored and exportable?

In study right-click on solution(sol 1) and use Other->Assemble and choose the data you want to store. After solving: in Results right-click' Derived Values' and use System Matrix.

https://www.comsol.com/blogs/implementing-the-weak-form-with-a-comsol-app#equation1

Nice Greetings

> Is there a correct way to configure the eigenfrequency study so that the stiffness and mass matrices are stored and exportable? In study right-click on solution(sol 1) and use Other->Assemble and choose the data you want to store. After solving: in Results right-click' Derived Values' and use System Matrix. [https://www.comsol.com/blogs/implementing-the-weak-form-with-a-comsol-app#equation1](https://www.comsol.com/blogs/implementing-the-weak-form-with-a-comsol-app#equation1) Nice Greetings

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 12 hours ago 22 apr 2025, 13:05 CEST

However, for this purpose there is no need to do this operation at all, since the energy is available as a built-in variable.

-------------------
Henrik Sönnerlind
COMSOL
However, for this purpose there is no need to do this operation at all, since the energy is available as a built-in variable.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.