mirror of
https://github.com/atomic14/kicad-coil-plugins.git
synced 2024-10-18 09:06:57 +00:00
Merge pull request #2 from atomic14/feature/visualisations
Feature/visualisations
This commit is contained in:
commit
2b8a4be149
25 changed files with 121647 additions and 402 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -161,3 +161,4 @@ cython_debug/
|
|||
|
||||
*.json
|
||||
*.png
|
||||
*.vol
|
10
README.md
10
README.md
|
@ -25,6 +25,10 @@ ln -s ${PWD}/coil_plugin.py ~/Documents/KiCad/6.0/scripting/plugins/coil_plugin.
|
|||
|
||||
The project is still very experimental - so there are no guarantees that these will work or do anything useful...
|
||||
|
||||
* 6 circular coils - https://www.pcbway.com/project/shareproject/Proof_of_concept_6_coil_spiral_PCB_stator_23ae7370.html
|
||||
* 6 wedge coils - https://www.pcbway.com/project/shareproject/Proof_of_concept_6_coil_wedge_PCB_stator_c231a379.html
|
||||
* 12 wedge coils - https://www.pcbway.com/project/shareproject/Proof_of_concept_12_coil_wedge_PCB_stator_c54d9374.html
|
||||
- 6 circular coils - https://www.pcbway.com/project/shareproject/Proof_of_concept_6_coil_spiral_PCB_stator_23ae7370.html
|
||||
- 6 wedge coils - https://www.pcbway.com/project/shareproject/Proof_of_concept_6_coil_wedge_PCB_stator_c231a379.html
|
||||
- 12 wedge coils - https://www.pcbway.com/project/shareproject/Proof_of_concept_12_coil_wedge_PCB_stator_c54d9374.html
|
||||
|
||||
## Building python to take advantage of the M1 Mac Multiprocessors
|
||||
|
||||
https://www.reddit.com/r/Python/comments/qog8x3/if_you_are_using_apples_m1_macs_compiling_numpy/
|
||||
|
|
|
@ -106,7 +106,10 @@
|
|||
"SCREW_HOLE_RADIUS = STATOR_RADIUS\n",
|
||||
"\n",
|
||||
"# Coil params\n",
|
||||
"# for custom shape\n",
|
||||
"TURNS = 16\n",
|
||||
"# for spiral\n",
|
||||
"# TURNS = 17\n",
|
||||
"COIL_CENTER_RADIUS = 19.95\n",
|
||||
"COIL_VIA_RADIUS = 20.95"
|
||||
]
|
||||
|
@ -120,7 +123,12 @@
|
|||
"# where to put the input pads\n",
|
||||
"INPUT_PAD_RADIUS = STATOR_RADIUS - (PAD_WIDTH / 2 + VIA_DIAM + TRACK_SPACING)\n",
|
||||
"\n",
|
||||
"USE_SPIRAL = False\n",
|
||||
"USE_SPIRAL = True\n",
|
||||
"\n",
|
||||
"if USE_SPIRAL:\n",
|
||||
" TURNS = 18\n",
|
||||
" COIL_VIA_RADIUS = 20.5\n",
|
||||
" COIL_CENTER_RADIUS = 20.5\n",
|
||||
"\n",
|
||||
"LAYERS = 4"
|
||||
]
|
||||
|
@ -238,18 +246,63 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def get_spiral(turns, start_radius, thickness, layer=Layer.FRONT):\n",
|
||||
" points = []\n",
|
||||
" # create a starting point in the center\n",
|
||||
" for angle in np.arange(0, turns * 360, 1):\n",
|
||||
" radius = start_radius + thickness * angle / 360\n",
|
||||
" if layer == Layer.BACK:\n",
|
||||
" x = radius * np.cos(np.deg2rad(angle + 180))\n",
|
||||
" y = radius * np.sin(np.deg2rad(angle + 180))\n",
|
||||
" points.append((x, -y))\n",
|
||||
" else:\n",
|
||||
" x = radius * np.cos(np.deg2rad(angle))\n",
|
||||
" y = radius * np.sin(np.deg2rad(angle))\n",
|
||||
" points.append((x, y))\n",
|
||||
" return points"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"if not USE_SPIRAL:\n",
|
||||
" print(\"Not using spiral\")\n",
|
||||
" template_f = []\n",
|
||||
" for i in range(len(template)):\n",
|
||||
" template_f.append(template[len(template) - i - len(template) // 2])\n",
|
||||
" template_f = flip_x(template_f)\n",
|
||||
" points_f = chaikin(\n",
|
||||
" optimize_points(flip_x(get_points(template_f, TURNS, TRACK_SPACING + TRACK_WIDTH))),\n",
|
||||
" optimize_points(\n",
|
||||
" flip_x(get_points(template_f, TURNS, TRACK_SPACING + TRACK_WIDTH))\n",
|
||||
" ),\n",
|
||||
" 2,\n",
|
||||
" )\n",
|
||||
" points_b = chaikin(\n",
|
||||
" optimize_points(get_points(template, TURNS, TRACK_SPACING + TRACK_WIDTH)), 2\n",
|
||||
" )\n",
|
||||
"else:\n",
|
||||
" print(\"Using spiral\")\n",
|
||||
" points_f = get_spiral(\n",
|
||||
" TURNS, VIA_DIAM / 2 + TRACK_SPACING, TRACK_SPACING + TRACK_WIDTH, Layer.FRONT\n",
|
||||
" )\n",
|
||||
" points_b = get_spiral(\n",
|
||||
" TURNS, VIA_DIAM / 2 + TRACK_SPACING, TRACK_SPACING + TRACK_WIDTH, Layer.BACK\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
" points_f = [(0, 0)] + points_f\n",
|
||||
" points_b = [(0, 0)] + points_b\n",
|
||||
" print(\"Track points\", len(points_f), len(points_b))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"points_f = [(COIL_VIA_RADIUS - COIL_CENTER_RADIUS, 0)] + points_f\n",
|
||||
"points_b = [(COIL_VIA_RADIUS - COIL_CENTER_RADIUS, 0)] + points_b\n",
|
||||
"\n",
|
||||
|
@ -269,40 +322,75 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"# write the coil out in a format that can be simulated\n",
|
||||
"# shift the coils aronnd to make connections a bit easier\n",
|
||||
"COIL_ROTATION = -360 / 12\n",
|
||||
"# rotate the points by 90 degrees so that the x axis is horizontal\n",
|
||||
"pf = rotate(points_f, 90)\n",
|
||||
"pb = rotate(points_b, 90)\n",
|
||||
"fname = \"simulations/coils/coil_12_custom\"\n",
|
||||
"if USE_SPIRAL:\n",
|
||||
" fname = \"simulations/coils/coil_12_spiral\"\n",
|
||||
"\n",
|
||||
"for i in range(12):\n",
|
||||
" angle = i * 360 / 12 + COIL_ROTATION\n",
|
||||
" p_f = scale(translate(rotate(points_f, angle), COIL_CENTER_RADIUS, angle), 0.1)\n",
|
||||
" p_b = scale(translate(rotate(points_b, angle), COIL_CENTER_RADIUS, angle), 0.1)\n",
|
||||
"# write the coil out in a format that can be simulated\n",
|
||||
"p_f = rotate(points_f, 90)\n",
|
||||
"p_b = rotate(points_b, 90)\n",
|
||||
"\n",
|
||||
" # we'll have positive current through the A coils, and negative current through the B coils\n",
|
||||
" current = 0\n",
|
||||
" if i % 3 == 0:\n",
|
||||
" current = 0.5\n",
|
||||
" elif i % 3 == 1:\n",
|
||||
" current = -0.5\n",
|
||||
"with open(fname + \".csv\", \"w\") as f:\n",
|
||||
" for point in p_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
"\n",
|
||||
"# two layer board\n",
|
||||
" with open(f\"simulations/coil-2-{i}.txt\", \"wt\") as f:\n",
|
||||
"with open(fname + \"-2-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in p_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0, {current}\\n\")\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
" for point in p_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-0.62,{current}\\n\")\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-0.062,0.5\\n\")\n",
|
||||
"\n",
|
||||
" # four layer board\n",
|
||||
" with open(f\"simulations/coil-4-top-{i}.txt\", \"wt\") as f:\n",
|
||||
"# all four layer board\n",
|
||||
"with open(fname + \"-4-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in p_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,{current}\\n\")\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
" for point in p_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-0.11,{current}\\n\")\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-0.011,0.5\\n\")\n",
|
||||
" for point in p_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-(0.011+0.04),0.5\\n\")\n",
|
||||
" for point in p_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-(0.011+0.011+0.04),0.5\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# write the coil out in a format that can be simulated\n",
|
||||
"# shift the coils aronnd to make connections a bit easier\n",
|
||||
"pf = rotate(points_f, 90)\n",
|
||||
"pb = rotate(points_b, 90)\n",
|
||||
"fname = \"simulations/coils/coil_12_custom\"\n",
|
||||
"if USE_SPIRAL:\n",
|
||||
" fname = \"simulations/coils/coil_12_spiral\"\n",
|
||||
"\n",
|
||||
" with open(f\"simulations/coil-4-bottom-{i}.txt\", \"wt\") as f:\n",
|
||||
" for point in p_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-(0.11+0.4),{current}\\n\")\n",
|
||||
" for point in p_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-(0.11+0.11+0.4),{current}\\n\")"
|
||||
"with open(fname + \".csv\", \"w\") as f:\n",
|
||||
" for point in pf:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0,0.5\\n\")\n",
|
||||
"\n",
|
||||
"# two layer board\n",
|
||||
"with open(fname + \"-2-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in pf[::-1]:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0,0.5\\n\")\n",
|
||||
" for point in pb:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-0.062,0.5\\n\")\n",
|
||||
"\n",
|
||||
"# all four layer board\n",
|
||||
"with open(fname + \"-4-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in pf[::-1]:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0,0.5\\n\")\n",
|
||||
" for point in pb:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-0.011,0.5\\n\")\n",
|
||||
" for point in pf[::-1]:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-(0.011+0.04),0.5\\n\")\n",
|
||||
" for point in pb:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-(0.011+0.011+0.04),0.5\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -538,35 +626,35 @@
|
|||
"\n",
|
||||
"outer_cuts = (\n",
|
||||
" draw_arc(-45 + nibble_angle_size / 2, 45 - nibble_angle_size / 2, STATOR_RADIUS, 5)\n",
|
||||
" # + translate(\n",
|
||||
" # rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5)[::-1], 135),\n",
|
||||
" # STATOR_RADIUS,\n",
|
||||
" # 45,\n",
|
||||
" # )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5)[::-1], 135),\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 45,\n",
|
||||
" )\n",
|
||||
" + draw_arc(\n",
|
||||
" 45 + nibble_angle_size / 2, 135 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" # + translate(\n",
|
||||
" # rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5), 225)[::-1],\n",
|
||||
" # STATOR_RADIUS,\n",
|
||||
" # 135,\n",
|
||||
" # )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 225)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 135,\n",
|
||||
" )\n",
|
||||
" + draw_arc(\n",
|
||||
" 135 + nibble_angle_size / 2, 225 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" # + translate(\n",
|
||||
" # rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5), 315)[::-1],\n",
|
||||
" # STATOR_RADIUS,\n",
|
||||
" # 225,\n",
|
||||
" # )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 315)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 225,\n",
|
||||
" )\n",
|
||||
" + draw_arc(\n",
|
||||
" 225 + nibble_angle_size / 2, 315 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" # + translate(\n",
|
||||
" # rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5), 45)[::-1],\n",
|
||||
" # STATOR_RADIUS,\n",
|
||||
" # 315,\n",
|
||||
" # )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 45)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 315,\n",
|
||||
" )\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"edge_cuts = [\n",
|
||||
|
@ -626,7 +714,7 @@
|
|||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "1ce20143987840b9786ebb5907032c9c3a8efacbb887dbb0ebc4934f2ad26cb3"
|
||||
"hash": "fc384f9db26c31784edfba3761ba3d2c7b2f9b8a63e03a9eb0778fc35334efe1"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
"# PCB Edge size\n",
|
||||
"STATOR_RADIUS = 25\n",
|
||||
"STATOR_HOLE_RADIUS = 5.5\n",
|
||||
"HOLE_SPACE = 2\n",
|
||||
"\n",
|
||||
"# where to puth the mounting pins\n",
|
||||
"SCREW_HOLE_DRILL_DIAM = 2.3 # 2.3mm drill for a 2mm screw\n",
|
||||
|
@ -72,16 +73,41 @@
|
|||
"\n",
|
||||
"HOLE_SPACING = 0.25\n",
|
||||
"\n",
|
||||
"# where to put the input pads\n",
|
||||
"INPUT_PAD_RADIUS = STATOR_RADIUS - (PAD_WIDTH / 2 + VIA_DIAM + TRACK_SPACING)\n",
|
||||
"\n",
|
||||
"# Coil params\n",
|
||||
"TURNS = 26\n",
|
||||
"COIL_CENTER_RADIUS = 15\n",
|
||||
"COIL_VIA_RADIUS = 16\n",
|
||||
"COIL_VIA_RADIUS = 15.3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Large 30 mm version\n",
|
||||
"\n",
|
||||
"# where to place the pins\n",
|
||||
"# CONNECTION_PINS_RADIUS = 16.5\n",
|
||||
"# PCB Edge size\n",
|
||||
"# STATOR_RADIUS = 30\n",
|
||||
"\n",
|
||||
"# # where to puth the mounting pins\n",
|
||||
"# SCREW_HOLE_DRILL_DIAM = 2.3 # 2.3mm drill for a 2mm screw\n",
|
||||
"# SCREW_HOLE_RADIUS = STATOR_RADIUS\n",
|
||||
"\n",
|
||||
"# # Coil params\n",
|
||||
"# TURNS = 31\n",
|
||||
"# COIL_CENTER_RADIUS = 19\n",
|
||||
"# COIL_VIA_RADIUS = 19.3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# where to put the input pads\n",
|
||||
"INPUT_PAD_RADIUS = STATOR_RADIUS - (PAD_WIDTH / 2 + VIA_DIAM + TRACK_SPACING)\n",
|
||||
"\n",
|
||||
"USE_SPIRAL = False\n",
|
||||
"\n",
|
||||
|
@ -218,8 +244,8 @@
|
|||
" optimize_points(get_points(template, TURNS, TRACK_SPACING + TRACK_WIDTH)), 2\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
" points_f = [(0, 0)] + points_f\n",
|
||||
" points_b = [(0, 0)] + points_b\n",
|
||||
" points_f = [(COIL_VIA_RADIUS - COIL_CENTER_RADIUS, 0)] + points_f\n",
|
||||
" points_b = [(COIL_VIA_RADIUS - COIL_CENTER_RADIUS, 0)] + points_b\n",
|
||||
"\n",
|
||||
" df = pd.DataFrame(points_f, columns=[\"x\", \"y\"])\n",
|
||||
" ax = df.plot.line(x=\"x\", y=\"y\", color=\"blue\")\n",
|
||||
|
@ -237,27 +263,7 @@
|
|||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# write the coil out in a format that can be simulated\n",
|
||||
"\n",
|
||||
"# two layer board\n",
|
||||
"with open(\"simulations/coil-2.txt\", \"wt\") as f:\n",
|
||||
" for point in points_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
" for point in points_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-0.62,0.5\\n\")\n",
|
||||
"\n",
|
||||
"# four layer board\n",
|
||||
"with open(\"simulations/coil-4.txt\", \"wt\") as f:\n",
|
||||
" for point in points_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
" for point in points_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-0.11,0.5\\n\")\n",
|
||||
" for point in points_f[::-1]:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-(0.11+0.4),0.5\\n\")\n",
|
||||
" for point in points_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0-(0.11+0.11+0.4),0.5\\n\")"
|
||||
]
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
|
@ -309,6 +315,50 @@
|
|||
" print(\"Using template\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Write out coils for simulation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# write the coil out in a format that can be simulated\n",
|
||||
"# rotate the points by 90 degrees so that the x axis is horizontal\n",
|
||||
"pf = rotate(points_f, 90)\n",
|
||||
"pb = rotate(points_b, 90)\n",
|
||||
"fname = \"simulations/coils/coil_6_custom\"\n",
|
||||
"if USE_SPIRAL:\n",
|
||||
" fname = \"simulations/coils/coil_6_spiral\"\n",
|
||||
"\n",
|
||||
"with open(fname + \".csv\", \"w\") as f:\n",
|
||||
" for point in pf:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0,0.5\\n\")\n",
|
||||
"\n",
|
||||
"# two layer board\n",
|
||||
"with open(fname + \"-2-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in pf[::-1]:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0,0.5\\n\")\n",
|
||||
" for point in pb:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-0.062,0.5\\n\")\n",
|
||||
"\n",
|
||||
"# all four layer board\n",
|
||||
"with open(fname + \"-4-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in pf[::-1]:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0,0.5\\n\")\n",
|
||||
" for point in pb:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-0.011,0.5\\n\")\n",
|
||||
" for point in pf[::-1]:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-(0.011+0.04),0.5\\n\")\n",
|
||||
" for point in pb:\n",
|
||||
" f.write(f\"{point[0]/10},{point[1]/10},0-(0.011+0.011+0.04),0.5\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
@ -403,12 +453,12 @@
|
|||
"tracks_b.append(coil_C_opp_b)\n",
|
||||
"\n",
|
||||
"# connect the front and back coils together\n",
|
||||
"vias.append(create_via(get_arc_point(angle_A, COIL_CENTER_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_B, COIL_CENTER_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_C, COIL_CENTER_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_A_opp, COIL_CENTER_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_B_opp, COIL_CENTER_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_C_opp, COIL_CENTER_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_A, COIL_VIA_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_B, COIL_VIA_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_C, COIL_VIA_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_A_opp, COIL_VIA_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_B_opp, COIL_VIA_RADIUS)))\n",
|
||||
"vias.append(create_via(get_arc_point(angle_C_opp, COIL_VIA_RADIUS)))\n",
|
||||
"\n",
|
||||
"# connect the front copper opposite coils together\n",
|
||||
"common_connection_radius = SCREW_HOLE_RADIUS - (\n",
|
||||
|
@ -426,7 +476,7 @@
|
|||
"# vias.append(create_via(get_arc_point(angle_C_opp, common_connection_radius)))\n",
|
||||
"\n",
|
||||
"# wires for connecting to opposite coils\n",
|
||||
"connection_radius1 = STATOR_HOLE_RADIUS + (2 * TRACK_SPACING)\n",
|
||||
"connection_radius1 = STATOR_HOLE_RADIUS + (2 * TRACK_SPACING + HOLE_SPACING)\n",
|
||||
"connection_radius2 = connection_radius1 + (2 * TRACK_SPACING + VIA_DIAM / 2)\n",
|
||||
"\n",
|
||||
"# draw a 45 degree line from each coil at connection radius 1\n",
|
||||
|
@ -556,7 +606,7 @@
|
|||
"outer_cuts = (\n",
|
||||
" draw_arc(-45 + nibble_angle_size / 2, 45 - nibble_angle_size / 2, STATOR_RADIUS, 5)\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5)[::-1], 135),\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5)[::-1], 135),\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 45,\n",
|
||||
" )\n",
|
||||
|
@ -564,7 +614,7 @@
|
|||
" 45 + nibble_angle_size / 2, 135 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5), 225)[::-1],\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 225)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 135,\n",
|
||||
" )\n",
|
||||
|
@ -572,7 +622,7 @@
|
|||
" 135 + nibble_angle_size / 2, 225 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5), 315)[::-1],\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 315)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 225,\n",
|
||||
" )\n",
|
||||
|
@ -580,7 +630,7 @@
|
|||
" 225 + nibble_angle_size / 2, 315 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(1, 179, SCREW_HOLE_DRILL_DIAM / 2, 5), 45)[::-1],\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 45)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 315,\n",
|
||||
" )\n",
|
||||
|
@ -593,7 +643,7 @@
|
|||
"\n",
|
||||
"# dump out the json version\n",
|
||||
"json_result = dump_json(\n",
|
||||
" filename=\"coils_6.json\",\n",
|
||||
" filename=f\"coils_6_{STATOR_RADIUS}.json\",\n",
|
||||
" track_width=TRACK_WIDTH,\n",
|
||||
" pin_diam=PIN_DIAM,\n",
|
||||
" pin_drill=PIN_DRILL,\n",
|
||||
|
@ -643,7 +693,7 @@
|
|||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "1ce20143987840b9786ebb5907032c9c3a8efacbb887dbb0ebc4934f2ad26cb3"
|
||||
"hash": "fc384f9db26c31784edfba3761ba3d2c7b2f9b8a63e03a9eb0778fc35334efe1"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
579
coil_generator-radial.ipynb
Normal file
579
coil_generator-radial.ipynb
Normal file
|
@ -0,0 +1,579 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"import numpy as np\n",
|
||||
"\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from skspatial.objects import LineSegment, Line, Vector\n",
|
||||
"\n",
|
||||
"# some helper functions\n",
|
||||
"from helpers import (\n",
|
||||
" get_arc_point,\n",
|
||||
" draw_arc,\n",
|
||||
" rotate,\n",
|
||||
" translate,\n",
|
||||
" flip_y,\n",
|
||||
" flip_x,\n",
|
||||
" optimize_points,\n",
|
||||
" chaikin,\n",
|
||||
" rotate_point,\n",
|
||||
" scale,\n",
|
||||
")\n",
|
||||
"from pcb_json import (\n",
|
||||
" dump_json,\n",
|
||||
" plot_json,\n",
|
||||
" create_via,\n",
|
||||
" create_pad,\n",
|
||||
" create_pin,\n",
|
||||
" create_track,\n",
|
||||
" create_silk,\n",
|
||||
" create_silk,\n",
|
||||
" create_mounting_hole,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"from enum import Enum\n",
|
||||
"\n",
|
||||
"Layer = Enum(\"Layer\", \"FRONT BACK\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Track width and spacing\n",
|
||||
"TRACK_WIDTH = 0.127\n",
|
||||
"TRACK_SPACING = 0.127\n",
|
||||
"\n",
|
||||
"# via defaults\n",
|
||||
"VIA_DIAM = 0.8\n",
|
||||
"VIA_DRILL = 0.4\n",
|
||||
"\n",
|
||||
"# this is for a 1.27mm pitch pin\n",
|
||||
"PIN_DIAM = 1.0\n",
|
||||
"PIN_DRILL = 0.65\n",
|
||||
"\n",
|
||||
"# this is for the PCB connector - see https://www.farnell.com/datasheets/2003059.pdf\n",
|
||||
"PAD_WIDTH = 3\n",
|
||||
"PAD_HEIGHT = 2\n",
|
||||
"PAD_PITCH = 2.5\n",
|
||||
"\n",
|
||||
"STATOR_HOLE_RADIUS = 5.5\n",
|
||||
"HOLE_SPACING = 0.25"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Standard 25 mm version\n",
|
||||
"\n",
|
||||
"# PCB Edge size\n",
|
||||
"STATOR_RADIUS = 25\n",
|
||||
"STATOR_HOLE_RADIUS = 5.5\n",
|
||||
"\n",
|
||||
"# where to puth the mounting pins\n",
|
||||
"SCREW_HOLE_DRILL_DIAM = 2.3 # 2.3mm drill for a 2mm screw\n",
|
||||
"SCREW_HOLE_RADIUS = STATOR_RADIUS\n",
|
||||
"\n",
|
||||
"# Coil params\n",
|
||||
"TURNS = 12\n",
|
||||
"COIL_CENTER_RADIUS = 16\n",
|
||||
"COIL_VIA_RADIUS = 17"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Large 30 mm version\n",
|
||||
"\n",
|
||||
"# PCB Edge size\n",
|
||||
"STATOR_RADIUS = 30\n",
|
||||
"\n",
|
||||
"# where to puth the mounting pins\n",
|
||||
"SCREW_HOLE_DRILL_DIAM = 2.3 # 2.3mm drill for a 2mm screw\n",
|
||||
"SCREW_HOLE_RADIUS = STATOR_RADIUS\n",
|
||||
"\n",
|
||||
"# Coil params\n",
|
||||
"TURNS = 16\n",
|
||||
"COIL_CENTER_RADIUS = 19.95\n",
|
||||
"COIL_VIA_RADIUS = 20.95"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# where to put the input pads\n",
|
||||
"INPUT_PAD_RADIUS = STATOR_RADIUS - (PAD_WIDTH / 2 + VIA_DIAM + TRACK_SPACING)\n",
|
||||
"\n",
|
||||
"USE_SPIRAL = False\n",
|
||||
"\n",
|
||||
"LAYERS = 4"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Radial coil generator"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def get_points(spacing, inner_radius, outer_radius, start_angle, end_angle):\n",
|
||||
" # first calculate the angle step size from the spacing and the inner_radius\n",
|
||||
" spacing_angle = np.rad2deg(np.arctan2(spacing, inner_radius))\n",
|
||||
" print(spacing_angle)\n",
|
||||
" # now calculate the points be iterating from start_angle to end_angle with the spacing_angle\n",
|
||||
" points = []\n",
|
||||
" for angle in np.arange(start_angle, end_angle, spacing_angle * 2):\n",
|
||||
" points.append(get_arc_point(angle, inner_radius))\n",
|
||||
" points.append(get_arc_point(angle, outer_radius))\n",
|
||||
" points.append(\n",
|
||||
" (\n",
|
||||
" get_arc_point(angle, outer_radius)[0],\n",
|
||||
" get_arc_point(angle, outer_radius)[1] + spacing,\n",
|
||||
" )\n",
|
||||
" )\n",
|
||||
" points.append(get_arc_point(angle + spacing_angle, inner_radius))\n",
|
||||
" return points"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"points_f = get_points(\n",
|
||||
" TRACK_SPACING + TRACK_WIDTH,\n",
|
||||
" (COIL_CENTER_RADIUS - 10),\n",
|
||||
" COIL_CENTER_RADIUS + 10,\n",
|
||||
" -15,\n",
|
||||
" 15,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"df = pd.DataFrame(points_f, columns=[\"x\", \"y\"])\n",
|
||||
"ax = df.plot.line(x=\"x\", y=\"y\", color=\"blue\")\n",
|
||||
"ax.axis(\"equal\")\n",
|
||||
"\n",
|
||||
"# calculat the total length of the track to compute the resistance\n",
|
||||
"total_length_front = 0\n",
|
||||
"for i in range(len(points_f) - 1):\n",
|
||||
" total_length_front += np.linalg.norm(\n",
|
||||
" np.array(points_f[i + 1]) - np.array(points_f[i])\n",
|
||||
" )\n",
|
||||
"print(\"Total length front\", total_length_front)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"spacing = TRACK_SPACING + TRACK_WIDTH\n",
|
||||
"inner_radius = COIL_CENTER_RADIUS - 10\n",
|
||||
"outer_radius = COIL_CENTER_RADIUS + 10\n",
|
||||
"start_angle = -15\n",
|
||||
"end_angle = 15\n",
|
||||
"# first calculate the angle step size from the spacing and the inner_radius\n",
|
||||
"spacing_angle = np.rad2deg(np.arctan2(spacing, inner_radius))\n",
|
||||
"# now calculate the points be iterating from start_angle to end_angle with the spacing_angle\n",
|
||||
"i = 0\n",
|
||||
"count = (end_angle - start_angle) // spacing_angle\n",
|
||||
"print(spacing_angle, count)\n",
|
||||
"# for angle in np.arange(start_angle, end_angle, spacing_angle):\n",
|
||||
"for angle in [start_angle, end_angle]:\n",
|
||||
" i = i + 1\n",
|
||||
" current = 1\n",
|
||||
" if i == 2:\n",
|
||||
" current = -1\n",
|
||||
" with open(f\"simulations/radial_{i}.csv\", \"w\") as f:\n",
|
||||
" points = [\n",
|
||||
" get_arc_point(angle, inner_radius),\n",
|
||||
" get_arc_point(angle, outer_radius),\n",
|
||||
" ]\n",
|
||||
" points = translate(rotate(points, 90), -22.5, 90)\n",
|
||||
" for point in points:\n",
|
||||
" f.write(f\"{point[0]}/10,{point[1]}/10,0,{current}\\n\")\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# # write the coil out in a format that can be simulated\n",
|
||||
"p_f = translate(rotate(points_f, 90), -22.5, 90)\n",
|
||||
"p_b = translate(rotate(points_f, 90), -22.5, 90)\n",
|
||||
"\n",
|
||||
"# df = pd.DataFrame(p_f, columns=[\"x\", \"y\"])\n",
|
||||
"# ax = df.plot.line(x=\"x\", y=\"y\", color=\"blue\")\n",
|
||||
"# ax.axis(\"equal\")\n",
|
||||
"\n",
|
||||
"with open(\"simulations/coils/coil_rad.csv\", \"w\") as f:\n",
|
||||
" for point in p_f:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
"\n",
|
||||
"# two layer board\n",
|
||||
"with open(\"simulations/coils/coil-rad-2-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in p_f:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
" for point in p_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},{0-0.062},0.5\\n\")\n",
|
||||
"\n",
|
||||
"# all four layer board\n",
|
||||
"with open(\"simulations/coils/coil-rad-4-layer.csv\", \"wt\") as f:\n",
|
||||
" for point in p_f:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},0,0.5\\n\")\n",
|
||||
" for point in p_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},{0-0.011},0.5\\n\")\n",
|
||||
" for point in p_f:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},{0-(0.011+0.04)},0.5\\n\")\n",
|
||||
" for point in p_b:\n",
|
||||
" f.write(f\"{point[0]},{point[1]},{0-(0.011+0.011+0.04)},0.5\\n\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Generate PCB Layout"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# calculat the total length of the track to compute the resistance\n",
|
||||
"total_length_front = 0\n",
|
||||
"for i in range(len(points_f) - 1):\n",
|
||||
" total_length_front += np.linalg.norm(\n",
|
||||
" np.array(points_f[i + 1]) - np.array(points_f[i])\n",
|
||||
" )\n",
|
||||
"print(\"Total length front\", total_length_front)\n",
|
||||
"\n",
|
||||
"total_length_back = 0\n",
|
||||
"for i in range(len(points_b) - 1):\n",
|
||||
" total_length_back += np.linalg.norm(\n",
|
||||
" np.array(points_b[i + 1]) - np.array(points_b[i])\n",
|
||||
" )\n",
|
||||
"print(\"Total length back\", total_length_back)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vias = []\n",
|
||||
"tracks_f = []\n",
|
||||
"tracks_b = []\n",
|
||||
"pads = []\n",
|
||||
"pins = []\n",
|
||||
"mounting_holes = []\n",
|
||||
"silk = []\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# shift the coils aronnd to make connections a bit easier\n",
|
||||
"COIL_ROTATION = -360 / 12\n",
|
||||
"\n",
|
||||
"coil_angles = []\n",
|
||||
"for i in range(12):\n",
|
||||
" angle = i * 360 / 12 + COIL_ROTATION\n",
|
||||
" coil_angles.append(angle)\n",
|
||||
"\n",
|
||||
"# the main coils\n",
|
||||
"coil_labels = [\"A\", \"B\", \"C\"]\n",
|
||||
"coils_f = []\n",
|
||||
"coils_b = []\n",
|
||||
"for i in range(12):\n",
|
||||
" angle = coil_angles[i]\n",
|
||||
" if (i // 3) % 2 == 0:\n",
|
||||
" coil_A_f = translate(rotate(points_f, angle), COIL_CENTER_RADIUS, angle)\n",
|
||||
" coil_A_b = translate(rotate(points_b, angle), COIL_CENTER_RADIUS, angle)\n",
|
||||
" else:\n",
|
||||
" # slightly nudge the coils so that they don't overlap when flipped\n",
|
||||
" coil_A_f = translate(rotate(flip_y(points_f), angle), COIL_CENTER_RADIUS, angle)\n",
|
||||
" coil_A_b = translate(rotate(flip_y(points_b), angle), COIL_CENTER_RADIUS, angle)\n",
|
||||
" # keep track of the coils\n",
|
||||
" coils_f.append(coil_A_f)\n",
|
||||
" coils_b.append(coil_A_b)\n",
|
||||
"\n",
|
||||
" tracks_f.append(coil_A_f)\n",
|
||||
" tracks_b.append(coil_A_b)\n",
|
||||
" vias.append(create_via(get_arc_point(angle, COIL_VIA_RADIUS)))\n",
|
||||
" silk.append(\n",
|
||||
" create_silk(get_arc_point(angle, COIL_CENTER_RADIUS), coil_labels[i % 3])\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
"# raidus for connecting the bottoms of the coils together\n",
|
||||
"connection_radius1 = STATOR_HOLE_RADIUS + 3 * TRACK_SPACING\n",
|
||||
"\n",
|
||||
"# create tracks to link the A coils around the center\n",
|
||||
"connection_via_radius_A = connection_radius1 + 3 * TRACK_SPACING + VIA_DIAM / 2\n",
|
||||
"coil_A1_A2_inner = (\n",
|
||||
" [get_arc_point(coil_angles[0], connection_via_radius_A)]\n",
|
||||
" + draw_arc(COIL_ROTATION, coil_angles[3], connection_radius1)\n",
|
||||
" + [get_arc_point(coil_angles[3], connection_via_radius_A)]\n",
|
||||
")\n",
|
||||
"tracks_f.append(coil_A1_A2_inner)\n",
|
||||
"coil_A3_A4_inner = (\n",
|
||||
" [get_arc_point(coil_angles[6], connection_via_radius_A)]\n",
|
||||
" + draw_arc(coil_angles[6], coil_angles[9], connection_radius1)\n",
|
||||
" + [get_arc_point(coil_angles[9], connection_via_radius_A)]\n",
|
||||
")\n",
|
||||
"tracks_f.append(coil_A3_A4_inner)\n",
|
||||
"# connect up the bottoms of the A coils\n",
|
||||
"coils_b[0].append(coil_A1_A2_inner[0])\n",
|
||||
"coils_b[3].append(coil_A1_A2_inner[-1])\n",
|
||||
"coils_b[6].append(coil_A3_A4_inner[0])\n",
|
||||
"coils_b[9].append(coil_A3_A4_inner[-1])\n",
|
||||
"# add the vias to stitch them together\n",
|
||||
"vias.append(create_via(coil_A1_A2_inner[0]))\n",
|
||||
"vias.append(create_via(coil_A1_A2_inner[-1]))\n",
|
||||
"vias.append(create_via(coil_A3_A4_inner[0]))\n",
|
||||
"vias.append(create_via(coil_A3_A4_inner[-1]))\n",
|
||||
"\n",
|
||||
"# create tracks to link the B coils around the center - this can all be done on the bottom layer\n",
|
||||
"coil_B1_B2_inner = draw_arc(coil_angles[1], coil_angles[4], connection_radius1)\n",
|
||||
"tracks_b.append(coil_B1_B2_inner)\n",
|
||||
"coil_B3_B4_inner = draw_arc(coil_angles[7], coil_angles[10], connection_radius1)\n",
|
||||
"tracks_b.append(coil_B3_B4_inner)\n",
|
||||
"# connect up the bottoms of the A coils\n",
|
||||
"coils_b[1].append(coil_B1_B2_inner[0])\n",
|
||||
"coils_b[4].append(coil_B1_B2_inner[-1])\n",
|
||||
"coils_b[7].append(coil_B3_B4_inner[0])\n",
|
||||
"coils_b[10].append(coil_B3_B4_inner[-1])\n",
|
||||
"\n",
|
||||
"# create tracks to link the C coils around the center\n",
|
||||
"connection_via_radius_C = connection_via_radius_A + 3 * TRACK_SPACING + VIA_DIAM / 2\n",
|
||||
"coil_C1_C2_inner = draw_arc(coil_angles[2], coil_angles[5], connection_via_radius_C)\n",
|
||||
"tracks_f.append(coil_C1_C2_inner)\n",
|
||||
"coil_C3_C4_inner = draw_arc(coil_angles[8], coil_angles[11], connection_via_radius_C)\n",
|
||||
"tracks_f.append(coil_C3_C4_inner)\n",
|
||||
"# connect up the bottoms of the B coils\n",
|
||||
"coils_b[2].append(coil_C1_C2_inner[0])\n",
|
||||
"coils_b[5].append(coil_C1_C2_inner[-1])\n",
|
||||
"coils_b[8].append(coil_C3_C4_inner[0])\n",
|
||||
"coils_b[11].append(coil_C3_C4_inner[-1])\n",
|
||||
"# add the vias to stitch them together\n",
|
||||
"vias.append(create_via(coil_C1_C2_inner[0]))\n",
|
||||
"vias.append(create_via(coil_C1_C2_inner[-1]))\n",
|
||||
"vias.append(create_via(coil_C3_C4_inner[0]))\n",
|
||||
"vias.append(create_via(coil_C3_C4_inner[-1]))\n",
|
||||
"\n",
|
||||
"# connect the last three coils together\n",
|
||||
"common_connection_radius = SCREW_HOLE_RADIUS - (SCREW_HOLE_DRILL_DIAM / 2 + 0.5)\n",
|
||||
"tracks_f.append(draw_arc(coil_angles[9], coil_angles[11], common_connection_radius))\n",
|
||||
"coils_f[9].append(get_arc_point(coil_angles[9], common_connection_radius))\n",
|
||||
"coils_f[10].append(get_arc_point(coil_angles[10], common_connection_radius))\n",
|
||||
"coils_f[11].append(get_arc_point(coil_angles[11], common_connection_radius))\n",
|
||||
"\n",
|
||||
"# connect the outer A coils together\n",
|
||||
"outer_connection_radius_A = SCREW_HOLE_RADIUS - (SCREW_HOLE_DRILL_DIAM / 2 + 0.5)\n",
|
||||
"tracks_f.append(draw_arc(coil_angles[3], coil_angles[6], outer_connection_radius_A))\n",
|
||||
"coils_f[3].append(get_arc_point(coil_angles[3], outer_connection_radius_A))\n",
|
||||
"coils_f[6].append(get_arc_point(coil_angles[6], outer_connection_radius_A))\n",
|
||||
"\n",
|
||||
"# connect the outer B coils together\n",
|
||||
"outer_connection_radius_B = outer_connection_radius_A - TRACK_SPACING - VIA_DIAM / 2\n",
|
||||
"tracks_b.append(\n",
|
||||
" [get_arc_point(coil_angles[4], outer_connection_radius_B)]\n",
|
||||
" + draw_arc(coil_angles[4], coil_angles[7], outer_connection_radius_A)\n",
|
||||
" + [get_arc_point(coil_angles[7], outer_connection_radius_B)]\n",
|
||||
")\n",
|
||||
"coils_f[4].append(get_arc_point(coil_angles[4], outer_connection_radius_B))\n",
|
||||
"coils_f[7].append(get_arc_point(coil_angles[7], outer_connection_radius_B))\n",
|
||||
"vias.append(\n",
|
||||
" create_via(get_arc_point(4 * 360 / 12 + COIL_ROTATION, outer_connection_radius_B))\n",
|
||||
")\n",
|
||||
"vias.append(\n",
|
||||
" create_via(get_arc_point(7 * 360 / 12 + COIL_ROTATION, outer_connection_radius_B))\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# connect the outer C coilds together\n",
|
||||
"outer_connection_radius_C = outer_connection_radius_B - TRACK_SPACING - VIA_DIAM / 2\n",
|
||||
"tracks_b.append(\n",
|
||||
" draw_arc(\n",
|
||||
" 5 * 360 / 12 + COIL_ROTATION,\n",
|
||||
" 8 * 360 / 12 + COIL_ROTATION,\n",
|
||||
" outer_connection_radius_C,\n",
|
||||
" )\n",
|
||||
")\n",
|
||||
"coils_f[5].append(\n",
|
||||
" get_arc_point(5 * 360 / 12 + COIL_ROTATION, outer_connection_radius_C)\n",
|
||||
")\n",
|
||||
"coils_f[8].append(\n",
|
||||
" get_arc_point(8 * 360 / 12 + COIL_ROTATION, outer_connection_radius_C)\n",
|
||||
")\n",
|
||||
"vias.append(\n",
|
||||
" create_via(get_arc_point(5 * 360 / 12 + COIL_ROTATION, outer_connection_radius_C))\n",
|
||||
")\n",
|
||||
"vias.append(\n",
|
||||
" create_via(get_arc_point(8 * 360 / 12 + COIL_ROTATION, outer_connection_radius_C))\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# create the pads for connecting the inputs to the coils\n",
|
||||
"silk.append(\n",
|
||||
" create_silk((INPUT_PAD_RADIUS - PAD_HEIGHT - 2.5, PAD_PITCH), \"C\", \"b\", 2.5, -900)\n",
|
||||
")\n",
|
||||
"silk.append(create_silk((INPUT_PAD_RADIUS - PAD_HEIGHT - 2.5, 0), \"B\", \"b\", 2.5, -900))\n",
|
||||
"silk.append(\n",
|
||||
" create_silk((INPUT_PAD_RADIUS - PAD_HEIGHT - 2.5, -PAD_PITCH), \"A\", \"b\", 2.5, -900)\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"pads.append(create_pad((INPUT_PAD_RADIUS, -PAD_PITCH), PAD_WIDTH, PAD_HEIGHT, \"b\"))\n",
|
||||
"pads.append(create_pad((INPUT_PAD_RADIUS, 0), PAD_WIDTH, PAD_HEIGHT, \"b\"))\n",
|
||||
"pads.append(create_pad((INPUT_PAD_RADIUS, PAD_PITCH), PAD_WIDTH, PAD_HEIGHT, \"b\"))\n",
|
||||
"\n",
|
||||
"# connect coil A to the top pad\n",
|
||||
"pad_connection_point_x = INPUT_PAD_RADIUS\n",
|
||||
"pad_angle = np.rad2deg(np.arcsin(PAD_PITCH / pad_connection_point_x))\n",
|
||||
"coils_f[0].append(get_arc_point(coil_angles[0], pad_connection_point_x))\n",
|
||||
"vias.append(create_via(get_arc_point(coil_angles[0], pad_connection_point_x)))\n",
|
||||
"# connect coil B to the middle pad\n",
|
||||
"coils_f[1].append((pad_connection_point_x + PAD_WIDTH / 2 + VIA_DIAM / 2, 0))\n",
|
||||
"vias.append(create_via(((pad_connection_point_x + PAD_WIDTH / 2 + VIA_DIAM / 2, 0))))\n",
|
||||
"# connect coil C to the bottom pad\n",
|
||||
"coils_f[2].append(get_arc_point(coil_angles[2], pad_connection_point_x))\n",
|
||||
"vias.append(create_via(get_arc_point(coil_angles[2], pad_connection_point_x)))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# if we are doing four layers then duplicate the front and back layers on (front and inner1), (inner2 and back)\n",
|
||||
"tracks_in1 = []\n",
|
||||
"tracks_in2 = []\n",
|
||||
"if LAYERS == 4:\n",
|
||||
" tracks_in1 = tracks_b.copy()\n",
|
||||
" tracks_in2 = tracks_f.copy()\n",
|
||||
"\n",
|
||||
"# these final bits of wiring up to the input pads don't need to be duplicated\n",
|
||||
"tracks_b.append(\n",
|
||||
" [(pad_connection_point_x + PAD_WIDTH / 2, 0), (pad_connection_point_x, 0)]\n",
|
||||
")\n",
|
||||
"tracks_b.append(draw_arc(coil_angles[0], -pad_angle, pad_connection_point_x, 1))\n",
|
||||
"tracks_b.append(draw_arc(coil_angles[2], pad_angle, pad_connection_point_x, 1))\n",
|
||||
"\n",
|
||||
"nibble_angle_size = 360 * SCREW_HOLE_DRILL_DIAM / (2 * np.pi * STATOR_RADIUS)\n",
|
||||
"\n",
|
||||
"outer_cuts = (\n",
|
||||
" draw_arc(-45 + nibble_angle_size / 2, 45 - nibble_angle_size / 2, STATOR_RADIUS, 5)\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5)[::-1], 135),\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 45,\n",
|
||||
" )\n",
|
||||
" + draw_arc(\n",
|
||||
" 45 + nibble_angle_size / 2, 135 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 225)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 135,\n",
|
||||
" )\n",
|
||||
" + draw_arc(\n",
|
||||
" 135 + nibble_angle_size / 2, 225 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 315)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 225,\n",
|
||||
" )\n",
|
||||
" + draw_arc(\n",
|
||||
" 225 + nibble_angle_size / 2, 315 - nibble_angle_size / 2, STATOR_RADIUS, 5\n",
|
||||
" )\n",
|
||||
" + translate(\n",
|
||||
" rotate(draw_arc(5, 175, SCREW_HOLE_DRILL_DIAM / 2, 5), 45)[::-1],\n",
|
||||
" STATOR_RADIUS,\n",
|
||||
" 315,\n",
|
||||
" )\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"edge_cuts = [\n",
|
||||
" outer_cuts,\n",
|
||||
" draw_arc(0, 360, STATOR_HOLE_RADIUS, 1),\n",
|
||||
"]\n",
|
||||
"\n",
|
||||
"# dump out the json version\n",
|
||||
"json_result = dump_json(\n",
|
||||
" filename=f\"coils_12_{STATOR_RADIUS}mm.json\",\n",
|
||||
" track_width=TRACK_WIDTH,\n",
|
||||
" pin_diam=PIN_DIAM,\n",
|
||||
" pin_drill=PIN_DRILL,\n",
|
||||
" via_diam=VIA_DIAM,\n",
|
||||
" via_drill=VIA_DRILL,\n",
|
||||
" vias=vias,\n",
|
||||
" pins=pins,\n",
|
||||
" pads=pads,\n",
|
||||
" silk=silk,\n",
|
||||
" tracks_f=tracks_f,\n",
|
||||
" tracks_in1=tracks_in1,\n",
|
||||
" tracks_in2=tracks_in2,\n",
|
||||
" tracks_b=tracks_b,\n",
|
||||
" mounting_holes=mounting_holes,\n",
|
||||
" edge_cuts=edge_cuts,\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# plot the json\n",
|
||||
"plot_json(json_result)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.10.7 ('venv': venv)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.7"
|
||||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "1ce20143987840b9786ebb5907032c9c3a8efacbb887dbb0ebc4934f2ad26cb3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
|
@ -188,5 +188,34 @@ class CoilPlugin(pcbnew.ActionPlugin):
|
|||
ec.SetPolyPoints(v)
|
||||
board.Add(ec)
|
||||
|
||||
# put it on the solder mask as well - who knows why...
|
||||
for edge_cut in coil_data["edgeCuts"]:
|
||||
ec = pcbnew.PCB_SHAPE(board)
|
||||
ec.SetShape(pcbnew.SHAPE_T_POLY)
|
||||
ec.SetFilled(False)
|
||||
ec.SetLayer(pcbnew.F_Mask)
|
||||
ec.SetWidth(int(0.1 * pcbnew.IU_PER_MM))
|
||||
v = pcbnew.wxPoint_Vector()
|
||||
for point in edge_cut:
|
||||
x = point["x"] + CENTER_X
|
||||
y = point["y"] + CENTER_Y
|
||||
v.append(pcbnew.wxPointMM(x, y))
|
||||
ec.SetPolyPoints(v)
|
||||
board.Add(ec)
|
||||
|
||||
for edge_cut in coil_data["edgeCuts"]:
|
||||
ec = pcbnew.PCB_SHAPE(board)
|
||||
ec.SetShape(pcbnew.SHAPE_T_POLY)
|
||||
ec.SetFilled(False)
|
||||
ec.SetLayer(pcbnew.B_Mask)
|
||||
ec.SetWidth(int(0.1 * pcbnew.IU_PER_MM))
|
||||
v = pcbnew.wxPoint_Vector()
|
||||
for point in edge_cut:
|
||||
x = point["x"] + CENTER_X
|
||||
y = point["y"] + CENTER_Y
|
||||
v.append(pcbnew.wxPointMM(x, y))
|
||||
ec.SetPolyPoints(v)
|
||||
board.Add(ec)
|
||||
|
||||
|
||||
CoilPlugin().register() # Instantiate and register to Pcbnew])
|
||||
|
|
|
@ -4,3 +4,4 @@ numpy
|
|||
pandas
|
||||
scikit-spatial
|
||||
pre-commit
|
||||
plotly
|
||||
|
|
BIN
simulations/.DS_Store
vendored
Normal file
BIN
simulations/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
'''
|
||||
"""
|
||||
Biot-Savart Magnetic Field Calculator v4.3
|
||||
Mingde Yin
|
||||
Ryan Zazo
|
||||
|
@ -6,7 +6,7 @@ Ryan Zazo
|
|||
All lengths are in cm, B-field is in G
|
||||
|
||||
from - https://github.com/vuthalab/biot-savart
|
||||
'''
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
@ -14,17 +14,18 @@ from mpl_toolkits.mplot3d import Axes3D
|
|||
import matplotlib.cm as cm
|
||||
import matplotlib.ticker as ticker
|
||||
|
||||
'''
|
||||
"""
|
||||
Feature Wishlist:
|
||||
improve plot_coil with different colors for different values of current
|
||||
|
||||
accelerate integrator to use meshgrids directly instead of a layer of for loop
|
||||
|
||||
get parse_coil to use vectorized function instead of for loop
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
def parse_coil(filename):
|
||||
'''
|
||||
"""
|
||||
Parses 4 column CSV into x,y,z,I slices for coil.
|
||||
|
||||
Each (x,y,z,I) entry defines a vertex on the coil.
|
||||
|
@ -35,28 +36,41 @@ def parse_coil(filename):
|
|||
- There are 2 amps of current running between points 1 and 2
|
||||
- There are 3 amps of current running between points 2 and 3
|
||||
- The last bit of current is functionally useless.
|
||||
'''
|
||||
with open(filename, "r") as f: return np.array([[eval(i) for i in line.split(",")] for line in f.read().splitlines()]).T
|
||||
"""
|
||||
with open(filename, "r") as f:
|
||||
return np.array(
|
||||
[[eval(i) for i in line.split(",")] for line in f.read().splitlines()]
|
||||
).T
|
||||
|
||||
|
||||
def slice_coil(coil, steplength):
|
||||
'''
|
||||
"""
|
||||
Slices a coil into pieces of size steplength.
|
||||
|
||||
If the coil is already sliced into pieces smaller than that, this does nothing.
|
||||
'''
|
||||
"""
|
||||
|
||||
def interpolate_points(p1, p2, parts):
|
||||
'''
|
||||
"""
|
||||
Produces a series of linearly spaced points between two given points in R3+I
|
||||
|
||||
Linearly interpolates X,Y,Z; but keeps I the SAME
|
||||
|
||||
i.e. (0, 2, 1, 3), (3, 4, 2, 5), parts = 2:
|
||||
(0, 2, 1, 3), (1.5, 3, 1.5, 3), (3, 4, 2, 5)
|
||||
'''
|
||||
return np.column_stack((np.linspace(p1[0], p2[0], parts+1), np.linspace(p1[1], p2[1], parts+1),
|
||||
np.linspace(p1[2], p2[2], parts+1), p1[3] * np.ones((parts+1))))
|
||||
"""
|
||||
return np.column_stack(
|
||||
(
|
||||
np.linspace(p1[0], p2[0], parts + 1),
|
||||
np.linspace(p1[1], p2[1], parts + 1),
|
||||
np.linspace(p1[2], p2[2], parts + 1),
|
||||
p1[3] * np.ones((parts + 1)),
|
||||
)
|
||||
)
|
||||
|
||||
newcoil = np.zeros((1, 4)) # fill column with dummy data, we will remove this later.
|
||||
newcoil = np.zeros(
|
||||
(1, 4)
|
||||
) # fill column with dummy data, we will remove this later.
|
||||
|
||||
segment_starts = coil[:, :-1]
|
||||
segment_ends = coil[:, 1:]
|
||||
|
@ -72,17 +86,21 @@ def slice_coil(coil, steplength):
|
|||
# determine how many steps we must chop each segment into
|
||||
|
||||
for i in range(segments.shape[1]):
|
||||
newrows = interpolate_points(segment_starts[:,i], segment_ends[:,i], stepnumbers[i])
|
||||
newrows = interpolate_points(
|
||||
segment_starts[:, i], segment_ends[:, i], stepnumbers[i]
|
||||
)
|
||||
# set of new interpolated points to feed in
|
||||
newcoil = np.vstack((newcoil, newrows))
|
||||
|
||||
if newcoil.shape[0] %2 != 0: newcoil = np.vstack((newcoil, newcoil[-1,:]))
|
||||
if newcoil.shape[0] % 2 != 0:
|
||||
newcoil = np.vstack((newcoil, newcoil[-1, :]))
|
||||
## Force the coil to have an even number of segments, for Richardson Extrapolation to work
|
||||
|
||||
return newcoil[1:, :].T # return non-dummy columns
|
||||
|
||||
|
||||
def calculate_field(coil, x, y, z):
|
||||
'''
|
||||
"""
|
||||
Calculates magnetic field vector as a result of some position and current x, y, z, I
|
||||
[In the same coordinate system as the coil]
|
||||
|
||||
|
@ -90,15 +108,15 @@ def calculate_field(coil, x, y, z):
|
|||
x, y, z: position in cm
|
||||
|
||||
Output B-field is a 3-D vector in units of G
|
||||
'''
|
||||
"""
|
||||
FACTOR = 0.1 # = mu_0 / 4pi when lengths are in cm, and B-field is in G
|
||||
|
||||
def bs_integrate(start, end):
|
||||
'''
|
||||
"""
|
||||
Produces tiny segment of magnetic field vector (dB) using the midpoint approximation over some interval
|
||||
|
||||
TODO for future optimization: Get this to work with meshgrids directly
|
||||
'''
|
||||
"""
|
||||
dl = (end - start).T
|
||||
mid = (start + end) / 2
|
||||
position = np.array((x - mid[0], y - mid[1], z - mid[2])).T
|
||||
|
@ -106,7 +124,11 @@ def calculate_field(coil, x, y, z):
|
|||
mag = np.sqrt((x - mid[0]) ** 2 + (y - mid[1]) ** 2 + (z - mid[2]) ** 2)
|
||||
# magnitude of the relative position vector
|
||||
|
||||
return start[3] * np.cross(dl[:3], position) / np.array((mag ** 3, mag ** 3, mag ** 3)).T
|
||||
return (
|
||||
start[3]
|
||||
* np.cross(dl[:3], position)
|
||||
/ np.array((mag**3, mag**3, mag**3)).T
|
||||
)
|
||||
# Apply the Biot-Savart Law to get the differential magnetic field
|
||||
# current flowing in this segment is represented by start[3]
|
||||
|
||||
|
@ -115,77 +137,118 @@ def calculate_field(coil, x, y, z):
|
|||
# midpoint integration with 1 layer of Richardson Extrapolation
|
||||
starts, mids, ends = coil[:, :-1:2], coil[:, 1::2], coil[:, 2::2]
|
||||
|
||||
for start, mid, end in np.nditer([starts, mids, ends], flags=['external_loop'], order='F'):
|
||||
for start, mid, end in np.nditer(
|
||||
[starts, mids, ends], flags=["external_loop"], order="F"
|
||||
):
|
||||
# use numpy fast indexing
|
||||
fullpart = bs_integrate(start, end) # stage 1 richardson
|
||||
halfpart = bs_integrate(start, mid) + bs_integrate(mid, end) # stage 2 richardson
|
||||
halfpart = bs_integrate(start, mid) + bs_integrate(
|
||||
mid, end
|
||||
) # stage 2 richardson
|
||||
|
||||
B += 4/3 * halfpart - 1/3 * fullpart # richardson extrapolated midpoint rule
|
||||
B += (
|
||||
4 / 3 * halfpart - 1 / 3 * fullpart
|
||||
) # richardson extrapolated midpoint rule
|
||||
|
||||
return (
|
||||
B * FACTOR
|
||||
) # return SUM of all components as 3 (x,y,z) meshgrids for (Bx, By, Bz) component when evaluated using produce_target_volume
|
||||
|
||||
return B * FACTOR # return SUM of all components as 3 (x,y,z) meshgrids for (Bx, By, Bz) component when evaluated using produce_target_volume
|
||||
|
||||
def produce_target_volume(coil, box_size, start_point, vol_resolution):
|
||||
'''
|
||||
"""
|
||||
Generates a set of field vector values for each tuple (x, y, z) in the box.
|
||||
|
||||
Coil: Input Coil Positions in format specified above, already sub-divided into small pieces
|
||||
box_size: (x, y, z) dimensions of the box in cm
|
||||
start_point: (x, y, z) = (0, 0, 0) = bottom left corner position of the box
|
||||
vol_resolution: Spatial resolution (in cm)
|
||||
'''
|
||||
x = np.linspace(start_point[0], box_size[0] + start_point[0],int(box_size[0]/vol_resolution)+1)
|
||||
y = np.linspace(start_point[1], box_size[1] + start_point[1],int(box_size[1]/vol_resolution)+1)
|
||||
z = np.linspace(start_point[2], box_size[2] + start_point[2],int(box_size[2]/vol_resolution)+1)
|
||||
"""
|
||||
x = np.linspace(
|
||||
start_point[0],
|
||||
box_size[0] + start_point[0],
|
||||
int(box_size[0] / vol_resolution) + 1,
|
||||
)
|
||||
y = np.linspace(
|
||||
start_point[1],
|
||||
box_size[1] + start_point[1],
|
||||
int(box_size[1] / vol_resolution) + 1,
|
||||
)
|
||||
z = np.linspace(
|
||||
start_point[2],
|
||||
box_size[2] + start_point[2],
|
||||
int(box_size[2] / vol_resolution) + 1,
|
||||
)
|
||||
# Generate points at regular spacing, incl. end points
|
||||
|
||||
Z, Y, X = np.meshgrid(z, y, x, indexing='ij')
|
||||
Z, Y, X = np.meshgrid(z, y, x, indexing="ij")
|
||||
# NOTE: Requires axes to be flipped in order for meshgrid to have the correct dimensional order
|
||||
|
||||
return calculate_field(coil, X, Y, Z)
|
||||
|
||||
|
||||
def get_field_vector(targetVolume, position, start_point, volume_resolution):
|
||||
'''
|
||||
"""
|
||||
Returns the B vector [Bx, By, Bz] components in a generated Target Volume at a given position tuple (x, y, z) in a coordinate system
|
||||
|
||||
start_point: (x, y, z) = (0, 0, 0) = bottom left corner position of the box
|
||||
volume_resolution: Division of volumetric meshgrid (generate a point every volume_resolution cm)
|
||||
'''
|
||||
relativePosition = ((np.array(position) - np.array(start_point)) / volume_resolution).astype(int)
|
||||
"""
|
||||
relativePosition = (
|
||||
(np.array(position) - np.array(start_point)) / volume_resolution
|
||||
).astype(int)
|
||||
# adjust to the meshgrid's system
|
||||
|
||||
if (relativePosition < 0).any(): return ("ERROR: Out of bounds! (negative indices)")
|
||||
if (relativePosition < 0).any():
|
||||
return "ERROR: Out of bounds! (negative indices)"
|
||||
|
||||
try: return targetVolume[relativePosition[0], relativePosition[1], relativePosition[2], :]
|
||||
except: return ("ERROR: Out of bounds!")
|
||||
try:
|
||||
return targetVolume[
|
||||
relativePosition[0], relativePosition[1], relativePosition[2], :
|
||||
]
|
||||
except:
|
||||
return "ERROR: Out of bounds!"
|
||||
# basic error checking to see if you actually got a correct input/output
|
||||
|
||||
'''
|
||||
|
||||
"""
|
||||
- If you are indexing a targetvolume meshgrid on your own, remember to account for the offset (starting point), and spatial resolution
|
||||
- You will need an index like <relativePosition = ((np.array(position) - np.array(start_point)) / volume_resolution).astype(int)>
|
||||
'''
|
||||
"""
|
||||
|
||||
def write_target_volume(input_filename,output_filename, box_size, start_point,
|
||||
coil_resolution=1, volume_resolution=1):
|
||||
'''
|
||||
|
||||
def write_target_volume(
|
||||
input_filename,
|
||||
output_filename,
|
||||
box_size,
|
||||
start_point,
|
||||
coil_resolution=1,
|
||||
volume_resolution=1,
|
||||
):
|
||||
"""
|
||||
Takes a coil specified in input_filename, generates a target volume, and saves the generated target volume to output_filename.
|
||||
|
||||
box_size: (x, y, z) dimensions of the box in cm
|
||||
start_point: (x, y, z) = (0, 0, 0) = bottom left corner position of the box AKA the offset
|
||||
coil_resolution: How long each coil subsegment should be
|
||||
volume_resolution: Division of volumetric meshgrid (generate a point every volume_resolution cm)
|
||||
'''
|
||||
"""
|
||||
coil = parse_coil(input_filename)
|
||||
chopped = slice_coil(coil, coil_resolution)
|
||||
targetVolume = produce_target_volume(chopped, box_size, start_point, volume_resolution)
|
||||
targetVolume = produce_target_volume(
|
||||
chopped, box_size, start_point, volume_resolution
|
||||
)
|
||||
|
||||
with open(output_filename, "wb") as f: np.save(f, targetVolume)
|
||||
with open(output_filename, "wb") as f:
|
||||
np.save(f, targetVolume)
|
||||
# stored in standard numpy pickle form
|
||||
|
||||
|
||||
def read_target_volume(filename):
|
||||
'''
|
||||
"""
|
||||
Takes the name of a saved target volume and loads the B vector meshgrid.
|
||||
Returns None if not found.
|
||||
'''
|
||||
"""
|
||||
targetVolume = None
|
||||
|
||||
try:
|
||||
|
@ -195,10 +258,20 @@ def read_target_volume(filename):
|
|||
except:
|
||||
pass
|
||||
|
||||
|
||||
## plotting routines
|
||||
|
||||
def plot_fields(Bfields,box_size,start_point,vol_resolution,which_plane='z',level=0,num_contours=50):
|
||||
'''
|
||||
|
||||
def plot_fields(
|
||||
Bfields,
|
||||
box_size,
|
||||
start_point,
|
||||
vol_resolution,
|
||||
which_plane="z",
|
||||
level=0,
|
||||
num_contours=50,
|
||||
):
|
||||
"""
|
||||
Plots the set of Bfields in the given region, at the specified resolutions.
|
||||
|
||||
Bfields: A 4D array of the Bfield.
|
||||
|
@ -209,22 +282,34 @@ def plot_fields(Bfields,box_size,start_point,vol_resolution,which_plane='z',leve
|
|||
level : The "height" of the plane. For instance the Z = 5 plane would have a level of 5
|
||||
num_contours: THe amount of contours on the contour plot.
|
||||
|
||||
'''
|
||||
"""
|
||||
|
||||
# filled contour plot of Bx, By, and Bz on a chosen slice plane
|
||||
X = np.linspace(start_point[0], box_size[0] + start_point[0],int(box_size[0]/vol_resolution)+1)
|
||||
Y = np.linspace(start_point[1], box_size[1] + start_point[1],int(box_size[1]/vol_resolution)+1)
|
||||
Z = np.linspace(start_point[2], box_size[2] + start_point[2],int(box_size[2]/vol_resolution)+1)
|
||||
X = np.linspace(
|
||||
start_point[0],
|
||||
box_size[0] + start_point[0],
|
||||
int(box_size[0] / vol_resolution) + 1,
|
||||
)
|
||||
Y = np.linspace(
|
||||
start_point[1],
|
||||
box_size[1] + start_point[1],
|
||||
int(box_size[1] / vol_resolution) + 1,
|
||||
)
|
||||
Z = np.linspace(
|
||||
start_point[2],
|
||||
box_size[2] + start_point[2],
|
||||
int(box_size[2] / vol_resolution) + 1,
|
||||
)
|
||||
|
||||
print(Z)
|
||||
|
||||
if which_plane=='x':
|
||||
if which_plane == "x":
|
||||
|
||||
converted_level = np.where(X >= level)
|
||||
B_sliced = [Bfields[converted_level[0][0], :, :, i].T for i in range(3)]
|
||||
x_label, y_label = "y", "z"
|
||||
x_array, y_array = Y, Z
|
||||
elif which_plane=='y':
|
||||
elif which_plane == "y":
|
||||
converted_level = np.where(Y >= level)
|
||||
B_sliced = [Bfields[:, converted_level[0][0], :, i].T for i in range(3)]
|
||||
x_label, y_label = "x", "z"
|
||||
|
@ -238,34 +323,42 @@ def plot_fields(Bfields,box_size,start_point,vol_resolution,which_plane='z',leve
|
|||
|
||||
Bmin, Bmax = np.amin(B_sliced), np.amax(B_sliced)
|
||||
|
||||
component_labels = ['x','y','z']
|
||||
component_labels = ["x", "y", "z"]
|
||||
fig, axes = plt.subplots(nrows=4, ncols=1, figsize=(10, 40))
|
||||
axes[0].set_ylabel(y_label + " (cm)")
|
||||
|
||||
for i in range(3):
|
||||
contours = axes[i].contourf(x_array,y_array,B_sliced[i],
|
||||
vmin=Bmin,vmax=Bmax,
|
||||
cmap=cm.magma,levels=num_contours)
|
||||
contours = axes[i].contourf(
|
||||
x_array,
|
||||
y_array,
|
||||
B_sliced[i],
|
||||
vmin=Bmin,
|
||||
vmax=Bmax,
|
||||
cmap=cm.magma,
|
||||
levels=num_contours,
|
||||
)
|
||||
axes[i].set_xlabel(x_label + " (cm)")
|
||||
axes[i].set_title("$\mathcal{B}$" + "$_{}$".format(component_labels[i]))
|
||||
|
||||
axes[3].set_aspect(100)
|
||||
fig.colorbar(contours,cax=axes[3],extend='both')
|
||||
fig.colorbar(contours, cax=axes[3], extend="both")
|
||||
|
||||
plt.tight_layout()
|
||||
|
||||
plt.show()
|
||||
return plt
|
||||
|
||||
|
||||
def plot_coil(*input_filenames):
|
||||
'''
|
||||
"""
|
||||
Plots one or more coils in space.
|
||||
|
||||
input_filenames: Name of the files containing the coils.
|
||||
Should be formatted appropriately.
|
||||
'''
|
||||
"""
|
||||
fig = plt.figure()
|
||||
tick_spacing = 2
|
||||
ax = fig.add_subplot(111, projection='3d')
|
||||
ax = fig.add_subplot(111, projection="3d")
|
||||
ax.set_xlabel("$x$ (cm)")
|
||||
ax.set_ylabel("$y$ (cm)")
|
||||
ax.set_zlabel("$z$ (cm)")
|
||||
|
@ -273,29 +366,61 @@ def plot_coil(*input_filenames):
|
|||
for input_filename in input_filenames:
|
||||
coil_points = np.array(parse_coil(input_filename))
|
||||
|
||||
ax.plot3D(coil_points[0,:],coil_points[1,:],coil_points[2,:],lw=2)
|
||||
ax.plot3D(
|
||||
coil_points[0, :], coil_points[1, :], coil_points[2, :], lw=2, color="red"
|
||||
)
|
||||
for axis in [ax.xaxis, ax.yaxis, ax.zaxis]:
|
||||
axis.set_major_locator(ticker.MultipleLocator(tick_spacing))
|
||||
plt.tight_layout()
|
||||
# set the size of the plot
|
||||
fig.set_size_inches(10, 10)
|
||||
plt.show()
|
||||
# save the plot
|
||||
fig.savefig("coil.png", dpi=300)
|
||||
|
||||
|
||||
def plot_coil2(coil_points):
|
||||
"""
|
||||
Plots one or more coils in space.
|
||||
|
||||
input_filenames: Name of the files containing the coils.
|
||||
Should be formatted appropriately.
|
||||
"""
|
||||
fig = plt.figure()
|
||||
tick_spacing = 2
|
||||
ax = fig.add_subplot(111, projection="3d")
|
||||
ax.set_xlabel("$x$ (cm)")
|
||||
ax.set_ylabel("$y$ (cm)")
|
||||
ax.set_zlabel("$z$ (cm)")
|
||||
|
||||
coil_points = np.array(coil_points)
|
||||
ax.plot3D(
|
||||
coil_points[0, :], coil_points[1, :], coil_points[2, :], lw=2, color="red"
|
||||
)
|
||||
|
||||
for axis in [ax.xaxis, ax.yaxis, ax.zaxis]:
|
||||
axis.set_major_locator(ticker.MultipleLocator(tick_spacing))
|
||||
plt.tight_layout()
|
||||
# set the size of the plot
|
||||
fig.set_size_inches(5, 5)
|
||||
plt.show()
|
||||
|
||||
|
||||
def create_B_x_rectangle(name, p0=[-21.59, -38.1, -21.59, 1], L=76.20, W=43.18):
|
||||
'''
|
||||
"""
|
||||
Creates a rectangle of the Y-Z plane that produces a B_x field.
|
||||
|
||||
name: filename to output to. Should be a .txt file.
|
||||
p0: [x0,y0,z0,Current] Starting point of the rectangle.
|
||||
L: Length (on Z)
|
||||
W: Width (on y)
|
||||
'''
|
||||
"""
|
||||
f = open(name, "w")
|
||||
|
||||
p1 = [p0[0], p0[1] + W, p0[2], p0[3]]
|
||||
p2 = [p0[0], p0[1] + W, p0[2] + L, p0[3]]
|
||||
p3 = [p0[0], p0[1], p0[2] + L, p0[3]]
|
||||
|
||||
|
||||
line = str(p0)
|
||||
line = line[1 : len(line) - 1] + "\n"
|
||||
f.write(line)
|
||||
|
@ -320,14 +445,14 @@ def create_B_x_rectangle(name,p0=[-21.59,-38.1,-21.59,1],L = 76.20,W= 43.18):
|
|||
|
||||
def create_B_y_rectangle(name, p0=[-21.59, -38.1, -21.59, 1], L=76.20, D=43.18):
|
||||
|
||||
'''
|
||||
"""
|
||||
Creates a rectangle of the X-Z plane that produces a B_y field.
|
||||
|
||||
name: filename to output to. Should be a .txt file.
|
||||
p0: [x0,y0,z0,Current] Starting point of the rectangle.
|
||||
L: Length (on Z)
|
||||
D: Depth (on X)
|
||||
'''
|
||||
"""
|
||||
f = open(name, "w")
|
||||
|
||||
p1 = [p0[0], p0[1], p0[2] + L, p0[3]]
|
||||
|
@ -355,15 +480,16 @@ def create_B_y_rectangle(name,p0=[-21.59,-38.1,-21.59,1], L = 76.20, D= 43.18):
|
|||
f.write(line)
|
||||
f.close()
|
||||
|
||||
|
||||
def create_B_z_rectangle(name, p0=[-26.67, -26.67, -26.67, 1], H=53.340, DD=53.340):
|
||||
'''
|
||||
"""
|
||||
Creates a rectangle of the X-Y plane that produces a B_z field.
|
||||
|
||||
name: filename to output to. Should be a .txt file.
|
||||
p0: [x0,y0,z0,Current] Starting point of the rectangle.
|
||||
H: Height (on Y)
|
||||
DD: Depth (on X)
|
||||
'''
|
||||
"""
|
||||
f = open(name, "w")
|
||||
|
||||
p1 = [p0[0] + DD, p0[1], p0[2], p0[3]]
|
||||
|
@ -392,8 +518,9 @@ def create_B_z_rectangle(name,p0=[-26.67,-26.67,-26.67,1], H= 53.340, DD = 53.34
|
|||
|
||||
f.close()
|
||||
|
||||
|
||||
def helmholtz_coils(fname1, fname2, numSegments, radius, spacing, current):
|
||||
'''
|
||||
"""
|
||||
Creates a pair of Helmholtz Coils that are parallel to the X-Y plane.
|
||||
|
||||
fname1: Name of the file where the first coil will be saved.
|
||||
|
@ -402,24 +529,42 @@ def helmholtz_coils(fname1, fname2, numSegments, radius, spacing, current):
|
|||
radius: Radius of the coils
|
||||
spacing: Spacing between the coils. The first coil will be located at -spacing/2 and the 2nd coil will be located at spacing/2 on the Z plane
|
||||
current: The current that goest through each coil.
|
||||
'''
|
||||
"""
|
||||
f = open(fname1, "w")
|
||||
line = ""
|
||||
for i in range(0, numSegments, 1):
|
||||
line = str(np.cos(2*np.pi*(i)/(numSegments-1))*radius) + "," + str(np.sin(2*np.pi*(i)/(numSegments-1))*radius) + "," + str(-spacing/2.0) + "," + str(current) + "\n"
|
||||
line = (
|
||||
str(np.cos(2 * np.pi * (i) / (numSegments - 1)) * radius)
|
||||
+ ","
|
||||
+ str(np.sin(2 * np.pi * (i) / (numSegments - 1)) * radius)
|
||||
+ ","
|
||||
+ str(-spacing / 2.0)
|
||||
+ ","
|
||||
+ str(current)
|
||||
+ "\n"
|
||||
)
|
||||
f.write(line)
|
||||
f.close()
|
||||
|
||||
f = open(fname2, "w")
|
||||
line = ""
|
||||
for i in range(0, numSegments, 1):
|
||||
line = str(np.cos(2*np.pi*(i)/(numSegments-1))*radius) + "," + str(np.sin(2*np.pi*(i)/(numSegments-1))*radius) + "," + str(spacing/2.0) + "," + str(current) + "\n"
|
||||
line = (
|
||||
str(np.cos(2 * np.pi * (i) / (numSegments - 1)) * radius)
|
||||
+ ","
|
||||
+ str(np.sin(2 * np.pi * (i) / (numSegments - 1)) * radius)
|
||||
+ ","
|
||||
+ str(spacing / 2.0)
|
||||
+ ","
|
||||
+ str(current)
|
||||
+ "\n"
|
||||
)
|
||||
f.write(line)
|
||||
f.close()
|
||||
|
||||
|
||||
def create_Bx_circle(fname, numSegments, radius, spacing, current, center):
|
||||
'''
|
||||
"""
|
||||
Creates a coil on the Y-Z plane that produces a B_x field.
|
||||
|
||||
fname: Name of the file where the first coil will be saved.
|
||||
|
@ -428,17 +573,26 @@ def create_Bx_circle(fname, numSegments, radius, spacing, current, center):
|
|||
spacing: Spacing between the coil and the Y-Z plane
|
||||
current: The current that goest through the coil.
|
||||
center: (y,z) The center of the coil on the Y-Z plane
|
||||
'''
|
||||
"""
|
||||
f = open(fname, "w")
|
||||
line = ""
|
||||
for i in range(0, numSegments, 1):
|
||||
line = str(spacing) + "," + str(np.cos(2*np.pi*(i)/(numSegments-1))*radius + center[0]) + "," + str(np.sin(2*np.pi*(i)/(numSegments-1))*radius + center[1]) + "," + str(current) + "\n"
|
||||
line = (
|
||||
str(spacing)
|
||||
+ ","
|
||||
+ str(np.cos(2 * np.pi * (i) / (numSegments - 1)) * radius + center[0])
|
||||
+ ","
|
||||
+ str(np.sin(2 * np.pi * (i) / (numSegments - 1)) * radius + center[1])
|
||||
+ ","
|
||||
+ str(current)
|
||||
+ "\n"
|
||||
)
|
||||
f.write(line)
|
||||
f.close()
|
||||
|
||||
|
||||
def create_By_circle(fname, numSegments, radius, spacing, current, center):
|
||||
'''
|
||||
"""
|
||||
Creates a coil on the X-Z plane that produces a B_y field.
|
||||
|
||||
fname: Name of the file where the first coil will be saved.
|
||||
|
@ -447,17 +601,26 @@ def create_By_circle(fname, numSegments, radius, spacing, current, center):
|
|||
spacing: Spacing between the coil and the X-Z plane
|
||||
current: The current that goest through the coil.
|
||||
center: (x,z) The center of the coil on the X-Z plane
|
||||
'''
|
||||
"""
|
||||
f = open(fname, "w")
|
||||
line = ""
|
||||
for i in range(0, numSegments, 1):
|
||||
line = str(np.cos(2*np.pi*(i)/(numSegments-1))*radius + center[0]) + "," + str(spacing) + "," + str(np.sin(2*np.pi*(i)/(numSegments-1))*radius + center[1]) + "," + str(current) + "\n"
|
||||
line = (
|
||||
str(np.cos(2 * np.pi * (i) / (numSegments - 1)) * radius + center[0])
|
||||
+ ","
|
||||
+ str(spacing)
|
||||
+ ","
|
||||
+ str(np.sin(2 * np.pi * (i) / (numSegments - 1)) * radius + center[1])
|
||||
+ ","
|
||||
+ str(current)
|
||||
+ "\n"
|
||||
)
|
||||
f.write(line)
|
||||
f.close()
|
||||
|
||||
|
||||
def create_Bz_circle(fname, numSegments, radius, spacing, current, center):
|
||||
'''
|
||||
"""
|
||||
Creates a coil on the X-Y plane that produces a B_z field.
|
||||
|
||||
fname: Name of the file where the first coil will be saved.
|
||||
|
@ -466,11 +629,19 @@ def create_Bz_circle(fname, numSegments, radius, spacing, current, center):
|
|||
spacing: Spacing between the coil and the X-Y plane
|
||||
current: The current that goest through the coil.
|
||||
center: (x,y) The center of the coil on the X-Y plane
|
||||
'''
|
||||
"""
|
||||
f = open(fname, "w")
|
||||
line = ""
|
||||
for i in range(0, numSegments, 1):
|
||||
line = str(np.cos(2*np.pi*(i)/(numSegments-1))*radius + center[0]) + "," + str(np.sin(2*np.pi*(i)/(numSegments-1))*radius + center[1]) + "," + str(spacing) + "," + str(current) + "\n"
|
||||
line = (
|
||||
str(np.cos(2 * np.pi * (i) / (numSegments - 1)) * radius + center[0])
|
||||
+ ","
|
||||
+ str(np.sin(2 * np.pi * (i) / (numSegments - 1)) * radius + center[1])
|
||||
+ ","
|
||||
+ str(spacing)
|
||||
+ ","
|
||||
+ str(current)
|
||||
+ "\n"
|
||||
)
|
||||
f.write(line)
|
||||
f.close()
|
||||
|
||||
|
|
373
simulations/coil_magnetic_fields.ipynb
Normal file
373
simulations/coil_magnetic_fields.ipynb
Normal file
|
@ -0,0 +1,373 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import numpy as np\n",
|
||||
"import biot_savart_v4_3 as bs\n",
|
||||
"import matplotlib.pyplot as plt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# set the size larger\n",
|
||||
"plt.rcParams[\"figure.figsize\"] = (10, 10)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# COIL_NAME = \"coil_6_spiral\"\n",
|
||||
"# COIL_NAME = \"coil_6_custom\"\n",
|
||||
"# COIL_NAME = \"coil_12_spiral\"\n",
|
||||
"COIL_NAME = \"coil_12_custom\"\n",
|
||||
"COIL = \"coils/\" + COIL_NAME + \".csv\""
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"bs.plot_coil(COIL)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"bs.write_target_volume(\n",
|
||||
" COIL,\n",
|
||||
" COIL_NAME + \"volume.vol\",\n",
|
||||
" (4, 4, 4),\n",
|
||||
" (-2, -2, -2),\n",
|
||||
" 0.1,\n",
|
||||
" 0.1,\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# read in the results\n",
|
||||
"total_volume = bs.read_target_volume(COIL_NAME + \"volume.vol\")\n",
|
||||
"\n",
|
||||
"total_volume = -total_volume\n",
|
||||
"\n",
|
||||
"# reads the volume we created\n",
|
||||
"bs.plot_fields(total_volume, (4, 4, 4), (-2, -2, -2), 0.1, which_plane=\"z\", level=0.1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import plotly.graph_objects as go\n",
|
||||
"\n",
|
||||
"X, Y, Z = np.mgrid[-2:2:41j, -2:2:41j, -2:2:41j]\n",
|
||||
"# values = np.sqrt(total_volume[:,:,:,0]*total_volume[:,:,:,0] +\n",
|
||||
"# total_volume[:,:,:,1]*total_volume[:,:,:,1] +\n",
|
||||
"# total_volume[:,:,:,2]*total_volume[:,:,:,2])\n",
|
||||
"values = total_volume[:, :, :, 2]\n",
|
||||
"fig = go.Figure(\n",
|
||||
" data=go.Volume(\n",
|
||||
" x=X.flatten(),\n",
|
||||
" y=Y.flatten(),\n",
|
||||
" z=Z.flatten(),\n",
|
||||
" value=np.abs(values.flatten()),\n",
|
||||
" isomin=0.1,\n",
|
||||
" isomax=0.5,\n",
|
||||
" opacity=0.1, # needs to be small to see through all surfaces\n",
|
||||
" surface_count=17, # needs to be a large number for good volume rendering\n",
|
||||
" )\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"coil = bs.parse_coil(\"coils/\" + COIL_NAME + \".csv\")\n",
|
||||
"coil = coil[0:3, :]\n",
|
||||
"# add the coil as a line plot\n",
|
||||
"fig.add_trace(\n",
|
||||
" go.Scatter3d(\n",
|
||||
" x=coil[0, :],\n",
|
||||
" y=coil[1, :],\n",
|
||||
" z=coil[2, :],\n",
|
||||
" mode=\"lines\",\n",
|
||||
" line=dict(color=\"red\", width=5),\n",
|
||||
" )\n",
|
||||
")\n",
|
||||
"# make the plotly graph bigger\n",
|
||||
"fig.update_layout(\n",
|
||||
" autosize=False,\n",
|
||||
" width=1400,\n",
|
||||
" height=1000,\n",
|
||||
")\n",
|
||||
"fig.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"slice = [total_volume[:, 21, :, i].T for i in range(3)]\n",
|
||||
"x_contour = slice[0]\n",
|
||||
"y_contour = slice[1]\n",
|
||||
"z_contour = slice[2]\n",
|
||||
"\n",
|
||||
"print(x_contour.shape)\n",
|
||||
"print(y_contour.shape)\n",
|
||||
"print(z_contour.shape)\n",
|
||||
"\n",
|
||||
"x = np.arange(0, x_contour.shape[0], 1)\n",
|
||||
"y = np.arange(0, z_contour.shape[1], 1)\n",
|
||||
"xG, yG = np.meshgrid(x, y)\n",
|
||||
"\n",
|
||||
"# calclulate the magnitude of the field\n",
|
||||
"mag = np.sqrt(x_contour ** 2 + y_contour ** 2 + z_contour ** 2)\n",
|
||||
"\n",
|
||||
"# color = 2 * np.log(np.hypot(x_contour, z_contour))\n",
|
||||
"color = np.log(mag)\n",
|
||||
"stream_plot = plt.streamplot(\n",
|
||||
" x,\n",
|
||||
" y,\n",
|
||||
" x_contour,\n",
|
||||
" z_contour,\n",
|
||||
" color=color,\n",
|
||||
" linewidth=1,\n",
|
||||
" cmap=plt.cm.Reds,\n",
|
||||
" density=2,\n",
|
||||
" arrowstyle=\"->\",\n",
|
||||
" arrowsize=1.5,\n",
|
||||
")\n",
|
||||
"# set the axis to be equal\n",
|
||||
"plt.axis(\"equal\")\n",
|
||||
"\n",
|
||||
"# set the plt size to 5x5\n",
|
||||
"plt.rcParams[\"figure.figsize\"] = (10, 10)\n",
|
||||
"\n",
|
||||
"# save the figure\n",
|
||||
"plt.savefig(COIL_NAME + \"_field_lines.png\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import matplotlib.cm as cm\n",
|
||||
"\n",
|
||||
"# get the total left and right field in the X direction\n",
|
||||
"slice = [total_volume[:, :, 21, i].T for i in range(3)]\n",
|
||||
"x_contour = slice[0]\n",
|
||||
"y_contour = slice[1]\n",
|
||||
"z_contour = slice[2]\n",
|
||||
"\n",
|
||||
"# vmin = np.min([np.min(x_contour), np.min(z_contour), np.min(y_contour)])\n",
|
||||
"# vmax = np.max([np.max(x_contour), np.max(z_contour), np.max(y_contour)])\n",
|
||||
"\n",
|
||||
"vmin = np.min(x_contour)\n",
|
||||
"vmax = np.max(x_contour)\n",
|
||||
"\n",
|
||||
"# -7.970943527635176 7.775784181783158\n",
|
||||
"vmin = -7.970943527635176\n",
|
||||
"vmax = 7.775784181783158\n",
|
||||
"\n",
|
||||
"print(vmin, vmax)\n",
|
||||
"\n",
|
||||
"left_x = np.sum(x_contour[x_contour < 0])\n",
|
||||
"right_x = np.sum(x_contour[x_contour > 0])\n",
|
||||
"\n",
|
||||
"print(\"Left X: \", left_x)\n",
|
||||
"print(\"Right X: \", right_x)\n",
|
||||
"\n",
|
||||
"plt.rcParams[\"figure.figsize\"] = (5, 5)\n",
|
||||
"\n",
|
||||
"# make the plot larger\n",
|
||||
"plt.rcParams[\"figure.figsize\"] = (10, 10)\n",
|
||||
"\n",
|
||||
"# plot the coil\n",
|
||||
"coil = bs.parse_coil(\"coils/\" + COIL_NAME + \".csv\")\n",
|
||||
"coil = coil[0:3, :]\n",
|
||||
"coil = coil * 10 + 20\n",
|
||||
"plt.plot(coil[0, :], coil[1, :], color=\"black\", alpha=0.1)\n",
|
||||
"\n",
|
||||
"# plt.imshow(x_contour, cmap='hot', interpolation='nearest')\n",
|
||||
"plt.contourf(\n",
|
||||
" y_contour,\n",
|
||||
" vmin=vmin,\n",
|
||||
" vmax=vmax,\n",
|
||||
" cmap=cm.magma,\n",
|
||||
" levels=50,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# hide the axis\n",
|
||||
"plt.axis(\"off\")\n",
|
||||
"\n",
|
||||
"# remove any padding\n",
|
||||
"plt.tight_layout()\n",
|
||||
"plt.margins(x=0)\n",
|
||||
"plt.margins(x=0)\n",
|
||||
"\n",
|
||||
"plt.savefig(COIL_NAME + \"_field_y.png\", bbox_inches=\"tight\", pad_inches=0)\n",
|
||||
"\n",
|
||||
"print(vmin, vmax)\n",
|
||||
"\n",
|
||||
"# 6 coil custom\n",
|
||||
"# Left X: -565.6790142743889\n",
|
||||
"# Right X: 544.1011578804321\n",
|
||||
"\n",
|
||||
"# 6 coil spiral\n",
|
||||
"# Left X: -512.1107132193335\n",
|
||||
"# Right X: 534.1946450523811\n",
|
||||
"\n",
|
||||
"# 12 coil spiral\n",
|
||||
"# Left X: -218.54696343677543\n",
|
||||
"# Right X: 233.84835661493196\n",
|
||||
"\n",
|
||||
"# 12 coil custom\n",
|
||||
"# Left X: -361.95894587646944\n",
|
||||
"# Right X: 347.13174239269904"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# plot the magitude of the slice\n",
|
||||
"plt.imshow(np.log(mag), cmap=\"hot\", interpolation=\"nearest\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"slice = [total_volume[:, :, 25, i].T for i in range(3)]\n",
|
||||
"x_contour = slice[0]\n",
|
||||
"y_contour = slice[1]\n",
|
||||
"z_contour = slice[2]\n",
|
||||
"\n",
|
||||
"mag = np.sqrt(x_contour ** 2 + y_contour ** 2 + z_contour ** 2)\n",
|
||||
"\n",
|
||||
"print(np.max(mag), np.min(mag))\n",
|
||||
"\n",
|
||||
"# plot a histogram of the magnitude\n",
|
||||
"# plt.hist(mag.flatten(), bins=10)\n",
|
||||
"\n",
|
||||
"plt.hist(z_contour.flatten(), bins=10)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# show the z contour as a 3d surface plot\n",
|
||||
"fig = plt.figure()\n",
|
||||
"\n",
|
||||
"# change the figure size to 16.9\n",
|
||||
"ax = fig.add_subplot(111, projection=\"3d\")\n",
|
||||
"\n",
|
||||
"xG_ = xG[10:30, 10:30]\n",
|
||||
"yG_ = yG[10:30, 10:30]\n",
|
||||
"z_contour_ = z_contour[10:30, 10:30]\n",
|
||||
"\n",
|
||||
"print(xG.shape, yG.shape, z_contour.shape)\n",
|
||||
"\n",
|
||||
"# change the axis limits to 10 to 30\n",
|
||||
"ax.set_xlim(10, 30)\n",
|
||||
"ax.set_ylim(10, 30)\n",
|
||||
"surf = ax.plot_surface(\n",
|
||||
" xG_, yG_, z_contour_, cmap=cm.plasma, linewidth=0, antialiased=False, alpha=0.5\n",
|
||||
")\n",
|
||||
"# add the coil to the plot as a set of lines - the X and Y coordinates of the coil are in the first two elements of the coil array\n",
|
||||
"coil = bs.parse_coil(\"coils/\" + COIL_NAME + \".csv\")\n",
|
||||
"coil = coil[0:2, :]\n",
|
||||
"# need to scale the coil by 10 and shift it by 20, 20\n",
|
||||
"coil = coil * 10 + 20\n",
|
||||
"# draw the coil in yellow\n",
|
||||
"ax.plot(coil[0, :], coil[1, :], 0, color=\"black\")\n",
|
||||
"\n",
|
||||
"# hide the axes\n",
|
||||
"ax.set_axis_off()\n",
|
||||
"\n",
|
||||
"# save to png\n",
|
||||
"plt.savefig(COIL_NAME + \"_field_surface_z.png\")\n",
|
||||
"plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# write out the coil as SVG\n",
|
||||
"coil = bs.parse_coil(\"coils/\" + COIL_NAME + \".csv\")\n",
|
||||
"coil = coil[0:2, :]\n",
|
||||
"with open(COIL_NAME + \"_coil.svg\", \"w\") as f:\n",
|
||||
" # write the header\n",
|
||||
" f.write('<svg viewBox=\"0 0 400 400\" xmlns=\"http://www.w3.org/2000/svg\">')\n",
|
||||
" # the X and Y points of the coil the X and Y coordinates of the coil are in the first two elements of the coil array\n",
|
||||
" # write out the coil as a set of lines\n",
|
||||
" print(len(coil[0]) - 1)\n",
|
||||
" # write out the coil as a polyline\n",
|
||||
" f.write('<polyline points=\"')\n",
|
||||
" for i in range(0, len(coil[0]), 10):\n",
|
||||
" f.write(str(coil[0, i] * 100 + 200) + \",\" + str(coil[1, i] * 100 + 200) + \" \")\n",
|
||||
" f.write('\" style=\"fill:none;stroke:black;stroke-width:1\" />')\n",
|
||||
" # write the footer\n",
|
||||
" f.write(\"</svg>\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.10.7 ('venv': venv)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.7"
|
||||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "fc384f9db26c31784edfba3761ba3d2c7b2f9b8a63e03a9eb0778fc35334efe1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
524
simulations/coils/coil_12_custom-2-layer.csv
Normal file
524
simulations/coils/coil_12_custom-2-layer.csv
Normal file
|
@ -0,0 +1,524 @@
|
|||
3.651896755057407e-17,0.5964,0,0.5
|
||||
-0.0016940191256797047,0.5963692131993299,0,0.5
|
||||
-0.03218636338791504,0.5958150507872684,0,0.5
|
||||
-0.06437272677583011,0.5952301015745369,0,0.5
|
||||
-0.613234923496066,0.585255178157432,0,0.5
|
||||
-0.6444693783411616,0.5813421943160753,0,0.5
|
||||
-0.6578273688326443,0.5208834085887586,0,0.5
|
||||
-0.6414351256447517,0.45761996384420794,0,0.5
|
||||
-0.3330167577712027,-0.6206632558303865,0,0.5
|
||||
-0.31341351103188797,-0.6838783924977248,0,0.5
|
||||
-0.26897343759777254,-0.7434676328352169,0,0.5
|
||||
-0.23919882496584782,-0.7464627632095369,0,0.5
|
||||
0.2523041289746812,-0.7407858696098035,0,0.5
|
||||
0.2819452252337086,-0.7371462094711321,0,0.5
|
||||
0.3239820039556717,-0.6773092205747797,0,0.5
|
||||
0.3410484396099368,-0.614463337495282,0,0.5
|
||||
0.6062075026647455,0.45692556903932535,0,0.5
|
||||
0.618553431841941,0.5196957106053652,0,0.5
|
||||
0.5756210939766506,0.578169352259476,0,0.5
|
||||
0.5155725671713546,0.5803699236424482,0,0.5
|
||||
-0.5223685774586827,0.5615065668818353,0,0.5
|
||||
-0.5823196355662792,0.5571983765728039,0,0.5
|
||||
-0.6234975368729788,0.4985143077708532,0,0.5
|
||||
-0.609299702439493,0.4376179771888281,0,0.5
|
||||
-0.31256078133004983,-0.5998319044856729,0,0.5
|
||||
-0.2937399878638962,-0.6606536202340665,0,0.5
|
||||
-0.25170462658257375,-0.71799462203065,0,0.5
|
||||
-0.22381946306948025,-0.7208851305006826,0,0.5
|
||||
0.2360781188848798,-0.7155732811646855,0,0.5
|
||||
0.26383415827694223,-0.7120829333176939,0,0.5
|
||||
0.3035452853797047,-0.6545685214078408,0,0.5
|
||||
0.3199127205462674,-0.5941539671327736,0,0.5
|
||||
0.5748154264416326,0.43579359790858463,0,0.5
|
||||
0.5867251531184586,0.49613654058383805,0,0.5
|
||||
0.5461975274059612,0.5523619436970402,0,0.5
|
||||
0.4892571054930269,0.5544916711475668,0,0.5
|
||||
-0.49514286322729256,0.5366013621438461,0,0.5
|
||||
-0.5519902086943936,0.5324762620983367,0,0.5
|
||||
-0.5908424583818932,0.4761147702828872,0,0.5
|
||||
-0.5771642792342361,0.4176159905334528,0,0.5
|
||||
-0.29210480488890883,-0.5790005531409179,0,0.5
|
||||
-0.2740664646959168,-0.6374288479703648,0,0.5
|
||||
-0.23443581556738713,-0.6925216112260386,0,0.5
|
||||
-0.20844010117312398,-0.6953074977917847,0,0.5
|
||||
0.2198521087950826,-0.6903606927195416,0,0.5
|
||||
0.2457230913201809,-0.6870196571642307,0,0.5
|
||||
0.28310856680374336,-0.631827822240879,0,0.5
|
||||
0.29877700148260333,-0.5738445967702432,0,0.5
|
||||
0.5434233502185207,0.414661626777847,0,0.5
|
||||
0.5548968743949769,0.47257737056231275,0,0.5
|
||||
0.5167739608352723,0.5265545351346052,0,0.5
|
||||
0.4629416438146997,0.5286134186526864,0,0.5
|
||||
-0.46791714899590203,0.5116961574058569,0,0.5
|
||||
-0.5216607818225076,0.5077541476238692,0,0.5
|
||||
-0.5581873798908062,0.4537152327949177,0,0.5
|
||||
-0.5450288560289769,0.39761400387807055,0,0.5
|
||||
-0.2716488284477496,-0.5581692017962265,0,0.5
|
||||
-0.2543929415279183,-0.61420407570673,0,0.5
|
||||
-0.21716700455218169,-0.6670486004214949,0,0.5
|
||||
-0.1930607392767501,-0.6697298650829528,0,0.5
|
||||
0.20362609870528145,-0.6651481042744276,0,0.5
|
||||
0.2276120243634144,-0.6619563810107955,0,0.5
|
||||
0.26267184822777584,-0.6090871230739416,0,0.5
|
||||
0.2776412824189334,-0.5535352264077362,0,0.5
|
||||
0.5120312739954082,0.39352965564710685,0,0.5
|
||||
0.5230685956714949,0.44901820054078617,0,0.5
|
||||
0.48735039426458326,0.5007471265721699,0,0.5
|
||||
0.43662618213637244,0.5027351661578057,0,0.5
|
||||
-0.440691434764512,0.48679095266786787,0,0.5
|
||||
-0.49133135495062213,0.4830320331494017,0,0.5
|
||||
-0.5255323013997197,0.4313156953069484,0,0.5
|
||||
-0.512893432823718,0.3776120172226888,0,0.5
|
||||
-0.25119285200659125,-0.537337850451532,0,0.5
|
||||
-0.2347194183599207,-0.590979303443092,0,0.5
|
||||
-0.19989819353697735,-0.6415755896169493,0,0.5
|
||||
-0.17768137738037754,-0.6441522323741198,0,0.5
|
||||
0.18740008861547558,-0.6399355158293318,0,0.5
|
||||
0.209500957406643,-0.6368931048573794,0,0.5
|
||||
0.2422351296518035,-0.5863464239070237,0,0.5
|
||||
0.25650556335525887,-0.5332258560452477,0,0.5
|
||||
0.4806391977722949,0.3723976845163649,0,0.5
|
||||
0.4912403169480126,0.4254590305192587,0,0.5
|
||||
0.4579268276938942,0.4749397180097346,0,0.5
|
||||
0.41031072045804506,0.47685691366292515,0,0.5
|
||||
-0.4134657205331214,0.46188574792987885,0,0.5
|
||||
-0.4610019280787361,0.4583099186749345,0,0.5
|
||||
-0.49287722290863323,0.40891615781898116,0,0.5
|
||||
-0.48075800961845994,0.35761003056731083,0,0.5
|
||||
-0.23073687556544303,-0.5165064991068024,0,0.5
|
||||
-0.21504589519193376,-0.5677545311794169,0,0.5
|
||||
-0.18262938252178346,-0.6161025788123655,0,0.5
|
||||
-0.16230201548401463,-0.6185745996652494,0,0.5
|
||||
0.17117407852567373,-0.6147229273842122,0,0.5
|
||||
0.1913898904498764,-0.6118298287039404,0,0.5
|
||||
0.22179841107583648,-0.5636057247400847,0,0.5
|
||||
0.2353698442915894,-0.5129164856827393,0,0.5
|
||||
0.4492471215491823,0.3512657133856249,0,0.5
|
||||
0.4594120382245304,0.40189986049773224,0,0.5
|
||||
0.4285032611232052,0.4491323094472994,0,0.5
|
||||
0.38399525877971774,0.4509786611680446,0,0.5
|
||||
-0.3862400063017312,0.4369805431918901,0,0.5
|
||||
-0.43067250120685047,0.4335878042004674,0,0.5
|
||||
-0.46022214441754705,0.3865166203310132,0,0.5
|
||||
-0.44862258641320174,0.3376080439119312,0,0.5
|
||||
-0.2102808991242898,-0.49567514776209026,0,0.5
|
||||
-0.1953723720239415,-0.5445297589157603,0,0.5
|
||||
-0.16536057150658384,-0.5906295680077986,0,0.5
|
||||
-0.1469226535876459,-0.5929969669563936,0,0.5
|
||||
0.15494806843587988,-0.5895103389390638,0,0.5
|
||||
0.17327882349311796,-0.58676655255047,0,0.5
|
||||
0.20136169249987734,-0.5408650255731134,0,0.5
|
||||
0.21423412522792748,-0.4926071153201999,0,0.5
|
||||
0.41785504532607065,0.3301337422548883,0,0.5
|
||||
0.427583759501049,0.37834069047620744,0,0.5
|
||||
0.3990796945525164,0.4233249008848644,0,0.5
|
||||
0.3576797971013906,0.42510040867316407,0,0.5
|
||||
-0.35901429207034086,0.41207533845390093,0,0.5
|
||||
-0.4003430743349646,0.4088656897259999,0,0.5
|
||||
-0.4275670659264604,0.3641170828430448,0,0.5
|
||||
-0.41648716320794305,0.3176060572565512,0,0.5
|
||||
-0.18982492268313647,-0.47484379641737806,0,0.5
|
||||
-0.1756988488559492,-0.5213049866521036,0,0.5
|
||||
-0.14809176049138478,-0.5651565572032342,0,0.5
|
||||
-0.1315432916912783,-0.5674193342475425,0,0.5
|
||||
0.13872205834607435,-0.564297750493963,0,0.5
|
||||
0.1551677565363472,-0.56170327639705,0,0.5
|
||||
0.1809249739239059,-0.5181243264061925,0,0.5
|
||||
0.19309840616425383,-0.4722977449577085,0,0.5
|
||||
0.3864629691029576,0.3090017711241465,0,0.5
|
||||
0.39575548077756667,0.35478152045468003,0,0.5
|
||||
0.36965612798182723,0.3975174923224291,0,0.5
|
||||
0.3313643354230632,0.3992221561782835,0,0.5
|
||||
-0.33178857783895055,0.387170133715912,0,0.5
|
||||
-0.37001364746307885,0.3841435752515327,0,0.5
|
||||
-0.39491198743537387,0.34171754535507615,0,0.5
|
||||
-0.38435174000268446,0.29760407060117033,0,0.5
|
||||
-0.16936894624197996,-0.45401244507267735,0,0.5
|
||||
-0.15602532568795352,-0.4980802143884591,0,0.5
|
||||
-0.1308229494761823,-0.5396835463986817,0,0.5
|
||||
-0.11616392979490739,-0.5418417015387027,0,0.5
|
||||
0.12249604825626995,-0.5390851620488604,0,0.5
|
||||
0.13705668957957745,-0.536640000243627,0,0.5
|
||||
0.1604882553479353,-0.4953836272392681,0,0.5
|
||||
0.17196268710058094,-0.45198837459521374,0,0.5
|
||||
0.3550708928798445,0.2878697999934051,0,0.5
|
||||
0.36392720205408435,0.33122235043315285,0,0.5
|
||||
0.3402325614111382,0.3717100837599939,0,0.5
|
||||
0.3050488737447358,0.37334390368340287,0,0.5
|
||||
-0.30456286360756024,0.36226492897792284,0,0.5
|
||||
-0.3396842205911931,0.35942146077706527,0,0.5
|
||||
-0.36225690894428747,0.3193180078671083,0,0.5
|
||||
-0.35221631679742627,0.27760208394579144,0,0.5
|
||||
-0.1489129698008299,-0.43318109372795394,0,0.5
|
||||
-0.13635180251996465,-0.4748554421247905,0,0.5
|
||||
-0.11355413846098647,-0.5142105355941043,0,0.5
|
||||
-0.10078456789854265,-0.5162640688298386,0,0.5
|
||||
0.10627003816646827,-0.5138725736037415,0,0.5
|
||||
0.11894562262281094,-0.5115767240901884,0,0.5
|
||||
0.14005153677196824,-0.4726429280723291,0,0.5
|
||||
0.15082696803691145,-0.43167900423270533,0,0.5
|
||||
0.3236788166567318,0.26673782886266506,0,0.5
|
||||
0.33209892333060226,0.3076631804116264,0,0.5
|
||||
0.310808994840449,0.34590267519755874,0,0.5
|
||||
0.27873341206640834,0.34746565118852224,0,0.5
|
||||
-0.27733714937617004,0.33735972423993404,0,0.5
|
||||
-0.3093547937193074,0.3346993463025981,0,0.5
|
||||
-0.32960183045320124,0.2969184703791407,0,0.5
|
||||
-0.3200808935921681,0.2576000972904128,0,0.5
|
||||
-0.12845699335967908,-0.4123497423832333,0,0.5
|
||||
-0.11667827935197495,-0.451630669861125,0,0.5
|
||||
-0.09628532744578969,-0.4887375247895296,0,0.5
|
||||
-0.08540520600217685,-0.4906864361209764,0,0.5
|
||||
0.09004402807666877,-0.4886599851586141,0,0.5
|
||||
0.10083455566604668,-0.4865134479367407,0,0.5
|
||||
0.11961481819600343,-0.44990222890538084,0,0.5
|
||||
0.12969124897324413,-0.4113696338701878,0,0.5
|
||||
0.2922867404336197,0.24560585773192617,0,0.5
|
||||
0.3002706446071205,0.28410401039010047,0,0.5
|
||||
0.2813854282697602,0.32009526663512367,0,0.5
|
||||
0.2524179503880812,0.3215873986936418,0,0.5
|
||||
-0.25011143514477974,0.3124545195019449,0,0.5
|
||||
-0.27902536684742163,0.3099772318281307,0,0.5
|
||||
-0.2969467519621147,0.2745189328911719,0,0.5
|
||||
-0.28794547038690954,0.23759811063503192,0,0.5
|
||||
-0.1080010169185234,-0.3915183910385297,0,0.5
|
||||
-0.09700475618398015,-0.4284058975974774,0,0.5
|
||||
-0.07901651643058794,-0.46326451398497326,0,0.5
|
||||
-0.07002584410580649,-0.46510880341213234,0,0.5
|
||||
0.07381801798686734,-0.4634473967134987,0,0.5
|
||||
0.0827234887092801,-0.4614501717833045,0,0.5
|
||||
0.09917809962003603,-0.4271615297384434,0,0.5
|
||||
0.10855552990957429,-0.39106026350768075,0,0.5
|
||||
0.2608946642105069,0.224473886601186,0,0.5
|
||||
0.26844236588363835,0.26054484036857384,0,0.5
|
||||
0.2519618616990711,0.2942878580726884,0,0.5
|
||||
0.22610248870975386,0.2957091461987612,0,0.5
|
||||
-0.22288572091338957,0.2875493147639562,0,0.5
|
||||
-0.24869593997553602,0.28525511735366366,0,0.5
|
||||
-0.26429167347102833,0.2521193954032039,0,0.5
|
||||
-0.2558100471816512,0.21759612397965228,0,0.5
|
||||
-0.0875450404773701,-0.37068703969381755,0,0.5
|
||||
-0.07733123301598786,-0.4051811253338207,0,0.5
|
||||
-0.061747705415388696,-0.43779150318040816,0,0.5
|
||||
-0.05464648220943852,-0.4395311707032799,0,0.5
|
||||
0.05759200789706552,-0.43823480826838274,0,0.5
|
||||
0.06461242175251326,-0.4363868956298683,0,0.5
|
||||
0.0787413810440685,-0.40442083057150624,0,0.5
|
||||
0.08741981084590433,-0.37075089314517395,0,0.5
|
||||
0.22950258798739434,0.20334191547044594,0,0.5
|
||||
0.2366140871601563,0.23698567034704737,0,0.5
|
||||
0.22253829512838208,0.2684804495102533,0,0.5
|
||||
0.19978702703142653,0.26983089370388064,0,0.5
|
||||
-0.19566000668199912,0.26264411002596694,0,0.5
|
||||
-0.21836651310365013,0.2605330028791961,0,0.5
|
||||
-0.2316365949799418,0.22971985791523544,0,0.5
|
||||
-0.2236746239763927,0.19759413732427222,0,0.5
|
||||
-0.06708906403621683,-0.3498556883491055,0,0.5
|
||||
-0.057657709847995606,-0.3819563530701642,0,0.5
|
||||
-0.0444788944001895,-0.4123184923758429,0,0.5
|
||||
-0.039267120313070586,-0.4139535379944272,0,0.5
|
||||
0.041365997807263716,-0.4130222198232666,0,0.5
|
||||
0.04650135479574643,-0.4113236194764319,0,0.5
|
||||
0.058304662468100975,-0.38168013140456897,0,0.5
|
||||
0.0662840917822344,-0.35044152278266705,0,0.5
|
||||
0.1981105117642817,0.18220994433970578,0,0.5
|
||||
0.20478580843667427,0.21342650032552077,0,0.5
|
||||
0.19311472855769313,0.24267304094781803,0,0.5
|
||||
0.17347156535309927,0.24395264120899998,0,0.5
|
||||
-0.16843429245060884,0.23773890528797778,0,0.5
|
||||
-0.18803708623176435,0.2358108884047287,0,0.5
|
||||
-0.19898151648885531,0.20732032042726717,0,0.5
|
||||
-0.19153920077113423,0.1775921506688923,0,0.5
|
||||
-0.046633087595063544,-0.32902433700439343,0,0.5
|
||||
-0.037984186680003335,-0.35873158080650763,0,0.5
|
||||
-0.027210083384990258,-0.38684548157127774,0,0.5
|
||||
-0.02388775841670261,-0.38837590528557475,0,0.5
|
||||
0.025139987717462016,-0.38780963137815044,0,0.5
|
||||
0.028390287838979705,-0.3862603433229955,0,0.5
|
||||
0.03786794389213355,-0.35893943223763164,0,0.5
|
||||
0.045148372718564575,-0.33013215242016003,0,0.5
|
||||
0.1667184355411691,0.16107797320896577,0,0.5
|
||||
0.17295752971319228,0.18986733030399433,0,0.5
|
||||
0.16369116198700417,0.21686563238538295,0,0.5
|
||||
0.147156103674772,0.21807438871411952,0,0.5
|
||||
-0.14120857821921848,0.21283370054998882,0,0.5
|
||||
-0.15770765935987854,0.21108877393026143,0,0.5
|
||||
-0.1663264379977688,0.18492078293929892,0,0.5
|
||||
-0.15940377756587573,0.15759016401351247,0,0.5
|
||||
-0.026177111153910256,-0.30819298565968134,0,0.5
|
||||
-0.01831066351201106,-0.3355068085428511,0,0.5
|
||||
-0.009941272369791046,-0.36137247076671253,0,0.5
|
||||
-0.008508396520334669,-0.3627982725767222,0,0.5
|
||||
0.008913977627660125,-0.36259704293303485,0,0.5
|
||||
0.01027922088221279,-0.3611970671695597,0,0.5
|
||||
0.017431225316165942,-0.33619873307069487,0,0.5
|
||||
0.024012653654894557,-0.3098227820576535,0,0.5
|
||||
0.13532635931805645,0.13994600207822558,0,0.5
|
||||
0.14148306072087882,0.16631459035725468,0,0.5
|
||||
0.14098998030851972,0.19118039524389957,0,0.5
|
||||
0.13428541178085387,0.19244047906114253,0,0.5
|
||||
0.014096258695227765,0.19025618288487128,0,0.5
|
||||
6.123233995736766e-18,0.1,0,0.5
|
||||
6.123233995736766e-18,0.1,0-0.062,0.5
|
||||
9.582450478399791e-05,-0.3500011067797529,0-0.062,0.5
|
||||
0.0009128544929424784,-0.3500105435334354,0-0.062,0.5
|
||||
0.0013539363225873063,-0.34863650901999965,0-0.062,0.5
|
||||
0.008476379268035728,-0.3238944510244738,0-0.062,0.5
|
||||
0.015949122933333587,-0.29777730998732527,0-0.062,0.5
|
||||
0.14333606596324666,0.14758917068582267,0-0.062,0.5
|
||||
0.14999889875222572,0.17372101419531494,0-0.062,0.5
|
||||
0.14254294592393582,0.1987277166930279,0-0.062,0.5
|
||||
0.12759572110352352,0.20038109818099445,0-0.062,0.5
|
||||
-0.13399837283560825,0.20513526246667918,0-0.062,0.5
|
||||
-0.14897937870165953,0.2039619281041653,0-0.062,0.5
|
||||
-0.15704339035145115,0.178087745293231,0-0.062,0.5
|
||||
-0.1510223974296127,0.15051198764359563,0-0.062,0.5
|
||||
-0.03458051318672963,-0.3199774672389067,0-0.062,0.5
|
||||
-0.02764958460414982,-0.34756908265416314,0-0.062,0.5
|
||||
-0.019334754360596326,-0.37372870524627755,0-0.062,0.5
|
||||
-0.01702698267256115,-0.3752033371555925,0-0.062,0.5
|
||||
0.01619807746851859,-0.3755870889311484,0-0.062,0.5
|
||||
0.01857567787739061,-0.3741089761689951,0-0.062,0.5
|
||||
0.02814742509600716,-0.34711919467467933,0-0.062,0.5
|
||||
0.03640509937448687,-0.31860866133203736,0-0.062,0.5
|
||||
0.17547148916850508,0.16759115734120258,0-0.062,0.5
|
||||
0.18265397724331217,0.19612055168328324,0-0.062,0.5
|
||||
0.17287237279582154,0.22344983116749528,0-0.062,0.5
|
||||
0.15482143533491377,0.22528630291898355,0-0.062,0.5
|
||||
-0.1603138345139356,0.23101351496155975,0-0.062,0.5
|
||||
-0.1784029452723486,0.2297693366666005,0-0.062,0.5
|
||||
-0.18887166907493325,0.20164691531475754,0-0.062,0.5
|
||||
-0.1824144736527254,0.17164395877433578,0-0.062,0.5
|
||||
-0.05571623225039958,-0.34028683760141354,0-0.062,0.5
|
||||
-0.04808630318011735,-0.37030978182110036,0-0.062,0.5
|
||||
-0.03744582131736317,-0.39879198139971384,0-0.062,0.5
|
||||
-0.03325299276236296,-0.4004159256007086,0-0.062,0.5
|
||||
0.03157743936488654,-0.401164721640001,0-0.062,0.5
|
||||
0.03584448889258983,-0.3995819869735603,0-0.062,0.5
|
||||
0.04782094826399943,-0.3703439669383359,0-0.062,0.5
|
||||
0.05686107581564015,-0.33944001267674945,0-0.062,0.5
|
||||
0.20760691237376344,0.18759314399658225,0-0.062,0.5
|
||||
0.21530905573439854,0.21852008917125132,0-0.062,0.5
|
||||
0.20320179966770718,0.24817194564196238,0-0.062,0.5
|
||||
0.18204714956630397,0.25019150765697235,0-0.062,0.5
|
||||
-0.18662929619226293,0.25689176745644027,0-0.062,0.5
|
||||
-0.20782651184303763,0.2555767452290356,0-0.062,0.5
|
||||
-0.22069994779841534,0.22520608533628406,0-0.062,0.5
|
||||
-0.21380654987583805,0.1927759299050759,0-0.062,0.5
|
||||
-0.07685195131406945,-0.36059620796392045,0-0.062,0.5
|
||||
-0.0685230217560848,-0.3930504809880376,0-0.062,0.5
|
||||
-0.055556888274129856,-0.4238552575531499,0-0.062,0.5
|
||||
-0.04947900285216456,-0.42562851404582414,0-0.062,0.5
|
||||
0.04695680126125581,-0.4267423543488489,0-0.062,0.5
|
||||
0.05311329990779042,-0.42505499777812067,0-0.062,0.5
|
||||
0.06749447143199308,-0.39356873920198765,0-0.062,0.5
|
||||
0.07731705225679474,-0.36027136402145693,0-0.062,0.5
|
||||
0.23974233557902208,0.20759513065196256,0-0.062,0.5
|
||||
0.2479641342254851,0.24091962665921973,0-0.062,0.5
|
||||
0.23353122653959307,0.2728940601164297,0-0.062,0.5
|
||||
0.20927286379769433,0.27509671239496136,0-0.062,0.5
|
||||
-0.21294475787059025,0.2827700199513209,0-0.062,0.5
|
||||
-0.23725007841372667,0.28138415379147086,0-0.062,0.5
|
||||
-0.25252822652189744,0.24876525535781063,0-0.062,0.5
|
||||
-0.2451986260989507,0.21390790103581597,0-0.062,0.5
|
||||
-0.09798767037773938,-0.38090557832642724,0-0.062,0.5
|
||||
-0.08895974033205233,-0.4157911801549747,0-0.062,0.5
|
||||
-0.07366795523089675,-0.4489185337065863,0-0.062,0.5
|
||||
-0.0657050129419665,-0.45084110249094056,0-0.062,0.5
|
||||
0.06233616315762246,-0.45231998705770604,0-0.062,0.5
|
||||
0.07038211092298827,-0.4505280085826907,0-0.062,0.5
|
||||
0.08716799459998396,-0.416793511465649,0-0.062,0.5
|
||||
0.09777302869794671,-0.38110271536617357,0-0.062,0.5
|
||||
0.27187775878428033,0.2275971173073421,0-0.062,0.5
|
||||
0.28061921271657153,0.2633191641471879,0-0.062,0.5
|
||||
0.2638606534114788,0.29761617459089723,0-0.062,0.5
|
||||
0.23649857802908464,0.30000191713295055,0-0.062,0.5
|
||||
-0.23926021954891744,0.30864827244620147,0-0.062,0.5
|
||||
-0.26667364498441554,0.307191562353906,0-0.062,0.5
|
||||
-0.28435650524537925,0.2723244253793367,0-0.062,0.5
|
||||
-0.276590702322063,0.23503987216655525,0-0.062,0.5
|
||||
-0.11912338944140724,-0.4012149486889425,0-0.062,0.5
|
||||
-0.10939645890801768,-0.4385318793219207,0-0.062,0.5
|
||||
-0.09177902218766153,-0.4739818098600317,0-0.062,0.5
|
||||
-0.08193102303176647,-0.4760536909360657,0-0.062,0.5
|
||||
0.07771552505398842,-0.47789761976656725,0-0.062,0.5
|
||||
0.08765092193818529,-0.47600101938726447,0-0.062,0.5
|
||||
0.10684151776797397,-0.44001828372931373,0-0.062,0.5
|
||||
0.11822900513909781,-0.4019340667108934,0-0.062,0.5
|
||||
0.30401318198953853,0.24759910396272106,0-0.062,0.5
|
||||
0.3132742912076578,0.28571870163515567,0-0.062,0.5
|
||||
0.29419008028336446,0.3223382890653644,0-0.062,0.5
|
||||
0.2637242922604749,0.32490712187093945,0-0.062,0.5
|
||||
-0.26557568122724484,0.3345265249410821,0-0.062,0.5
|
||||
-0.29609721155510466,0.33299897091634123,0-0.062,0.5
|
||||
-0.31618478396886146,0.29588359540086373,0-0.062,0.5
|
||||
-0.3079827785451759,0.25617184329729625,0-0.062,0.5
|
||||
-0.14025910850507914,-0.42152431905144105,0-0.062,0.5
|
||||
-0.12983317748398726,-0.4612725784888493,0-0.062,0.5
|
||||
-0.10989008914443035,-0.49904508601345904,0-0.062,0.5
|
||||
-0.09815703312157005,-0.5012662793811729,0-0.062,0.5
|
||||
0.09309488695035835,-0.5034752524754114,0-0.062,0.5
|
||||
0.1049197329533867,-0.5014740301918212,0-0.062,0.5
|
||||
0.1265150409359685,-0.4632430559929622,0-0.062,0.5
|
||||
0.13868498158025325,-0.42276541805559786,0-0.062,0.5
|
||||
0.33614860519479717,0.2676010906181017,0-0.062,0.5
|
||||
0.3459293696987443,0.3081182391231243,0-0.062,0.5
|
||||
0.3245195071552503,0.34706040353983175,0-0.062,0.5
|
||||
0.2909500064918652,0.34981232660892847,0-0.062,0.5
|
||||
-0.29189114290557205,0.36040477743596266,0-0.062,0.5
|
||||
-0.32552077812579355,0.3588063794787764,0-0.062,0.5
|
||||
-0.34801306269234344,0.31944276542239025,0-0.062,0.5
|
||||
-0.33937485476828844,0.2773038144280363,0-0.062,0.5
|
||||
-0.161394827568749,-0.44183368941394824,0-0.062,0.5
|
||||
-0.15026989605995472,-0.4840132776557867,0-0.062,0.5
|
||||
-0.12800115610119692,-0.524108362166895,0-0.062,0.5
|
||||
-0.11438304321137145,-0.526478867826288,0-0.062,0.5
|
||||
0.10847424884672938,-0.529052885184253,0-0.062,0.5
|
||||
0.12218854396858916,-0.5269470409963751,0-0.062,0.5
|
||||
0.146188564103964,-0.4864678282566076,0-0.062,0.5
|
||||
0.15914095802140962,-0.44359676940029924,0-0.062,0.5
|
||||
0.3682840284000559,0.28760307727348267,0-0.062,0.5
|
||||
0.37858444818983095,0.3305177766110931,0-0.062,0.5
|
||||
0.3548489340271361,0.3717825180142992,0-0.062,0.5
|
||||
0.3181757207232555,0.37471753134691754,0-0.062,0.5
|
||||
-0.31820660458389943,0.3862830299308431,0-0.062,0.5
|
||||
-0.3549443446964826,0.3846137880412115,0-0.062,0.5
|
||||
-0.3798413414158256,0.3430019354439168,0-0.062,0.5
|
||||
-0.3707669309914012,0.2984357855587765,0-0.062,0.5
|
||||
-0.1825305466324189,-0.4621430597764549,0-0.062,0.5
|
||||
-0.1707066146359222,-0.5067539768227238,0-0.062,0.5
|
||||
-0.1461122230579639,-0.5491716383203318,0-0.062,0.5
|
||||
-0.13060905330117353,-0.5516914562714051,0-0.062,0.5
|
||||
0.12385361074309427,-0.5546305178931163,0-0.062,0.5
|
||||
0.13945735498378514,-0.5524200518009516,0-0.062,0.5
|
||||
0.16586208727195306,-0.5096926005202753,0-0.062,0.5
|
||||
0.17959693446255984,-0.464428120745022,0-0.062,0.5
|
||||
0.40041945160531406,0.30760506392886156,0-0.062,0.5
|
||||
0.41123952668091734,0.35291731409906096,0-0.062,0.5
|
||||
0.3851783608990219,0.39650463248876655,0-0.062,0.5
|
||||
0.3454014349546459,0.3996227360849067,0-0.062,0.5
|
||||
-0.34452206626222676,0.41216128242572364,0-0.062,0.5
|
||||
-0.3843679112671717,0.4104211966036466,0-0.062,0.5
|
||||
-0.41166962013930747,0.3665611054654425,0-0.062,0.5
|
||||
-0.4021590072145134,0.319567756689515,0-0.062,0.5
|
||||
-0.2036662656960852,-0.48245243013897665,0-0.062,0.5
|
||||
-0.1911433332118859,-0.5294946759896766,0-0.062,0.5
|
||||
-0.16422329001472707,-0.5742349144737843,0-0.062,0.5
|
||||
-0.14683506339097208,-0.5769040447165373,0-0.062,0.5
|
||||
0.1392329726394586,-0.5802081506019843,0-0.062,0.5
|
||||
0.15672616599898037,-0.5778930626055321,0-0.062,0.5
|
||||
0.18553561043994116,-0.5329173727839465,0-0.062,0.5
|
||||
0.2000529109037091,-0.485259472089748,0-0.062,0.5
|
||||
0.4325548748105719,0.32760705058423956,0-0.062,0.5
|
||||
0.4438946051720034,0.3753168515870281,0-0.062,0.5
|
||||
0.41550778777090747,0.4212267469632335,0-0.062,0.5
|
||||
0.37262714918603607,0.42452794082289536,0-0.062,0.5
|
||||
-0.37083752794055425,0.43803953492060443,0-0.062,0.5
|
||||
-0.4137914778378609,0.4362286051660821,0-0.062,0.5
|
||||
-0.4434978988627899,0.39012027548697004,0-0.062,0.5
|
||||
-0.4335510834376266,0.34069972782025676,0-0.062,0.5
|
||||
-0.22480198475975866,-0.5027618005014689,0-0.062,0.5
|
||||
-0.21158005178785713,-0.5522353751565985,0-0.062,0.5
|
||||
-0.18233435697149739,-0.5992981906272046,0-0.062,0.5
|
||||
-0.163061073480777,-0.6021166331616374,0-0.062,0.5
|
||||
0.15461233453583006,-0.6057857833108214,0-0.062,0.5
|
||||
0.17399497701418346,-0.6033660734100821,0-0.062,0.5
|
||||
0.2052091336079374,-0.5561421450475886,0-0.062,0.5
|
||||
0.22050888734486623,-0.5060908234344463,0-0.062,0.5
|
||||
0.4646902980158309,0.34760903723962117,0-0.062,0.5
|
||||
0.4765496836630902,0.39771638907499735,0-0.062,0.5
|
||||
0.44583721464279347,0.4459488614377012,0-0.062,0.5
|
||||
0.39985286341742654,0.44943314556088476,0-0.062,0.5
|
||||
-0.39715298961888135,0.4639177874154849,0-0.062,0.5
|
||||
-0.44321504440854975,0.46203601372851716,0-0.062,0.5
|
||||
-0.4753261775862721,0.41367944550849745,0-0.062,0.5
|
||||
-0.4649431596607396,0.36183169895099876,0-0.062,0.5
|
||||
-0.245937703823433,-0.523071170863958,0-0.062,0.5
|
||||
-0.23201677036382926,-0.5749760743235169,0-0.062,0.5
|
||||
-0.20044542392826864,-0.6243614667806214,0-0.062,0.5
|
||||
-0.17928708357058273,-0.6273292216067339,0-0.062,0.5
|
||||
0.16999169643220244,-0.6313634160196553,0-0.062,0.5
|
||||
0.19126378802938757,-0.6288390842146285,0-0.062,0.5
|
||||
0.22488265677593486,-0.5793669173112275,0-0.062,0.5
|
||||
0.24096486378602444,-0.5269221747791415,0-0.062,0.5
|
||||
0.4968257212210899,0.36761102389500266,0-0.062,0.5
|
||||
0.509204762154177,0.42011592656296637,0-0.062,0.5
|
||||
0.47616664151467925,0.47067097591216844,0-0.062,0.5
|
||||
0.4270785776488168,0.47433835029887367,0-0.062,0.5
|
||||
-0.42346845129720867,0.48979603991036547,0-0.062,0.5
|
||||
-0.47263861097923876,0.48784342229095234,0-0.062,0.5
|
||||
-0.5071544563097539,0.4372386155300229,0-0.062,0.5
|
||||
-0.49633523588385176,0.3829636700817369,0-0.062,0.5
|
||||
-0.2670734228870985,-0.5433805412264827,0-0.062,0.5
|
||||
-0.25245348893979214,-0.5977167734904729,0-0.062,0.5
|
||||
-0.21855649088503076,-0.6494247429340763,0-0.062,0.5
|
||||
-0.19551309366038006,-0.6525418100518676,0-0.062,0.5
|
||||
0.18537105832857126,-0.6569410487285081,0-0.062,0.5
|
||||
0.20853259904458743,-0.6543120950191932,0-0.062,0.5
|
||||
0.24455617994392753,-0.6025916895748824,0-0.062,0.5
|
||||
0.26142084022717815,-0.547753526123852,0-0.062,0.5
|
||||
0.5289611444263483,0.3876130105503827,0-0.062,0.5
|
||||
0.5418598406452635,0.4425154640509348,0-0.062,0.5
|
||||
0.5064960683865649,0.4953930903866358,0-0.062,0.5
|
||||
0.45430429188020716,0.49924355503686274,0-0.062,0.5
|
||||
-0.44978391297553594,0.5156742924052461,0-0.062,0.5
|
||||
-0.5020621775499277,0.5136508308533874,0-0.062,0.5
|
||||
-0.5389827350332356,0.46079778555154843,0-0.062,0.5
|
||||
-0.5277273121069638,0.4040956412124748,0-0.062,0.5
|
||||
-0.28820914195076325,-0.5636899115890106,0-0.062,0.5
|
||||
-0.2728902075157542,-0.6204574726574322,0-0.062,0.5
|
||||
-0.23666755784179266,-0.6744880190875366,0-0.062,0.5
|
||||
-0.21173910375017777,-0.6777543984970087,0-0.062,0.5
|
||||
0.20075042022492898,-0.6825186814374012,0-0.062,0.5
|
||||
0.2258014100597756,-0.6797851058237997,0-0.062,0.5
|
||||
0.26422970311190846,-0.6258164618385792,0-0.062,0.5
|
||||
0.2818768166683206,-0.5685848774686024,0-0.062,0.5
|
||||
0.5610965676316055,0.4076149972057584,0-0.062,0.5
|
||||
0.5745149191363492,0.4649150015389008,0-0.062,0.5
|
||||
0.5368254952584505,0.5201152048611029,0-0.062,0.5
|
||||
0.48153000611159713,0.5241487597748515,0-0.062,0.5
|
||||
-0.47609937465386337,0.5415525449001267,0-0.062,0.5
|
||||
-0.5314857441206168,0.5394582394158227,0-0.062,0.5
|
||||
-0.5708110137567182,0.48435695557307606,0-0.062,0.5
|
||||
-0.5591193883300771,0.42522761234321715,0-0.062,0.5
|
||||
-0.3093448610144383,-0.5839992819514966,0-0.062,0.5
|
||||
-0.29332692609172717,-0.6431981718243476,0-0.062,0.5
|
||||
-0.2547786247985646,-0.69955129524095,0-0.062,0.5
|
||||
-0.22796511383998413,-0.7029669869421018,0-0.062,0.5
|
||||
0.21612978212130202,-0.7080963141462318,0-0.062,0.5
|
||||
0.2430702210749805,-0.7052581166283429,0-0.062,0.5
|
||||
0.28390322627990666,-0.6490412341022148,0-0.062,0.5
|
||||
0.3023327931094795,-0.5894162288132947,0-0.062,0.5
|
||||
0.5932319908368646,0.42761698386114044,0-0.062,0.5
|
||||
0.607169997627436,0.48731453902687016,0-0.062,0.5
|
||||
0.5671549221303364,0.5448373193355702,0-0.062,0.5
|
||||
0.5087557203429875,0.5490539645128406,0-0.062,0.5
|
||||
-0.5024148363321908,0.5674307973950072,0-0.062,0.5
|
||||
-0.5609093106913059,0.565265647978258,0-0.062,0.5
|
||||
-0.6026392924802002,0.5079161255946025,0-0.062,0.5
|
||||
-0.5905114645531897,0.4463595834739572,0-0.062,0.5
|
||||
-0.3304805800781082,-0.6043086523140033,0-0.062,0.5
|
||||
-0.31376364466769463,-0.6659388709912846,0-0.062,0.5
|
||||
-0.27288969175533145,-0.7246145713943861,0-0.062,0.5
|
||||
-0.24419112392978595,-0.7281795753872176,0-0.062,0.5
|
||||
0.23150914401766998,-0.7336739468550841,0-0.062,0.5
|
||||
0.2603390320901797,-0.730731127432908,0-0.062,0.5
|
||||
0.3035767494478989,-0.6722660063658713,0-0.062,0.5
|
||||
0.32278876955063274,-0.6102475801580066,0-0.062,0.5
|
||||
0.6253674140421229,0.44761897051652044,0-0.062,0.5
|
||||
0.6398250761185225,0.5097140765148386,0-0.062,0.5
|
||||
0.5974843490022221,0.5695594338100378,0-0.062,0.5
|
||||
0.535981434574378,0.5739591692508299,0-0.062,0.5
|
||||
-0.5287302980105177,0.5933090498898878,0-0.062,0.5
|
||||
-0.5903328772619947,0.591073056540693,0-0.062,0.5
|
||||
-0.634467571203682,0.531475295616129,0-0.062,0.5
|
||||
-0.6219035407763023,0.4674915546046973,0-0.062,0.5
|
||||
-0.3516162991417781,-0.6246180226765102,0-0.062,0.5
|
||||
-0.3349663315325018,-0.6886707231707487,0-0.062,0.5
|
||||
-0.30555415620005266,-0.7495097547858331,0-0.062,0.5
|
||||
-0.28952392899549656,-0.7530559783083552,0-0.062,0.5
|
||||
-0.03039201464593615,-0.756048970098667,0-0.062,0.5
|
||||
-0.015196007322968098,-0.7562244850493334,0-0.062,0.5
|
||||
-0.000799789859103628,-0.7563907623710175,0-0.062,0.5
|
||||
-4.63161419437529e-17,-0.7564,0-0.062,0.5
|
|
1048
simulations/coils/coil_12_custom-4-layer.csv
Normal file
1048
simulations/coils/coil_12_custom-4-layer.csv
Normal file
File diff suppressed because it is too large
Load diff
262
simulations/coils/coil_12_custom.csv
Normal file
262
simulations/coils/coil_12_custom.csv
Normal file
|
@ -0,0 +1,262 @@
|
|||
6.123233995736766e-18,0.1,0,0.5
|
||||
0.014096258695227765,0.19025618288487128,0,0.5
|
||||
0.13428541178085387,0.19244047906114253,0,0.5
|
||||
0.14098998030851972,0.19118039524389957,0,0.5
|
||||
0.14148306072087882,0.16631459035725468,0,0.5
|
||||
0.13532635931805645,0.13994600207822558,0,0.5
|
||||
0.024012653654894557,-0.3098227820576535,0,0.5
|
||||
0.017431225316165942,-0.33619873307069487,0,0.5
|
||||
0.01027922088221279,-0.3611970671695597,0,0.5
|
||||
0.008913977627660125,-0.36259704293303485,0,0.5
|
||||
-0.008508396520334669,-0.3627982725767222,0,0.5
|
||||
-0.009941272369791046,-0.36137247076671253,0,0.5
|
||||
-0.01831066351201106,-0.3355068085428511,0,0.5
|
||||
-0.026177111153910256,-0.30819298565968134,0,0.5
|
||||
-0.15940377756587573,0.15759016401351247,0,0.5
|
||||
-0.1663264379977688,0.18492078293929892,0,0.5
|
||||
-0.15770765935987854,0.21108877393026143,0,0.5
|
||||
-0.14120857821921848,0.21283370054998882,0,0.5
|
||||
0.147156103674772,0.21807438871411952,0,0.5
|
||||
0.16369116198700417,0.21686563238538295,0,0.5
|
||||
0.17295752971319228,0.18986733030399433,0,0.5
|
||||
0.1667184355411691,0.16107797320896577,0,0.5
|
||||
0.045148372718564575,-0.33013215242016003,0,0.5
|
||||
0.03786794389213355,-0.35893943223763164,0,0.5
|
||||
0.028390287838979705,-0.3862603433229955,0,0.5
|
||||
0.025139987717462016,-0.38780963137815044,0,0.5
|
||||
-0.02388775841670261,-0.38837590528557475,0,0.5
|
||||
-0.027210083384990258,-0.38684548157127774,0,0.5
|
||||
-0.037984186680003335,-0.35873158080650763,0,0.5
|
||||
-0.046633087595063544,-0.32902433700439343,0,0.5
|
||||
-0.19153920077113423,0.1775921506688923,0,0.5
|
||||
-0.19898151648885531,0.20732032042726717,0,0.5
|
||||
-0.18803708623176435,0.2358108884047287,0,0.5
|
||||
-0.16843429245060884,0.23773890528797778,0,0.5
|
||||
0.17347156535309927,0.24395264120899998,0,0.5
|
||||
0.19311472855769313,0.24267304094781803,0,0.5
|
||||
0.20478580843667427,0.21342650032552077,0,0.5
|
||||
0.1981105117642817,0.18220994433970578,0,0.5
|
||||
0.0662840917822344,-0.35044152278266705,0,0.5
|
||||
0.058304662468100975,-0.38168013140456897,0,0.5
|
||||
0.04650135479574643,-0.4113236194764319,0,0.5
|
||||
0.041365997807263716,-0.4130222198232666,0,0.5
|
||||
-0.039267120313070586,-0.4139535379944272,0,0.5
|
||||
-0.0444788944001895,-0.4123184923758429,0,0.5
|
||||
-0.057657709847995606,-0.3819563530701642,0,0.5
|
||||
-0.06708906403621683,-0.3498556883491055,0,0.5
|
||||
-0.2236746239763927,0.19759413732427222,0,0.5
|
||||
-0.2316365949799418,0.22971985791523544,0,0.5
|
||||
-0.21836651310365013,0.2605330028791961,0,0.5
|
||||
-0.19566000668199912,0.26264411002596694,0,0.5
|
||||
0.19978702703142653,0.26983089370388064,0,0.5
|
||||
0.22253829512838208,0.2684804495102533,0,0.5
|
||||
0.2366140871601563,0.23698567034704737,0,0.5
|
||||
0.22950258798739434,0.20334191547044594,0,0.5
|
||||
0.08741981084590433,-0.37075089314517395,0,0.5
|
||||
0.0787413810440685,-0.40442083057150624,0,0.5
|
||||
0.06461242175251326,-0.4363868956298683,0,0.5
|
||||
0.05759200789706552,-0.43823480826838274,0,0.5
|
||||
-0.05464648220943852,-0.4395311707032799,0,0.5
|
||||
-0.061747705415388696,-0.43779150318040816,0,0.5
|
||||
-0.07733123301598786,-0.4051811253338207,0,0.5
|
||||
-0.0875450404773701,-0.37068703969381755,0,0.5
|
||||
-0.2558100471816512,0.21759612397965228,0,0.5
|
||||
-0.26429167347102833,0.2521193954032039,0,0.5
|
||||
-0.24869593997553602,0.28525511735366366,0,0.5
|
||||
-0.22288572091338957,0.2875493147639562,0,0.5
|
||||
0.22610248870975386,0.2957091461987612,0,0.5
|
||||
0.2519618616990711,0.2942878580726884,0,0.5
|
||||
0.26844236588363835,0.26054484036857384,0,0.5
|
||||
0.2608946642105069,0.224473886601186,0,0.5
|
||||
0.10855552990957429,-0.39106026350768075,0,0.5
|
||||
0.09917809962003603,-0.4271615297384434,0,0.5
|
||||
0.0827234887092801,-0.4614501717833045,0,0.5
|
||||
0.07381801798686734,-0.4634473967134987,0,0.5
|
||||
-0.07002584410580649,-0.46510880341213234,0,0.5
|
||||
-0.07901651643058794,-0.46326451398497326,0,0.5
|
||||
-0.09700475618398015,-0.4284058975974774,0,0.5
|
||||
-0.1080010169185234,-0.3915183910385297,0,0.5
|
||||
-0.28794547038690954,0.23759811063503192,0,0.5
|
||||
-0.2969467519621147,0.2745189328911719,0,0.5
|
||||
-0.27902536684742163,0.3099772318281307,0,0.5
|
||||
-0.25011143514477974,0.3124545195019449,0,0.5
|
||||
0.2524179503880812,0.3215873986936418,0,0.5
|
||||
0.2813854282697602,0.32009526663512367,0,0.5
|
||||
0.3002706446071205,0.28410401039010047,0,0.5
|
||||
0.2922867404336197,0.24560585773192617,0,0.5
|
||||
0.12969124897324413,-0.4113696338701878,0,0.5
|
||||
0.11961481819600343,-0.44990222890538084,0,0.5
|
||||
0.10083455566604668,-0.4865134479367407,0,0.5
|
||||
0.09004402807666877,-0.4886599851586141,0,0.5
|
||||
-0.08540520600217685,-0.4906864361209764,0,0.5
|
||||
-0.09628532744578969,-0.4887375247895296,0,0.5
|
||||
-0.11667827935197495,-0.451630669861125,0,0.5
|
||||
-0.12845699335967908,-0.4123497423832333,0,0.5
|
||||
-0.3200808935921681,0.2576000972904128,0,0.5
|
||||
-0.32960183045320124,0.2969184703791407,0,0.5
|
||||
-0.3093547937193074,0.3346993463025981,0,0.5
|
||||
-0.27733714937617004,0.33735972423993404,0,0.5
|
||||
0.27873341206640834,0.34746565118852224,0,0.5
|
||||
0.310808994840449,0.34590267519755874,0,0.5
|
||||
0.33209892333060226,0.3076631804116264,0,0.5
|
||||
0.3236788166567318,0.26673782886266506,0,0.5
|
||||
0.15082696803691145,-0.43167900423270533,0,0.5
|
||||
0.14005153677196824,-0.4726429280723291,0,0.5
|
||||
0.11894562262281094,-0.5115767240901884,0,0.5
|
||||
0.10627003816646827,-0.5138725736037415,0,0.5
|
||||
-0.10078456789854265,-0.5162640688298386,0,0.5
|
||||
-0.11355413846098647,-0.5142105355941043,0,0.5
|
||||
-0.13635180251996465,-0.4748554421247905,0,0.5
|
||||
-0.1489129698008299,-0.43318109372795394,0,0.5
|
||||
-0.35221631679742627,0.27760208394579144,0,0.5
|
||||
-0.36225690894428747,0.3193180078671083,0,0.5
|
||||
-0.3396842205911931,0.35942146077706527,0,0.5
|
||||
-0.30456286360756024,0.36226492897792284,0,0.5
|
||||
0.3050488737447358,0.37334390368340287,0,0.5
|
||||
0.3402325614111382,0.3717100837599939,0,0.5
|
||||
0.36392720205408435,0.33122235043315285,0,0.5
|
||||
0.3550708928798445,0.2878697999934051,0,0.5
|
||||
0.17196268710058094,-0.45198837459521374,0,0.5
|
||||
0.1604882553479353,-0.4953836272392681,0,0.5
|
||||
0.13705668957957745,-0.536640000243627,0,0.5
|
||||
0.12249604825626995,-0.5390851620488604,0,0.5
|
||||
-0.11616392979490739,-0.5418417015387027,0,0.5
|
||||
-0.1308229494761823,-0.5396835463986817,0,0.5
|
||||
-0.15602532568795352,-0.4980802143884591,0,0.5
|
||||
-0.16936894624197996,-0.45401244507267735,0,0.5
|
||||
-0.38435174000268446,0.29760407060117033,0,0.5
|
||||
-0.39491198743537387,0.34171754535507615,0,0.5
|
||||
-0.37001364746307885,0.3841435752515327,0,0.5
|
||||
-0.33178857783895055,0.387170133715912,0,0.5
|
||||
0.3313643354230632,0.3992221561782835,0,0.5
|
||||
0.36965612798182723,0.3975174923224291,0,0.5
|
||||
0.39575548077756667,0.35478152045468003,0,0.5
|
||||
0.3864629691029576,0.3090017711241465,0,0.5
|
||||
0.19309840616425383,-0.4722977449577085,0,0.5
|
||||
0.1809249739239059,-0.5181243264061925,0,0.5
|
||||
0.1551677565363472,-0.56170327639705,0,0.5
|
||||
0.13872205834607435,-0.564297750493963,0,0.5
|
||||
-0.1315432916912783,-0.5674193342475425,0,0.5
|
||||
-0.14809176049138478,-0.5651565572032342,0,0.5
|
||||
-0.1756988488559492,-0.5213049866521036,0,0.5
|
||||
-0.18982492268313647,-0.47484379641737806,0,0.5
|
||||
-0.41648716320794305,0.3176060572565512,0,0.5
|
||||
-0.4275670659264604,0.3641170828430448,0,0.5
|
||||
-0.4003430743349646,0.4088656897259999,0,0.5
|
||||
-0.35901429207034086,0.41207533845390093,0,0.5
|
||||
0.3576797971013906,0.42510040867316407,0,0.5
|
||||
0.3990796945525164,0.4233249008848644,0,0.5
|
||||
0.427583759501049,0.37834069047620744,0,0.5
|
||||
0.41785504532607065,0.3301337422548883,0,0.5
|
||||
0.21423412522792748,-0.4926071153201999,0,0.5
|
||||
0.20136169249987734,-0.5408650255731134,0,0.5
|
||||
0.17327882349311796,-0.58676655255047,0,0.5
|
||||
0.15494806843587988,-0.5895103389390638,0,0.5
|
||||
-0.1469226535876459,-0.5929969669563936,0,0.5
|
||||
-0.16536057150658384,-0.5906295680077986,0,0.5
|
||||
-0.1953723720239415,-0.5445297589157603,0,0.5
|
||||
-0.2102808991242898,-0.49567514776209026,0,0.5
|
||||
-0.44862258641320174,0.3376080439119312,0,0.5
|
||||
-0.46022214441754705,0.3865166203310132,0,0.5
|
||||
-0.43067250120685047,0.4335878042004674,0,0.5
|
||||
-0.3862400063017312,0.4369805431918901,0,0.5
|
||||
0.38399525877971774,0.4509786611680446,0,0.5
|
||||
0.4285032611232052,0.4491323094472994,0,0.5
|
||||
0.4594120382245304,0.40189986049773224,0,0.5
|
||||
0.4492471215491823,0.3512657133856249,0,0.5
|
||||
0.2353698442915894,-0.5129164856827393,0,0.5
|
||||
0.22179841107583648,-0.5636057247400847,0,0.5
|
||||
0.1913898904498764,-0.6118298287039404,0,0.5
|
||||
0.17117407852567373,-0.6147229273842122,0,0.5
|
||||
-0.16230201548401463,-0.6185745996652494,0,0.5
|
||||
-0.18262938252178346,-0.6161025788123655,0,0.5
|
||||
-0.21504589519193376,-0.5677545311794169,0,0.5
|
||||
-0.23073687556544303,-0.5165064991068024,0,0.5
|
||||
-0.48075800961845994,0.35761003056731083,0,0.5
|
||||
-0.49287722290863323,0.40891615781898116,0,0.5
|
||||
-0.4610019280787361,0.4583099186749345,0,0.5
|
||||
-0.4134657205331214,0.46188574792987885,0,0.5
|
||||
0.41031072045804506,0.47685691366292515,0,0.5
|
||||
0.4579268276938942,0.4749397180097346,0,0.5
|
||||
0.4912403169480126,0.4254590305192587,0,0.5
|
||||
0.4806391977722949,0.3723976845163649,0,0.5
|
||||
0.25650556335525887,-0.5332258560452477,0,0.5
|
||||
0.2422351296518035,-0.5863464239070237,0,0.5
|
||||
0.209500957406643,-0.6368931048573794,0,0.5
|
||||
0.18740008861547558,-0.6399355158293318,0,0.5
|
||||
-0.17768137738037754,-0.6441522323741198,0,0.5
|
||||
-0.19989819353697735,-0.6415755896169493,0,0.5
|
||||
-0.2347194183599207,-0.590979303443092,0,0.5
|
||||
-0.25119285200659125,-0.537337850451532,0,0.5
|
||||
-0.512893432823718,0.3776120172226888,0,0.5
|
||||
-0.5255323013997197,0.4313156953069484,0,0.5
|
||||
-0.49133135495062213,0.4830320331494017,0,0.5
|
||||
-0.440691434764512,0.48679095266786787,0,0.5
|
||||
0.43662618213637244,0.5027351661578057,0,0.5
|
||||
0.48735039426458326,0.5007471265721699,0,0.5
|
||||
0.5230685956714949,0.44901820054078617,0,0.5
|
||||
0.5120312739954082,0.39352965564710685,0,0.5
|
||||
0.2776412824189334,-0.5535352264077362,0,0.5
|
||||
0.26267184822777584,-0.6090871230739416,0,0.5
|
||||
0.2276120243634144,-0.6619563810107955,0,0.5
|
||||
0.20362609870528145,-0.6651481042744276,0,0.5
|
||||
-0.1930607392767501,-0.6697298650829528,0,0.5
|
||||
-0.21716700455218169,-0.6670486004214949,0,0.5
|
||||
-0.2543929415279183,-0.61420407570673,0,0.5
|
||||
-0.2716488284477496,-0.5581692017962265,0,0.5
|
||||
-0.5450288560289769,0.39761400387807055,0,0.5
|
||||
-0.5581873798908062,0.4537152327949177,0,0.5
|
||||
-0.5216607818225076,0.5077541476238692,0,0.5
|
||||
-0.46791714899590203,0.5116961574058569,0,0.5
|
||||
0.4629416438146997,0.5286134186526864,0,0.5
|
||||
0.5167739608352723,0.5265545351346052,0,0.5
|
||||
0.5548968743949769,0.47257737056231275,0,0.5
|
||||
0.5434233502185207,0.414661626777847,0,0.5
|
||||
0.29877700148260333,-0.5738445967702432,0,0.5
|
||||
0.28310856680374336,-0.631827822240879,0,0.5
|
||||
0.2457230913201809,-0.6870196571642307,0,0.5
|
||||
0.2198521087950826,-0.6903606927195416,0,0.5
|
||||
-0.20844010117312398,-0.6953074977917847,0,0.5
|
||||
-0.23443581556738713,-0.6925216112260386,0,0.5
|
||||
-0.2740664646959168,-0.6374288479703648,0,0.5
|
||||
-0.29210480488890883,-0.5790005531409179,0,0.5
|
||||
-0.5771642792342361,0.4176159905334528,0,0.5
|
||||
-0.5908424583818932,0.4761147702828872,0,0.5
|
||||
-0.5519902086943936,0.5324762620983367,0,0.5
|
||||
-0.49514286322729256,0.5366013621438461,0,0.5
|
||||
0.4892571054930269,0.5544916711475668,0,0.5
|
||||
0.5461975274059612,0.5523619436970402,0,0.5
|
||||
0.5867251531184586,0.49613654058383805,0,0.5
|
||||
0.5748154264416326,0.43579359790858463,0,0.5
|
||||
0.3199127205462674,-0.5941539671327736,0,0.5
|
||||
0.3035452853797047,-0.6545685214078408,0,0.5
|
||||
0.26383415827694223,-0.7120829333176939,0,0.5
|
||||
0.2360781188848798,-0.7155732811646855,0,0.5
|
||||
-0.22381946306948025,-0.7208851305006826,0,0.5
|
||||
-0.25170462658257375,-0.71799462203065,0,0.5
|
||||
-0.2937399878638962,-0.6606536202340665,0,0.5
|
||||
-0.31256078133004983,-0.5998319044856729,0,0.5
|
||||
-0.609299702439493,0.4376179771888281,0,0.5
|
||||
-0.6234975368729788,0.4985143077708532,0,0.5
|
||||
-0.5823196355662792,0.5571983765728039,0,0.5
|
||||
-0.5223685774586827,0.5615065668818353,0,0.5
|
||||
0.5155725671713546,0.5803699236424482,0,0.5
|
||||
0.5756210939766506,0.578169352259476,0,0.5
|
||||
0.618553431841941,0.5196957106053652,0,0.5
|
||||
0.6062075026647455,0.45692556903932535,0,0.5
|
||||
0.3410484396099368,-0.614463337495282,0,0.5
|
||||
0.3239820039556717,-0.6773092205747797,0,0.5
|
||||
0.2819452252337086,-0.7371462094711321,0,0.5
|
||||
0.2523041289746812,-0.7407858696098035,0,0.5
|
||||
-0.23919882496584782,-0.7464627632095369,0,0.5
|
||||
-0.26897343759777254,-0.7434676328352169,0,0.5
|
||||
-0.31341351103188797,-0.6838783924977248,0,0.5
|
||||
-0.3330167577712027,-0.6206632558303865,0,0.5
|
||||
-0.6414351256447517,0.45761996384420794,0,0.5
|
||||
-0.6578273688326443,0.5208834085887586,0,0.5
|
||||
-0.6444693783411616,0.5813421943160753,0,0.5
|
||||
-0.613234923496066,0.585255178157432,0,0.5
|
||||
-0.06437272677583011,0.5952301015745369,0,0.5
|
||||
-0.03218636338791504,0.5958150507872684,0,0.5
|
||||
-0.0016940191256797047,0.5963692131993299,0,0.5
|
||||
3.651896755057407e-17,0.5964,0,0.5
|
|
12964
simulations/coils/coil_12_spiral-2-layer.csv
Normal file
12964
simulations/coils/coil_12_spiral-2-layer.csv
Normal file
File diff suppressed because it is too large
Load diff
25928
simulations/coils/coil_12_spiral-4-layer.csv
Normal file
25928
simulations/coils/coil_12_spiral-4-layer.csv
Normal file
File diff suppressed because it is too large
Load diff
6482
simulations/coils/coil_12_spiral.csv
Normal file
6482
simulations/coils/coil_12_spiral.csv
Normal file
File diff suppressed because it is too large
Load diff
1260
simulations/coils/coil_6_custom-2-layer.csv
Normal file
1260
simulations/coils/coil_6_custom-2-layer.csv
Normal file
File diff suppressed because it is too large
Load diff
2520
simulations/coils/coil_6_custom-4-layer.csv
Normal file
2520
simulations/coils/coil_6_custom-4-layer.csv
Normal file
File diff suppressed because it is too large
Load diff
630
simulations/coils/coil_6_custom.csv
Normal file
630
simulations/coils/coil_6_custom.csv
Normal file
|
@ -0,0 +1,630 @@
|
|||
1.8369701987210342e-18,0.030000000000000072,0,0.5
|
||||
0.0038302268878547393,0.0951542663288179,0,0.5
|
||||
0.0364879508790372,0.09646958976400224,0,0.5
|
||||
0.03853954195450916,0.09648467656527193,0,0.5
|
||||
0.04281045732182199,0.09544091555294185,0,0.5
|
||||
0.0455043277655865,0.09426609429352764,0,0.5
|
||||
0.08972308038603485,0.07416307263640205,0,0.5
|
||||
0.09211156125092582,0.0725493947943603,0,0.5
|
||||
0.09088546419851488,0.06360621529473445,0,0.5
|
||||
0.08713465327538955,0.05528302702608083,0,0.5
|
||||
0.020846153711544364,-0.0855911823100587,0,0.5
|
||||
0.016895836925205483,-0.09385515235133103,0,0.5
|
||||
0.012078634334950782,-0.1017324037580934,0,0.5
|
||||
0.010676503798784438,-0.1022209352798904,0,0.5
|
||||
-0.009744643261954997,-0.1031372512654739,0,0.5
|
||||
-0.011212220938561963,-0.10273725979296913,0,0.5
|
||||
-0.017207472056747893,-0.0946210973022997,0,0.5
|
||||
-0.022401284511458626,-0.08600313045183842,0,0.5
|
||||
-0.10989465757806591,0.06100411036579505,0,0.5
|
||||
-0.11484137306849251,0.06972560611968379,0,0.5
|
||||
-0.11638887882956399,0.07970528887204745,0,0.5
|
||||
-0.11316161418477236,0.08207232950967391,0,0.5
|
||||
-0.053523344817451135,0.11469937823458647,0,0.5
|
||||
-0.0497963804836835,0.11662194254922857,0,0.5
|
||||
-0.04234929184318698,0.11860105148787392,0,0.5
|
||||
-0.03780171324306962,0.11887749710505997,0,0.5
|
||||
0.03660761291854649,0.12187440927576343,0,0.5
|
||||
0.0411798229438867,0.12195527347975668,0,0.5
|
||||
0.049070277238394557,0.1204139169809317,0,0.5
|
||||
0.053265238651396395,0.11862043444491077,0,0.5
|
||||
0.12088408979092162,0.08787910529535853,0,0.5
|
||||
0.12460111864736201,0.0855487487252807,0,0.5
|
||||
0.12388878692376404,0.07434365961343205,0,0.5
|
||||
0.11938027837443702,0.06422391717034472,0,0.5
|
||||
0.03893945621014858,-0.10672635769337864,0,0.5
|
||||
0.03408305672939073,-0.11675746511125525,0,0.5
|
||||
0.027108688240037836,-0.12636712376931084,0,0.5
|
||||
0.02421578939929247,-0.12701341486038484,0,0.5
|
||||
-0.0208820212447712,-0.12903699584166178,0,0.5
|
||||
-0.023849762955487967,-0.12861275819041673,0,0.5
|
||||
-0.03217130310432606,-0.11895289948672923,0,0.5
|
||||
-0.03844971711454052,-0.1086439608005437,0,0.5
|
||||
-0.1431396291495626,0.06725707684710837,0,0.5
|
||||
-0.1490240562127806,0.0777116556607368,0,0.5
|
||||
-0.1502538313156824,0.08999303665839652,0,0.5
|
||||
-0.1457358210334664,0.09318443673105667,0,0.5
|
||||
-0.06318186085067679,0.1383482570412796,0,0.5
|
||||
-0.05808110682150316,0.141007209410617,0,0.5
|
||||
-0.04882149447916745,0.14370453174846706,0,0.5
|
||||
-0.04363379035019029,0.1440426041989631,0,0.5
|
||||
0.04048527162906275,0.1474305859700415,0,0.5
|
||||
0.045699102268767715,0.14750154898549986,0,0.5
|
||||
0.05542899180420411,0.14539090149267203,0,0.5
|
||||
0.06102614953720625,0.14297477459629387,0,0.5
|
||||
0.1520450991958084,0.10159513795431507,0,0.5
|
||||
0.15709067604379823,0.09854810265620115,0,0.5
|
||||
0.15689210964901326,0.08508110393212971,0,0.5
|
||||
0.15162590347348454,0.07316480731460867,0,0.5
|
||||
0.05703275870875285,-0.1278615330766985,0,0.5
|
||||
0.051270276533576034,-0.1396597778711794,0,0.5
|
||||
0.04213874214512494,-0.15100184378052817,0,0.5
|
||||
0.03775507499980055,-0.15180589444087925,0,0.5
|
||||
-0.03201939922758741,-0.15493674041784963,0,0.5
|
||||
-0.03648730497241398,-0.15448825658786436,0,0.5
|
||||
-0.047135134151904255,-0.14328470167115878,0,0.5
|
||||
-0.05449814971762242,-0.131284791149249,0,0.5
|
||||
-0.1763846007210593,0.07351004332842162,0,0.5
|
||||
-0.1832067393570687,0.08569770520178975,0,0.5
|
||||
-0.18411878380180086,0.10028078444474553,0,0.5
|
||||
-0.1783100278821605,0.10429654395243934,0,0.5
|
||||
-0.07284037688390235,0.1619971358479727,0,0.5
|
||||
-0.06636583315932275,0.1653924762720054,0,0.5
|
||||
-0.05529369711514785,0.1688080120090602,0,0.5
|
||||
-0.049465867457310915,0.16920771129286621,0,0.5
|
||||
0.04436293033957908,0.17298676266431956,0,0.5
|
||||
0.05021838159364881,0.17304782449124304,0,0.5
|
||||
0.061787706370013754,0.17036788600441238,0,0.5
|
||||
0.06878706042301619,0.16732911474767703,0,0.5
|
||||
0.18320610860069514,0.11531117061327156,0,0.5
|
||||
0.1895802334402344,0.11154745658712159,0,0.5
|
||||
0.1898954323742624,0.09581854825082735,0,0.5
|
||||
0.18387152857253203,0.08210569745887261,0,0.5
|
||||
0.07512606120735711,-0.14899670846001833,0,0.5
|
||||
0.06845749633776133,-0.1625620906311035,0,0.5
|
||||
0.05716879605021204,-0.17563656379174541,0,0.5
|
||||
0.05129436060030862,-0.17659837402137352,0,0.5
|
||||
-0.04315677721040362,-0.18083648499403748,0,0.5
|
||||
-0.049124846989339985,-0.18036375498531196,0,0.5
|
||||
-0.06209896519948242,-0.1676165038555883,0,0.5
|
||||
-0.07054658232070432,-0.15392562149795425,0,0.5
|
||||
-0.20962957229255602,0.07976300980973491,0,0.5
|
||||
-0.2173894225013568,0.09368375474284274,0,0.5
|
||||
-0.21798373628791934,0.1105685322310946,0,0.5
|
||||
-0.21088423473085466,0.11540865117382212,0,0.5
|
||||
-0.08249889291712796,0.18564601465466585,0,0.5
|
||||
-0.07465055949714236,0.18977774313339382,0,0.5
|
||||
-0.061765899751128284,0.19391149226965337,0,0.5
|
||||
-0.05529794456443156,0.19437281838676937,0,0.5
|
||||
0.04824058905009533,0.19854293935859763,0,0.5
|
||||
0.054737660918529794,0.19859409999698624,0,0.5
|
||||
0.06814642093582328,0.1953448705161527,0,0.5
|
||||
0.07654797130882601,0.1916834548990602,0,0.5
|
||||
0.2143671180055818,0.129027203272228,0,0.5
|
||||
0.2220697908366705,0.12454681051804195,0,0.5
|
||||
0.22289875509951146,0.10655599256952493,0,0.5
|
||||
0.2161171536715794,0.0910465876031365,0,0.5
|
||||
0.09321936370596139,-0.17013188384333824,0,0.5
|
||||
0.08564471614194664,-0.18546440339102768,0,0.5
|
||||
0.07219884995529917,-0.20027128380296277,0,0.5
|
||||
0.06483364620081672,-0.20139085360186787,0,0.5
|
||||
-0.05429415519321994,-0.20673622957022503,0,0.5
|
||||
-0.06176238900626613,-0.20623925338275922,0,0.5
|
||||
-0.07706279624706074,-0.19194830604001759,0,0.5
|
||||
-0.08659501492378635,-0.17656645184665928,0,0.5
|
||||
-0.24287454386405272,0.08601597629104821,0,0.5
|
||||
-0.2515721056456449,0.10166980428389574,0,0.5
|
||||
-0.2518486887740377,0.1208562800174436,0,0.5
|
||||
-0.24345844157954866,0.12652075839520482,0,0.5
|
||||
-0.09215740895035349,0.20929489346135904,0,0.5
|
||||
-0.0829352858349619,0.2141630099947823,0,0.5
|
||||
-0.06823810238710863,0.2190149725302466,0,0.5
|
||||
-0.06113002167155214,0.21953792548067255,0,0.5
|
||||
0.052118247760611525,0.22409911605287572,0,0.5
|
||||
0.05925694024341073,0.22414037550272942,0,0.5
|
||||
0.07450513550163276,0.220321855027893,0,0.5
|
||||
0.08430888219463581,0.2160377950504433,0,0.5
|
||||
0.24552812741046864,0.14274323593118454,0,0.5
|
||||
0.2545593482331068,0.13754616444896242,0,0.5
|
||||
0.25590207782476077,0.11729343688822258,0,0.5
|
||||
0.248362778770627,0.09998747774740047,0,0.5
|
||||
0.11131266620456563,-0.1912670592266581,0,0.5
|
||||
0.10283193594613191,-0.20836671615095184,0,0.5
|
||||
0.08722890386038623,-0.22490600381418013,0,0.5
|
||||
0.07837293180132475,-0.2261833331823623,0,0.5
|
||||
-0.0654315331760362,-0.23263597414641288,0,0.5
|
||||
-0.07439993102319217,-0.23211475178020682,0,0.5
|
||||
-0.09202662729463897,-0.21628010822444707,0,0.5
|
||||
-0.10264344752686831,-0.19920728219536452,0,0.5
|
||||
-0.27611951543554936,0.0922689427723615,0,0.5
|
||||
-0.28575478878993293,0.10965585382494872,0,0.5
|
||||
-0.28571364126015614,0.1311440278037926,0,0.5
|
||||
-0.2760326484282428,0.13763286561658755,0,0.5
|
||||
-0.1018159249835792,0.23294377226805216,0,0.5
|
||||
-0.09122001217278167,0.23854827685617072,0,0.5
|
||||
-0.07471030502308919,0.24411845279083977,0,0.5
|
||||
-0.06696209877867289,0.24470303257457568,0,0.5
|
||||
0.05599590647112801,0.2496552927471538,0,0.5
|
||||
0.06377621956829198,0.24968665100847262,0,0.5
|
||||
0.08086385006744254,0.2452988395396333,0,0.5
|
||||
0.09206979308044588,0.2403921352018264,0,0.5
|
||||
0.27668913681535523,0.15645926859014095,0,0.5
|
||||
0.28704890562954277,0.15054551837988273,0,0.5
|
||||
0.28890540055000974,0.1280308812069201,0,0.5
|
||||
0.28060840386967434,0.10892836789166427,0,0.5
|
||||
0.12940596870316987,-0.21240223460997795,0,0.5
|
||||
0.12001915575031719,-0.23126902891087595,0,0.5
|
||||
0.10225895776547334,-0.2495407238253975,0,0.5
|
||||
0.09191221740183286,-0.2509758127628567,0,0.5
|
||||
-0.07656891115885198,-0.25853571872260145,0,0.5
|
||||
-0.08703747304011775,-0.25799025017765514,0,0.5
|
||||
-0.10699045834221672,-0.24061191040887736,0,0.5
|
||||
-0.1186918801299498,-0.2218481125440705,0,0.5
|
||||
-0.30936448700704605,0.09852190925367467,0,0.5
|
||||
-0.31993747193422106,0.11764190336600162,0,0.5
|
||||
-0.3195785937462746,0.1414317755901416,0,0.5
|
||||
-0.3086068552769369,0.14874497283797022,0,0.5
|
||||
-0.11147444101680468,0.25659265107474527,0,0.5
|
||||
-0.09950473851060114,0.26293354371755906,0,0.5
|
||||
-0.08118250765906948,0.2692219330514328,0,0.5
|
||||
-0.07279417588579341,0.2698681396684788,0,0.5
|
||||
0.05987356518164415,0.27521146944143193,0,0.5
|
||||
0.06829549889317285,0.2752329265142158,0,0.5
|
||||
0.08722256463325197,0.2702758240513736,0,0.5
|
||||
0.09983070396625561,0.2647464753532095,0,0.5
|
||||
0.3078501462202421,0.17017530124909763,0,0.5
|
||||
0.3195384630259791,0.16354487231080334,0,0.5
|
||||
0.321908723275259,0.13876832552561782,0,0.5
|
||||
0.3128540289687219,0.11786925803592822,0,0.5
|
||||
0.1474992712017736,-0.23353740999329897,0,0.5
|
||||
0.13720637555450194,-0.25417134167080124,0,0.5
|
||||
0.11728901167055987,-0.27417544383661596,0,0.5
|
||||
0.10545150300234038,-0.27576829234335215,0,0.5
|
||||
-0.08770628914166825,-0.28443546329878944,0,0.5
|
||||
-0.09967501505704379,-0.2838657485751029,0,0.5
|
||||
-0.12195428938979487,-0.26494371259330696,0,0.5
|
||||
-0.13474031273303166,-0.24448894289277584,0,0.5
|
||||
-0.34260945857854264,0.1047748757349879,0,0.5
|
||||
-0.354120155078509,0.12562795290705456,0,0.5
|
||||
-0.35344354623239294,0.15171952337649058,0,0.5
|
||||
-0.34118106212563093,0.1598570800593529,0,0.5
|
||||
-0.12113295705003047,0.2802415298814383,0,0.5
|
||||
-0.10778946484842096,0.28731881057894737,0,0.5
|
||||
-0.0876547102950501,0.29432541331202594,0,0.5
|
||||
-0.07862625299291423,0.29503324676238185,0,0.5
|
||||
0.06375122389216067,0.30076764613570994,0,0.5
|
||||
0.07281477821805415,0.300779202019959,0,0.5
|
||||
0.09358127919906181,0.295252808563114,0,0.5
|
||||
0.10759161485206574,0.28910081550459266,0,0.5
|
||||
0.33901115562512874,0.183891333908054,0,0.5
|
||||
0.3520280204224152,0.1765442262417236,0,0.5
|
||||
0.3549120460005081,0.14950576984431535,0,0.5
|
||||
0.34509965406776927,0.12681014818019212,0,0.5
|
||||
0.16559257370037833,-0.25467258537661785,0,0.5
|
||||
0.15439359535868769,-0.2770736544307244,0,0.5
|
||||
0.1323190655756475,-0.2988101638478323,0,0.5
|
||||
0.11899078860284898,-0.3005607719238457,0,0.5
|
||||
-0.09884366712448386,-0.3103352078749782,0,0.5
|
||||
-0.11231255707396921,-0.30974124697255145,0,0.5
|
||||
-0.1369181204373725,-0.28927551477773755,0,0.5
|
||||
-0.15078874533611303,-0.2671297732414821,0,0.5
|
||||
-0.37585443015003933,0.11102784221630116,0,0.5
|
||||
-0.38830283822279715,0.13361400244810756,0,0.5
|
||||
-0.3873084987185114,0.16200727116283978,0,0.5
|
||||
-0.373755268974325,0.17096918728073576,0,0.5
|
||||
-0.1307914730832558,0.3038904086881316,0,0.5
|
||||
-0.1160741911862403,0.311704077440336,0,0.5
|
||||
-0.09412691293103027,0.3194288935726192,0,0.5
|
||||
-0.08445833010003463,0.32019835385628515,0,0.5
|
||||
0.06762888260267674,0.3263238228299882,0,0.5
|
||||
0.07733405754293494,0.3263254775257024,0,0.5
|
||||
0.09993999376487114,0.32022979307485444,0,0.5
|
||||
0.11535252573787538,0.31345515565597587,0,0.5
|
||||
0.3701721650300155,0.19760736656701045,0,0.5
|
||||
0.3845175778188513,0.189543580172644,0,0.5
|
||||
0.3879153687257572,0.16024321416301293,0,0.5
|
||||
0.37734527916681676,0.13575103832445598,0,0.5
|
||||
0.18368587619898263,-0.2758077607599375,0,0.5
|
||||
0.17158081516287307,-0.29997596719064834,0,0.5
|
||||
0.14734911948073462,-0.32344488385904935,0,0.5
|
||||
0.13253007420335702,-0.32535325150433964,0,0.5
|
||||
-0.10998104510730111,-0.3362349524511641,0,0.5
|
||||
-0.12495009909089631,-0.335616745369997,0,0.5
|
||||
-0.1518819514849518,-0.31360731696216504,0,0.5
|
||||
-0.166837177939196,-0.28977060359018547,0,0.5
|
||||
-0.4090994017215362,0.11728080869761459,0,0.5
|
||||
-0.42248552136708534,0.14160005198916062,0,0.5
|
||||
-0.42117345120462996,0.17229501894918875,0,0.5
|
||||
-0.40632947582301926,0.18208129450211843,0,0.5
|
||||
-0.14044998911648177,0.3275392874948245,0,0.5
|
||||
-0.1243589175240603,0.3360893443017242,0,0.5
|
||||
-0.10059911556701107,0.34453237383321217,0,0.5
|
||||
-0.09029040720715562,0.3453634609501881,0,0.5
|
||||
0.07150654131319321,0.3518799995242661,0,0.5
|
||||
0.08185333686781619,0.35187175303144536,0,0.5
|
||||
0.10629870833068096,0.3452067775865946,0,0.5
|
||||
0.12311343662368548,0.33780949580735886,0,0.5
|
||||
0.40133317443490224,0.21132339922596693,0,0.5
|
||||
0.4170071352152876,0.20254293410356441,0,0.5
|
||||
0.42091869145100647,0.17098065848171046,0,0.5
|
||||
0.40959090426586425,0.14469192846871975,0,0.5
|
||||
0.20177917869758627,-0.29694293614325884,0,0.5
|
||||
0.18876803496705766,-0.322878279950574,0,0.5
|
||||
0.16237917338582103,-0.3480796038702682,0,0.5
|
||||
0.1460693598038645,-0.35014573108483554,0,0.5
|
||||
-0.12111842309011674,-0.3621346970273532,0,0.5
|
||||
-0.13758764110782168,-0.3614922437674458,0,0.5
|
||||
-0.1668457825325293,-0.3379391191465957,0,0.5
|
||||
-0.18288561054227725,-0.3124114339388918,0,0.5
|
||||
-0.4423443732930326,0.1235337751789278,0,0.5
|
||||
-0.45666820451137313,0.1495861015302136,0,0.5
|
||||
-0.45503840369074816,0.1825827667355378,0,0.5
|
||||
-0.4389036826717131,0.1931934017235012,0,0.5
|
||||
-0.15010850514970703,0.35118816630151783,0,0.5
|
||||
-0.13264364386187955,0.3604746111631128,0,0.5
|
||||
-0.10707131820299114,0.36963585409380556,0,0.5
|
||||
-0.09612248431427595,0.37052856804409146,0,0.5
|
||||
0.07538420002370926,0.37743617621854425,0,0.5
|
||||
0.08637261619269695,0.37741802853718864,0,0.5
|
||||
0.11265742289649024,0.37018376209833503,0,0.5
|
||||
0.13087434750949506,0.36216383595874213,0,0.5
|
||||
0.43249418383978877,0.22503943188492354,0,0.5
|
||||
0.44949669261172354,0.21554228803448497,0,0.5
|
||||
0.45392201417625533,0.18171810280040818,0,0.5
|
||||
0.44183652936491147,0.15363281861298378,0,0.5
|
||||
0.21987248119619038,-0.31807811152657905,0,0.5
|
||||
0.20595525477124282,-0.3457805927104985,0,0.5
|
||||
0.177409227290908,-0.37271432388148595,0,0.5
|
||||
0.15960864540437247,-0.3749382106653304,0,0.5
|
||||
-0.13225580107293228,-0.38803444160354245,0,0.5
|
||||
-0.15022518312474697,-0.38736774216489483,0,0.5
|
||||
-0.18180961358010675,-0.36227092133102673,0,0.5
|
||||
-0.19893404314535842,-0.3350522642875985,0,0.5
|
||||
-0.4755893448645289,0.12978674166024057,0,0.5
|
||||
-0.4908508876556609,0.1575721510712661,0,0.5
|
||||
-0.4889033561768663,0.19287051452188647,0,0.5
|
||||
-0.4714778895204069,0.20430550894488358,0,0.5
|
||||
-0.159767021182933,0.37483704510821075,0,0.5
|
||||
-0.14092837019969962,0.38485987802450106,0,0.5
|
||||
-0.11354352083897205,0.3947393343543985,0,0.5
|
||||
-0.10195456142139706,0.39569367513799436,0,0.5
|
||||
0.07926185873422537,0.40299235291282215,0,0.5
|
||||
0.09089189551757783,0.4029643040429317,0,0.5
|
||||
0.11901613746229969,0.39516074661007516,0,0.5
|
||||
0.13863525839530486,0.3865181761101251,0,0.5
|
||||
0.46365519324467597,0.23875546454388039,0,0.5
|
||||
0.48198625000816014,0.2285416419654057,0,0.5
|
||||
0.48692533690150486,0.19245554711910623,0,0.5
|
||||
0.47408215446395924,0.16257370875724805,0,0.5
|
||||
0.23796578369479465,-0.3392132869098989,0,0.5
|
||||
0.22314247457542802,-0.36868290547042265,0,0.5
|
||||
0.192439281195995,-0.3973490438927032,0,0.5
|
||||
0.17314793100488035,-0.3997306902458245,0,0.5
|
||||
-0.14339317905575,-0.4139341861797277,0,0.5
|
||||
-0.16286272514167457,-0.41324324056233974,0,0.5
|
||||
-0.19677344462768645,-0.38660272351545355,0,0.5
|
||||
-0.21498247574844176,-0.3576930946363013,0,0.5
|
||||
-0.5088343164360256,0.13603970814155375,0,0.5
|
||||
-0.525033570799949,0.16555820061231882,0,0.5
|
||||
-0.5227683086629845,0.20315826230823514,0,0.5
|
||||
-0.5040520963691009,0.21541761616626592,0,0.5
|
||||
-0.1694255372161585,0.398485923914904,0,0.5
|
||||
-0.1492130965375191,0.40924514488588953,0,0.5
|
||||
-0.12001572347495233,0.41984281461499184,0,0.5
|
||||
-0.10778663852851755,0.4208587822318977,0,0.5
|
||||
0.08313951744474171,0.42854852960710044,0,0.5
|
||||
0.09541117484245891,0.4285105795486751,0,0.5
|
||||
0.1253748520281093,0.4201377311218157,0,0.5
|
||||
0.14639616928111476,0.4108725162615084,0,0.5
|
||||
0.4948162026495625,0.25247149720283646,0,0.5
|
||||
0.5144758074045962,0.24154099589632566,0,0.5
|
||||
0.519928659626754,0.2031929914378035,0,0.5
|
||||
0.506327779563007,0.17151459890151188,0,0.5
|
||||
0.25605908619340034,-0.36034846229321554,0,0.5
|
||||
0.24032969437961488,-0.39158521823034337,0,0.5
|
||||
0.20746933510108362,-0.4219837639039171,0,0.5
|
||||
0.18668721660538992,-0.4245231698263156,0,0.5
|
||||
-0.15453055703856594,-0.43983393075591526,0,0.5
|
||||
-0.1755002671586004,-0.43911873895978715,0,0.5
|
||||
-0.21173727567526454,-0.41093452569988304,0,0.5
|
||||
-0.23103090835152362,-0.3803339249850065,0,0.5
|
||||
-0.5420792880075228,0.1422926746228676,0,0.5
|
||||
-0.5592162539442376,0.17354425015337244,0,0.5
|
||||
-0.5566332611491035,0.21344601009458475,0,0.5
|
||||
-0.5366263032177954,0.22652972338764923,0,0.5
|
||||
-0.1790840532493837,0.42213480272159726,0,0.5
|
||||
-0.15749782287533826,0.4336304117472781,0,0.5
|
||||
-0.12648792611093226,0.444946294875585,0,0.5
|
||||
-0.11361871563563772,0.44602388932580084,0,0.5
|
||||
0.08701717615525842,0.45410470630137817,0,0.5
|
||||
0.09993045416734037,0.45405685505441784,0,0.5
|
||||
0.13173356659391927,0.44511471563355565,0,0.5
|
||||
0.15415708016692503,0.4352268564128912,0,0.5
|
||||
0.5259772120544496,0.26618752986179334,0,0.5
|
||||
0.5469653648010327,0.2545403498272465,0,0.5
|
||||
0.5529319823520036,0.21393043575650156,0,0.5
|
||||
0.5385734046620547,0.1804554890457762,0,0.5
|
||||
0.27415238869200464,-0.38148363767653515,0,0.5
|
||||
0.25751691418380024,-0.4144875309902673,0,0.5
|
||||
0.22249938900617078,-0.44661848391513426,0,0.5
|
||||
0.20022650220589805,-0.44931564940680974,0,0.5
|
||||
-0.16566793502138225,-0.46573367533210286,0,0.5
|
||||
-0.18813780917552653,-0.46499423735723455,0,0.5
|
||||
-0.22670110672284288,-0.4352663278843124,0,0.5
|
||||
-0.24707934095460563,-0.4029747553337117,0,0.5
|
||||
-0.575324259579019,0.14854564110418028,0,0.5
|
||||
-0.5933989370885251,0.18153029969442475,0,0.5
|
||||
-0.5904982136352214,0.22373375788093308,0,0.5
|
||||
-0.569200510066489,0.23764183060903127,0,0.5
|
||||
-0.18874256928260966,0.4457836815282903,0,0.5
|
||||
-0.1657825492131583,0.4580156786086665,0,0.5
|
||||
-0.13296012874691315,0.4700497751361782,0,0.5
|
||||
-0.11945079274275879,0.47118899641970396,0,0.5
|
||||
0.09089483486577445,0.4796608829956564,0,0.5
|
||||
0.10444973349222116,0.47960313056016124,0,0.5
|
||||
0.13809228115972866,0.47009170014529617,0,0.5
|
||||
0.16191799105273472,0.45958119656427454,0,0.5
|
||||
0.5571382214593364,0.2799035625207499,0,0.5
|
||||
0.579454922197469,0.26753970375816694,0,0.5
|
||||
0.5859353050772527,0.22466788007519903,0,0.5
|
||||
0.570819029761102,0.18939637919003977,0,0.5
|
||||
0.29224569119060706,-0.4026188130598591,0,0.5
|
||||
0.2747041339879836,-0.4373898437501957,0,0.5
|
||||
0.23752944291125605,-0.47125320392635606,0,0.5
|
||||
0.2137657878064044,-0.4741081289873086,0,0.5
|
||||
-0.17680531300419672,-0.49163341990829446,0,0.5
|
||||
-0.2007753511924506,-0.4908697357546859,0,0.5
|
||||
-0.24166493777041903,-0.45959813006874545,0,0.5
|
||||
-0.2631277735576856,-0.42561558568242025,0,0.5
|
||||
-0.6085692311505153,0.15479860758549338,0,0.5
|
||||
-0.6275816202328129,0.18951634923547772,0,0.5
|
||||
-0.6243631661213398,0.23402150566728236,0,0.5
|
||||
-0.6017747169151829,0.24875393783041422,0,0.5
|
||||
-0.19840108531583495,0.4694325603349835,0,0.5
|
||||
-0.17406727555097762,0.48240094547005496,0,0.5
|
||||
-0.1394323313828933,0.49515325539677146,0,0.5
|
||||
-0.12528286984987916,0.4963541035136072,0,0.5
|
||||
0.09477249357629065,0.5052170596899346,0,0.5
|
||||
0.10896901281710207,0.5051494060659045,0,0.5
|
||||
0.1444509957255381,0.4950686846570365,0,0.5
|
||||
0.16967890193854449,0.48393553671565764,0,0.5
|
||||
0.5882992308642232,0.29361959517970637,0,0.5
|
||||
0.6119444795939051,0.2805390576890874,0,0.5
|
||||
0.6189386278025018,0.23540532439389664,0,0.5
|
||||
0.6030646548601495,0.19833726933430362,0,0.5
|
||||
0.3103389936892111,-0.42375398844317924,0,0.5
|
||||
0.2918913537921687,-0.4602921565101202,0,0.5
|
||||
0.2525594968163428,-0.4958879239375734,0,0.5
|
||||
0.2273050734069121,-0.49890060856780283,0,0.5
|
||||
-0.1879426909870148,-0.517533164484479,0,0.5
|
||||
-0.21341289320937856,-0.51674523415213,0,0.5
|
||||
-0.2566287688179992,-0.4839299322531714,0,0.5
|
||||
-0.2791762061607694,-0.44825641603112204,0,0.5
|
||||
-0.641814202722013,0.16105157406680753,0,0.5
|
||||
-0.6617643033771019,0.19750239877653142,0,0.5
|
||||
-0.658228118607459,0.24430925345363189,0,0.5
|
||||
-0.6343489237638779,0.25986604505179745,0,0.5
|
||||
-0.20805960134906046,0.49308143914167674,0,0.5
|
||||
-0.18235200188879708,0.5067862123314434,0,0.5
|
||||
-0.14590453401887354,0.5202567356573645,0,0.5
|
||||
-0.13111494695699963,0.5215192106075103,0,0.5
|
||||
0.09865015228680697,0.5307732363842128,0,0.5
|
||||
0.11348829214198312,0.5306956815716478,0,0.5
|
||||
0.15080971029134765,0.5200456691687769,0,0.5
|
||||
0.17743981282435434,0.5082898768670409,0,0.5
|
||||
0.6194602402691094,0.3073356278386624,0,0.5
|
||||
0.6444340369903407,0.2935384116200073,0,0.5
|
||||
0.6519419505277505,0.24614276871259372,0,0.5
|
||||
0.6353102799591965,0.20727815947856704,0,0.5
|
||||
0.3284322961878155,-0.44488916382649935,0,0.5
|
||||
0.3090785735963541,-0.48319446927004456,0,0.5
|
||||
0.2675895507214301,-0.520522643948791,0,0.5
|
||||
0.24084435900742035,-0.5236930881482974,0,0.5
|
||||
-0.19908006896983108,-0.5434329090606669,0,0.5
|
||||
-0.2260504352263047,-0.5426207325495775,0,0.5
|
||||
-0.2715925998655774,-0.5082617344376009,0,0.5
|
||||
-0.29522463876385135,-0.4708972463798274,0,0.5
|
||||
-0.6750591742935093,0.16730454054812033,0,0.5
|
||||
-0.6959469865213895,0.20548844831758392,0,0.5
|
||||
-0.6920930710935769,0.25459700123998047,0,0.5
|
||||
-0.6669231306125715,0.27097815227317973,0,0.5
|
||||
-0.21771811738228627,0.5167303179483699,0,0.5
|
||||
-0.19063672822661698,0.5311714791928319,0,0.5
|
||||
-0.15237673665485427,0.5453602159179578,0,0.5
|
||||
-0.13694702406412057,0.5466843177014136,0,0.5
|
||||
0.10252781099732315,0.5563294130784906,0,0.5
|
||||
0.1180075714668641,0.5562419570773909,0,0.5
|
||||
0.15716842485715724,0.5450226536805172,0,0.5
|
||||
0.18520072371016422,0.5326442170184239,0,0.5
|
||||
0.6506212496739968,0.32105166049761935,0,0.5
|
||||
0.6769235943867777,0.3065377655509282,0,0.5
|
||||
0.6849452732530004,0.2568802130312918,0,0.5
|
||||
0.6675559050582447,0.21621904962283148,0,0.5
|
||||
0.3465255986864197,-0.4660243392098188,0,0.5
|
||||
0.3262657934005393,-0.5060967820299683,0,0.5
|
||||
0.28261960462651714,-0.5451573639600082,0,0.5
|
||||
0.2543836446079285,-0.5484855677287919,0,0.5
|
||||
-0.21021744695264508,-0.5693326536368587,0,0.5
|
||||
-0.23868797724322835,-0.5684962309470294,0,0.5
|
||||
-0.2865564309131532,-0.5325935366220348,0,0.5
|
||||
-0.3112730713669309,-0.4935380767285368,0,0.5
|
||||
-0.7083041458650049,0.17355750702943235,0,0.5
|
||||
-0.7301296696656767,0.21347449785863576,0,0.5
|
||||
-0.7259580235796946,0.2648847490263286,0,0.5
|
||||
-0.6994973374612649,0.2820902594945616,0,0.5
|
||||
-0.22737663341551193,0.540379196755063,0,0.5
|
||||
-0.1989214545644367,0.5555567460542202,0,0.5
|
||||
-0.15884893929083482,0.570463696178551,0,0.5
|
||||
-0.14277910117124132,0.5718494247953168,0,0.5
|
||||
0.10640546970783989,0.5818855897727685,0,0.5
|
||||
0.12252685079174559,0.5817882325831338,0,0.5
|
||||
0.16352713942296732,0.5699996381922572,0,0.5
|
||||
0.19296163459597457,0.5569985571698068,0,0.5
|
||||
0.6817822590788837,0.33476769315657584,0,0.5
|
||||
0.7094131517832138,0.31953711948184865,0,0.5
|
||||
0.7179485959782494,0.26761765734998944,0,0.5
|
||||
0.6998015301572921,0.22515993976709536,0,0.5
|
||||
0.3646189011850237,-0.487159514593139,0,0.5
|
||||
0.3434530132047243,-0.5289990947898928,0,0.5
|
||||
0.297649658531604,-0.5697920839712258,0,0.5
|
||||
0.2679229302084364,-0.5732780473092866,0,0.5
|
||||
-0.22135482493546096,-0.5952323982130467,0,0.5
|
||||
-0.25132551926015395,-0.5943717293444771,0,0.5
|
||||
-0.301520261960731,-0.5569253388064644,0,0.5
|
||||
-0.3273215039700125,-0.5161789070772421,0,0.5
|
||||
-0.7415491174365024,0.17981047351074628,0,0.5
|
||||
-0.7643123528099656,0.22146054739968948,0,0.5
|
||||
-0.7598229760658138,0.27517249681267836,0,0.5
|
||||
-0.7320715443099597,0.293202366715945,0,0.5
|
||||
-0.23703514944873763,0.564028075561756,0,0.5
|
||||
-0.20720618090225634,0.5799420129156087,0,0.5
|
||||
-0.16532114192681524,0.595567176439144,0,0.5
|
||||
-0.14861117827836196,0.5970145318892197,0,0.5
|
||||
0.11028312841835572,0.6074417664670467,0,0.5
|
||||
0.1270461301166262,0.6073345080888771,0,0.5
|
||||
0.16988585398877637,0.5949766227039976,0,0.5
|
||||
0.20072254548178395,0.5813528973211901,0,0.5
|
||||
0.7129432684837699,0.3484837258155326,0,0.5
|
||||
0.7419027091796496,0.3325364734127693,0,0.5
|
||||
0.7509519187034982,0.2783551016686873,0,0.5
|
||||
0.7320471552563392,0.23410082991135953,0,0.5
|
||||
0.382712203683628,-0.5082946899764592,0,0.5
|
||||
0.3606402330089097,-0.5519014075498172,0,0.5
|
||||
0.3126797124366911,-0.5944268039824433,0,0.5
|
||||
0.28146221580894426,-0.5980705268897808,0,0.5
|
||||
-0.23249220291827974,-0.6211321427892302,0,0.5
|
||||
-0.2639630612770827,-0.6202472277419202,0,0.5
|
||||
-0.316484093008312,-0.5812571409908894,0,0.5
|
||||
-0.34336993657309706,-0.538819737425943,0,0.5
|
||||
-0.7747940890079996,0.1860634399920605,0,0.5
|
||||
-0.7984950359542541,0.22944659694074315,0,0.5
|
||||
-0.7936879285519325,0.28546024459902786,0,0.5
|
||||
-0.764645751158654,0.3043144739373282,0,0.5
|
||||
-0.24669366548196275,0.5876769543684492,0,0.5
|
||||
-0.2154909072400754,0.6043272797769971,0,0.5
|
||||
-0.1717933445627951,0.6206706566997373,0,0.5
|
||||
-0.1544432553854821,0.622179638983123,0,0.5
|
||||
0.1141607871288722,0.6329979431613252,0,0.5
|
||||
0.13156540944150738,0.6328807835946206,0,0.5
|
||||
0.17624456855458612,0.6199536072157382,0,0.5
|
||||
0.208483456367594,0.6057072374725734,0,0.5
|
||||
0.7441042778886566,0.3621997584744884,0,0.5
|
||||
0.7743922665760857,0.34553582734368893,0,0.5
|
||||
0.7839552414287473,0.2890925459873841,0,0.5
|
||||
0.7642927803553865,0.24304172005562266,0,0.5
|
||||
0.4008055061822323,-0.5294298653597789,0,0.5
|
||||
0.377827452813095,-0.5748037203097411,0,0.5
|
||||
0.3277097663417782,-0.6190615239936604,0,0.5
|
||||
0.2950015014094523,-0.6228630064702749,0,0.5
|
||||
-0.24362958090109615,-0.6470318873654181,0,0.5
|
||||
-0.27660060329400893,-0.6461227261393677,0,0.5
|
||||
-0.33144792405589035,-0.605588943175319,0,0.5
|
||||
-0.3594183691761791,-0.5614605677746484,0,0.5
|
||||
-0.8080390605794957,0.19231640647337322,0,0.5
|
||||
-0.8326777190985416,0.23743264648179557,0,0.5
|
||||
-0.8275528810380504,0.2957479923853763,0,0.5
|
||||
-0.7972199580073476,0.31542658115871036,0,0.5
|
||||
-0.25635218151518885,0.6113258331751423,0,0.5
|
||||
-0.2237756335778956,0.6287125466383854,0,0.5
|
||||
-0.17826554719877613,0.6457741369603303,0,0.5
|
||||
-0.1602753324926033,0.647344746077026,0,0.5
|
||||
0.11803844583938825,0.6585541198556027,0,0.5
|
||||
0.13608468876638818,0.6584270591003635,0,0.5
|
||||
0.18260328312039553,0.6449305917274784,0,0.5
|
||||
0.21624436725340374,0.6300615776239563,0,0.5
|
||||
0.7752652872935439,0.37591579113344553,0,0.5
|
||||
0.8068818239725226,0.35853518127461004,0,0.5
|
||||
0.8169585641539971,0.29982999030608243,0,0.5
|
||||
0.7965384054544347,0.25198261019988716,0,0.5
|
||||
0.4188988086808362,-0.5505650407430993,0,0.5
|
||||
0.39501467261727974,-0.597706033069666,0,0.5
|
||||
0.3427398202468649,-0.6436962440048786,0,0.5
|
||||
0.3085407870099602,-0.6476554860507704,0,0.5
|
||||
-0.25476695888390954,-0.672931631941611,0,0.5
|
||||
-0.28923814531093195,-0.6719982245368206,0,0.5
|
||||
-0.34641175510346545,-0.6299207453597536,0,0.5
|
||||
-0.3754668017792582,-0.5841013981233585,0,0.5
|
||||
-0.8412840321509923,0.19856937295468674,0,0.5
|
||||
-0.8668604022428298,0.2454186960228491,0,0.5
|
||||
-0.8614178335241693,0.3060357401717262,0,0.5
|
||||
-0.8297941648560421,0.3265386883800939,0,0.5
|
||||
-0.26601069754841383,0.6349747119818355,0,0.5
|
||||
-0.23206035991571455,0.6530978134997739,0,0.5
|
||||
-0.18473774983475585,0.6708776172209235,0,0.5
|
||||
-0.16610740959972325,0.6725098531709293,0,0.5
|
||||
0.12191610454990467,0.6841102965498809,0,0.5
|
||||
0.14060396809126932,0.6839733346061067,0,0.5
|
||||
0.18896199768620514,0.6699075762392186,0,0.5
|
||||
0.22400527813921361,0.6544159177753394,0,0.5
|
||||
0.8064262966984304,0.38963182379240224,0,0.5
|
||||
0.8393713813689583,0.3715345352055307,0,0.5
|
||||
0.849961886879246,0.3105674346247806,0,0.5
|
||||
0.8287840305534822,0.260923500344152,0,0.5
|
||||
0.43699211117944375,-0.5717002161264126,0,0.5
|
||||
0.4122018924214686,-0.6206083458295832,0,0.5
|
||||
0.3577698741519555,-0.668330964016089,0,0.5
|
||||
0.3220800726104716,-0.6724479656312583,0,0.5
|
||||
-0.26590433686672527,-0.6988313765177984,0,0.5
|
||||
-0.3018756873278577,-0.6978737229342682,0,0.5
|
||||
-0.36137558615104354,-0.6542525475441834,0,0.5
|
||||
-0.3915152343823399,-0.606742228472064,0,0.5
|
||||
-0.8745290037224891,0.20482233943599976,0,0.5
|
||||
-0.901043085387118,0.2534047455639018,0,0.5
|
||||
-0.8952827860102875,0.3163234879580749,0,0.5
|
||||
-0.862368371704736,0.3376507956014763,0,0.5
|
||||
-0.27566921358164026,0.6586235907885282,0,0.5
|
||||
-0.24034508625353507,0.6774830803611619,0,0.5
|
||||
-0.1912099524707372,0.6959810974815162,0,0.5
|
||||
-0.17193948670684478,0.6976749602648319,0,0.5
|
||||
0.12579376326042077,0.7096664732441591,0,0.5
|
||||
0.1451232474161502,0.7095196101118499,0,0.5
|
||||
0.19532071225201467,0.6948845607509588,0,0.5
|
||||
0.2317661890250235,0.6787702579267225,0,0.5
|
||||
0.8375873061033179,0.4033478564513583,0,0.5
|
||||
0.8718609387653954,0.3845338891364508,0,0.5
|
||||
0.8829652096044963,0.32130487894347853,0,0.5
|
||||
0.861029655652531,0.2698643904884169,0,0.5
|
||||
0.45508541367805383,-0.5928353915097193,0,0.5
|
||||
0.42938911222566,-0.6435106585894934,0,0.5
|
||||
0.37279992805704854,-0.6929656840272924,0,0.5
|
||||
0.3356193582109853,-0.6972404452117394,0,0.5
|
||||
-0.2770417148495411,-0.724731121093985,0,0.5
|
||||
-0.31451322934478354,-0.7237492213317152,0,0.5
|
||||
-0.3763394171986219,-0.6785843497286131,0,0.5
|
||||
-0.40756366698542196,-0.6293830588207695,0,0.5
|
||||
-0.9077739752939855,0.2110753059173136,0,0.5
|
||||
-0.9352257685314058,0.2613907951049554,0,0.5
|
||||
-0.9291477384964058,0.3266112357444245,0,0.5
|
||||
-0.8949425785534298,0.34876290282285966,0,0.5
|
||||
-0.2853277296148652,0.6822724695952218,0,0.5
|
||||
-0.24862981259135397,0.7018683472225508,0,0.5
|
||||
-0.19768215510671688,0.7210845777421099,0,0.5
|
||||
-0.17777156381396472,0.7228400673587355,0,0.5
|
||||
0.1296714219709373,0.7352226499384376,0,0.5
|
||||
0.14964252674103146,0.7350658856175935,0,0.5
|
||||
0.20167942681782441,0.7198615452626996,0,0.5
|
||||
0.23952709991083349,0.703124598078106,0,0.5
|
||||
0.8687483155082039,0.4170638891103141,0,0.5
|
||||
0.9043504961618307,0.3975332430673705,0,0.5
|
||||
0.9159685323297445,0.33204232326217503,0,0.5
|
||||
0.8932752807515774,0.27880528063267945,0,0.5
|
||||
0.4731787161766552,-0.6139705668930455,0,0.5
|
||||
0.4465763320298423,-0.6664129713494242,0,0.5
|
||||
0.3878299819621328,-0.7176004040385163,0,0.5
|
||||
0.3491586438114907,-0.72203292479224,0,0.5
|
||||
-0.28817909283235743,-0.7506308656701737,0,0.5
|
||||
-0.32715077136170956,-0.7496247197291632,0,0.5
|
||||
-0.3913032482461999,-0.7029161519130429,0,0.5
|
||||
-0.42361209958850365,-0.652023889169475,0,0.5
|
||||
-0.9410189468654815,0.21732827239862568,0,0.5
|
||||
-0.9694084516756931,0.2693768446460071,0,0.5
|
||||
-0.9630126909825233,0.33689898353077236,0,0.5
|
||||
-0.9275167854021232,0.35987501004424116,0,0.5
|
||||
-0.2949862456480912,0.7059213484019147,0,0.5
|
||||
-0.2573414039412242,0.7262364216563786,0,0.5
|
||||
-0.21226479297164896,0.7458614018790531,0,0.5
|
||||
-0.1998245113789881,0.747351862205339,0,0.5
|
||||
-0.02097605368066722,0.754555167855809,0,0.5
|
||||
-0.010488026840333588,0.7549775839279045,0,0.5
|
||||
-0.0005520014126490925,0.7553777675751528,0,0.5
|
||||
4.625490960379553e-17,0.7554000000000001,0,0.5
|
|
19442
simulations/coils/coil_6_spiral-2-layer.csv
Normal file
19442
simulations/coils/coil_6_spiral-2-layer.csv
Normal file
File diff suppressed because it is too large
Load diff
38884
simulations/coils/coil_6_spiral-4-layer.csv
Normal file
38884
simulations/coils/coil_6_spiral-4-layer.csv
Normal file
File diff suppressed because it is too large
Load diff
9721
simulations/coils/coil_6_spiral.csv
Normal file
9721
simulations/coils/coil_6_spiral.csv
Normal file
File diff suppressed because it is too large
Load diff
389
simulations/magnetic_force_on_coils.ipynb
Normal file
389
simulations/magnetic_force_on_coils.ipynb
Normal file
|
@ -0,0 +1,389 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import numpy as np\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from mpl_toolkits.mplot3d import Axes3D\n",
|
||||
"from biot_savart_v4_3 import parse_coil, plot_coil, slice_coil"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# COIL = '6'\n",
|
||||
"COIL = \"12\"\n",
|
||||
"\n",
|
||||
"# load up the simple spiral coil\n",
|
||||
"coil1 = parse_coil(f\"coils/coil_{COIL}_spiral.csv\")\n",
|
||||
"plot_coil(f\"coils/coil_{COIL}_spiral.csv\")\n",
|
||||
"coil1 = slice_coil(coil1, 1)\n",
|
||||
"coil1 = coil1.T\n",
|
||||
"print(coil1.shape)\n",
|
||||
"\n",
|
||||
"coil2 = parse_coil(f\"coils/coil_{COIL}_custom.csv\")\n",
|
||||
"plot_coil(f\"coils/coil_{COIL}_custom.csv\")\n",
|
||||
"coil2 = slice_coil(coil2, 1)\n",
|
||||
"coil2 = coil2.T\n",
|
||||
"print(coil2.shape)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# show a simple dipole magnet\n",
|
||||
"# magnetic field at a point x,y,z of a dipole magnet with moment m in the z direction\n",
|
||||
"def dipole(x, y, z, m=0.185):\n",
|
||||
" mu0 = 1e-7 / 4 * np.pi\n",
|
||||
" r = np.sqrt(x ** 2 + y ** 2 + z ** 2)\n",
|
||||
" return (\n",
|
||||
" np.array(\n",
|
||||
" [3 * x * z / r ** 5, 3 * y * z / r ** 5, (3 * z ** 2 / r ** 5 - 1 / r ** 3)]\n",
|
||||
" )\n",
|
||||
" * m\n",
|
||||
" * mu0\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def plot_field_slice(x, y, bx, by, mag, name=\"magnetic_field.png\", draw_magnet=True):\n",
|
||||
" # plot the magnetic field\n",
|
||||
" fig = plt.figure()\n",
|
||||
" ax = fig.add_subplot(111)\n",
|
||||
" ax.streamplot(\n",
|
||||
" x,\n",
|
||||
" y,\n",
|
||||
" bx,\n",
|
||||
" by,\n",
|
||||
" linewidth=1,\n",
|
||||
" cmap=plt.cm.inferno,\n",
|
||||
" density=2,\n",
|
||||
" arrowstyle=\"->\",\n",
|
||||
" arrowsize=1.5,\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
" ax.set_xlabel(\"$x$\")\n",
|
||||
" ax.set_ylabel(\"$y$\")\n",
|
||||
" ax.set_xlim(-0.1, 0.1)\n",
|
||||
" ax.set_ylim(-0.1, 0.1)\n",
|
||||
" ax.set_aspect(\"equal\")\n",
|
||||
"\n",
|
||||
" # plot the magniture of the field as an image\n",
|
||||
" im = ax.imshow(\n",
|
||||
" mag, extent=[-0.1, 0.1, -0.1, 0.1], origin=\"lower\", cmap=plt.cm.inferno\n",
|
||||
" )\n",
|
||||
" if draw_magnet:\n",
|
||||
" # draw the magnet\n",
|
||||
" ax.add_patch(\n",
|
||||
" plt.Rectangle((-0.005, -0.0015), 0.01, 0.003, fc=\"w\", ec=\"k\", lw=1)\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
" # make the figure bigger\n",
|
||||
" fig.set_size_inches(10, 10)\n",
|
||||
"\n",
|
||||
" fig.show()\n",
|
||||
" # save the figure\n",
|
||||
" fig.savefig(name)\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# # calculate the magnetic field at y = 0, over z = -1, 1 and x = -1, 1\n",
|
||||
"x = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"z = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"X, Z = np.meshgrid(x, z)\n",
|
||||
"Bx, By, Bz = dipole(X, 0, Z)\n",
|
||||
"\n",
|
||||
"print(Bx.shape, By.shape, Bz.shape)\n",
|
||||
"\n",
|
||||
"plot_field_slice(\n",
|
||||
" X,\n",
|
||||
" Z,\n",
|
||||
" Bx,\n",
|
||||
" Bz,\n",
|
||||
" np.log(np.sqrt(Bx ** 2 + By ** 2 + Bz ** 2)),\n",
|
||||
" \"dipole_field_side.png\",\n",
|
||||
" False,\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# # calculate the magnetic field at z = 1, over y = -1, 1 and x = -1, 1\n",
|
||||
"x = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"y = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"X, Y = np.meshgrid(x, y)\n",
|
||||
"Bx, By, Bz = dipole(X, Y, 0.01)\n",
|
||||
"\n",
|
||||
"plot_field_slice(\n",
|
||||
" X,\n",
|
||||
" Y,\n",
|
||||
" Bx,\n",
|
||||
" By,\n",
|
||||
" np.log(np.sqrt(Bx ** 2 + By ** 2 + Bz ** 2)),\n",
|
||||
" \"dipole_field_bottom.png\",\n",
|
||||
" False,\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Simple Simulation of a dipole magnet"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def B(x, y, z, m=0.185, l=0.003, d=0.01):\n",
|
||||
" d = d * 0.75\n",
|
||||
" # simulate multiple points in the cylinder and add them together to create a disk of field\n",
|
||||
" bx = 0\n",
|
||||
" by = 0\n",
|
||||
" bz = 0\n",
|
||||
" for degrees in range(0, 360, 30):\n",
|
||||
" angle = np.deg2rad(degrees)\n",
|
||||
" x_, y_, z_ = dipole(\n",
|
||||
" x + 0.9 * d / 2 * np.cos(angle),\n",
|
||||
" y + 0.9 * d / 2 * np.sin(angle),\n",
|
||||
" z - 0.9 * l / 2,\n",
|
||||
" m / (360 / 60),\n",
|
||||
" )\n",
|
||||
" bx += x_\n",
|
||||
" by += y_\n",
|
||||
" bz += z_\n",
|
||||
" x_, y_, z_ = dipole(\n",
|
||||
" x + 0.9 * d / 2 * np.cos(angle),\n",
|
||||
" y + 0.9 * d / 2 * np.sin(angle),\n",
|
||||
" z + 0.9 * l / 2,\n",
|
||||
" m / (360 / 60),\n",
|
||||
" )\n",
|
||||
" bx += x_\n",
|
||||
" by += y_\n",
|
||||
" bz += z_\n",
|
||||
" return np.array([bx, by, bz])\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# # calculate the magnetic field at y = 0, over z = -1, 1 and x = -1, 1\n",
|
||||
"x = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"z = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"X, Z = np.meshgrid(x, z)\n",
|
||||
"Bx, By, Bz = B(X, 0, Z)\n",
|
||||
"\n",
|
||||
"print(Bx.shape, By.shape, Bz.shape)\n",
|
||||
"\n",
|
||||
"plot_field_slice(\n",
|
||||
" X,\n",
|
||||
" Z,\n",
|
||||
" Bx,\n",
|
||||
" Bz,\n",
|
||||
" np.log(np.sqrt(Bx ** 2 + By ** 2 + Bz ** 2)),\n",
|
||||
" \"magnetic_field_side.png\",\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# # calculate the magnetic field at z = 1, over y = -1, 1 and x = -1, 1\n",
|
||||
"x = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"y = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"X, Y = np.meshgrid(x, y)\n",
|
||||
"Bx, By, Bz = B(X, Y, 0.01)\n",
|
||||
"\n",
|
||||
"plot_field_slice(\n",
|
||||
" X,\n",
|
||||
" Y,\n",
|
||||
" Bx,\n",
|
||||
" By,\n",
|
||||
" np.log(np.sqrt(Bx ** 2 + By ** 2 + Bz ** 2)),\n",
|
||||
" \"magnetic_field_bottom.png\",\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# calculate the magnetic field in a 3d volume\n",
|
||||
"x = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"y = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"z = np.linspace(-0.1, 0.1, 100)\n",
|
||||
"X, Y, Z = np.meshgrid(x, y, z)\n",
|
||||
"Bx, By, Bz = B(X, Y, Z)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# do a 3d quivwer plot of the magnetic field\n",
|
||||
"fig = plt.figure()\n",
|
||||
"ax = fig.add_subplot(111, projection=\"3d\")\n",
|
||||
"# down sample the results\n",
|
||||
"ax.quiver(\n",
|
||||
" X[::10, ::10, ::10],\n",
|
||||
" Y[::10, ::10, ::10],\n",
|
||||
" Z[::10, ::10, ::10],\n",
|
||||
" Bx[::10, ::10, ::10],\n",
|
||||
" By[::10, ::10, ::10],\n",
|
||||
" Bz[::10, ::10, ::10],\n",
|
||||
" length=0.01,\n",
|
||||
" normalize=True,\n",
|
||||
")\n",
|
||||
"ax.set_xlabel(\"$x$\")\n",
|
||||
"ax.set_ylabel(\"$y$\")\n",
|
||||
"ax.set_zlabel(\"$z$\")\n",
|
||||
"ax.set_xlim(-0.1, 0.1)\n",
|
||||
"ax.set_ylim(-0.1, 0.1)\n",
|
||||
"ax.set_zlim(-0.1, 0.1)\n",
|
||||
"ax.set_aspect(\"equal\")\n",
|
||||
"# make the plot larger\n",
|
||||
"fig.set_size_inches(10, 10)\n",
|
||||
"fig.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# calculate the force on a wire of length l carrying current I at a point x,y,z with a direction vector d\n",
|
||||
"def F(p, d, I, l):\n",
|
||||
" return I * l * np.cross(d, B(p[0], p[1], p[2]))\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def calculate_forces_on_wire_points(points):\n",
|
||||
" Fx = []\n",
|
||||
" Fy = []\n",
|
||||
" Fz = []\n",
|
||||
" # calculate the force on each point\n",
|
||||
" for i in range(len(points) - 1):\n",
|
||||
" # calculate the direction vector\n",
|
||||
" dx = points[i][0] - points[(i + 1)][0]\n",
|
||||
" dy = points[i][1] - points[(i + 1)][1]\n",
|
||||
" dz = points[i][2] - points[(i + 1)][2]\n",
|
||||
" d = np.array([dx, dy, dz])\n",
|
||||
" # get the length of d\n",
|
||||
" l = np.sqrt(dx ** 2 + dy ** 2 + dz ** 2)\n",
|
||||
" if l > 0:\n",
|
||||
" # normalise d\n",
|
||||
" d = d / l\n",
|
||||
" # calculate the force\n",
|
||||
" fx, fy, fz = F(points[i], d, points[i][3], l)\n",
|
||||
" Fx.append(fx)\n",
|
||||
" Fy.append(fy)\n",
|
||||
" Fz.append(fz)\n",
|
||||
" else:\n",
|
||||
" Fx.append(0)\n",
|
||||
" Fy.append(0)\n",
|
||||
" Fz.append(0)\n",
|
||||
" return Fx, Fy, Fz"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# instead of sweeping horizontally, we'll sweep the coils around a circle\n",
|
||||
"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.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",
|
||||
" Fy = []\n",
|
||||
" Fz = []\n",
|
||||
" for p in range(len(theta)):\n",
|
||||
" x = X[p]\n",
|
||||
" y = Y[p]\n",
|
||||
" z = Z\n",
|
||||
"\n",
|
||||
" points = coil.copy()\n",
|
||||
" for i in range(len(points)):\n",
|
||||
" points[i][0] = points[i][0] / 1000 + x\n",
|
||||
" points[i][1] = points[i][1] / 1000 + y\n",
|
||||
" points[i][2] = points[i][2] / 1000 + z\n",
|
||||
" # feel the force\n",
|
||||
" Fx_, Fy_, Fz_ = calculate_forces_on_wire_points(points)\n",
|
||||
" Fx.append(sum(Fx_))\n",
|
||||
" Fy.append(sum(Fy_))\n",
|
||||
" Fz.append(sum(Fz_))\n",
|
||||
" return Fx, Fy, Fz\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# sweep the coils from -45 to 45 degrees in 1 degree steps\n",
|
||||
"theta = np.linspace(25, 175, 100)\n",
|
||||
"\n",
|
||||
"# do a quick sanity check\n",
|
||||
"# coil center in meters\n",
|
||||
"coil_center_radius = 20.5 / 1000\n",
|
||||
"X = coil_center_radius * np.cos(np.deg2rad(theta))\n",
|
||||
"Y = coil_center_radius * np.sin(np.deg2rad(theta)) - coil_center_radius\n",
|
||||
"\n",
|
||||
"# plot X and Y along with the coil\n",
|
||||
"plt.plot(X, Y, color=\"red\")\n",
|
||||
"points = coil2.copy()\n",
|
||||
"plt.plot(\n",
|
||||
" # points in meters (coil is in cm)\n",
|
||||
" [x / 100 for x, y, z, _ in points],\n",
|
||||
" [y / 100 for x, y, z, _ in points],\n",
|
||||
" label=\"coil\",\n",
|
||||
" color=\"blue\",\n",
|
||||
")\n",
|
||||
"# make the aspect ratio equal\n",
|
||||
"plt.gca().set_aspect(\"equal\")\n",
|
||||
"\n",
|
||||
"Fx_1_curve, Fy_1_curve, Fz_1_curve = sweep_coil_circle(coil1, 20.5 / 1000, theta)\n",
|
||||
"Fx_2_curve, Fy_2_curve, Fz_2_curve = sweep_coil_circle(coil2, 19.5 / 1000, theta)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"plt.plot(theta, np.array(Fx_1_curve), label=\"coil1\", color=\"red\")\n",
|
||||
"plt.plot(theta, -np.array(Fx_2_curve), label=\"coil2\", color=\"blue\")\n",
|
||||
"# plot a dotted line along y = 0\n",
|
||||
"plt.gcf().set_size_inches(16, 9)\n",
|
||||
"plt.plot([theta[0], theta[-1]], [0, 0], \"--\")\n",
|
||||
"print(np.max(np.abs(Fx_1_curve)))\n",
|
||||
"# save the plot\n",
|
||||
"plt.savefig(f\"torque_{COIL}_coil_sweep_circle_1mm_spiral.png\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.10.7 ('venv': venv)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.7"
|
||||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "fc384f9db26c31784edfba3761ba3d2c7b2f9b8a63e03a9eb0778fc35334efe1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import numpy as np\n",
|
||||
"import biot_savart_v4_3 as bs"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"bs.plot_coil(\"coil-4-top-1.txt\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"bs.plot_coil(\"coil-4-bottom-1.txt\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for i in range(0, 12):\n",
|
||||
" bs.write_target_volume(\n",
|
||||
" f\"coil-4-top-{i}.txt\",\n",
|
||||
" f\"targetvol-top-{i}.vol\",\n",
|
||||
" (6, 6, 1),\n",
|
||||
" (-3, -3, -0.5),\n",
|
||||
" 0.1,\n",
|
||||
" 0.1,\n",
|
||||
" )\n",
|
||||
" bs.write_target_volume(\n",
|
||||
" f\"coil-4-bottom-{i}.txt\",\n",
|
||||
" f\"targetvol-bottom-{i}.vol\",\n",
|
||||
" (6, 6, 1),\n",
|
||||
" (-3, -3, -0.5),\n",
|
||||
" 0.1,\n",
|
||||
" 0.1,\n",
|
||||
" )"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# read in the results\n",
|
||||
"top = [bs.read_target_volume(f\"targetvol-top-{i}.vol\") for i in range(0, 12)]\n",
|
||||
"bottom = [bs.read_target_volume(f\"targetvol-bottom-{i}.vol\") for i in range(0, 12)]\n",
|
||||
"\n",
|
||||
"# add all the results together into one volume\n",
|
||||
"volume = top[0] + bottom[0]\n",
|
||||
"for i in range(1, 12):\n",
|
||||
" volume += top[i]\n",
|
||||
" volume += bottom[i]\n",
|
||||
"\n",
|
||||
"print(volume.shape)\n",
|
||||
"\n",
|
||||
"# reads the volume we created\n",
|
||||
"bs.plot_fields(volume, (60, 60, 10), (0, 0, 0), 1, which_plane=\"z\", level=6)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.10.7 ('venv': venv)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.10.7"
|
||||
},
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "1ce20143987840b9786ebb5907032c9c3a8efacbb887dbb0ebc4934f2ad26cb3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
Loading…
Reference in a new issue