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 simulate the magnetic field around an infinitely long solenoid?

Please login with a confirmed email address before reporting spam

I am trying to simulate the magnetic field inside and around an infinitely long solenoid (helix) in 3D.

Obviously, I can't create a 3D solenoid that is infinitely long, so what I want to do is select a certain portion of the solenoid and ask COMSOL to assume that it extends on both ends to infinity. Because it will be interpreted as infinitely long, the solenoid will not have a fringing field at the ends, and its magnetic field should not be a dipole--the magnetic field should be confined to the solenoid's interior.

How can I accomplish this? I've looked into periodic boundary conditions, but I'm not sure if that's what is needed here. I want to say to COMSOL, "Here's a subsection of this solenoid. Only look at this subsection. Don't simulate anything beyond this subsection." How do I get COMSOL to treat my finite solenoid as infinitely long?

I'd be extremely grateful for a push in the right direction!


1 Reply Last Post Mar 30, 2021, 11:59 p.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Mar 30, 2021, 11:59 p.m. EDT
Updated: 4 years ago Mar 31, 2021, 10:36 a.m. EDT

I haven't tried to do this particular calculation, but if I were doing it, I would create a model with an exact integer number of turns (e.g., 1 or 2), of your solenoid, inside a cylindrical space. I would choose the cylinder carefully so that the two end faces were exactly identical geometrically (with them "cutting through" the wire, so to speak, in identical ways). I would do a surface mesh on one of those end faces and deliberately copy (the mesh) to the opposite face, then mesh the rest of the volume. (Making the two faces have identical surface meshes is helpful in setting up a clean periodic boundary condition.) Note that your assertion that "the magnetic field should be confined to the solenoid's interior" is not correct. For one thing, any helical coil surely has a non-zero component of current along the axis, and thus (by Ampere's law) a non-zero external azimuthal magnetic field. Make your computational-space cylinder large enough in radius that it does not overly perturb that field. In regard to launching the current and setting various physics-related and solver-related parameters, I'll refrain from commenting on those. Just be sure that you think about them. I suggest that you make an attempt and see if you can make it work, then come back with more questions if you get stuck. Good luck.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
I haven't tried to do this particular calculation, but if I were doing it, I would create a model with an exact integer number of turns (e.g., 1 or 2), of your solenoid, inside a cylindrical space. I would choose the cylinder carefully so that the two end faces were exactly identical geometrically (with them "cutting through" the wire, so to speak, in identical ways). I would do a surface mesh on one of those end faces and deliberately copy (the mesh) to the opposite face, then mesh the rest of the volume. (Making the two faces have identical surface meshes is helpful in setting up a clean periodic boundary condition.) Note that your assertion that "the magnetic field should be confined to the solenoid's interior" is *not* correct. For one thing, any helical coil surely has a non-zero component of current along the axis, and thus (by Ampere's law) a non-zero external azimuthal magnetic field. Make your computational-space cylinder large enough in radius that it does not overly perturb that field. In regard to launching the current and setting various physics-related and solver-related parameters, I'll refrain from commenting on those. Just be sure that *you* think about them. I suggest that you make an attempt and see if you can make it work, then come back with more questions if you get stuck. Good luck.

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.