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 can we determine magnetic field of a current carrying wire with finite length?

Please login with a confirmed email address before reporting spam

Hi dear all users
How can we determine magnetic field of a current carrying wire with finite length, and how it is possible to simulate it in time dependent domain in COMSOL.
To simulate and obtain the magnetic field of a wire carrying current, the “magnetic field” module is used. Also to assign current characteristics to wire I have used “multi turn coil-linear”.
We have considered wire length a finite number but the magnetic field of wire corresponds to equations of infinite length.
How can one obtain the magnetic field of a wire with finite length?

4 Replies Last Post 24 août 2017, 12:47 UTC−4
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 19 oct. 2014, 22:42 UTC−4
By "finite length" do you mean that the wire is an open circuit? Are you modeling a complete closed current loop?
By "finite length" do you mean that the wire is an open circuit? Are you modeling a complete closed current loop?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 oct. 2014, 04:52 UTC−4
Hello dear Robert
thank you for your replying
could you please tell me how can i feed time dependent current into a wire in "magnetic field"? how can i build a closed loop wire in the magnetic field?
Best regards.
Hello dear Robert thank you for your replying could you please tell me how can i feed time dependent current into a wire in "magnetic field"? how can i build a closed loop wire in the magnetic field? Best regards.

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 24 août 2017, 10:53 UTC−4
Hello, I have the same exact problem. I have a 3D volume (a box of 10mm size) and one 1mmx1mmx10mm copper wire traversing it. I am interested in plotting the magnetic fields in the volume.
On the stationary case I solved the problem in Magnetic Fields (mf) module selecting Physics>Domain>Single-Turn Coil then in Attributes>Ground I selected one of the faces of the copper wire; then and Attributes>Boundary Feed allowed me to run a current through the wire.
This works for the stationary case. The moment I try to feed an alternate current the problems becomes really hard to tackle for me.
I tried to modify the coil excitation parameter with Connect to 'External U Vs. I' feature and including Electrical circuit physics, designing a simple circuit with a ground node n=0; Voltage Source connected p=1 and n=0 in sine Source type with 1Hz Frequency; External U Vs. I p=1, n=0 Current: Coil current <element>. Setting a Time dependent study at t=0s to t=1s in steps of 0.1s.
I get the following error:
"
" Failed to find consistent initial values.
" Singular matrix.
"
" For mesh-case 0 there are 497 degrees of freedom that do not occur in any equation (empty columns in matrix) for the variable
" comp1.mf.VCoil.
" at coordinates: (-0.005,-0.0005,-0.0005), (-0.0045,-0.0005,-0.0005), (-0.004,-0.0005,-0.0005), (-0.00460987,-0.0005,
" -0.000250397), (-0.00410987,-0.0005,-0.000250397), ...
" Last time step is not converged.
" - Feature: Time-Dependent Solver 1 (sol4/t1)
"
What am I doing wrong? Is there a consistent documentation that I can follow without restricting to specific examples?
Hello, I have the same exact problem. I have a 3D volume (a box of 10mm size) and one 1mmx1mmx10mm copper wire traversing it. I am interested in plotting the magnetic fields in the volume. On the stationary case I solved the problem in Magnetic Fields (mf) module selecting Physics>Domain>Single-Turn Coil then in Attributes>Ground I selected one of the faces of the copper wire; then and Attributes>Boundary Feed allowed me to run a current through the wire. This works for the stationary case. The moment I try to feed an alternate current the problems becomes really hard to tackle for me. I tried to modify the coil excitation parameter with Connect to 'External U Vs. I' feature and including Electrical circuit physics, designing a simple circuit with a ground node n=0; Voltage Source connected p=1 and n=0 in sine Source type with 1Hz Frequency; External U Vs. I p=1, n=0 Current: Coil current . Setting a Time dependent study at t=0s to t=1s in steps of 0.1s. I get the following error: " " Failed to find consistent initial values. " Singular matrix. " " For mesh-case 0 there are 497 degrees of freedom that do not occur in any equation (empty columns in matrix) for the variable " comp1.mf.VCoil. " at coordinates: (-0.005,-0.0005,-0.0005), (-0.0045,-0.0005,-0.0005), (-0.004,-0.0005,-0.0005), (-0.00460987,-0.0005, " -0.000250397), (-0.00410987,-0.0005,-0.000250397), ... " Last time step is not converged. " - Feature: Time-Dependent Solver 1 (sol4/t1) " What am I doing wrong? Is there a consistent documentation that I can follow without restricting to specific examples?

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 24 août 2017, 12:47 UTC−4
[SOLVED (cheating a bit)]
Remaining only with the Magnetic field Formulation I kept the stationary solution. But, I set the current as a parameter function of a parameterized time tp : I=cos(tp*wp) and defined the parameter wp as 2*pi * f (where f is the frequency) then performed a sweep of the parameter tp.
[SOLVED (cheating a bit)] Remaining only with the Magnetic field Formulation I kept the stationary solution. But, I set the current as a parameter function of a parameterized time tp : I=cos(tp*wp) and defined the parameter wp as 2*pi * f (where f is the frequency) then performed a sweep of the parameter tp.

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.