radia 1.3.4__py3-none-any.whl → 1.3.6__py3-none-any.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.
- python/radia.pyd +0 -0
- python/radia_ngsolve.pyd +0 -0
- {radia-1.3.4.dist-info → radia-1.3.6.dist-info}/METADATA +79 -3
- {radia-1.3.4.dist-info → radia-1.3.6.dist-info}/RECORD +7 -7
- python/rad_ngsolve.pyd +0 -0
- {radia-1.3.4.dist-info → radia-1.3.6.dist-info}/WHEEL +0 -0
- {radia-1.3.4.dist-info → radia-1.3.6.dist-info}/licenses/LICENSE +0 -0
- {radia-1.3.4.dist-info → radia-1.3.6.dist-info}/top_level.txt +0 -0
python/radia.pyd
ADDED
|
Binary file
|
python/radia_ngsolve.pyd
CHANGED
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: radia
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.6
|
|
4
4
|
Summary: Radia 3D Magnetostatics with NGSolve Integration and OpenMP Parallelization
|
|
5
5
|
Home-page: https://github.com/ksugahar/Radia_NGSolve
|
|
6
6
|
Author: Pascal Elleaume
|
|
@@ -296,6 +296,82 @@ export_geometry_to_vtk(mag, 'geometry.vtk')
|
|
|
296
296
|
- NGSolve (optional, for FEM coupling via radia_ngsolve)
|
|
297
297
|
- PyVista (optional, for 3D visualization)
|
|
298
298
|
|
|
299
|
+
## Linear Material with External Field (ObjBckgCF)
|
|
300
|
+
|
|
301
|
+
Radia supports soft magnetic materials (linear materials) in external fields using `ObjBckgCF`.
|
|
302
|
+
|
|
303
|
+
### Working Example
|
|
304
|
+
|
|
305
|
+
```python
|
|
306
|
+
import radia as rad
|
|
307
|
+
import numpy as np
|
|
308
|
+
|
|
309
|
+
rad.UtiDelAll()
|
|
310
|
+
rad.FldUnits('m') # Use SI units
|
|
311
|
+
|
|
312
|
+
# Create soft iron cube (10cm side)
|
|
313
|
+
cube = rad.ObjRecMag([0, 0, 0], [0.1, 0.1, 0.1], [0, 0, 0])
|
|
314
|
+
|
|
315
|
+
# Apply isotropic linear material (mu_r = 100)
|
|
316
|
+
chi = 99.0 # chi = mu_r - 1
|
|
317
|
+
mat = rad.MatLin(chi) # IMPORTANT: Use single argument for isotropic
|
|
318
|
+
rad.MatApl(cube, mat)
|
|
319
|
+
|
|
320
|
+
# Create external field (1 Tesla in z-direction)
|
|
321
|
+
def uniform_B(pos):
|
|
322
|
+
return [0, 0, 1.0] # Returns B in Tesla
|
|
323
|
+
bg = rad.ObjBckgCF(uniform_B)
|
|
324
|
+
|
|
325
|
+
# Create system and solve
|
|
326
|
+
system = rad.ObjCnt([cube, bg])
|
|
327
|
+
result = rad.Solve(system, 0.0001, 1000)
|
|
328
|
+
|
|
329
|
+
# Result: M ~ 2.3 MA/m (correct for cube with mu_r=100 in 1T field)
|
|
330
|
+
M = rad.ObjM(cube)
|
|
331
|
+
print(f"Magnetization: {M[1]} A/m")
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Important Notes
|
|
335
|
+
|
|
336
|
+
1. **Isotropic materials**: Always use `MatLin(chi)` (single argument)
|
|
337
|
+
- Do NOT use `MatLin(chi, [0, 0, 1e-10])` - this creates a poorly defined anisotropic tensor
|
|
338
|
+
|
|
339
|
+
2. **Callback returns B in Tesla**: The callback function for `ObjBckgCF` should return magnetic flux density B in Tesla
|
|
340
|
+
|
|
341
|
+
3. **Units**: When using `rad.FldUnits('m')`, all coordinates are in meters
|
|
342
|
+
|
|
343
|
+
4. **Tetrahedral elements**: Also works with `ObjPolyhdr` tetrahedral meshes
|
|
344
|
+
|
|
345
|
+
### Supported Element Types
|
|
346
|
+
|
|
347
|
+
| Element | API | External Field Support |
|
|
348
|
+
|---------|-----|----------------------|
|
|
349
|
+
| Hexahedron | `ObjRecMag` | Yes |
|
|
350
|
+
| Tetrahedron | `ObjPolyhdr` | Yes |
|
|
351
|
+
| Extruded Polygon | `ObjThckPgn` | Yes |
|
|
352
|
+
|
|
353
|
+
## Tetrahedral Mesh Import from NGSolve/Netgen
|
|
354
|
+
|
|
355
|
+
Radia can import tetrahedral meshes from NGSolve/Netgen for complex geometries.
|
|
356
|
+
|
|
357
|
+
**Features:**
|
|
358
|
+
- Direct Netgen/OCC mesh import to Radia MMM
|
|
359
|
+
- Independent mesh optimization for FEM vs MMM
|
|
360
|
+
- Nastran CTETRA face connectivity standard
|
|
361
|
+
|
|
362
|
+
**Usage:** See `examples/cube_uniform_field/linear/` for examples.
|
|
363
|
+
|
|
364
|
+
**Benchmark** (mu_r=100, B0=1T, 100mm cube):
|
|
365
|
+
|
|
366
|
+
| Mesh | Elements | M_z (MA/m) | Error |
|
|
367
|
+
|------|----------|------------|-------|
|
|
368
|
+
| 1x1x1 hex | 1 | 2.3171 | 0.00% |
|
|
369
|
+
| 2x2x2 hex | 8 | 2.4180 | 4.36% |
|
|
370
|
+
| 5x5x5 hex | 125 | 2.6652 | 15.02% |
|
|
371
|
+
|
|
372
|
+
Analytical: M = 2.3171 MA/m (N = 1/3 for cube)
|
|
373
|
+
|
|
374
|
+
|
|
299
375
|
## Changes from Original Radia
|
|
300
376
|
|
|
301
377
|
### Removed Components
|
|
@@ -379,5 +455,5 @@ See [examples/NGSolve_CoefficientFunction_to_Radia_BackgroundField/](examples/NG
|
|
|
379
455
|
|
|
380
456
|
---
|
|
381
457
|
|
|
382
|
-
**Version**: 1.
|
|
383
|
-
**Last Updated**: 2025-11-
|
|
458
|
+
**Version**: 1.3.4 (OpenMP + NGSolve Edition)
|
|
459
|
+
**Last Updated**: 2025-11-30
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
python/__init__.py,sha256=oUOAjf_vY8DNy5HRU7oArAMic8urvHCR9yHSi4HFkkQ,47
|
|
2
2
|
python/nastran_mesh_import.py,sha256=CSoVhZCXa85lPiTF2hlspE2clBKOD7-_sCp1bxu_IK0,18147
|
|
3
3
|
python/netgen_mesh_import.py,sha256=UopXk-5bbfj1j9_hyiq8jbjb4SQXnWaeuaC7TDf17wA,19872
|
|
4
|
-
python/rad_ngsolve.pyd,sha256=s5ZvpTIrjYeV_B3vQv5HrtP4u_RaPhvxuZf5aKv3oC0,566272
|
|
5
4
|
python/rad_ngsolve_fast.py,sha256=GkC7ruKy3MESHsO0iRSWsrgLU4-DPPgctOi6pPpsWg4,5675
|
|
5
|
+
python/radia.pyd,sha256=K6I8UDH2NI-U857_jTG_jWGmRW8zOvSFgdLRpuIK_Xo,1738752
|
|
6
6
|
python/radia_coil_builder.py,sha256=nQkiAbfhueNvvxUARHdPD0C68ImidHmUQv_q4RsImeY,11253
|
|
7
7
|
python/radia_field_cached.py,sha256=Bjw3ecNe3u7AAXnLob5m_tjYIY7HwB9DpgFg9a-aP_8,9509
|
|
8
|
-
python/radia_ngsolve.pyd,sha256=
|
|
8
|
+
python/radia_ngsolve.pyd,sha256=hmPQal8FEqt9Ia5NQ05Vw35RUW5jbWFGQ5PzwXJiLww,566272
|
|
9
9
|
python/radia_ngsolve_field.py,sha256=suJr4wacfYFKOkyV-5AQuHWnW5rtUMb0gSSjq8VRSXc,10166
|
|
10
10
|
python/radia_ngsolve_utils.py,sha256=xZCR9DOIKMwdEjmC28rOXVZiWFY5BQYH2VfopfuVBps,8406
|
|
11
11
|
python/radia_pyvista_viewer.py,sha256=JS33Mx4azGI7hUX0bzefc6zJfhv6qfRjM3Kl1bE9Mjs,4275
|
|
12
12
|
python/radia_vtk_export.py,sha256=I8Vyyt9tky78Qw1xPru9f0Rii6QEmdEgTFjQtamyooc,6540
|
|
13
|
-
radia-1.3.
|
|
14
|
-
radia-1.3.
|
|
15
|
-
radia-1.3.
|
|
16
|
-
radia-1.3.
|
|
17
|
-
radia-1.3.
|
|
13
|
+
radia-1.3.6.dist-info/licenses/LICENSE,sha256=yaWxyzG9DpJ44dDNdGni4nukwiZ8pU-r_aW-1tYNAjk,4374
|
|
14
|
+
radia-1.3.6.dist-info/METADATA,sha256=sLwoSNnU0g8jAa_efG0c3xDb2Z_YLIqgGXo55OIiblo,15518
|
|
15
|
+
radia-1.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
16
|
+
radia-1.3.6.dist-info/top_level.txt,sha256=J-z0poNcsv31IHB413--iOY8LoHBKiTHeybHX3abokI,7
|
|
17
|
+
radia-1.3.6.dist-info/RECORD,,
|
python/rad_ngsolve.pyd
DELETED
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|