Sinusoidal Wire Magnetics (part 3 3 )

A piece of wire has the following shape 0 x 4 π 0≤x≤4π , y = sin x y=\sin x , z = 0 z=0 from position A A to B B upto two cycle. There is one more wire of the following shape 0 x 4 π 0≤x≤4π , y = cos x y=\cos x , z = 1 z=1 from position A A to B B upto two cycle. Both the wire carries a current of 4 π A 4π A . What is the magnitude of net magnetic field B n e t B_{net} at test point N ( x , y , z ) = ( 1 , 2 , 3 ) N (x, y, z) =(1, 2,3) Details and Assumptions 1) Magnetic permeability μ 0 = 1 \mu_{0} =1


The answer is 0.847.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Karan Chatrath
Mar 17, 2020

My usual approach is to take a semi-analytical route, but a purely numerical approach is far more convenient. Attached here is the code I wrote. It is different, in terms of style and language, from that of @Steven Chase . See the lines which start with '%' sign as those lines explain each following step. Essentially, the code does the same as I would have done using a semi-analytical approach, but without tedious algebraic manipulations:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
clear all
clc

% Point of interest:
rc = [1;2;3];

% Numerical resoloution/step size:
dx = 1e-5;

% Initialisation:
B1  = [0;0;0];
B2  = [0;0;0];

% Computing B field at POI due to wire on XY plane:
for x = 0:dx:4*pi
        % Position vector of point on wire:
        r1  = [x;sin(x);0];

        % Arc length element of wire:
        dr1 = [1;cos(x);0]*dx;

        % Vector joining point on wire and POI:
        R1  = rc - r1;

        % Biot-Savart:
        dB1 = 1*(cross(dr1,R1)/norm(R1)^3);

        % Euler integration:
        B1  = B1 + dB1;        
end

% Computing B field at POI due to wire offset from XY plane:
for x = 0:dx:4*pi
        % Position vector of point on wire:
        r2  = [x;cos(x);1];

        % Arc length element of wire:
        dr2 = [1;-sin(x);0]*dx;

        % Vector joining point on wire and POI:
        R2  = rc - r2;

        % Biot-Savart:
        dB2 = 1*(cross(dr2,R2)/norm(R2)^3);

        % Euler integration:
        B2  = B2 + dB2;        
end

% Calculating the resultant B field:
norm(B1+B2)

% Answer: 0.8496

@Karan Chatrath The questions which you reported today. Current circulate around the center . For solving this question you can take a element at a distance x then multiply element's area with current per unit area in the whole disk.

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

Thank you for the clarification

Karan Chatrath - 1 year, 2 months ago

Log in to reply

Problem solved, report deleted

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath Sir was making a question yesterday. But i can't. I think wolfram is not capable of doing that high level integration. The question is that. We have to find magnetic force between segment AB and CD .Can you help me? .Two parabolas of equation y 2 = 4 ( x 1 ) y^{2}=4(x-1) y 2 = 4 ( x + 1 ) y^{2}=-4(x+1)

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member @Karan Chatrath The comment has been edited.

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member I am able to perform the integral for F x F_x using Wolfram. Verified result using code. Assuming that μ o = 1 \mu_o = 1 and that each wire carries a current of I = 2 π I = 2\sqrt{\pi} , I get the net force as:

F x 1.54151 F_x \approx 1.54151 F y = F z = 0 F_y=F_z=0

The expression for d F x dF_x is:

d F x = 16 ( y 1 2 + 2 y 1 y 2 + y 2 2 + 8 ) ( 16 ( y 1 y 2 ) 2 + ( y 1 2 + y 2 2 + 8 ) 2 ) 3 / 2 d y 1 d y 2 dF_x = \frac{16\,\left(-{y_{1}}^2+2\,y_{1}\,y_{2}+{y_{2}}^2+8\right)}{{\left(16\,{\left(y_{1}-y_{2}\right)}^2+{\left({y_{1}}^2+{y_{2}}^2+8\right)}^2\right)}^{3/2}}dy_1 \ dy_2

F x = 2 2 2 2 16 ( y 1 2 + 2 y 1 y 2 + y 2 2 + 8 ) ( 16 ( y 1 y 2 ) 2 + ( y 1 2 + y 2 2 + 8 ) 2 ) 3 / 2 d y 1 d y 2 F_x = \int_{-2}^{2} \int_{-2}^{2} \frac{16\,\left(-{y_{1}}^2+2\,y_{1}\,y_{2}+{y_{2}}^2+8\right)}{{\left(16\,{\left(y_{1}-y_{2}\right)}^2+{\left({y_{1}}^2+{y_{2}}^2+8\right)}^2\right)}^{3/2}}dy_1 \ dy_2

