-
Notifications
You must be signed in to change notification settings - Fork 178
Open
Description
Describe the bug
When exporting models containing valves from Dymola 2025 to fmu, they cannot be run with FMPy 0.3.27 because the unit of the flow coefficient (m(1/2).kg(1/2)) is missing in the modelDescription.xml.
To Reproduce
Steps to reproduce the behavior:
- Open model 'Buildings.Fluid.Actuators.Valves.Examples.TwoWayValves'
- Export FMU (tried 2.0 and 3.0)
- Run python script:
from fmpy import simulate_fmu
simulate_fmu('TwoWayValves.fmu') - See the error:
ValidationError: Failed to validate modelDescription.xml:- The unit "m(1/2).kg(1/2)" of variable "valLin.Kv_SI" (line 667) is not defined.
[...]
- The unit "m(1/2).kg(1/2)" of variable "valLin.Kv_SI" (line 667) is not defined.
Expected behavior
No error should occur. The missing unit can manually be added in the modelDescription.xml to avert the error :
<Unit
name="m(1/2).kg(1/2)"/>
Version
- Modelica Buildings Library: 12.1.0
- Modelica simulation environment: Dymola 2025x Refresh 1
- FMPy 0.3.27
- Windows 11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels