- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在ThermoSysPro库中有一个StodolaTurbine组件的自定义参数,在涡轮组件的图 TableView 中,我可以看到自定义参数属于一条记录。但是这条记录没有参数,这种情况下如何添加一个自定义参数呢?
最佳答案
您设置的每个修饰符都会显示在参数窗口中。您不仅可以为参数设置修饰符,还可以为或多或少不是最终的所有内容设置修饰符:所有变量和组件实例也是如此,无论它们在参数窗口中是否可见。 Dymola 将在“自定义参数”部分显示此类修饰符。
有几种方法可以设置这样的修饰符:
在旧的 Dymola 版本中,这些修饰符仅显示在一般参数组中,这会导致混淆。因此他们将其移至“自定义参数”部分。
让我们使用下面的简单代码来演示三种不同的方法。
package Demo
model StepSine
Modelica.Blocks.Sources.Step step annotation (Placement(transformation(extent={{-20,20},{20,60}})));
Modelica.Blocks.Interfaces.RealOutput y annotation (Placement(transformation(extent={{100,-10},{120,10}})));
Modelica.Blocks.Math.Add add annotation (Placement(transformation(extent={{60,-10},{80,10}})));
Modelica.Blocks.Sources.Sine sine annotation (Placement(transformation(extent={{-20,-60},{20,-20}})));
equation
connect(add.y, y) annotation (Line(points={{81,0},{110,0}}, color={0,0,127}));
connect(step.y, add.u1) annotation (Line(points={{22,40},{40,40},{40,6},{58,6}}, color={0,0,127}));
connect(sine.y, add.u2) annotation (Line(points={{22,-40},{40,-40},{40,-6},{58,-6}}, color={0,0,127}));
end StepSine;
model Example
StepSine stepSine annotation (Placement(transformation(extent={{-8,-10},{12,10}})));
end Example;
end Demo;
这里我们创建了类 StepSine
,它只是向正弦信号添加一个阶跃。组件的任何参数都不会传播,但使用上述方法我们仍然可以在 Example
中设置它们。
使用文字图层
StepSine stepSine(add.k1=-1)
stepSine
的参数窗口。您获得了第一个自定义参数。使用“添加修饰符”
Example
中stepSine
的参数窗口step.height=1
并单击“确定”使用“显示组件”
stepSine
-> 显示组件sine
的参数窗口,输入例如3为振幅stepSine
的参数窗口。您获得了第三个自定义参数。关于modelica - 如何在 Dymola 中定义记录的自定义参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58941502/
我想知道是否有其他正则化技术(例如双曲正切)而不是 smoothStep函数存在于 Modelica 中。我处理我使用的复杂代码 smoothStep几次以避免在我的模型中喋喋不休;但是,我已经在我的
尽管 Modelica 是一种非因果建模语言,但我们学到了例如here它可以改变你写方程的方式。MutualInductor的代码模型在 Modelica.Electrical.Polyphase.B
我写了一个函数,返回值为记录类型。 通常我会使用这个函数通过一个初始方程来初始化一个记录类型的实例。 但是因为我想在时钟模型中使用这个函数,所以不可能有初始方程。 对我来说,这似乎是使用属性 star
我有一个本地模型,当我在 Dymola 中检查时,该模型声称有 35 个变量和 34 个未知数,而当我在 OMEdit 中检查完全相同的模型时,它的平衡率为 34/34。在确定什么算作变量时,是否包括
我有一个参数 z,我需要其值始终为 1。 model test Real parameter z = 1; end test; 当我拖放此模型并双击它时,参数选项卡将打开,我可以更改值。我怎样才能防止
我有一组关于不规则网格的数据。我通过插值来找到 f(x,y)。我在维基百科算法的帮助下实现了双线性插值。然而,它并不准确。我想实现双三次插值或双三次样条插值。我已经找到了双三次插值的算法,但我必须找到
我想提出一个我之前问过的关于 Modelica array of partial model 的问题。 。考虑以下两个 Controller 之间的切换模型。 model Switch input
如何使用 Modelica(OpenModelica、jModelica)为工厂和 Controller 的 C/C++ 例程实现控制系统设计的软件在环。您可以建议什么方法?我认为外部 C 函数会有所
我希望使用条件表达式减少具有超过 300000 个方程的大型通用模型,以便仅保留相关部分。为了说明这个问题,我有以下最小模型: model Test parameter Boolean level
我有一组必须进行插值的数据。我的第一个数据集包含每个 x1[:] 和 y1[:] 的 z1[:] 值。我必须将第二个数据集 x2[:], y2[:] w.r.t 插入到我的第一个数据集中以获得 z2[
我有一个参数 z,我需要其值始终为 1。 model test Real parameter z = 1; end test; 当我拖放此模型并双击它时,参数选项卡将打开,我可以更改值。我怎样才能防止
我有一组关于不规则网格的数据。我通过插值来找到 f(x,y)。我在维基百科算法的帮助下实现了双线性插值。然而,它并不准确。我想实现双三次插值或双三次样条插值。我已经找到了双三次插值的算法,但我必须找到
我正在尝试在模型的 equation 部分中实现一个简单的迭代猜测方案,但是,我收到以下错误:No viable alternative near token: while 在 OpenModelic
首先我想说我是 StackOverflow 和 Modelica 的新手。 我的目标是模拟旋转爆震发动机的喷油器系统。从本质上讲,这是一个从油箱到火箭发动机的管道系统。这个系统会根据实验设置而改变,所
我想知道是否有办法“调试”modelica 代码,我的意思是逐行调试代码,您可以看到变量如何变化,诸如此类? 我知道modelica代码被翻译成C,我只是想知道是否有可能以某种方式做到这一点,如果有,
我正在尝试根据电网电压控制并网光伏系统。 这个想法是这样的:当电网电压上升到 VMax 以上时,我想关闭系统 timeOff。当 timeOff 过去后,我想再次打开,但只有当电网电压低于 VMax
我正在尝试在 Modelica.Media 的基础上建立一个新的媒体模型。我的模型从 PartialMixtureMedium 扩展而来。当模拟一个开放的容器(取自 Modelica.Fluid)时,
在 Modelica 中计算连续信号的平均值 (mean) 和标准偏差 (StdDev) 的最佳方法是什么?应计算固定时间段 T 的均值和 StdDev;即,从 t-T 到 t。 最佳答案 下面是该问
在模拟相当复杂的稳态模型以模拟多回路制冷剂系统时,我收到来自 Dymola 的以下警告消息。 The following variables are iteration variables of th
我在 Modelica 上收到一条错误消息: All branches in if equation with non-parameter tests must have the same numbe
我是一名优秀的程序员,十分优秀!