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 Dec 3, 2022, 8:24 a.m. EST
Remi Magnard COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago Dec 2, 2022, 5:53 a.m. EST
Updated: 2 years ago Dec 2, 2022, 5:53 a.m. EST

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 Dec 3, 2022, 8:24 a.m. EST

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.