FMU Export & Co-Simulation
Export the building model as an FMU (Functional Mock-up Unit, FMI 2.0 Co-Simulation), configure input and output variables in the FMU generator, and run coupled simulations with MasterSim
Overview
VICUS Buildings can export the building model as an FMU (Functional Mock-up Unit). The FMU encapsulates the NANDRAD solver together with the project and can be coupled with other models in FMI-capable co-simulation environments — for example plant, control, or ground models. The generated FMU conforms to FMI 2.0 for Co-Simulation.
Exporting an FMU
The export is started via the button Export FMU… (Shift+F4) in the start panel of the Dynamic Simulation page (simulation view, button
Simulation, F10). The tooltip describes the function: “Creates an FMU (Functional Mock-Up Unit) for co-simulation, which can be used for coupled simulations with external tools.”
The workflow:
- VICUS Buildings performs the same pre-checks as when starting a simulation and generates the NANDRAD project.
- The NANDRAD FMU generator then opens — a dialog integrated into VICUS Buildings that is pre-populated directly with the generated NANDRAD project (the FMU generator’s interface is currently only available in English).
In the FMU generator you configure:
- Model name (Model name:) and target directory (Target directory:) or FMU file path,
- Input variables and Output variables of the FMU — filterable by variable name and description. Suitable inputs are, for example, heat loads or setpoint temperatures, and suitable outputs are room temperatures and heat flows; the available variables correspond to the FMI interface quantities of the NANDRAD model.
- Options such as using display names for FMI variables and writing the FMU specification back into the NANDRAD project file.
The “Generate FMU” button packages the project, climate data, and solver library into the .fmu file.
Note: If the project itself already requires a coupled simulation (see below), a warning appears during export that the exported FMU contains only the NANDRAD core model and no coupled model parts (e.g. pipe-ground models).
Coupled simulation with MasterSim
Certain model components automatically require a co-simulation because they are computed as a separate FMU — in VICUS this concerns in particular heat networks with a coupled ground model (pipe-soil coupling, ground-coupled probe/collector models). In this case, when starting the simulation, VICUS Buildings creates a MasterSim project file (.msim) alongside the NANDRAD project and, instead of the NANDRAD solver, starts the bundled co-simulation master MasterSimulator. The FMUs involved are placed in the fmus/ subfolder of the result directory. For the user this runs transparently via the same Start simulation button.
Good to know:
Before exporting the FMU, define the required outputs and check the model with a test initialization — the FMU contains exactly the exported NANDRAD project, and input errors would otherwise only show up when importing into the co-simulation environment.
Editorial note: CO2 balance co-simulation
The program code additionally contains a dialog for co-simulation with CO2 balances and CO2-based ventilation control (generating a CO2-balance FMU together with a MasterSim project). This dialog is not accessible via any menu in the current version and is therefore not documented further here.