openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
openEMS is a free and open-source electromagnetic field solver using the EC-FDTD method.
openEMS is a free, open-source FDTD (Finite-Difference Time-Domain) electromagnetic field solver. It is the core simulation engine of the openEMS-Project and is used together with CSXCAD for geometry and material description.
…openEMS is normally built as part of the openEMS-Project meta-repo using the
update_openEMS.sh script, which handles all dependencies automatically.
See the openEMS-Project README for the
recommended full-stack build.
Required dependencies: CSXCAD, fparser, TinyXML, HDF5, VTK, Boost (≥ 1.46, components: thread, date_time, serialization, chrono, program_options).
mkdir build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX=~/opt/openEMS \
-DFPARSER_ROOT_DIR=~/opt/openEMS \
-DCSXCAD_ROOT_DIR=~/opt/openEMS
make -j$(nproc)
make installDeveloper-local path overrides go in localConfig.cmake (gitignored) at the repo
root — this avoids having to pass -D flags every time:
# localConfig.cmake
SET(CMAKE_INSTALL_PREFIX "$ENV{HOME}/opt/openEMS")
SET(FPARSER_ROOT_DIR "$ENV{HOME}/opt/openEMS")
SET(CSXCAD_ROOT_DIR "$ENV{HOME}/opt/openEMS")The build produces libopenEMS.so and the openEMS binary, both installed under
/lib and /bin.
After make install, run the Octave setup once to compile the HDF5 helper:
octave --no-gui --eval "setup()"The CSXCAD Python module must be installed first (from the CSXCAD repo):
python3 -m venv ~/.venv/openEMS
source ~/.venv/openEMS/bin/activate
# 1. Install CSXCAD Python module
export CSXCAD_INSTALL_PATH=~/opt/openEMS
cd /path/to/CSXCAD/python && pip install .
# 2. Install openEMS Python module
export OPENEMS_INSTALL_PATH=~/opt/openEMS
cd /path/to/openEMS/python && pip install .Verify from outside the source tree:
python3 -c "import CSXCAD; print(CSXCAD.__version__)"
python3 -c "import openEMS; print(openEMS.__version__)"After installation, follow the official tutorials to run your first simulation:
matlab/Tutorials/python/Tutorials/Octave smoke-test (fastest sanity check):
cd .github/smoketests/octave
octave MSL_NotchFilter.mPython smoke-test:
cd .github/smoketests/python
python3 MSL_NotchFilter.pyFull Octave test suite:
cd TESTSUITE
octave --no-gui run_testsuite.mPython unit tests:
python3 -m unittest discover -s python/Tests -p "test_*.py" -vPull requests are welcome. Please:
TESTSUITE/ for non-trivial changes.Signed-off-by: Your Name in commit messages (DCO).openEMS is free software licensed under the GNU General Public License v3. See COPYING for the full text.
Copyright © 2010-2026 Thorsten Liebig and contributors.
No open issues yet, or sync has not completed.