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.

How do I load arbitrary current to the coil in comsol?

Please login with a confirmed email address before reporting spam

In comsol, I want to give the coil arbitrary current defined by interpolation, but it always wrong. My specific approach is: (a) the global definition, using interpolation method defined excitation current, the function name is current3, as shown below:


(b) Defining the multi-turn coil, in the coil excitation, I chose the "current", then in the coil current, I would like to fill out the "current3", but the characters are displayed in yellow, is undefined variable, how is this going ? How can I put my defined arbitray current to the coil.

Look forward to your reply, thank you.


7 Replies Last Post 22 juil. 2013, 01:58 UTC−4
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 juil. 2013, 02:52 UTC−4
A yellow expression mostly means a unit issue. Using current3[A] should do the trick.

Cheers
Edgar

--
Edgar J. Kaiser
www.emphys.com
A yellow expression mostly means a unit issue. Using current3[A] should do the trick. Cheers Edgar -- Edgar J. Kaiser http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 juil. 2013, 02:21 UTC−4
Hi!
Since you are doing a transient simulation, you should use current3(t).
If you get unit error, you can write current3(t[1/s])[A].
Ralf
Hi! Since you are doing a transient simulation, you should use current3(t). If you get unit error, you can write current3(t[1/s])[A]. Ralf

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 juil. 2013, 05:33 UTC−4
Thank you very much. You are right. In comsol, the functions need units. I want to ask another question. when 0=<t<=1, the function is f(t). When 1=<t<=2, the function is g(t). If f(t) and g(t) are current functions, and they need to be loaded the excited coil. Should I write "f(t)&&g(t)" in coil current (Icoil)?
Thank you very much. You are right. In comsol, the functions need units. I want to ask another question. when 0=

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 juil. 2013, 06:51 UTC−4
Hi!
Try to define a third function like: h(t) = if(t<1, f(t), g(t))
Ralf
Hi! Try to define a third function like: h(t) = if(t

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 juil. 2013, 23:27 UTC−4
thank you. Your answer is right. I am doing eddy current detection. Do your research direction is the same one ? if it is, I hope that we can have more exchanges.
thank you. Your answer is right. I am doing eddy current detection. Do your research direction is the same one ? if it is, I hope that we can have more exchanges.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 juil. 2013, 10:42 UTC−4
Excuse me. I want to ask another question. when 0=<t<=1, the function is f(t). When 1<t<=2, the function is g(t). When 2<t<=3, the function is h(t). How can the three functions be written one? If they are only f(t) and g(t), it can be written" if(t<1,f(t),g(t))". However, they are three, What shoud I do?

Best your wishes,

Xin Wei
Excuse me. I want to ask another question. when 0=

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 juil. 2013, 01:58 UTC−4
you can use Definitions -> functions -> piecewise
in argument type "t", for "start" and "end" use the start and end times and in "functions" use the expression you want for this part
you can use Definitions -> functions -> piecewise in argument type "t", for "start" and "end" use the start and end times and in "functions" use the expression you want for this part

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.