Search code examples
modelicadymola

How to trace the parameters and equations that are used to calculate the mass on the pipeline in Dymola?


The components in Modelica contain equations, parameters which are used to calculate the state and variables for the whole system. For example, in a power plant model, the key variables are pressure, enthalpy, and mass flow rate. Assuming I am interested in the mass flow on some pipeline, how could I trace the equations and parameters that are used to calculate the mass flow rate on this pipeline?

enter image description here


Solution

  • In Simulation Setup, Translation, activate "Provide variable dependencies for plotting", this is equal to setting the flag Advanced.GenerateVariableDependencies := true;. In the results you can then right-click on the variable and click "Plot Dependencies", and you will see the equation how it was calculated.

    enter image description here

    As an alternative, in Simulation Setup, Translation, activate "Generate listing of translated Modelica code in dsmodel.mof" and then search for the variable name in that dsmodel.mof file.