Skip to main content
CoFmuPy logo


👋 About CoFmuPy

CoFmuPy is a Python library designed for rapid prototyping of digital twins through the co-simulation of Functional Mock-up Units (FMUs). It offers advanced master coordination features, such as solving algebraic loops between FMUs and managing the interaction between various simulation components. This library provides a seamless interface to orchestrate complex physics simulations and handle the data exchange between FMUs.

The documentation is available online: https://irt-saint-exupery.github.io/CoFmuPy

🐾 Installation

CoFmuPy is available on PyPI and can be installed using pip:

pip install cofmupy

🐍 Key Keatures

CoFmuPy provides a Python interface (with a graphical user interface under development) for configuring and running co-simulations of FMI-based systems, with a focus on coordinating interacting FMUs within complex digital twin architectures.

A high-level API allows users to easily define, execute, and visualize digital twins scenarios, while still enabling more advanced control when needed.

Building on the FMPy library as an FMI-compliant execution backend, CoFmuPy focuses on system-level co-simulation capabilities and advanced coordination logic. In particular, CoFmuPy provides the following key features:

  • Advanced master coordination for coupled FMUs: Native master algorithms orchestrate the execution of multiple interacting FMUs, ensuring coherent time advancement and stable system-level simulation across heterogeneous subsystems. Cyclic dependencies between FMUs (algebraic loops) are automatically detected and resolved using fixed-point strategies, supporting both Jacobi and Gauss–Seidel co-simulation schemes, with or without rollback. This enables the simulation of tightly coupled systems without manual intervention or model restructuring.

  • Explicit data exchange and synchronization mechanisms: CoFmuPy provides fine-grained control over data routing, synchronization, and signal propagation between FMUs, as well as between FMUs and external data sources or sinks.

  • Native integration of Python and AI components: Python-based models (e.g., machine learning or control logic) can be directly integrated into the co-simulation loop without immediate FMU export while still being FMI-compliant, enabling full integration of AI frameworks.

  • Declarative and reproducible configuration: Co-simulation systems are fully defined through a structured JSON configuration file, making experiments easy to reproduce, modify, and extend.

  • Graphical interface (coming soon): A user-friendly graphical interface will enable drag-and-drop system construction, FMU interconnection, remote interfaces configuration, algorithm selection, and co-simulation control.

📚 Citation

If you use CoFmuPy in your research or publications, please cite:

@inproceedings{friedrich2025cofmupy,
  title={CoFmuPy: A Python Framework for Rapid Prototyping of FMI-based Digital Twins},
  author={Friedrich, Corentin and Lombana, Andr{\'e}s and Fasquel, J{\'e}r{\^o}me and Schlick, Charlie and Bennani, Nora and Mendil, Mouhcine},
  booktitle={The 2nd International Conference on Engineering Digital Twins},
  year={2025}
}

✒️ Contributing

Feel free to propose your ideas or come and contribute with us on the CoFmuPy library!

🙏 Acknowledgments

This project was funded by the European Union under GA no 101101961 - HECATE. Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or Clean Aviation Joint Undertaking. Neither the European Union nor the granting authority can be held responsible for them. The project is supported by the Clean Aviation Joint Undertaking and its Members.

HECATE logo IRT Saint Exupéry logo

📝 License

The package is released under the 2-Clause BSD License.

Metadata

Release files for cofmupy 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cofmupy 1.0.0
File Size Uploaded
cofmupy-1.0.0.tar.gz 104.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cofmupy 1.0.0
File Interpreter ABI Platform
cofmupy-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 282.5 kB

Release files / cofmupy-1.0.0.tar.gz

Download URL cofmupy-1.0.0.tar.gz
Size 104.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fc13703edbc1d8f6e5d9c653890062223ace3120dc93c19e4b846b91b69b6a07
BLAKE2b-256 checksum
How to use checksums
7a47b0773051099be00140ed25ba0c1efedf56f9bba30030aa3f2e1c2705d459
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / cofmupy-1.0.0-py3-none-any.whl

Download URL cofmupy-1.0.0-py3-none-any.whl
Size 177.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8acd8d71656106f9c19c6c05b1db62a3280cc38c202cfead0abb5f9d58808ba
BLAKE2b-256 checksum
How to use checksums
cb3d0a0af5c826df3bd242ff3c43c1c4f3e0c162d1ddc5f26a126b48e065e176
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page