Remi Magnard
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
2 years ago
Mar 16, 2023, 5:57 a.m. EDT
Updated:
2 years ago
Mar 16, 2023, 8:47 a.m. EDT
Dear Guo Jiang,
In the COMSOL Application Libraries you will find a section for LiveLink for Simulink tutorial models. The workflow to run a cosimulation is always the same, so even we do not have the exact application you want to solve you will find the information to set up your model.
If you experience problems when running the cosimulation in Simulink you may try the following general advice:
Make sure the model runs in COMSOL with similar input as you would set in Simulink. In your specific case you may want to try to set up a simple electrical circuit in COMSOL and see if you can solve your problem using a segregated solver (both finite element model and circuit running sequentially). In some cases, the component is so intricate in the electrical circuit that it needs to be solved fully coupled. If it is the case for you, cosimulation might not be suited.
Reduce the communication step size. Keep in mind that, in cosimulations, COMSOL and Simulink run independently and exchange information at communication time steps. It is important to adjust this communication time step; a too large value may cause convergence error, while a very small value leads to important computational time.
If you have issues to set-up your model, please send it to the our support (support@comsol.com) so we can provide an appropriate answer to your specific problem.
Best regards,
Rémi Magnard
Dear Guo Jiang,
In the COMSOL Application Libraries you will find a section for LiveLink for Simulink tutorial models. The workflow to run a cosimulation is always the same, so even we do not have the exact application you want to solve you will find the information to set up your model.
If you experience problems when running the cosimulation in Simulink you may try the following general advice:
1. Make sure the model runs in COMSOL with similar input as you would set in Simulink. In your specific case you may want to try to set up a simple electrical circuit in COMSOL and see if you can solve your problem using a segregated solver (both finite element model and circuit running sequentially). In some cases, the component is so intricate in the electrical circuit that it needs to be solved fully coupled. If it is the case for you, cosimulation might not be suited.
2. Reduce the communication step size. Keep in mind that, in cosimulations, COMSOL and Simulink run independently and exchange information at communication time steps. It is important to adjust this communication time step; a too large value may cause convergence error, while a very small value leads to important computational time.
If you have issues to set-up your model, please send it to the our support (support@comsol.com) so we can provide an appropriate answer to your specific problem.
Best regards,
Rémi Magnard