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 with Simulink little help
Posted 30 sept. 2010, 14:46 UTC−4 2 Replies
Please login with a confirmed email address before reporting spam
I would like some help here! I would be gratefull!
softwares:
Comsol Multiphysics 3.4
Matlab 7.8.0 (R2009a)
I have studied Chapter 9 from model library
PROCESS
i start comsol with matlab
my Comsol model: -> structural mechanics -> plain stress
i draw a rectangular with fixed left side and a 'load' at right side.
I mesh it and solve it.
In options->constants i put load = 100
i try to export it in simulink
i check block type as General dynamic
my comsol subsystem has 1 input (load) and 1 output(y displacement in node 4)
I go to matlab and open the simulink
when typing the structure name to Comsol Multiphysics Subsystem (simsct)
- i have warning msg-
Warning: Calling MEX-file 'C:\COMSOL34\multiphysics\ml74\flgetarray.dll'.
MEX-files with .dll extensions will not execute in a future version of MATLAB.
Warning: Calling MEX-file 'C:\COMSOL34\multiphysics\ml74\flsetarray.dll'.
MEX-files with .dll extensions will not execute in a future version of MATLAB.
Anyway i continue (i want to see what happens next)
my simulink circuit
constant (or sine wave (tests) ) -> comsol -> scope
Simulation diagnostics
1)model error:
Java exception occurred: Exception: com.femlab.jni.FlNativeException: Matrix is zero Messages: Matrix is zero Stack trace: at linearization.cpp, row 1970, () at com.femlab.solver.Linearization.newMatResSolve(Native Method) at com.femlab.solver.Linearization.newMatResSolve(Unknown Source)
2) 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 1970, () at com.femlab.solver.Linearization.newMatResSolve(Native Method) at com.femlab.solver.Linearization.newMatResSolve(Unknown Source)
AND matlab warning
Warning: Unable to determine a fixed step size based on the sample times in the model 'untitled', because the model does
not have any discrete sample times. Picking a fixed step size of (0.2) based on simulation start and stop times. You can
disable this diagnostic by explicitly specifying a fixed step size in the Solver pane of the Configuration Parameters
dialog box, or setting the 'Automatic solver parameter selection' diagnostic to 'none' in the Solver group on the
Diagnostics pane of the Configuration Parameters dialog box.
Best regards
Hope for light
softwares:
Comsol Multiphysics 3.4
Matlab 7.8.0 (R2009a)
I have studied Chapter 9 from model library
PROCESS
i start comsol with matlab
my Comsol model: -> structural mechanics -> plain stress
i draw a rectangular with fixed left side and a 'load' at right side.
I mesh it and solve it.
In options->constants i put load = 100
i try to export it in simulink
i check block type as General dynamic
my comsol subsystem has 1 input (load) and 1 output(y displacement in node 4)
I go to matlab and open the simulink
when typing the structure name to Comsol Multiphysics Subsystem (simsct)
- i have warning msg-
Warning: Calling MEX-file 'C:\COMSOL34\multiphysics\ml74\flgetarray.dll'.
MEX-files with .dll extensions will not execute in a future version of MATLAB.
Warning: Calling MEX-file 'C:\COMSOL34\multiphysics\ml74\flsetarray.dll'.
MEX-files with .dll extensions will not execute in a future version of MATLAB.
Anyway i continue (i want to see what happens next)
my simulink circuit
constant (or sine wave (tests) ) -> comsol -> scope
Simulation diagnostics
1)model error:
Java exception occurred: Exception: com.femlab.jni.FlNativeException: Matrix is zero Messages: Matrix is zero Stack trace: at linearization.cpp, row 1970, () at com.femlab.solver.Linearization.newMatResSolve(Native Method) at com.femlab.solver.Linearization.newMatResSolve(Unknown Source)
2) 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 1970, () at com.femlab.solver.Linearization.newMatResSolve(Native Method) at com.femlab.solver.Linearization.newMatResSolve(Unknown Source)
AND matlab warning
Warning: Unable to determine a fixed step size based on the sample times in the model 'untitled', because the model does
not have any discrete sample times. Picking a fixed step size of (0.2) based on simulation start and stop times. You can
disable this diagnostic by explicitly specifying a fixed step size in the Solver pane of the Configuration Parameters
dialog box, or setting the 'Automatic solver parameter selection' diagnostic to 'none' in the Solver group on the
Diagnostics pane of the Configuration Parameters dialog box.
Best regards
Hope for light
2 Replies Last Post 1 oct. 2010, 06:46 UTC−4