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.

Troubles with export to Simulink model as General dynamic block

Please login with a confirmed email address before reporting spam

Hello, everyone!
I tried to export the model of synchronous generator - generator_2d.mph from AC/DC Module/Motors and Drives of Model library, but it doesn't work. When I try to simulate this model from Simulink it reports about 2 mistakes:

Model error "Java exception occurred:
Exception:
com.femlab.jni.FlNativeException: Matrix is zero
Messages:
Matrix is zero"

and

Block error "Error in 'untitled/COMSOL Multiphysics Subsystem/S-Function' while executing M-File S-function 'femsfun', flag = 1 (derivatives), at time 0. MATLAB error message:
Java exception occurred:
Exception:
com.femlab.jni.FlNativeException: Matrix is zero
Messages:
Matrix is zero


Stack trace:

at linearization.cpp, row 2146, ()

at com.femlab.solver.Linearization.newMatResSolve(Native Method)

at com.femlab.solver.Linearization.newMatResSolve(Unknown Source)",
when solver is ode45

and another mistake:
Model error "Memory allocation failure", when solver is ode15s

When I export this as "General static", all work good! And in this way I even able to get diagramms of magnetic values time dependend. But for some reason electrical values is possible to get only in General dynamic export...
Please help me to make a working general dynamic export of generator_2d to Simulink and to avoid the errors!
Thank you a lot!! With best wishes,
Konstantin.
P.S. Sorry for my English.

0 Replies Last Post 09.03.2010, 13:14 GMT-5
COMSOL Moderator

Hello Konstantin Klochkov

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.

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.