Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-l] induced electric field



Regarding John D's C++ implementation:

The formulae I gave for E_x & E_y ought to work for both the interior and exterior solutions if proper care is taken. However, the correct phases of the arctangents need be evaluated on the proper branches including the correct multiples of [pi] terms. The numerators and/or the denominators of the C/A, D/A, C/B, and D/B ratios inside the arctangents start changing sign in the external region and one needs to use the correct quadrant for the arctangents of the ratios. It is the same problem that happens if one is careless in evaluating the phase angle of a point in the x-y in polar coordinates from the arctan(y/x) ratio when the (x,y) point is in some tricky quadrants. I didn't check which are the arctangent branches are to be used in for the various external (x,y) cases. That still needs to be worked out.

David Bowman

-----Original Message-----
From: phys-l-bounces@carnot.physics.buffalo.edu [mailto:phys-l-bounces@carnot.physics.buffalo.edu] On Behalf Of John Denker
Sent: Monday, November 23, 2009 5:53 PM
To: Forum for Physics Educators
Subject: Re: [Phys-l] induced electric field

On 11/23/2009 01:58 PM, David Bowman wrote:

E_y = (B'/(4*[pi]))*(C*ln((A2 + C2)/(B2 + C2)) +
D*ln((A2 + D2)/(B2 + D2))+ 2*A(arctan(C/A) + arctan(D/A))
- 2*B(arctan(C/B) + arctan(D/B)))

Nifty!

I gather it only applies to the interior of the
solenoid.



Implementation in c++:
http://www.av8n.com/physics/square-solenoid.c
Sorry about the lack of comments.




Example output:

./square-solenoid # magnitude
0.255 0.270 0.274 0.275 0.276 0.275 0.274 0.270 0.255
0.270 0.232 0.212 0.202 0.199 0.202 0.212 0.232 0.270
0.274 0.212 0.167 0.139 0.128 0.139 0.167 0.212 0.274
0.275 0.202 0.139 0.087 0.063 0.087 0.139 0.202 0.275
0.276 0.199 0.128 0.063 0.000 0.063 0.128 0.199 0.276
0.275 0.202 0.139 0.087 0.063 0.087 0.139 0.202 0.275
0.274 0.212 0.167 0.139 0.128 0.139 0.167 0.212 0.274
0.270 0.232 0.212 0.202 0.199 0.202 0.212 0.232 0.270
0.255 0.270 0.274 0.275 0.276 0.275 0.274 0.270 0.255

dir=1 ./square-solenoid # direction
135.0 150.2 161.1 170.8 180.0 -170.8 -161.1 -150.2 -135.0
119.8 135.0 150.2 165.1 180.0 -165.1 -150.2 -135.0 -119.8
108.9 119.8 135.0 155.3 180.0 -155.3 -135.0 -119.8 -108.9
99.2 104.9 114.7 135.0 180.0 -135.0 -114.7 -104.9 -99.2
90.0 90.0 90.0 90.0 180.0 -90.0 -90.0 -90.0 -90.0
80.8 75.1 65.3 45.0 0.0 -45.0 -65.3 -75.1 -80.8
71.1 60.2 45.0 24.7 0.0 -24.7 -45.0 -60.2 -71.1
60.2 45.0 29.8 14.9 0.0 -14.9 -29.8 -45.0 -60.2
45.0 29.8 18.9 9.2 0.0 -9.2 -18.9 -29.8 -45.0

curl=1 ./square-solenoid # look at the curl, should be constant
1.250 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.250
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.250 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.250

expand=2 ./square-solenoid # look at the exterior field ... not correct
0.113 0.128 0.631 0.650 0.657 0.650 0.631 0.128 0.113
0.128 0.152 0.413 0.443 0.453 0.443 0.413 0.152 0.128
0.631 0.413 0.255 0.274 0.276 0.274 0.255 0.413 0.631
0.650 0.443 0.274 0.167 0.128 0.167 0.274 0.443 0.650
0.657 0.453 0.276 0.128 0.000 0.128 0.276 0.453 0.657
0.650 0.443 0.274 0.167 0.128 0.167 0.274 0.443 0.650
0.631 0.413 0.255 0.274 0.276 0.274 0.255 0.413 0.631
0.128 0.152 0.413 0.443 0.453 0.443 0.413 0.152 0.128
0.113 0.128 0.631 0.650 0.657 0.650 0.631 0.128 0.113

curl=1 expand=2 ./square-solenoid # also not correct
0.000 0.000 1.000 1.000 1.000 1.000 1.000 0.000 0.000
0.000 0.000 1.000 1.000 1.000 1.000 1.000 0.000 0.000
1.000 1.000 1.250 1.000 1.000 1.000 1.250 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
1.000 1.000 1.250 1.000 1.000 1.000 1.250 1.000 1.000
0.000 0.000 1.000 1.000 1.000 1.000 1.000 0.000 0.000
0.000 0.000 1.000 1.000 1.000 1.000 1.000 0.000 0.000


_______________________________________________
Forum for Physics Educators
Phys-l@carnot.physics.buffalo.edu
https://carnot.physics.buffalo.edu/mailman/listinfo/phys-l