Code_Saturne FMU Export: User Feedback and Developer Insights
Posted: Tue May 26, 2026 10:30 am
Code_Saturne FMU Export: User Feedback and Developer Insights
This thread summarizes a recent email exchange between Félix Marsollier (SIL3X) and Yvan Fournier (EDF, Code_Saturne support team) regarding the FMU (Functional Mock-up Unit) export functionality in Code_Saturne. The discussion covers technical questions, current limitations, and future perspectives for FMU support in Code_Saturne.
1. Context and Use Cases
Félix Marsollier (SIL3X) shared his team’s experience and use cases for Code_Saturne’s FMU export:
A. FMU Execution and Portability
Question:
Is it possible to run the FMU on machines without Code_Saturne installed?
Answer (Yvan Fournier):
Question:
Is the list of supported FMI tags in the documentation exhaustive? If not, where can we find a complete list?
Answer:
Question:
Are there plans to upgrade to FMI 3.x? SIL3X is interested in:
3. Future Perspectives
4. Open Questions for the Community
5. How to Contribute
Acknowledgments
Special thanks to Yvan Fournier and the Code_Saturne support team for their responsive and detailed feedback. SIL3X is grateful for the open-source availability of Code_Saturne and looks forward to collaborating with the community.
Last updated: May 26, 2026
Original discussion: Email exchange between SIL3X and EDF (March 2026).
This thread summarizes a recent email exchange between Félix Marsollier (SIL3X) and Yvan Fournier (EDF, Code_Saturne support team) regarding the FMU (Functional Mock-up Unit) export functionality in Code_Saturne. The discussion covers technical questions, current limitations, and future perspectives for FMU support in Code_Saturne.
1. Context and Use Cases
Félix Marsollier (SIL3X) shared his team’s experience and use cases for Code_Saturne’s FMU export:
- Standalone FMU: SIL3X aims to create self-contained FMUs (without requiring Code_Saturne to be installed on the target machine). They achieved this by recompiling Code_Saturne using Spack and embedding the binary in the FMU’s Resources directory, referenced via a relative path in the .xml file.
- Target Applications:
- Client use: Enable non-experts to rerun 3D simulations by modifying boundary conditions (static or dynamic).
- System coupling: Strong coupling between 3D CFD and 0D/1D system models.
A. FMU Execution and Portability
Question:
Is it possible to run the FMU on machines without Code_Saturne installed?
Answer (Yvan Fournier):
- By default, the FMU expects Code_Saturne to be installed on the machine.
- Workaround: Use a shared file system between the FMU and Code_Saturne machines to exchange connection details (hostname/socket + random key).
- Alternative: Modify the FMU (code_saturne.cpp/_init_client) to use a hardcoded hostname and scp commands instead of writing a control_file locally.
Question:
Is the list of supported FMI tags in the documentation exhaustive? If not, where can we find a complete list?
Answer:
- No exhaustive list is currently available.
- Mandatory tag: CoSimulation (only supported mode).
- Unsupported tags: DefaultExperiment, ModelStructure, TypeDefinitions, UnitDefinitions (Code_Saturne assumes SI units; no unit conversion is handled in the FMU).
- Supported tags: Likely limited to ScalarVariable for now.
- Perspective: Supporting additional tags (e.g., event handling, input interpolation, state variable derivatives, non-convergence feedback) is case-dependent and varies in complexity:
- Simple cases: e.g., providing state variable derivatives as (f(tn+1) - f(t))/dt.
- Complex cases: e.g., finer derivative calculations or granular non-convergence feedback (currently, non-convergence stops the simulation; allowing it to continue and report the issue may require significant changes).
Question:
Are there plans to upgrade to FMI 3.x? SIL3X is interested in:
- Matrix inputs/outputs (instead of only scalars/booleans).
- Scheduled execution mode (for real-time applications, where applicable).
- No current plans to officially support FMI 3.0, as existing projects rely on FMI 2.x.
- Feasibility:
- A basic FMI 3.0 port could be achieved by renaming fmi2 to fmi3 in the code (as a first step).
- Full support (e.g., for matrices) would require extending both the FMU and the Code_Saturne solver.
- Collaboration: Yvan Fournier expressed openness to guiding users who wish to test FMI 3.0 adaptations, but maintenance would require community involvement (e.g., contributors/users with FMI 3.0 projects).
3. Future Perspectives
- FMI 3.0: SIL3X plans to investigate modifying the module to support FMI 3.0 while maintaining backward compatibility with FMI 2.x.
4. Open Questions for the Community
- FMU Portability: Have other users successfully created standalone FMUs? What approaches did you use?
- FMI 3.0: Are there other teams interested in collaborating on FMI 3.0 support (e.g., for matrix I/O or scheduled execution)?
- Tag Support: Which FMI tags would be most useful for your applications? Are there workarounds for unsupported features?
5. How to Contribute
- Testing: Users are encouraged to experiment with FMI 3.0 adaptations and share feedback.
- Development: Contributions to extend FMU functionality (e.g., new tags, matrix support) are welcome.
- Forum Discussion: Continue the conversation in this thread or create new topics for specific technical challenges.
Acknowledgments
Special thanks to Yvan Fournier and the Code_Saturne support team for their responsive and detailed feedback. SIL3X is grateful for the open-source availability of Code_Saturne and looks forward to collaborating with the community.
Last updated: May 26, 2026
Original discussion: Email exchange between SIL3X and EDF (March 2026).