y 1 y_1 is the Y-coordinate for the right parabola while y 2 y_2 is the y-coordinate for the left parabola.

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath Thanks Sir this time you have taken element by going y y distance in Y axis. You don't want to go and take element in x axis to avoid square root? Am I correct

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member That is correct

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath Sir help me in this integral. Making very interesting question .

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member I think it evaluates to zero

Karan Chatrath - 1 year, 2 months ago

@Karan Chatrath Sir I am rechecking the question I get F x = 0.497 F_{x}=0.497 . Can you check it with code ,in the mean time I am trying to achieve F x = 0.622 F_{x}=0.622

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member I have checked with code as well.

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath Ok sir fine within 30 min I will change the question

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member No, before doing so, find the source of a mistake if any. Don't ever rule out the possibility that I might be wrong.

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath finally I reached this expression,but wolfram is not giving answer and it's not matching with your expression which you have written in your report.

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member Well, it is quite similar to what I reported apart from a negative sign for one of the terms in the numerator. Please re-check your work. Also, Wolfram evaluates that expression that you have got. It evaluates to approximately 6.1.

You may paste the snapshots of your work here, if you want.

Karan Chatrath - 1 year, 2 months ago

@Karan Chatrath @Karan chatrath I have taken left circle center as origin

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member I took the origin as the midpoint of the two circle centers. Thatis why we get different expressions. The expression that you get is okay. I made an error in my previous comment when I said 6.1. Ignore that. This integral that you got should evaluate to the right answer

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath Wolfram is not evaluating. Sir can you tell me this integral answer.. In which college you are??

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member

Here x = α x = \alpha and y = β y = \beta .

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath This snapshot is taken from wolfram. The answer is what I mentioned in the report.

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath Oh yes finally I was making a mistake in typing wolfram. Now I am getting the right answer.

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member Next time onwards, I request you to check your working very carefully before asking me to spot a mistake. It takes me time. Nevertheless, well done. Now you know the answer

Karan Chatrath - 1 year, 2 months ago

Is this is the flux going through z -z in the new question of Steven chase. Flux through 2cm xy plane circle wil me equal to -z axis hemisphere,so here is the expression.u also getting the same expression and one more thing wolfram can't able to solve this.

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member This expression does not seem correct just by looking at it. I expect it to be much bigger. I used spherical coordinates and not cartesian coordinates to parameterise the sphere. And yes, the expression I get cannot be handled by Wolfram. I am calculating the results using a script of code.

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath ok fine. But i just want to discuss with you that the flux going through -z sphere will be equal to a circle kept on xy plane of radius 2 . So what is wrong with these assumption. From this assumtion question will be easier and I think after that there is no need of using spherical coordinates. Am I correct?

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member You are correct. To calculate the flux through the negative hemisphere, your approach is a smart one. I had not thought of that. It makes the question much easier. Well done.

However, I would suggest that you use polar coordinates to parameterise the circle of radius 2.

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath Wolfram also failed in polar coordinates. I don't know how to write code. So what I do to solve the question?

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member The integral evaluates to approximately 1.56. Now you should be able to get the answer to the question. Do post a solution. I got the answer in a more complicated way but your approach is smart

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath I done integration with wolfram with a little smarter way , one little more assumtion is there. You can see the solution. And thank you for this integration I will post my 2nd solution using this integration.

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member I saw it. Very impressive!

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath can you give me the answer of this integral

A Former Brilliant Member - 1 year, 2 months ago

@Karan Chatrath Sir can you help me in evaluating this integral

A Former Brilliant Member - 1 year, 2 months ago

@Karan Chatrath Sir Can you please share your feelings with me as your Day streak has fallen from very high level ? N o t e Note - I just want to be motivate from you. Don't consider it as I am teasing you.

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member Yes, it is disheartening. But it is just a streak.

Karan Chatrath - 1 year, 2 months ago

Log in to reply

@Karan Chatrath @Karan Chatrath Sir How do you get back your day streak??Did you know how to do time travel?? Please

A Former Brilliant Member - 1 year, 2 months ago

Log in to reply

@A Former Brilliant Member @Karan Chatrath Can you please tell me the answer of this question. I don't want solution. I was solving with book and my answer and book answer was not matching.

A Former Brilliant Member - 1 year, 1 month ago

Log in to reply

@A Former Brilliant Member Hi, I just saw your comment. I will try this problem after some time and share my answer.

Karan Chatrath - 1 year, 1 month ago

Log in to reply

@Karan Chatrath I get the net electric field to be downward with magnitude:

E = 9 λ 2 π ϵ o L E = \frac{9\lambda}{2 \pi \epsilon_o L}

Karan Chatrath - 1 year, 1 month ago

Log in to reply

