An electromagnetic field computation program
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗EMerge is a python based FEM EM library for the time harmonic helmholtz formulation. It is thus best suited for Electromagnetic wave phenomenon. You can use it to simulate:
It is designed to be as easy to use and compatible as possible. It runs on all operating systems and on all hardware.
EMerge is designed to have your entire simulation start and finish in the same Python script (or more if you want). You require no awkward configuration files, JSON's, external software to do modelling etc. It allows you to do everything in Python:
If you have questions, suggestions, bug reports or just want to hang out, feel free to join the discord!
You can now install the basic version of emerge from PyPi!
pip install emerge
EMerge solves all systems with direct solvers only. Some are faster than others. Depending on the operating system and hardware you have, some might work better and/or are easier to install than others.
EMerge uses the Apple Accelerate sparse solver for all cases. From 3.0.0b4 onwards it is installed automatically
with EMerge on macOS (the precompiled emerge-aasds package on PyPI), so no extra installation is needed.
By default the Accelrate solver will be limited to a single thread for frequency distributed sweeps. To allow for more threads either set the environment variable manually:
VECLIB_MAXIMUM_THREADS = 4
Or in Python before loading EMerge:
import os
os.environ['VECLIB_MAXIMUM_THREADS'] = '4'
Of from 2.5.3 onwards also through the config sister module
from emerge_config import config
config.set_acc_threads(4)
To utilize the GPU on Apple silicon you can install the open source GPU based sparse direct solver SPARTA.
pip install git+https://github.com/FennisRobert/SPARTA
To activate the GPU, set:
model.set_solver(em.EMSolver.SPARTA)
Windows has easy access to the lightning fast PARDISO solver out of the box, no installation needed. If you want to install the UMFPACK solver for distributed sweeps this distribution should work through conda forge:
conda install conda-forge::scikit-umfpack
Otherwise try the solution in the user manual.
https://www.emerge-software.com/resources
If you have a new NVidia card you can try the first test implementation of the cuDSS solver. The dependencies can be installed through:
pip install emerge[cudss]
You can utilize the GPU on AMD devices through Vulkan using the open source SPARTA solver.
pip install git+https://github.com/FennisRobert/SPARTA
To activate the GPU, set:
model.set_solver(em.EMSolver.SPARTA)
pip install https://gmsh.info/python-packages-dev/gmsh/gmsh-5.0.0.dev1-py2.py3-none-macosx_12_0_arm64.whl --force-reinstall
EMerge ships compiled Rust kernels (the
emrmodule, source inemr/). PyPI wheels include them; installing from source (pip install /path/to/EMergeorpip install git+https://github.com/FennisRobert/EMerge.git) compiles them automatically and requires a Rust toolchain (https://rustup.rs).
You can read Gerber and ODB++ files using the optional emcad dependency which I also maintain. To get all the dependencies its easiest to do:
pip intall emerge[cad]
You can find the latest versions of the manual on: https://www.emerge-software.com/resources/