1. The problem statement, all variables and given/known data A simple model of a railgun is a metal bar which runs on two long parallel rails. The two rails are connected to a charged capacitor with capacitance C and a resistor with resistance R. After charging, the capacitor can discharge through the circuit. You may assume that the rails and sliding bar are perfect conductors, and that the bar moves without any friction. The two rails are cylinders with radius r with centers separated by a distance d. Assume that the sliding bar is a distance x along the rails where x>>d>>r. (a) At some instant, the circuit has current I running through it. If the sliding bar is fixed in position, what is the total magnetic flux through the middle of the circuit? You may assume that the rails are long enough that fringe effects can be ignored and the field from the rails can be approximated to be that of infinite wires. You may also ignore the contributions from the sliding bar and the capacitor at the end of the circuit. 2. Relevant equations ∫B⋅da = ΦB 3. The attempt at a solution I tried to model the wires as infinite, then use the principle of superposition to add up the magnetic fields in the center of the circuit. I assumed the current flows counter-clockwise through the circuit. I also assigned my coordinate system with the x-axis along the bottom rail, z-axis vertical (across the circuit, in the same direction as the bar), and the y-axis pointing out of the plane of the page. From this approach I found the magnetic field enclosed in the circuit to be: B = μoI/(2π) * (1/z + 1/(d-z)) pointing out of the page. The 1/z term is the contribution from the bottom rail, and the 1/(d-z) term is the contribution from the top rail. My issue is when I integrate this expression over the area of the circuit to find the flux, I end up with a ln(0) term. I am not sure how to approach this problem now. I've tried an Amperian loop as well but I was having a difficult time finding a shape that I could integrate over.