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



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