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.

Exporting to Simulink !!!

Please login with a confirmed email address before reporting spam

Hi Everyone,
I have a transient model of a electordynamic wheel. I am trying to export it into the simulink. I am trying to pass the simulink time into the Comsol Subsystem to get the transient solution. I have defined the constants as:
fem.const = {'vel',50, ...
'airgap','0.01',...
'wm','100',...
'time','0.1'};


fem.sol=femtime(fem, ...
'solcomp',{'u','Az'}, ...
'outcomp',{'u','Az'}, ...
'tlist',linspace(0,time,1),...
'tsteps','strict',...
'atol',1e-2,...
'rtol',5e-2, ...
'tout','tlist');

% Save current fem structure for restart purposes
nS=length(timeValues);
Fx=((4*pi*10^-7)^-1)*postint(fem,'real(Azy)*real(-Azx)','dl',[6],'edim',1,'solnum',nS)*width
Fy=0.5*((4*pi*10^-7)^-1)*postint(fem,'(real(-Azx).^2-real(Azy).^2)','dl',[6],'edim',1,'solnum',nS)*width

This command will give me the solution at time=0.1 sec. Now, I export this fem to simulink.

Dim_struct = femsim(fem,'input',{'airgap','wm','vel','time'}, ...
'output',{{'Fx' [0 0]'},{'Fy' [0 0]'}},...
'outnames',{'Fx1','Fy1'}, 'static','on')

I did not get the transient solution. I always get the same value of Fx and Fy. Can anyone suggest me what is wrong? Or do you have any idea how to export the transient problem into simulink.
I went throught two example in comsol manual. Magnetic break and Temperature control. One of the problem is using the subdomain integration and other is using the point integration. But my problem is a boundary integration. There is no such option in simulink export for boundary integration.

Thank you.
~N.Paudel


0 Replies Last Post Dec 19, 2009, 10:21 a.m. EST
COMSOL Moderator

Hello nirmal paudel

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.