coilem 0.3.0__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. backend/__init__.py +3 -0
  2. backend/_bin/magneto2d.exe +0 -0
  3. backend/_build_info.json +14 -0
  4. backend/_data/materials/electrical-steel/M350-50A.csv +261 -0
  5. backend/_data/schemas/v1/field_solution_report.schema.json +69 -0
  6. backend/_data/schemas/v1/halbach_array_config.schema.json +128 -0
  7. backend/_data/schemas/v1/halbach_solution_report.schema.json +144 -0
  8. backend/_data/schemas/v1/linear_halbach_array_config.schema.json +210 -0
  9. backend/_data/schemas/v1/linear_halbach_solution_report.schema.json +278 -0
  10. backend/_data/schemas/v1/magnetostatic_problem.schema.json +269 -0
  11. backend/_licenses/magneto2d-rust-crates.txt +3604 -0
  12. backend/_ui/assets/ChapterOneLinearMotorCapstone-BquaYlI-.css +1 -0
  13. backend/_ui/assets/ChapterOneLinearMotorCapstone-DZLuGjD9.js +1 -0
  14. backend/_ui/assets/CurrentConductor3D-0c2NtENw.css +1 -0
  15. backend/_ui/assets/CurrentConductor3D-CyLJt5wg.js +1 -0
  16. backend/_ui/assets/KnowledgeCheck-Xlv90t5X.js +1 -0
  17. backend/_ui/assets/LearningLessonOneFollowFlux-Cg5nDPxb.css +1 -0
  18. backend/_ui/assets/LearningLessonOneFollowFlux-DUESVnO6.js +1 -0
  19. backend/_ui/assets/LessonEightThreePhaseMotor-D_WN6UaY.css +1 -0
  20. backend/_ui/assets/LessonEightThreePhaseMotor-bo0qvQA0.js +1 -0
  21. backend/_ui/assets/LessonFiveFieldForce-D0HA-SCX.js +1 -0
  22. backend/_ui/assets/LessonFiveFieldForce-DJTyrsst.css +1 -0
  23. backend/_ui/assets/LessonFourIronSaturation-CndgXhAX.js +1 -0
  24. backend/_ui/assets/LessonFourIronSaturation-NSVDICTH.css +1 -0
  25. backend/_ui/assets/LessonSevenRotatingField-PlUTt5Yz.js +1 -0
  26. backend/_ui/assets/LessonSixRotorChase-BSuC5cRG.css +1 -0
  27. backend/_ui/assets/LessonSixRotorChase-Bmy8h9oz.js +1 -0
  28. backend/_ui/assets/LessonThreeBackEmf-BFhluPPa.css +1 -0
  29. backend/_ui/assets/LessonThreeBackEmf-C4adoy0X.js +1 -0
  30. backend/_ui/assets/LessonThreeCurrentField-BdsxuBAW.css +1 -0
  31. backend/_ui/assets/LessonThreeCurrentField-D0hdao9S.js +1 -0
  32. backend/_ui/assets/LessonTwoAirgapTax-DmVPJ3AP.css +1 -0
  33. backend/_ui/assets/LessonTwoAirgapTax-Ds0mXNZ1.js +1 -0
  34. backend/_ui/assets/LessonTwoMagneticCircuit-8vyvdttv.css +1 -0
  35. backend/_ui/assets/LessonTwoMagneticCircuit-jpwAmh07.js +1 -0
  36. backend/_ui/assets/MeshViewer-BgICi0ec.css +1 -0
  37. backend/_ui/assets/MeshViewer-C151YPki.js +1 -0
  38. backend/_ui/assets/PublicTutorials-BE9Eb9V0.css +1 -0
  39. backend/_ui/assets/PublicTutorials-CysyU3fR.js +3 -0
  40. backend/_ui/assets/fieldPlaybackWorker-D73So8vf.js +1 -0
  41. backend/_ui/assets/hero_b_heatmap_8p12s.compact-BKof8R8G.json +1 -0
  42. backend/_ui/assets/hero_field_8p12s.compact-BGWSOikl.json +1 -0
  43. backend/_ui/assets/hero_linear_halbach_field.magneto2d-BCAlYXVp.js +1 -0
  44. backend/_ui/assets/hero_linear_halbach_mesh.gmsh-BAeewYS_.js +1 -0
  45. backend/_ui/assets/hero_mesh_8p12s.compact-COWMSGTC.json +1 -0
  46. backend/_ui/assets/index-D3R_xLNO.css +1 -0
  47. backend/_ui/assets/index-to8kaH0V.js +4325 -0
  48. backend/_ui/assets/rotating-field-t-p3_cbS.css +1 -0
  49. backend/_ui/brand/coilem-mark.svg +36 -0
  50. backend/_ui/index.html +18 -0
  51. backend/_ui/materials/sample-custom-steel.csv +56 -0
  52. backend/airgap_sampling.py +207 -0
  53. backend/back_emf_harmonics.py +156 -0
  54. backend/custom_materials.py +138 -0
  55. backend/elmer/__init__.py +32 -0
  56. backend/elmer/adapter.py +994 -0
  57. backend/elmer/capabilities.py +279 -0
  58. backend/elmer/case.py +360 -0
  59. backend/elmer/errors.py +37 -0
  60. backend/elmer/mesh.py +405 -0
  61. backend/elmer/process.py +267 -0
  62. backend/elmer/profile.py +19 -0
  63. backend/elmer/profiles/v1.json +25 -0
  64. backend/elmer/results.py +309 -0
  65. backend/excitation.py +228 -0
  66. backend/export_safety.py +15 -0
  67. backend/field_artifacts.py +331 -0
  68. backend/field_composition.py +373 -0
  69. backend/field_lines.py +461 -0
  70. backend/geometry.py +1305 -0
  71. backend/geometry_drawer.py +1405 -0
  72. backend/geometry_ir.py +1447 -0
  73. backend/geometry_ir_tessellation.py +130 -0
  74. backend/gmsh_mesh_rotation.py +642 -0
  75. backend/gmsh_solver.py +1906 -0
  76. backend/halbach/__init__.py +54 -0
  77. backend/halbach/exports.py +411 -0
  78. backend/halbach/geometry.py +317 -0
  79. backend/halbach/gmsh_adapter.py +654 -0
  80. backend/halbach/linear_geometry.py +289 -0
  81. backend/halbach/linear_gmsh_adapter.py +707 -0
  82. backend/halbach/linear_models.py +232 -0
  83. backend/halbach/linear_postprocess.py +389 -0
  84. backend/halbach/linear_solver.py +270 -0
  85. backend/halbach/materials.py +272 -0
  86. backend/halbach/models.py +347 -0
  87. backend/halbach/postprocess.py +688 -0
  88. backend/halbach/solver.py +350 -0
  89. backend/launcher.py +475 -0
  90. backend/local_file_safety.py +27 -0
  91. backend/logging_utils.py +26 -0
  92. backend/machine_constants.py +109 -0
  93. backend/magneto2d_adapter/__init__.py +1767 -0
  94. backend/magneto2d_adapter/_state.py +53 -0
  95. backend/magneto2d_adapter/streaming.py +366 -0
  96. backend/material_catalog.py +144 -0
  97. backend/material_contract.py +255 -0
  98. backend/mesh_evidence.py +180 -0
  99. backend/mesh_profiles/gmsh_profiles.json +51 -0
  100. backend/models/__init__.py +81 -0
  101. backend/models/config.py +665 -0
  102. backend/models/errors.py +24 -0
  103. backend/models/field.py +326 -0
  104. backend/models/geometry.py +78 -0
  105. backend/models/mesh.py +57 -0
  106. backend/models/result.py +104 -0
  107. backend/models/waveforms.py +142 -0
  108. backend/platform_info.py +43 -0
  109. backend/preview.py +1113 -0
  110. backend/preview_from_ir.py +260 -0
  111. backend/public_field_playback.py +812 -0
  112. backend/public_field_playback_contract.py +396 -0
  113. backend/public_main.py +254 -0
  114. backend/public_material_catalog.py +273 -0
  115. backend/public_policy.py +273 -0
  116. backend/public_report.py +1343 -0
  117. backend/public_routes/__init__.py +1 -0
  118. backend/public_routes/halbach.py +594 -0
  119. backend/public_routes/preview.py +163 -0
  120. backend/public_routes/runs.py +195 -0
  121. backend/public_routes/solve.py +1436 -0
  122. backend/public_routes/tutorials.py +925 -0
  123. backend/public_security.py +96 -0
  124. backend/public_ui.py +141 -0
  125. backend/qualification.py +114 -0
  126. backend/resources.py +189 -0
  127. backend/solve_estimate.py +140 -0
  128. backend/solve_workspace.py +1046 -0
  129. backend/solver/__init__.py +3352 -0
  130. backend/solver/_helpers.py +1490 -0
  131. backend/solver/_mesh_pool.py +13 -0
  132. backend/solver/_process_pool.py +157 -0
  133. backend/solver_contract.py +31 -0
  134. backend/solver_environment.py +70 -0
  135. backend/steel_flux_metrics.py +209 -0
  136. backend/sweep_planning.py +137 -0
  137. backend/topology_provenance.py +201 -0
  138. backend/torque_metrics.py +54 -0
  139. backend/tutorial_fields.py +3150 -0
  140. backend/winding_utils.py +418 -0
  141. coilem-0.3.0.dist-info/METADATA +235 -0
  142. coilem-0.3.0.dist-info/RECORD +147 -0
  143. coilem-0.3.0.dist-info/WHEEL +5 -0
  144. coilem-0.3.0.dist-info/entry_points.txt +3 -0
  145. coilem-0.3.0.dist-info/licenses/LICENSE +235 -0
  146. coilem-0.3.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +322 -0
  147. coilem-0.3.0.dist-info/top_level.txt +1 -0
