# Magnetic Field Calculation

#### PhysicsLearner123

I am trying to solve the following problem This is my attempt, I am assuming an ampere loop of circle at point P.

The magnetic field at point P due to the circular pipe is
The ampere loop formula is
$$\displaystyle \int B.ds = Ienc*u0;$$
B * 2*Pi*(R + R) = u0*0.008; // i = 0.008Amps
B = 0.3 * 10^-7;

The magnetic field due to the wire

(u0 * I)/(2*Pi*R) = 0.3*10^-7;
I = 3.9mA

#### PhysicsLearner123

sorry there was a misunderstanding of the problem
The solution is
Magnetic field at the center of the circular ring = Magnetic field due to the wire + magnetic field due to the circular ring
magnetic field due to the circular ring = 0;
magnetic field due to the wire = (u0 * I)/(2*pi*(3R)); where I is the current in the wire ---->1
The direction of the current cannot be same as the direction in the pipe because they get added hence it is opposite of the ring and hence into the wire.

The magnetic field at Point P is
due to the wire + due to the circular ring
Bwire = u0*I/(2*PI * R)
BCircular = u0 * 0.08 /((2*PI*R)
Bwire - Bcircular = u0*I/(2*PI*R) - u0*0.08/(2*PI*R) --->2
Equating Eq1 and Eq2 get the current I