Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Comsol-Matlab interface

Please login with a confirmed email address before reporting spam

Hello everybody

Hope you're all ok :)

I have a question regarding the use of the Comsol-Matlab interface.

I have a very simple 3D model: a beam, fixed on one end and free at the other, made of steel. I would like to export the model to matlab, in order to analyze it with simulink. The problem is whether I export it as a Simulink model, or as a state-space model, I always have an issue with the mass matrix; the error message beeing: mass matrix is zero. I don't really know where the problem comes from, since it's a simple model, and I defined the material, the density ...

Also, I noticed that there's an option to esport the model matrices as sparse, but when you do it you can't use simulink, as it doesn't support sparse matrices. And when you turn them to full matrices, it runs out of memory :(

I don't know if I'm beeing clear with what's bothering me here, but I hope you have some advice for me :) !

Thank you very much in advance, and have a nice day!


1 Reply Last Post 28.03.2011, 11:59 GMT-4
COMSOL Moderator

Hello Nathalie G.

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.03.2011, 11:59 GMT-4
Hi Nathalie,

I've used the COMSOL API and I also have this problem (Mass matrix being empty). How did you define your output? I defined mine using a variable and an integration coupling variable since point probes don't seem to output a C matrix. Also, have you tried calculating the solution using the state space matrices and then comparing that answer to comsol? I'm unsure of my method since I'm getting a different answer from the state space matrices compared to COMSOL.

Thanks,
Andrew Wang
Hi Nathalie, I've used the COMSOL API and I also have this problem (Mass matrix being empty). How did you define your output? I defined mine using a variable and an integration coupling variable since point probes don't seem to output a C matrix. Also, have you tried calculating the solution using the state space matrices and then comparing that answer to comsol? I'm unsure of my method since I'm getting a different answer from the state space matrices compared to COMSOL. Thanks, Andrew Wang

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.