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 to specify magnetic field in a domain

Please login with a confirmed email address before reporting spam

Hi All,

I've been scouring the internet for an answer to this question, but I can't find anything about what I'm doing wrong.

I'd like to specify a certain magnetic field in a cylindrical air domain that is azimuthal (phi direction), and increases with the radius, so basically B=r x phi (the axis of rotation is the y-axis), up to numerical factors that are being ignored for now.

I've tried specifying the vector potential and magnetic field on the boundary, but none of these methods have worked. I've had success for a whole cylindrical domain, but when I try to do this for a slice (I will include something later that is symmetric every 36 degrees), I don't get the desired field. Can someone help me specify these boundary conditions so I get the desired field?

I've included the model below.

Thanks, Henry



5 Replies Last Post Oct 9, 2018, 6:25 p.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Oct 1, 2018, 3:11 p.m. EDT

By Ampere's law, in a cylinder, with a uniform (uniform across the circular cross section) current density directed along the axis of the cylinder, you will immediatey get a phi component of B that is proportional to r, just like you wanted. So try applying a volume uniform current density throughout the cylinder and in the axial direction.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
By Ampere's law, in a cylinder, with a uniform (uniform across the circular cross section) current density directed along the axis of the cylinder, you will immediatey get a phi component of B that is proportional to r, just like you wanted. So try applying a volume uniform current density throughout the cylinder and in the axial direction.

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Oct 1, 2018, 3:45 p.m. EDT

Hi Robert,

Thank you for your response. I actually did this a bit ago, but unfortunately, due to other reasons that are not worth going into here, this method will not work well for what I would like to eventually do. It is possible, but I'd like to try doing it a differemt way. Is this method my best bet, or is it possible to just specifiy the field value on the boundaries and generate the field this way?

Thank you, Henry

Hi Robert, Thank you for your response. I actually did this a bit ago, but unfortunately, due to other reasons that are not worth going into here, this method will not work well for what I would like to eventually do. It is possible, but I'd like to try doing it a differemt way. Is this method my best bet, or is it possible to just specifiy the field value on the boundaries and generate the field this way? Thank you, Henry

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Oct 2, 2018, 1:13 p.m. EDT
Updated: 6 years ago Oct 2, 2018, 1:16 p.m. EDT

Perhaps you could explain further what you are really trying to do? In a static model, the presence of the (curl of the) magnetic field and the presence of a current density are not independently specifiable. Curl B = mu0 J. And your field (as you require it) has a non-zero curl, so you need to have a non-zero current density.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Perhaps you could explain further what you are really trying to do? In a static model, the presence of the (curl of the) magnetic field and the presence of a current density are not independently specifiable. Curl B = mu0 J. And your field (as you require it) has a non-zero curl, so you need to have a non-zero current density.

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Oct 3, 2018, 8:02 p.m. EDT

Hi Robert,

I'm trying to model an exotic form of matter that for all intensive purposes adds a source term to Maxwell's Equations that behaves like a current density, but is not an actual current density. Essentially in the region where the matter is, Maxwell's equations are slightly modified, but again there is technically to actual current density. I'd like to eventually put in a detector model to simulate the response of the detector, but right now I'm just trying to impose a background field.

Thanks, Henry

Hi Robert, I'm trying to model an exotic form of matter that for all intensive purposes adds a source term to Maxwell's Equations that behaves like a current density, but is not an actual current density. Essentially in the region where the matter is, Maxwell's equations are slightly modified, but again there is technically to actual current density. I'd like to eventually put in a detector model to simulate the response of the detector, but right now I'm just trying to impose a background field. Thanks, Henry

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 6 years ago Oct 9, 2018, 6:25 p.m. EDT

Well, based on that, I admit I don't know the best approach here. My first thought would be to simply include the current density needed to generate the field anyway. Then you could (perhaps) not have to modify Maxwell's equations. After all, we are talking about a simple, uniform, static vector field of current density. If you don't like seeing that field later in your computations (which I presume may contain other currents), then you can always subtract it from your results for those currents. Your only problem handling it this way is if the presence of this background current somehow interferes with the other physics happening in your problem. Good luck. Maybe someone else has a better suggestion.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Well, based on that, I admit I don't know the best approach here. My first thought would be to simply include the current density needed to generate the field anyway. Then you could (perhaps) not have to modify Maxwell's equations. After all, we are talking about a simple, uniform, static vector field of current density. If you don't like seeing that field later in your computations (which I presume may contain other currents), then you can always subtract it from your results for those currents. Your only problem handling it this way is if the presence of this background current somehow interferes with the other physics happening in your problem. Good luck. Maybe someone else has a better suggestion.

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.