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.

livelink with simulink

Please login with a confirmed email address before reporting spam

I want to control the AC voltage in the COMSOL model circuit through simulink, specifically through the frequency value fed back to each stage. The frequency changes once every cycle, and the specific change depends on the feedback. I define a variable f, given the initial value, however, an error is reported during the apply process in cosimulation, prompting: the number of elements cannot be changed. Please use [] as one of the size inputs to automatically calculate the appropriate size for that dimension. I don't know how to solve it, can someone with good intentions analyze it? I will be very grateful for your help


2 Replies Last Post 3 dic 2022, 08:24 GMT-5
Remi Magnard COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 2 dic 2022, 05:53 GMT-5
Updated: 2 years ago 2 dic 2022, 05:53 GMT-5

Hi,

the error message indicates that the size of the input of the COMSOL cosimulation block is changing during the simulation, make sure the input size remain constant along the simulation.

If this does not help, please send your file to the support (support@comsol.com) so that we provide an appropriate solution to your problem.

Best regards,

Rémi Magnard

Hi, the error message indicates that the size of the input of the COMSOL cosimulation block is changing during the simulation, make sure the input size remain constant along the simulation. If this does not help, please send your file to the support (support@comsol.com) so that we provide an appropriate solution to your problem. Best regards, Rémi Magnard

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 3 dic 2022, 08:24 GMT-5

The frequency of the AC voltage in the circuit module wants to be controlled through cosimulation, where the frequency is a scalar and also a real number, so why is there a problem?

>The frequency of the AC voltage in the circuit module wants to be controlled through cosimulation, where the frequency is a scalar and also a real number, so why is there a problem?

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.