mirror of
https://github.com/atomic14/kicad-coil-plugins.git
synced 2024-10-18 09:06:57 +00:00
Magnet force simulation working again
This commit is contained in:
parent
c02f00e3cd
commit
370fba91fc
1 changed files with 4 additions and 4 deletions
|
@ -150,13 +150,13 @@
|
||||||
" bx = 0\n",
|
" bx = 0\n",
|
||||||
" by = 0\n",
|
" by = 0\n",
|
||||||
" bz = 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",
|
" angle = np.deg2rad(degrees)\n",
|
||||||
" x_, y_, z_ = dipole(\n",
|
" x_, y_, z_ = dipole(\n",
|
||||||
" x + d / 2 * np.cos(angle),\n",
|
" x + d / 2 * np.cos(angle),\n",
|
||||||
" y + d / 2 * np.sin(angle),\n",
|
" y + d / 2 * np.sin(angle),\n",
|
||||||
" z - l / 2,\n",
|
" z - l / 2,\n",
|
||||||
" m / (360 / 30),\n",
|
" m / (360 / 10),\n",
|
||||||
" )\n",
|
" )\n",
|
||||||
" bx += x_\n",
|
" bx += x_\n",
|
||||||
" by += y_\n",
|
" by += y_\n",
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
" x + d / 2 * np.cos(angle),\n",
|
" x + d / 2 * np.cos(angle),\n",
|
||||||
" y + d / 2 * np.sin(angle),\n",
|
" y + d / 2 * np.sin(angle),\n",
|
||||||
" z + l / 2,\n",
|
" z + l / 2,\n",
|
||||||
" m / (360 / 30),\n",
|
" m / (360 / 10),\n",
|
||||||
" )\n",
|
" )\n",
|
||||||
" bx += x_\n",
|
" bx += x_\n",
|
||||||
" by += y_\n",
|
" by += y_\n",
|
||||||
|
@ -294,7 +294,7 @@
|
||||||
"def sweep_coil_circle(coil, coil_center_radius, theta):\n",
|
"def sweep_coil_circle(coil, coil_center_radius, theta):\n",
|
||||||
" X = coil_center_radius * np.cos(np.deg2rad(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",
|
" Y = coil_center_radius * np.sin(np.deg2rad(theta)) - coil_center_radius\n",
|
||||||
" Z = -0.002\n",
|
" Z = -0.01\n",
|
||||||
"\n",
|
"\n",
|
||||||
" # loop through the locations and calculate the forces, sum up the force in the X direction for each location\n",
|
" # loop through the locations and calculate the forces, sum up the force in the X direction for each location\n",
|
||||||
" Fx = []\n",
|
" Fx = []\n",
|
||||||
|
|
Loading…
Reference in a new issue