summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-31 07:09:26 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-31 07:09:26 +0000
commit1137a43116939fc254c4a4bf247f8d374240aa44 (patch)
treef1aba215f47fae072e40a16c12465fe493ae9ead
parent118b7c91093ec88cedc53613f55e2fdf49e474da (diff)
automatic import of python-magneticalc
-rw-r--r--.gitignore1
-rw-r--r--python-magneticalc.spec270
-rw-r--r--sources1
3 files changed, 272 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..48072db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/MagnetiCalc-1.15.2.tar.gz
diff --git a/python-magneticalc.spec b/python-magneticalc.spec
new file mode 100644
index 0000000..1f51596
--- /dev/null
+++ b/python-magneticalc.spec
@@ -0,0 +1,270 @@
+%global _empty_manifest_terminate_build 0
+Name: python-MagnetiCalc
+Version: 1.15.2
+Release: 1
+Summary: MagnetiCalc calculates the magnetic flux density, vector potential, energy, self-inductance and magnetic dipole moment of arbitrary coils. Inside an OpenGL-accelerated GUI, the static magnetic flux density (B-field) or the magnetic vector potential (A-field) is displayed in interactive 3D, using multiple metrics for highlighting the field properties.
+License: ISC License
+URL: https://github.com/shredEngineer/MagnetiCalc
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b9/97/e621696b60b1356a465f97b3507fc2e1997767835d15da653d00da695eb6/MagnetiCalc-1.15.2.tar.gz
+BuildArch: noarch
+
+Requires: python3-numpy
+Requires: python3-numba
+Requires: python3-scipy
+Requires: python3-PyQt5
+Requires: python3-vispy
+Requires: python3-qtawesome
+Requires: python3-sty
+Requires: python3-si-prefix
+Requires: python3-h5py
+
+%description
+[![PyPI version](https://img.shields.io/pypi/v/MagnetiCalc?label=PyPI)](https://pypi.org/project/MagnetiCalc/)
+[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TN6YTPVX36YHA&source=url)
+[![Documentation](https://img.shields.io/badge/Documentation-API-orange)](https://shredengineer.github.io/MagnetiCalc/)
+๐Ÿ€ [Always looking for beta testers!](#contribute)
+**What does MagnetiCalc do?**
+MagnetiCalc calculates the static magnetic flux density, vector potential, energy, self-inductance
+and magnetic dipole moment of arbitrary coils. Inside an OpenGL-accelerated GUI, the magnetic flux density
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field,
+in units of <i>Tesla</i>)
+or the magnetic vector potential
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}" alt="A">-field,
+in units of <i>Tesla-meter</i>)
+is displayed in interactive 3D, using multiple metrics for highlighting the field properties.
+<i>Experimental feature:</i> To calculate the energy and self-inductance of permeable (i.e. ferrous) materials,
+different core media can be modeled as regions of variable relative permeability;
+however, core saturation is currently not modeled, resulting in excessive flux density values.
+**Who needs MagnetiCalc?**
+MagnetiCalc does its job for hobbyists, students, engineers and researchers of magnetic phenomena.
+I designed MagnetiCalc from scratch, because I didn't want to mess around
+with expensive and/or overly complex simulation software
+whenever I needed to solve a magnetostatic problem.
+**How does it work?**
+The <img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field calculation
+is implemented using the Biot-Savart law [**1**], employing multiprocessing techniques;
+MagnetiCalc uses just-in-time compilation ([JIT](https://numba.pydata.org/))
+and, if available, GPU-acceleration ([CUDA](https://numba.pydata.org/numba-doc/dev/cuda/overview.html))
+to achieve high-performance calculations.
+Additionally, the use of easily constrainable "sampling volumes" allows for selective calculation over
+grids of arbitrary shape and arbitrary relative permeabilities
+<img src="https://render.githubusercontent.com/render/math?math=\mu_r(\mathbf{x})" alt="ยต_r(x)">
+(<i>experimental</i>).
+The shape of any wire is modeled as a 3D piecewise linear curve.
+Arbitrary loops of wire are sliced into differential current elements
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{\ell}" alt="l">),
+each of which contributes to the total resulting field
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}" alt="A">,
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">)
+at some fixed 3D grid point (<img src="https://render.githubusercontent.com/render/math?math=\mathbf{x}" alt="x">),
+summing over the positions of all current elements
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{x^'}" alt="x'">):
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}(\mathbf{x})=I \cdot \frac{\mu_0}{4 \pi} \cdot \displaystyle \sum_\mathbf{x^'} \mu_r(\mathbf{x}) \cdot \frac{\mathbf{\ell}(\mathbf{x^')}}{\mid \mathbf{x} - \mathbf{x^'} \mid}"><br>
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}(\mathbf{x})=I \cdot \frac{\mu_0}{4 \pi} \cdot \displaystyle \sum_\mathbf{x^'} \mu_r(\mathbf{x}) \cdot \frac{\mathbf{\ell}(\mathbf{x^'}) \times (\mathbf{x} - \mathbf{x^'})}{\mid \mathbf{x} - \mathbf{x^'} \mid}"><br>
+At each grid point, the field magnitude (or field angle in some plane) is displayed
+using colored arrows and/or dots;
+field color and alpha transparency are individually mapped using one of the various
+[available metrics](#appendix-metrics).
+The coil's energy <img src="https://render.githubusercontent.com/render/math?math=E" alt="E"> [**2**]
+and self-inductance <img src="https://render.githubusercontent.com/render/math?math=L" alt="L"> [**3**]
+are calculated by summing the squared
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field
+over the entire sampling volume;
+ensure that the sampling volume encloses a large, non-singular portion of the field:
+<img src="https://render.githubusercontent.com/render/math?math=E=\frac{1}{\mu_0} \cdot \displaystyle \sum_\mathbf{x} \frac{\mathbf{B}(\mathbf{x}) \cdot \mathbf{B}(\mathbf{x})}{\mu_r(\mathbf{x})}"><br>
+<img src="https://render.githubusercontent.com/render/math?math=L=\frac{1}{\I^2} \cdot E"><br>
+Additionally, the scalar magnetic dipole moment
+<img src="https://render.githubusercontent.com/render/math?math=m" alt="m"> [**4**]
+is calculated by summing over all current elements:
+<img src="https://render.githubusercontent.com/render/math?math=m=\Bigl| I \cdot \frac{1}{2} \cdot \displaystyle \sum_\mathbf{x^'} \mathbf{x^'} \times \mathbf{\ell}(\mathbf{x^'}) \Bigr|"><br>
+***References***
+[**1**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 204, (5.4).<br>
+[**2**]: Kraus, Electromagnetics, 4th Edition, p. 269, 6-9-1.<br>
+[**3**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 252, (5.157).<br>
+[**4**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 216, (5.54).
+
+%package -n python3-MagnetiCalc
+Summary: MagnetiCalc calculates the magnetic flux density, vector potential, energy, self-inductance and magnetic dipole moment of arbitrary coils. Inside an OpenGL-accelerated GUI, the static magnetic flux density (B-field) or the magnetic vector potential (A-field) is displayed in interactive 3D, using multiple metrics for highlighting the field properties.
+Provides: python-MagnetiCalc
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-MagnetiCalc
+[![PyPI version](https://img.shields.io/pypi/v/MagnetiCalc?label=PyPI)](https://pypi.org/project/MagnetiCalc/)
+[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TN6YTPVX36YHA&source=url)
+[![Documentation](https://img.shields.io/badge/Documentation-API-orange)](https://shredengineer.github.io/MagnetiCalc/)
+๐Ÿ€ [Always looking for beta testers!](#contribute)
+**What does MagnetiCalc do?**
+MagnetiCalc calculates the static magnetic flux density, vector potential, energy, self-inductance
+and magnetic dipole moment of arbitrary coils. Inside an OpenGL-accelerated GUI, the magnetic flux density
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field,
+in units of <i>Tesla</i>)
+or the magnetic vector potential
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}" alt="A">-field,
+in units of <i>Tesla-meter</i>)
+is displayed in interactive 3D, using multiple metrics for highlighting the field properties.
+<i>Experimental feature:</i> To calculate the energy and self-inductance of permeable (i.e. ferrous) materials,
+different core media can be modeled as regions of variable relative permeability;
+however, core saturation is currently not modeled, resulting in excessive flux density values.
+**Who needs MagnetiCalc?**
+MagnetiCalc does its job for hobbyists, students, engineers and researchers of magnetic phenomena.
+I designed MagnetiCalc from scratch, because I didn't want to mess around
+with expensive and/or overly complex simulation software
+whenever I needed to solve a magnetostatic problem.
+**How does it work?**
+The <img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field calculation
+is implemented using the Biot-Savart law [**1**], employing multiprocessing techniques;
+MagnetiCalc uses just-in-time compilation ([JIT](https://numba.pydata.org/))
+and, if available, GPU-acceleration ([CUDA](https://numba.pydata.org/numba-doc/dev/cuda/overview.html))
+to achieve high-performance calculations.
+Additionally, the use of easily constrainable "sampling volumes" allows for selective calculation over
+grids of arbitrary shape and arbitrary relative permeabilities
+<img src="https://render.githubusercontent.com/render/math?math=\mu_r(\mathbf{x})" alt="ยต_r(x)">
+(<i>experimental</i>).
+The shape of any wire is modeled as a 3D piecewise linear curve.
+Arbitrary loops of wire are sliced into differential current elements
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{\ell}" alt="l">),
+each of which contributes to the total resulting field
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}" alt="A">,
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">)
+at some fixed 3D grid point (<img src="https://render.githubusercontent.com/render/math?math=\mathbf{x}" alt="x">),
+summing over the positions of all current elements
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{x^'}" alt="x'">):
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}(\mathbf{x})=I \cdot \frac{\mu_0}{4 \pi} \cdot \displaystyle \sum_\mathbf{x^'} \mu_r(\mathbf{x}) \cdot \frac{\mathbf{\ell}(\mathbf{x^')}}{\mid \mathbf{x} - \mathbf{x^'} \mid}"><br>
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}(\mathbf{x})=I \cdot \frac{\mu_0}{4 \pi} \cdot \displaystyle \sum_\mathbf{x^'} \mu_r(\mathbf{x}) \cdot \frac{\mathbf{\ell}(\mathbf{x^'}) \times (\mathbf{x} - \mathbf{x^'})}{\mid \mathbf{x} - \mathbf{x^'} \mid}"><br>
+At each grid point, the field magnitude (or field angle in some plane) is displayed
+using colored arrows and/or dots;
+field color and alpha transparency are individually mapped using one of the various
+[available metrics](#appendix-metrics).
+The coil's energy <img src="https://render.githubusercontent.com/render/math?math=E" alt="E"> [**2**]
+and self-inductance <img src="https://render.githubusercontent.com/render/math?math=L" alt="L"> [**3**]
+are calculated by summing the squared
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field
+over the entire sampling volume;
+ensure that the sampling volume encloses a large, non-singular portion of the field:
+<img src="https://render.githubusercontent.com/render/math?math=E=\frac{1}{\mu_0} \cdot \displaystyle \sum_\mathbf{x} \frac{\mathbf{B}(\mathbf{x}) \cdot \mathbf{B}(\mathbf{x})}{\mu_r(\mathbf{x})}"><br>
+<img src="https://render.githubusercontent.com/render/math?math=L=\frac{1}{\I^2} \cdot E"><br>
+Additionally, the scalar magnetic dipole moment
+<img src="https://render.githubusercontent.com/render/math?math=m" alt="m"> [**4**]
+is calculated by summing over all current elements:
+<img src="https://render.githubusercontent.com/render/math?math=m=\Bigl| I \cdot \frac{1}{2} \cdot \displaystyle \sum_\mathbf{x^'} \mathbf{x^'} \times \mathbf{\ell}(\mathbf{x^'}) \Bigr|"><br>
+***References***
+[**1**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 204, (5.4).<br>
+[**2**]: Kraus, Electromagnetics, 4th Edition, p. 269, 6-9-1.<br>
+[**3**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 252, (5.157).<br>
+[**4**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 216, (5.54).
+
+%package help
+Summary: Development documents and examples for MagnetiCalc
+Provides: python3-MagnetiCalc-doc
+%description help
+[![PyPI version](https://img.shields.io/pypi/v/MagnetiCalc?label=PyPI)](https://pypi.org/project/MagnetiCalc/)
+[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
+[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TN6YTPVX36YHA&source=url)
+[![Documentation](https://img.shields.io/badge/Documentation-API-orange)](https://shredengineer.github.io/MagnetiCalc/)
+๐Ÿ€ [Always looking for beta testers!](#contribute)
+**What does MagnetiCalc do?**
+MagnetiCalc calculates the static magnetic flux density, vector potential, energy, self-inductance
+and magnetic dipole moment of arbitrary coils. Inside an OpenGL-accelerated GUI, the magnetic flux density
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field,
+in units of <i>Tesla</i>)
+or the magnetic vector potential
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}" alt="A">-field,
+in units of <i>Tesla-meter</i>)
+is displayed in interactive 3D, using multiple metrics for highlighting the field properties.
+<i>Experimental feature:</i> To calculate the energy and self-inductance of permeable (i.e. ferrous) materials,
+different core media can be modeled as regions of variable relative permeability;
+however, core saturation is currently not modeled, resulting in excessive flux density values.
+**Who needs MagnetiCalc?**
+MagnetiCalc does its job for hobbyists, students, engineers and researchers of magnetic phenomena.
+I designed MagnetiCalc from scratch, because I didn't want to mess around
+with expensive and/or overly complex simulation software
+whenever I needed to solve a magnetostatic problem.
+**How does it work?**
+The <img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field calculation
+is implemented using the Biot-Savart law [**1**], employing multiprocessing techniques;
+MagnetiCalc uses just-in-time compilation ([JIT](https://numba.pydata.org/))
+and, if available, GPU-acceleration ([CUDA](https://numba.pydata.org/numba-doc/dev/cuda/overview.html))
+to achieve high-performance calculations.
+Additionally, the use of easily constrainable "sampling volumes" allows for selective calculation over
+grids of arbitrary shape and arbitrary relative permeabilities
+<img src="https://render.githubusercontent.com/render/math?math=\mu_r(\mathbf{x})" alt="ยต_r(x)">
+(<i>experimental</i>).
+The shape of any wire is modeled as a 3D piecewise linear curve.
+Arbitrary loops of wire are sliced into differential current elements
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{\ell}" alt="l">),
+each of which contributes to the total resulting field
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}" alt="A">,
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">)
+at some fixed 3D grid point (<img src="https://render.githubusercontent.com/render/math?math=\mathbf{x}" alt="x">),
+summing over the positions of all current elements
+(<img src="https://render.githubusercontent.com/render/math?math=\mathbf{x^'}" alt="x'">):
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{A}(\mathbf{x})=I \cdot \frac{\mu_0}{4 \pi} \cdot \displaystyle \sum_\mathbf{x^'} \mu_r(\mathbf{x}) \cdot \frac{\mathbf{\ell}(\mathbf{x^')}}{\mid \mathbf{x} - \mathbf{x^'} \mid}"><br>
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}(\mathbf{x})=I \cdot \frac{\mu_0}{4 \pi} \cdot \displaystyle \sum_\mathbf{x^'} \mu_r(\mathbf{x}) \cdot \frac{\mathbf{\ell}(\mathbf{x^'}) \times (\mathbf{x} - \mathbf{x^'})}{\mid \mathbf{x} - \mathbf{x^'} \mid}"><br>
+At each grid point, the field magnitude (or field angle in some plane) is displayed
+using colored arrows and/or dots;
+field color and alpha transparency are individually mapped using one of the various
+[available metrics](#appendix-metrics).
+The coil's energy <img src="https://render.githubusercontent.com/render/math?math=E" alt="E"> [**2**]
+and self-inductance <img src="https://render.githubusercontent.com/render/math?math=L" alt="L"> [**3**]
+are calculated by summing the squared
+<img src="https://render.githubusercontent.com/render/math?math=\mathbf{B}" alt="B">-field
+over the entire sampling volume;
+ensure that the sampling volume encloses a large, non-singular portion of the field:
+<img src="https://render.githubusercontent.com/render/math?math=E=\frac{1}{\mu_0} \cdot \displaystyle \sum_\mathbf{x} \frac{\mathbf{B}(\mathbf{x}) \cdot \mathbf{B}(\mathbf{x})}{\mu_r(\mathbf{x})}"><br>
+<img src="https://render.githubusercontent.com/render/math?math=L=\frac{1}{\I^2} \cdot E"><br>
+Additionally, the scalar magnetic dipole moment
+<img src="https://render.githubusercontent.com/render/math?math=m" alt="m"> [**4**]
+is calculated by summing over all current elements:
+<img src="https://render.githubusercontent.com/render/math?math=m=\Bigl| I \cdot \frac{1}{2} \cdot \displaystyle \sum_\mathbf{x^'} \mathbf{x^'} \times \mathbf{\ell}(\mathbf{x^'}) \Bigr|"><br>
+***References***
+[**1**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 204, (5.4).<br>
+[**2**]: Kraus, Electromagnetics, 4th Edition, p. 269, 6-9-1.<br>
+[**3**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 252, (5.157).<br>
+[**4**]: Jackson, Klassische Elektrodynamik, 5. Auflage, S. 216, (5.54).
+
+%prep
+%autosetup -n MagnetiCalc-1.15.2
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-MagnetiCalc -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 1.15.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..8d6e022
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+9087d57022cca851114c91f749ac7774 MagnetiCalc-1.15.2.tar.gz