This is a python wrapper package of a C++ implementation of a superconducting concentric coil system solver. The solver is using the biot savart law to calculate the main magnetic field, the stray field and then the energy from it.
- Package can be built by running :
$ python setup.py build_ext -i
-
Now the .so or .pyd (on windows) is used to import the bisol module from.
-
Package can also be installed by running :
$ python setup.py install
- This way it will be made available in the current environment everywhere.
Usage examples can be found in the examples directory. The package provides a simple solve()
function which accepts an array containing the simulation parameters :
R_1
andR_2
inm
... radial distance of the center of the first and second coil from the system center.h_1
andh_2
inm
... half height of the first and second coil respectively.d_1
andd_2
inm
... thickness of the first and second coil respectively.J_1
andJ_2
inA/mm^2
... current density of the first and second coil respectively.
The vector is then constructed from these as :
The function can be invoked by running :
y = pybisol.solve(x)
Where y is again a vector with :
with :
E
inJ
... total energy stored in the system.Bs_1
inT
... is the sum of the absolute values of the stray field in the computation points divided by the numer of points.Bs_2
inT^2
... is the sum of the squares of the stray field in the computation points divided by the number of points.Bmax_1
andBmax_2
inT
... maximal field for solenoid 1 and 2.