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 Jul 22, 2013, 1:58 a.m. EDT
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 15, 2013, 2:52 a.m. EDT
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 Jul 16, 2013, 2:21 a.m. EDT
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 Jul 16, 2013, 5:33 a.m. EDT
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 Jul 16, 2013, 6:51 a.m. EDT
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 Jul 17, 2013, 11:27 p.m. EDT
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 Jul 19, 2013, 10:42 a.m. EDT
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 Jul 22, 2013, 1:58 a.m. EDT
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.