小编Lor*_*zen的帖子

在 DYMOLA 中显示注释中的参数

我有一个使用不同组件的仿真模型。为了快速了解所用参数,我使用注释功能通过以下方式显示某些模型参数(例如 m_flow_nominal):

textString="Nominal Flow Rate = %m_flow_nominal"
Run Code Online (Sandbox Code Playgroud)

在注释对话框中。哪个会发出类似的东西

标称流量 = 5

这对于整数参数非常有效。


我还有一个从其他值计算的参数。比如,让我们说一个身体的体积。当我尝试通过以下方式显示此参数时:

textString="Volume = %volume"
Run Code Online (Sandbox Code Playgroud)

我将给出计算体积的公式,而不是最终值。例如

体积 = a * b * c

在这种情况下如何显示体积的最终值,而不是公式?


这是实际问题:

  parameter Modelica.SIunits.Length xBorFie = 10 "Borefield length";
  parameter Modelica.SIunits.Length yBorFie = 30 "Borefield width";
  parameter Modelica.SIunits.Length dBorHol = 5 "Distance between two boreholes";

  parameter Integer nXBorHol = integer((xBorFie+dBorHol)/dBorHol) "Number of boreholes in x-direction";
  parameter Integer nYBorHol = integer((yBorFie+dBorHol)/dBorHol) "Number of boreholes in y-direction";
  final parameter Integer nBorHol = nXBorHol*nYBorHol "Number of boreholes";
Run Code Online (Sandbox Code Playgroud)

使用时

textString="Number …
Run Code Online (Sandbox Code Playgroud)

parameters annotations dymola

4
推荐指数
1
解决办法
167
查看次数

标签 统计

annotations ×1

dymola ×1

parameters ×1