@Karan Chatrath @Karan Chatrath My answer is coming 3 λ π ϵ 0 L \frac{3\lambda}{π\epsilon_{0}L} Answer according to book λ 2 π ϵ 0 L \frac{\lambda}{2π\epsilon_{0}L} Answer according to my teacher 3 3 λ 2 π ϵ 0 L \frac{3\sqrt{3}\lambda}{2π\epsilon_{0}L} All these answers are in j \vec{-j} direction Can you recheck your answer one more time . In question two rods have linear charge density + λ +\lambda and one rod have λ -\lambda

A Former Brilliant Member - 1 year, 1 month ago

Log in to reply

@A Former Brilliant Member Your answer is correct. I made an algebraic error. Now I get:

E = 3 λ π ϵ o L E = \frac{3\lambda}{\pi \epsilon_o L}

Karan Chatrath - 1 year, 1 month ago

@Karan Chatrath Sir can you please explain what does this expression mean × E = 0 \nabla × E = 0

A Former Brilliant Member - 1 year, 1 month ago

Log in to reply

@A Former Brilliant Member This denotes the curl of a vector field, which in this case is zero. You can google search this expression.

Karan Chatrath - 1 year, 1 month ago

@Karan Chatrath sir i was integrating 0 1 x 2 d x \int_0^1 x^2 dx from python from the tool a app (it's name is pydroid 3) . I downloaded it from google play store. But answer was not coming here is my work.

A Former Brilliant Member - 1 year, 1 month ago

Log in to reply

@A Former Brilliant Member Were there any other python files along with the one that you wrote?

Karan Chatrath - 1 year, 1 month ago
Steven Chase
Mar 17, 2020
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
import math

# Scan resolution

N = 10**6

######################################################

# Constants

u0 = 1.0
I = 4.0*math.pi
Bmult = u0*I/(4.0*math.pi)

dx = 4.0*math.pi/N

######################################################

# Test point

Nx = 1.0
Ny = 2.0
Nz = 3.0

Bx = 0.0
By = 0.0
Bz = 0.0

######################################################
######################################################

# Sine Curve

# Determine B field using Biot Savart

x = 0.0

while x <= 4.0*math.pi:         

    y = math.sin(x)             # coordinates
    z = 0.0

    dy = math.cos(x) * dx        # path displacement (components of dL)
    dz = 0.0

    rx = x - Nx                  # vector to test point
    ry = y - Ny
    rz = z - Nz

    r = math.sqrt(rx**2.0 + ry**2.0 + rz**2.0)  # rmag 

    crossx = dy*rz - dz*ry      # dL cross r from Biot Savart
    crossy = -(dx*rz - dz*rx)
    crossz = dx*ry - dy*rx

    dBx = Bmult*crossx/(r**3.0)  # infinitesimal B field contributions
    dBy = Bmult*crossy/(r**3.0)
    dBz = Bmult*crossz/(r**3.0)

    Bx = Bx + dBx
    By = By + dBy
    Bz = Bz + dBz

    x = x + dx

######################################################
######################################################


# Cosine Curve

# Determine B field using Biot Savart

x = 0.0

while x <= 4.0*math.pi:         

    y = math.cos(x)             # coordinates
    z = 1.0

    dy = -math.sin(x) * dx        # path displacement (components of dL)
    dz = 0.0

    rx = x - Nx                  # vector to test point
    ry = y - Ny
    rz = z - Nz

    r = math.sqrt(rx**2.0 + ry**2.0 + rz**2.0)  # rmag 

    crossx = dy*rz - dz*ry      # dL cross r from Biot Savart
    crossy = -(dx*rz - dz*rx)
    crossz = dx*ry - dy*rx

    dBx = Bmult*crossx/(r**3.0)  # infinitesimal B field contributions
    dBy = Bmult*crossy/(r**3.0)
    dBz = Bmult*crossz/(r**3.0)

    switch = 1.0

    Bx = Bx + switch*dBx
    By = By + switch*dBy
    Bz = Bz + switch*dBz

    x = x + dx

######################################################
######################################################

# Print results

print N
print ""
print Bx
print By
print Bz
print ""
B = math.sqrt(Bx**2.0 + By**2.0 + Bz**2.0)

print B

######################################################
######################################################

#>>> 
#10000

#0.142151521445
#0.689803267364
#-0.475396128598

#0.849727651546
#>>> ================================ RESTART ================================
#>>> 
#100000

#0.142182753772
#0.68969595401
#-0.475352568372

#0.849621391389
#>>> ================================ RESTART ================================
#>>> 
#1000000

#0.142186087855
#0.689684855719
#-0.475347175376

#0.849609922803
#>>> 

@Steven Chase sir can I make animations through python. If yes how, suggest me a YouTube video?
Thanks in advance

A Former Brilliant Member - 11 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...