We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General

General

I try to run a Functional Mock-up Interface (FMI) Co-simulation in CFX. My Functional Mock-up Unit (FMU) specifies units for the input and output variables, but CFX sees them as unitless. What is the reason for this and is there a workaround?

    • FAQFAQ
      Participant

      If your FMU is written in Modelica, it will probably specify units for the input and output variables, e.g., like this on the Modelica side: Modelica.Blocks.Interfaces.RealInput InputA(unit=”W/m2″) which will be translated to something like the following in the .xml file of the FMU: Due to a known issue with its internal FMU library, CFX will not carry over the units of such variables correctly in versions up to CFX 2019 R2 and thus the variables are shown and treated as unitless. In Release 2019 R3, the issue will be corrected and the variables will carry the units that have been specified on the Modelica side. As a workaround, you can make the value that CFX passes to the FMU “artificially” unitless by multiplying them with the reciprocal value of its unit. For the example above, InputA corresponds to a heat flux with unit [W m^-2], so you need to multiply the value that is computed by CFX with 1 [m^2 W^-1], e.g. like this: LIBRARY: CEL: &replace FUNCTION: myFMU FMU File Name = D:/myPath/myFMU.fmu FMUI Function = True Option = Functional Mockup Unit Instance ARGUMENT VALUE: InputA Expression Value = areaAve(Wall Heat Flux)@WallA*1[m^2 W^-1] Result Units = [] Value Name = InputA END END END END