From 370fba91fc934bf244f3172c260f1d04c990169c Mon Sep 17 00:00:00 2001 From: Chris Greening Date: Tue, 22 Nov 2022 13:19:04 +0000 Subject: [PATCH] Magnet force simulation working again --- simulations/magnetic_force_on_coils.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/simulations/magnetic_force_on_coils.ipynb b/simulations/magnetic_force_on_coils.ipynb index a1bfbcb..3e955f6 100644 --- a/simulations/magnetic_force_on_coils.ipynb +++ b/simulations/magnetic_force_on_coils.ipynb @@ -150,13 +150,13 @@ " bx = 0\n", " by = 0\n", " bz = 0\n", - " for degrees in range(0, 360, 30):\n", + " for degrees in range(0, 360, 10):\n", " angle = np.deg2rad(degrees)\n", " x_, y_, z_ = dipole(\n", " x + d / 2 * np.cos(angle),\n", " y + d / 2 * np.sin(angle),\n", " z - l / 2,\n", - " m / (360 / 30),\n", + " m / (360 / 10),\n", " )\n", " bx += x_\n", " by += y_\n", @@ -165,7 +165,7 @@ " x + d / 2 * np.cos(angle),\n", " y + d / 2 * np.sin(angle),\n", " z + l / 2,\n", - " m / (360 / 30),\n", + " m / (360 / 10),\n", " )\n", " bx += x_\n", " by += y_\n", @@ -294,7 +294,7 @@ "def sweep_coil_circle(coil, coil_center_radius, theta):\n", " X = coil_center_radius * np.cos(np.deg2rad(theta))\n", " Y = coil_center_radius * np.sin(np.deg2rad(theta)) - coil_center_radius\n", - " Z = -0.002\n", + " Z = -0.01\n", "\n", " # loop through the locations and calculate the forces, sum up the force in the X direction for each location\n", " Fx = []\n",