Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

importing a coil geometry from matlab to comsol

Please login with a confirmed email address before reporting spam

HI friends.
I am very much new to comsol. I am working on my thesis. Its on a 1000 turn coil generating rf frequencies. The problem is I have to import this 1000 turns coil geometry from matlab to comsol. I wrote a program which gives me n turns in matlab. But I am having trouble with importing it in to comsal. here is ma matlab program.



close all
clear all
%W=
%w=
N=10;
p=3/N;
w=p/2;
%g=P-w;


x0=1;
y0=1;
z=[1,1];




Cx=w;
Cy=w;
a1=2;
b1=11;
P(1,1)=x0+a1+Cx;
P(1,2)=y0;
i=1;

for j=2:4:4*N+1



P(j,1)=x0+a1+Cx+(i-1)*p;
P(j,2)=y0+(i-1)*p+b1+Cy;




%hold on
P(j+1,1)=x0-(a1+Cx+(i-1)*p);
P(j+1,2)=y0+b1+Cy+(i-1)*p;
%line(P(j),P(j+1))
%hold on
P(j+2,1)=x0-((a1+Cx)+(i-1)*p);
P(j+2,2)=y0-((b1+Cy)+(i-1)*p);
%line(P(j+1),P(j+2))
%hold on
P(j+3,1)=x0+(a1+Cx)+i*p;
P(j+3,2)=y0-((b1+Cy)+(i-1)*p);
%line(P(j+2),P(j+3))

i=i+1;
P;



end

for j=1:1:4*N

plot([P(j,1),P(j+1,1)],[P((j),2),P((j+1),2)])
hold on
end

now the problem is I can not figure it out how to import this in to comsol mainly how to change this program to the sintax used by the comsol..... can any one please help me in this.
sorry for the inconvenience...
thanking you all

2 Replies Last Post Mar 9, 2011, 3:57 p.m. EST
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 2, 2011, 3:05 p.m. EST
Hi

I do not want to discurage you,
But I would rather simulate my coil as 1 block with the multi-turn coil BC, atleast first, because your computer will be very slow with so many geoemtries, and if you are in 3D you might well end up with the need of a very powerfull cluster to solve your problem, without any simple way to debug your model.

Check first how many elements you need just to get an estimate of the RAM size, then decide if its better in 3D, 2D or 2D-axi (probably the latter). Or that you do the calculation for 1 loop, and you add them up ... Ther a re many ways to get to Rome ...

--
Good luck
Ivar
Hi I do not want to discurage you, But I would rather simulate my coil as 1 block with the multi-turn coil BC, atleast first, because your computer will be very slow with so many geoemtries, and if you are in 3D you might well end up with the need of a very powerfull cluster to solve your problem, without any simple way to debug your model. Check first how many elements you need just to get an estimate of the RAM size, then decide if its better in 3D, 2D or 2D-axi (probably the latter). Or that you do the calculation for 1 loop, and you add them up ... Ther a re many ways to get to Rome ... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 9, 2011, 3:57 p.m. EST
hi Ivar..

thank you very much for the reply....
i can change the no of turns of the program. first am starting with 5 turns... but i cant import it in to the comsol...

hi Ivar.. thank you very much for the reply.... i can change the no of turns of the program. first am starting with 5 turns... but i cant import it in to the comsol...

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.