The force on a current carrying wire in a magnetic field is described by the relationship: $F=BIl \sin{\theta}$. In this practical arrangement, the value of 𝜃=90 so the equation can be simplified to $F=BIl$.
The value of $F$ is determined by the weight of the magnet placed on a balance. In effect $𝐹= \Delta mg $ where $\Delta m$ is the apparent change in mass as F varies due to the magnitude of the current.
The current can be varied and a graph of $F against $I can be plotted which should be linear. The length of the wire can be measured and the magnetic flux density of the magnet can be determined from the gradient of the graph and the value of length of wire within the pole pieces of the magnet.
Set up the apparatus as shown in the diagram. Measure the length, l of the wire which is between the poles of the magnet. Use the rheostat to increase the current in steps from zero. For each chosen current value, record Δm, the apparent change in mass of the magnet (this can be an increase or decrease, depending upon the orientation of the current and the magnetic field). The force, F on the wire is calculated from F = Δmg for each value of current I. A graph of F (y-axis) against I (x-axis) should be a straight line through the origin. The magnetic flux density, B of the magnet can be determined from: B= gradient length of wire
# Importing the necessary libraries
from matplotlib import pyplot as plt
import numpy as np
#from prettytable import PrettyTable
# Preparing the data to be computed and plotted
dt = np.array([
[1.0, 0.15],
[2.0, 0.29],
[3.0, 0.38],
[4.0, 0.50],
[5.0, 0.60],
[6.0, 0.81],
[7.0, 0.90],
[8.0, 1.13]
])
# Preparing X and y data from the given data
x = dt[:, 0].reshape(dt.shape[0], 1)
X = np.append(x, np.ones((dt.shape[0], 1)), axis=1)
y = dt[:, 1].reshape(dt.shape[0], 1)
# Calculating the parameters using the least square method
theta = np.linalg.inv(X.T.dot(X)).dot(X.T).dot(y)
print(f'The parameters of the line: {theta}')
# Now, calculating the y-axis values against x-values according to
# the parameters theta0 and theta1
y_line = X.dot(theta)
# Plotting the data points and the best fit line
plt.scatter(x, y)
plt.plot(x, y_line, 'r')
plt.title('Best fit line using regression method')
plt.xlabel('Length in cm')
plt.ylabel('Resistance')
plt.show()
#def makePrettyTable(table_col1, table_col2):
# table = PrettyTable()
# table.add_column("Column-1", x)
# table.add_column("Column-2", Y)
#return table
The parameters of the line: [[ 0.13452381] [-0.01035714]]
In comparison, our calculated resistivity is 0.13 Ohm/m vs a databook value of 0.105 Ohm/m This is well within the expected variance of an A-level practical.