A scientific data management and simulation platform for high-field magnet research.
MagnetDB centralizes the configurations, operational data, simulation workflows and analytics of the high-field magnets operated at the Laboratoire National des Champs Magnétiques Intenses (LNCMI), CNRS. LNCMI is the french magnet user facility located on 2 sites -- Grenoble (LNCMI-G) and Toulouse (LNCMI-T).
It is the foundation for the digital-twin work being carried out under the ANR JNL-G project (2026–2030) and integrates with the Feel++ scientific computing framework developed at CEMOSIS.
The platform serves researchers, magnet designers, operators and lab directors with a single view of magnet configurations, real-time and historical operational data, simulation results, and predictive-maintenance signals.
The MagnetDB organization hosts the open-source components of the platform. Restricted components (in particular parts of MagnetTools) are kept in private repositories; built artifacts for those are distributed via the LNCMI internal apt depot and the feelpp/magnettools DockerHub image.
| Repository | Purpose |
|---|---|
python_magnetdb |
Django + FastAPI backend, PostgreSQL schema, REST API, background workers, S3/MinIO integration |
magnetdb-frontend |
Web frontend — currently migrating from Vue 2 to React 18 + TypeScript + Vite |
python_magnetapi |
Lightweight client library for the MagnetDB API |
| Repository | Purpose |
|---|---|
python_magnetgeo |
Polymorphic geometry definitions for LNCMI-G resistive and superconductor magnets |
python_magnetgmsh |
Mesh generation from python_magnetgeo definitions via Gmsh |
hifimagnet-salome |
CAD and Mesh Generation with SALOME tools (requires a valid MeshGems license) |
| Repository | Purpose |
|---|---|
python_magnetsetup |
Templating engine that turns a MagnetDB configuration into a Feel++ / HiFiMagnet simulation case |
python_magnetworkflow |
Orchestrated workflow: setup → CAD → mesh → run → archive |
hifimagnet-paraview |
ParaView plugins and post-processing scripts |
| Repository | Purpose |
|---|---|
python_magnetrun |
Parsing, curation and analysis of magnets operational data from the different control and monitoring systems -- namely Pupitre, PigBrother and Hybrid MCS recordings following internal LNCMI nomenclature |
magnet-scipy |
SciPy-based analytics for magnet operational data |
python_magnetcooling |
Cooling-loop and thermal-hydraulic modelling helpers |
| Repository | Purpose |
|---|---|
python_magnettools |
Python bindings to the C++ MagnetTools library (analytical magnet calculations) |
┌───────────────────────────────────────────────────┐
│ MagnetDB (Django + FastAPI) │
│ PostgreSQL · MinIO (S3) · Celery · LemonLDAP SSO │
└───────────────────────────────────────────────────┘
▲ ▲
┌──────────────────┘ └──────────────────┐
│ │
operational data simulation pipeline
│ │
python_magnetrun python_magnetsetup
│ │ │
curation Feel++ │ HiFiMagnet
ETL │ │
stats Orchestrated workflows
anomaly │ │
detection │ python_magnetgmsh
│ │ │
▼ ▼ ▼
Pupitre · PigBrother · Hybrid CAD · mesh · results · provenance
(MCS recordings, sshfs) (attachments in MinIO)
The platform follows a three-layer operational data architecture:
- Raw (sshfs, LNCMI-internal) → Curated Parquet on S3 (canonical interchange layer) → Derived statistics in PostgreSQL + S3.
- Documentation: see the docs site of the relevant repository (each component ships its own Sphinx / Antora site)
- Demo stack: a minimal Docker Compose setup (postgres + redis + minio + api + jupyter) is available in
python_magnetdbfor students and external evaluators - Container images: published to GitHub Container Registry (
ghcr.io/<org>/...) - HPC: Apptainer / Singularity images are available for SLURM / PBS / SGE clusters
If you are joining the project as a student or contributor, start with python_magnetdb and the demo Docker Compose stack — it gives you a working MagnetDB instance with a curated seed dataset in under five minutes.
[!NOTE] The demo stack is intended for evaluation and development purposes. It is not production-ready and should not be used to deploy a real MagnetDB instance.
[!NOTE] Container images may not be actually published to GHCR until the first stable release (v1.0.0) is tagged.
- Feel++ — finite-element framework used by HiFiMagnet for non-linear multiphysics magnet simulation
- Scimba — scientific machine-learning framework used in the JNL-G project for ROM and Neural Galerkin methods
- JNL-G (ANR AAPG2025) — Digital twin of the LNCMI-G installation; the project under which MagnetDB is being extended into a full digital-twin platform
- FASUM (ANR Equipex+) — 40 T all-superconducting user magnet at LNCMI-G; MagnetDB ingests its operational data
- EMFL — European Magnetic Field Laboratory; LNCMI-G is one of three EMFL member facilities
Contributions are welcome. Each repository has its own CONTRIBUTING.md describing coding standards, testing, and the pull-request workflow.
- Issues and pull requests are tracked per repository
- Larger architectural discussions happen in
python_magnetdbDiscussions - Releases follow semantic versioning
- Tagged releases are archived on Software Heritage and Zenodo with a DOI
The data managed by MagnetDB in the context of the JNL-G project is described in the project's Data Management Plan. JNL-G's data are operational data of the LNCMI-G installation — recordings produced by the magnet, power and cooling control systems while a magnet is energized. User experimental data (measurements performed by external user teams on their own samples) are out of scope and are governed by the EMFL DMP.
MagnetDB is developed at LNCMI (CNRS UPR 3228) in collaboration with CEMOSIS (Université de Strasbourg). Its development has received support from:
- ANR AAPG2025 JNL-G — Digital twin of the LNCMI-G
- H2020 ISABEL (Grant Agreement No 871106) — Improving the sustainability of the European Magnetic Field Laboratory
- ANR Equipex+ FASUM (ANR-21-ESRE-0027) — Forty Tesla Superconducting User Magnet
- CNRS institutional support to LNCMI as a national research infrastructure
- Lead developer: Christophe Trophime — christophe.trophime@lncmi.cnrs.fr
- LNCMI Grenoble: 25 avenue des Martyrs, 38000 Grenoble, France — lncmi.cnrs.fr
- Issues: please open them in the relevant repository of this organization
MagnetDB is open-source software. Public components are released under the Apache-2.0 or LGPL-3.0 license (see each repository for its exact terms). Documentation and demonstration datasets are released under CC0 or CC-BY-4.0.

