(* 
This notebook describes the magnetic field of an Anti-helmholtz coil along the axis of the coil.

Sorrentino gives the magnetic field gradient near the center of their MOT as 50 Gauss/cm, which is 5000 Gauss/m.

HOWEVER, Dan says that we'll only need 15 Gauss/cm (1500 Gauss/m) in the large MOT.
*)

Clear[z,CurrentTurns]
μ = 4Pi 10^-7 (*T m/A*);
Radius = .177;
Displacement =Radius/2;
B =(10000) μ CurrentTurns Radius^2(1/(2(Radius^2+(z-Displacement)^2)^(3/2))-1/(2(Radius^2+(z+Displacement)^2)^(3/2)));
dBdz = D[B,z];

z=0;
CurrentTurns = (CurrentTurns/.Solve[dBdz== 1500,CurrentTurns][[1]] ) (* Amps *)
Clear[z];

(* So we need about 4355 CurrentTurns. Seems like there should be some way to optimize wire AWG and current supplied to minimize ohmic losses. *)

Clear[Turns,Current,WireDiameter]
cm=0.01m;
in = 2.54cm;

Turns = 4355/Current;
Ω = Watts/A^2 ;
ρ = 1.68 10^-8 Ω m; (* for copper *)

length = 2 (Radius m) Pi Turns;
area = Pi (WireDiameter)^2/4;
R = ρ length/area;
V = Current R;
P = Current V;

Current = 1.2A;
WireDiameter = 0.028in;
P/length
Turns A