backend/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """coilEM backend package."""
2
+
3
+ __version__ = "0.3.0"
Binary file
@@ -0,0 +1,14 @@
1
+ {
2
+ "application_version": "0.3.0",
3
+ "application_commit": "60c391310ed2c29d7b187d0bdfcdf264ae0f9b33",
4
+ "magneto2d_version": "0.3.3",
5
+ "magneto2d_target": "x86_64-pc-windows-msvc",
6
+ "magneto2d_sha256": "d2751458b605319608d9589c0c4d0aff55105ae3edc0f7cc915a7f86046fed66",
7
+ "ui_bundle_sha256": "ed2038d06ff7aca640250861d454ba6d55a3d5caf6d8018459af2be41d7e4711",
8
+ "toolchain": {
9
+ "rustc": "rustc 1.94.0 (4a4ef493e 2026-03-02)",
10
+ "cargo": "cargo 1.94.0 (85eff7c80 2026-01-15)",
11
+ "node": "v24.21.0",
12
+ "npm": "11.19.0"
13
+ }
14
+ }
@@ -0,0 +1,261 @@
1
+ # Generated by tools/generate_m350_50a_bh.py; do not edit by hand.
2
+ # Material: M350-50A (1.0810) @ 50 Hz; sample: sheet strip; measurement: Epstein frame.
3
+ # Source model: https://github.com/modelica/ModelicaStandardLibrary/blob/master/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/ElectricSheet/M350_50A.mo
4
+ # Source formula: https://github.com/modelica/ModelicaStandardLibrary/blob/master/Modelica/Magnetic/FluxTubes/Material/SoftMagnetic/mu_rApprox.mo
5
+ # Source license: BSD-3-Clause; retained notice is in THIRD_PARTY_NOTICES.md.
6
+ # Model parameters: mu_i=1210, B_myMax=1.16 T, c_a=24630, c_b=2.44, n=14.
7
+ # mu_r(B) = 1 + (mu_i - 1 + c_a*|B/B_myMax|) / (1 + c_b*|B/B_myMax| + |B/B_myMax|^n).
8
+ # H(B) = B / (mu_0 * mu_r(B)).
9
+ B_T,H_A_per_m
10
+ 0.000000,0.000000000
11
+ 0.000001,0.000657655
12
+ 0.010000,5.712477329
13
+ 0.020000,10.145635700
14
+ 0.030000,13.740712043
15
+ 0.040000,16.756955713
16
+ 0.050000,19.356683900
17
+ 0.060000,21.646712091
18
+ 0.070000,23.700208267
19
+ 0.080000,25.568974655
20
+ 0.090000,27.290715888
21
+ 0.100000,28.893529206
22
+ 0.110000,30.398781239
23
+ 0.120000,31.823009501
24
+ 0.130000,33.179213725
25
+ 0.140000,34.477753861
26
+ 0.150000,35.726987758
27
+ 0.160000,36.933732521
28
+ 0.170000,38.103603905
29
+ 0.180000,39.241269784
30
+ 0.190000,40.350642048
31
+ 0.200000,41.435023687
32
+ 0.210000,42.497222829
33
+ 0.220000,43.539642068
34
+ 0.230000,44.564349123
35
+ 0.240000,45.573133213
36
+ 0.250000,46.567550422
37
+ 0.260000,47.548960471
38
+ 0.270000,48.518556748
39
+ 0.280000,49.477390986
40
+ 0.290000,50.426393676
41
+ 0.300000,51.366391051
42
+ 0.310000,52.298119292
43
+ 0.320000,53.222236476
44
+ 0.330000,54.139332666
45
+ 0.340000,55.049938486
46
+ 0.350000,55.954532427
47
+ 0.360000,56.853547105
48
+ 0.370000,57.747374645
49
+ 0.380000,58.636371324
50
+ 0.390000,59.520861598
51
+ 0.400000,60.401141604
52
+ 0.410000,61.277482221
53
+ 0.420000,62.150131745
54
+ 0.430000,63.019318257
55
+ 0.440000,63.885251700
56
+ 0.450000,64.748125742
57
+ 0.460000,65.608119422
58
+ 0.470000,66.465398643
59
+ 0.480000,67.320117511
60
+ 0.490000,68.172419564
61
+ 0.500000,69.022438897
62
+ 0.510000,69.870301215
63
+ 0.520000,70.716124815
64
+ 0.530000,71.560021537
65
+ 0.540000,72.402097673
66
+ 0.550000,73.242454874
67
+ 0.560000,74.081191052
68
+ 0.570000,74.918401311
69
+ 0.580000,75.754178901
70
+ 0.590000,76.588616240
71
+ 0.600000,77.421805993
72
+ 0.610000,78.253842253
73
+ 0.620000,79.084821833
74
+ 0.630000,79.914845687
75
+ 0.640000,80.744020508
76
+ 0.650000,81.572460500
77
+ 0.660000,82.400289383
78
+ 0.670000,83.227642648
79
+ 0.680000,84.054670108
80
+ 0.690000,84.881538781
81
+ 0.700000,85.708436161
82
+ 0.710000,86.535573910
83
+ 0.720000,87.363192052
84
+ 0.730000,88.191563705
85
+ 0.740000,89.021000445
86
+ 0.750000,89.851858351
87
+ 0.760000,90.684544842
88
+ 0.770000,91.519526370
89
+ 0.780000,92.357337091
90
+ 0.790000,93.198588613
91
+ 0.800000,94.043980947
92
+ 0.810000,94.894314778
93
+ 0.820000,95.750505235
94
+ 0.830000,96.613597270
95
+ 0.840000,97.484782867
96
+ 0.850000,98.365420229
97
+ 0.860000,99.257055169
98
+ 0.870000,100.161444933
99
+ 0.880000,101.080584669
100
+ 0.890000,102.016736838
101
+ 0.900000,102.972463829
102
+ 0.910000,103.950664098
103
+ 0.920000,104.954612165
104
+ 0.930000,105.988002823
105
+ 0.940000,107.054999965
106
+ 0.950000,108.160290439
107
+ 0.960000,109.309143391
108
+ 0.970000,110.507475598
109
+ 0.980000,111.761923306
110
+ 0.990000,113.079921154
111
+ 1.000000,114.469788798
112
+ 1.010000,115.940825894
113
+ 1.020000,117.503416145
114
+ 1.030000,119.169141184
115
+ 1.040000,120.950905100
116
+ 1.050000,122.863070489
117
+ 1.060000,124.921606960
118
+ 1.070000,127.144253111
119
+ 1.080000,129.550693039
120
+ 1.090000,132.162748531
121
+ 1.100000,135.004588172
122
+ 1.110000,138.102954663
123
+ 1.120000,141.487411753
124
+ 1.130000,145.190612279
125
+ 1.140000,149.248588874
126
+ 1.150000,153.701069063
127
+ 1.160000,158.591816511
128
+ 1.170000,163.969000350
129
+ 1.180000,169.885594605
130
+ 1.190000,176.399809872
131
+ 1.200000,183.575559535
132
+ 1.210000,191.482962939
133
+ 1.220000,200.198888094
134
+ 1.230000,209.807536626
135
+ 1.240000,220.401073845
136
+ 1.250000,232.080306995
137
+ 1.260000,244.955414878
138
+ 1.270000,259.146732271
139
+ 1.280000,274.785592719
140
+ 1.290000,292.015233476
141
+ 1.300000,310.991766600
142
+ 1.310000,331.885220393
143
+ 1.320000,354.880655606
144
+ 1.330000,380.179361059
145
+ 1.340000,408.000133563
146
+ 1.350000,438.580647256
147
+ 1.360000,472.178917750
148
+ 1.370000,509.074866701
149
+ 1.380000,549.571992703
150
+ 1.390000,593.999154676
151
+ 1.400000,642.712474169
152
+ 1.410000,696.097363307
153
+ 1.420000,754.570685359
154
+ 1.430000,818.583055217
155
+ 1.440000,888.621287326
156
+ 1.450000,965.210998927
157
+ 1.460000,1048.919376696
158
+ 1.470000,1140.358115195
159
+ 1.480000,1240.186535764
160
+ 1.490000,1349.114894769
161
+ 1.500000,1467.907890334
162
+ 1.510000,1597.388376918
163
+ 1.520000,1738.441297294
164
+ 1.530000,1892.017841634
165
+ 1.540000,2059.139843574
166
+ 1.550000,2240.904423184
167
+ 1.560000,2438.488886853
168
+ 1.570000,2653.155894069
169
+ 1.580000,2886.258900995
170
+ 1.590000,3139.247890639
171
+ 1.600000,3413.675399130
172
+ 1.610000,3711.202847336
173
+ 1.620000,4033.607186601
174
+ 1.630000,4382.787866836
175
+ 1.640000,4760.774134494
176
+ 1.650000,5169.732667123
177
+ 1.660000,5611.975550151
178
+ 1.670000,6089.968600366
179
+ 1.680000,6606.340039080
180
+ 1.690000,7163.889516348
181
+ 1.700000,7765.597485622
182
+ 1.710000,8414.634926037
183
+ 1.720000,9114.373406959
184
+ 1.730000,9868.395486533
185
+ 1.740000,10680.505432714
186
+ 1.750000,11554.740251556
187
+ 1.760000,12495.381003428
188
+ 1.770000,13506.964383211
189
+ 1.780000,14594.294535409
190
+ 1.790000,15762.455069452
191
+ 1.800000,17016.821234218
192
+ 1.810000,18363.072203957
193
+ 1.820000,19807.203420300
194
+ 1.830000,21355.538926885
195
+ 1.840000,23014.743624303
196
+ 1.850000,24791.835363510
197
+ 1.860000,26694.196785631
198
+ 1.870000,28729.586805129
199
+ 1.880000,30906.151621687
200
+ 1.890000,33232.435133884
201
+ 1.900000,35717.388614815
202
+ 1.910000,38370.379496421
203
+ 1.920000,41201.199095352
204
+ 1.930000,44220.069098967
205
+ 1.940000,47437.646615626
206
+ 1.950000,50865.027578951
207
+ 1.960000,54513.748281400
208
+ 1.970000,58395.784798672
209
+ 1.980000,62523.550053196
210
+ 1.990000,66909.888252879
211
+ 2.000000,71568.066430493
212
+ 2.010000,76511.762800182
213
+ 2.020000,81755.051640914
214
+ 2.030000,87312.384412873
215
+ 2.040000,93198.566812270
216
+ 2.050000,99428.731473461
217
+ 2.060000,106018.306035243
218
+ 2.070000,112982.976301264
219
+ 2.080000,120338.644243443
220
+ 2.090000,128101.380622588
221
+ 2.100000,136287.372032801
222
+ 2.110000,144912.862216115
223
+ 2.120000,153994.087541839
224
+ 2.130000,163547.206601351
225
+ 2.140000,173588.223934156
226
+ 2.150000,184132.907974609
227
+ 2.160000,195196.703391035
228
+ 2.170000,206794.638079327
229
+ 2.180000,218941.225171129
230
+ 2.190000,231650.360521320
231
+ 2.200000,244935.216249491
232
+ 2.210000,258808.131023908
233
+ 2.220000,273280.497892160
234
+ 2.230000,288362.650577992
235
+ 2.240000,304063.749276241
236
+ 2.250000,320391.667084374
237
+ 2.260000,337352.878306943
238
+ 2.270000,354952.349954845
239
+ 2.280000,373193.437831538
240
+ 2.290000,392077.788649825
241
+ 2.300000,411605.249652329
242
+ 2.310000,431773.787213584
243
+ 2.320000,452579.415878979
244
+ 2.330000,474016.139243898
245
+ 2.340000,496075.903993740
246
+ 2.350000,518748.568311682
247
+ 2.360000,542021.885716219
248
+ 2.370000,565881.505216070
249
+ 2.380000,590310.988468010
250
+ 2.390000,615291.844396991
251
+ 2.400000,640803.581491470
252
+ 2.410000,666823.777725306
253
+ 2.420000,693328.167786507
254
+ 2.430000,720290.747018974
255
+ 2.440000,747683.891212539
256
+ 2.450000,775478.491116145
257
+ 2.460000,803644.100305350
258
+ 2.470000,832149.094815050
259
+ 2.480000,860960.842756871
260
+ 2.490000,890045.881983403
261
+ 2.500000,919370.103741850
@@ -0,0 +1,69 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://coilem.com/schemas/v1/field_solution_report.schema.json",
4
+ "title": "Magneto2D generic field solution report",
5
+ "type": "object",
6
+ "required": [
7
+ "openem_schema_version",
8
+ "openem_schema_kind",
9
+ "openem_provenance",
10
+ "problem_kind",
11
+ "problem_version",
12
+ "normalized_length_unit",
13
+ "solution"
14
+ ],
15
+ "properties": {
16
+ "openem_schema_version": {"const": "1.0"},
17
+ "openem_schema_kind": {"const": "field_solution_report"},
18
+ "openem_provenance": {"type": "object"},
19
+ "problem_kind": {"const": "magnetostatic_problem"},
20
+ "problem_version": {"const": "1.0"},
21
+ "normalized_length_unit": {"const": "m"},
22
+ "solution": {
23
+ "type": "object",
24
+ "required": [
25
+ "az_nodal",
26
+ "element_fields",
27
+ "final_material_state",
28
+ "convergence",
29
+ "timings",
30
+ "profile",
31
+ "energy_per_unit_depth"
32
+ ],
33
+ "properties": {
34
+ "az_nodal": {"type": "array", "items": {"type": "number"}},
35
+ "element_fields": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "object",
39
+ "required": ["bx", "by", "b_mag"],
40
+ "properties": {
41
+ "bx": {"type": "number"},
42
+ "by": {"type": "number"},
43
+ "b_mag": {"type": "number"}
44
+ }
45
+ }
46
+ },
47
+ "final_material_state": {"type": "array"},
48
+ "convergence": {
49
+ "type": "object",
50
+ "required": [
51
+ "converged",
52
+ "nonlinear",
53
+ "nonlinear_algorithm",
54
+ "nonlinear_iterations",
55
+ "nonlinear_residual_history",
56
+ "linear_solver"
57
+ ]
58
+ },
59
+ "timings": {"type": "object"},
60
+ "profile": {"type": "object"},
61
+ "energy_per_unit_depth": {
62
+ "type": "object",
63
+ "required": ["magnetic_field_j_per_m"]
64
+ },
65
+ "warnings": {"type": "array", "items": {"type": "string"}}
66
+ }
67
+ }
68
+ }
69
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://coilem.com/schemas/v1/halbach_array_config.schema.json",
4
+ "title": "Cylindrical Halbach array configuration",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["geometry", "magnet"],
8
+ "properties": {
9
+ "kind": {"const": "halbach_array_config"},
10
+ "version": {"const": "1.0"},
11
+ "units": {
12
+ "type": "object",
13
+ "additionalProperties": false,
14
+ "required": ["length", "angle"],
15
+ "properties": {
16
+ "length": {"const": "mm"},
17
+ "angle": {"const": "deg"}
18
+ }
19
+ },
20
+ "geometry": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["inner_radius", "outer_radius", "axial_length"],
24
+ "properties": {
25
+ "inner_radius": {"type": "number", "exclusiveMinimum": 0},
26
+ "outer_radius": {"type": "number", "exclusiveMinimum": 0},
27
+ "axial_length": {"type": "number", "exclusiveMinimum": 0},
28
+ "segment_count": {"type": "integer", "minimum": 4, "maximum": 64, "default": 16},
29
+ "segment_gap_angle": {"type": "number", "minimum": 0, "default": 0},
30
+ "segment_start_angle": {"type": "number", "default": 0}
31
+ }
32
+ },
33
+ "array": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "field_mode": {"const": "internal"},
38
+ "multipole_order": {"const": 1},
39
+ "field_direction": {"type": "number", "default": 0}
40
+ }
41
+ },
42
+ "magnet": {
43
+ "oneOf": [
44
+ {"$ref": "#/$defs/catalogMagnet"},
45
+ {"$ref": "#/$defs/customMagnet"}
46
+ ]
47
+ },
48
+ "sample_region": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "properties": {
52
+ "radius": {
53
+ "type": "number",
54
+ "exclusiveMinimum": 0,
55
+ "description": "Defaults at runtime to 0.8 * geometry.inner_radius."
56
+ },
57
+ "radial_samples": {"type": "integer", "minimum": 5, "maximum": 201, "default": 31},
58
+ "angular_samples": {"type": "integer", "minimum": 16, "maximum": 720, "default": 96},
59
+ "leakage_probe_radius": {
60
+ "type": "number",
61
+ "exclusiveMinimum": 0,
62
+ "description": "Defaults at runtime to 1.5 * geometry.outer_radius."
63
+ }
64
+ }
65
+ },
66
+ "solve": {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "quality": {"enum": ["quick", "standard", "fine", "custom"], "default": "standard"},
71
+ "mesh": {
72
+ "type": "object",
73
+ "additionalProperties": false,
74
+ "properties": {
75
+ "density": {"enum": ["coarse", "normal", "fine"], "default": "normal"},
76
+ "outer_boundary_radius_factor": {"type": "number", "minimum": 2, "maximum": 12, "default": 4},
77
+ "minimum_elements_across_magnet": {"type": "integer", "minimum": 2, "maximum": 40, "default": 6},
78
+ "corner_refinement": {"type": "boolean", "default": true}
79
+ }
80
+ },
81
+ "linear": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "properties": {
85
+ "solver": {"enum": ["direct", "pcg"], "default": "direct"},
86
+ "pcg_preconditioner": {"enum": ["incomplete_cholesky", "jacobi"], "default": "incomplete_cholesky"},
87
+ "tolerance": {"type": "number", "exclusiveMinimum": 0, "exclusiveMaximum": 1, "default": 1e-8},
88
+ "max_iterations": {"type": "integer", "minimum": 1, "default": 5000}
89
+ }
90
+ },
91
+ "field_line_count": {"type": "integer", "minimum": 0, "maximum": 200, "default": 18}
92
+ }
93
+ }
94
+ },
95
+ "$defs": {
96
+ "catalogMagnet": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": ["source"],
100
+ "properties": {
101
+ "source": {"const": "catalog"},
102
+ "grade": {
103
+ "default": "N42",
104
+ "enum": ["N35", "N42", "N48", "N52", "N48SH", "Ferrite_Y30", "Prius_2004_NdFeB"]
105
+ },
106
+ "temperature_c": {"type": "number", "minimum": -40, "maximum": 250, "default": 20}
107
+ }
108
+ },
109
+ "customMagnet": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": ["source", "name", "remanence_t", "source_note"],
113
+ "properties": {
114
+ "source": {"const": "custom"},
115
+ "name": {"type": "string", "minLength": 1, "maxLength": 160},
116
+ "remanence_t": {"type": "number", "exclusiveMinimum": 0},
117
+ "relative_permeability": {"type": "number", "minimum": 1, "default": 1.05},
118
+ "intrinsic_coercivity_a_per_m": {"type": "number", "exclusiveMinimum": 0},
119
+ "density_kg_per_m3": {"type": "number", "exclusiveMinimum": 0},
120
+ "reference_temperature_c": {"type": "number"},
121
+ "temperature_c": {"type": "number"},
122
+ "alpha_br_per_k": {"type": "number"},
123
+ "alpha_hcj_per_k": {"type": "number"},
124
+ "source_note": {"type": "string", "minLength": 1, "maxLength": 1000}
125
+ }
126
+ }
127
+ }
128
+ }
@@ -0,0 +1,144 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://coilem.com/schemas/v1/halbach_solution_report.schema.json",
4
+ "title": "Cylindrical Halbach array solution report",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "openem_schema_kind",
9
+ "openem_schema_version",
10
+ "model",
11
+ "configuration",
12
+ "geometry",
13
+ "mesh",
14
+ "artifacts",
15
+ "bore_field",
16
+ "external_leakage",
17
+ "magnet",
18
+ "energy",
19
+ "timings_ms",
20
+ "peak_memory_bytes",
21
+ "samples",
22
+ "field_data",
23
+ "magnetostatic_problem",
24
+ "generic_field_report",
25
+ "warnings"
26
+ ],
27
+ "properties": {
28
+ "openem_schema_kind": {"const": "halbach_solution_report"},
29
+ "openem_schema_version": {"const": "1.0"},
30
+ "model": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": [
34
+ "formulation",
35
+ "assumption",
36
+ "axial_end_effects_modeled",
37
+ "axial_length_usage",
38
+ "notice"
39
+ ],
40
+ "properties": {
41
+ "formulation": {"const": "planar_az"},
42
+ "assumption": {"const": "infinite_length_extruded_2d"},
43
+ "axial_end_effects_modeled": {"const": false},
44
+ "axial_length_usage": {
45
+ "type": "array",
46
+ "contains": {"const": "extruded_2d_estimates"}
47
+ },
48
+ "notice": {"type": "string", "minLength": 1}
49
+ }
50
+ },
51
+ "configuration": {"$ref": "halbach_array_config.schema.json"},
52
+ "geometry": {"type": "object"},
53
+ "mesh": {"type": "object"},
54
+ "artifacts": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": [
58
+ "magnetostatic_problem_sha256",
59
+ "generic_field_report_input_sha256",
60
+ "geometry_hash",
61
+ "mesh_hash"
62
+ ],
63
+ "properties": {
64
+ "magnetostatic_problem_sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
65
+ "generic_field_report_input_sha256": {"type": ["string", "null"]},
66
+ "geometry_hash": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
67
+ "mesh_hash": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
68
+ }
69
+ },
70
+ "bore_field": {
71
+ "type": "object",
72
+ "required": [
73
+ "headline",
74
+ "requested_field_direction_deg",
75
+ "mean_bx_t",
76
+ "mean_by_t",
77
+ "mean_field_direction_error_deg",
78
+ "center",
79
+ "b_parallel_t",
80
+ "b_perpendicular_rms_t",
81
+ "b_perpendicular_max_abs_t",
82
+ "b_magnitude_t",
83
+ "uniformity_ppm",
84
+ "roi_radius_mm",
85
+ "roi_area_mm2",
86
+ "sample_count",
87
+ "sampling_rule",
88
+ "radial_samples",
89
+ "angular_samples",
90
+ "ideal_continuous_estimate_t",
91
+ "segmentation_factor",
92
+ "angular_coverage",
93
+ "segmented_analytical_estimate_t",
94
+ "solved_vs_segmented_delta_pct",
95
+ "convergence"
96
+ ]
97
+ },
98
+ "external_leakage": {
99
+ "type": "object",
100
+ "required": [
101
+ "probe_radius_mm",
102
+ "sample_count",
103
+ "rms_b_t",
104
+ "max_b_t",
105
+ "dominant_field_direction_deg",
106
+ "leakage_ratio_rms"
107
+ ]
108
+ },
109
+ "magnet": {
110
+ "type": "object",
111
+ "required": ["area_mm2", "volume_m3", "mass_kg", "material", "segments", "demagnetization_screening"]
112
+ },
113
+ "energy": {
114
+ "type": "object",
115
+ "required": ["energy_per_unit_depth_j_per_m", "magnetic_energy_extruded_2d_estimate_j", "label"]
116
+ },
117
+ "timings_ms": {"type": "object"},
118
+ "peak_memory_bytes": {"type": ["integer", "null"], "minimum": 0},
119
+ "samples": {
120
+ "type": "object",
121
+ "additionalProperties": false,
122
+ "required": ["bore", "leakage"],
123
+ "properties": {
124
+ "bore": {"type": "array"},
125
+ "leakage": {"type": "array"}
126
+ }
127
+ },
128
+ "field_data": {
129
+ "type": "object",
130
+ "required": [
131
+ "nodes_mm",
132
+ "triangles",
133
+ "region_ids",
134
+ "az_nodal_t_m",
135
+ "element_fields_t",
136
+ "contours",
137
+ "available_views"
138
+ ]
139
+ },
140
+ "magnetostatic_problem": {"$ref": "magnetostatic_problem.schema.json"},
141
+ "generic_field_report": {"type": "object"},
142
+ "warnings": {"type": "array", "items": {"type": "string"}}
143
+ }
144
+ }