Skip to content

Commit

Permalink
补充modelica中变量类型的说明
Browse files Browse the repository at this point in the history
  • Loading branch information
mingtaoli committed Oct 7, 2023
1 parent d455b45 commit 722b8cd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/VariableType.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,18 @@ name, Quantity type, Unit, Delta, Default Value, Min Value, Max Value.
其中Delta用来标记这个变量是否是差值,如果是,就会忽略偏移量。(例如,对于温度差异,需要在转换为开尔文时忽略摄氏度的偏移量)。

基于文本或“无单位”的变量类型携带的信息要少得多:只包括默认值和边界值,以及一个可选的纯文本计量单位,仅用于可读性,不参与任何单位转换的计算。

在modelica中,实际上也是存在变量类型定义的。比如说modelica的标准库有个Units包。在其SI里,定义了一系列的type,实际就是变量类型。比如:

```modelica
type Angle = Real (
final quantity="Angle",
final unit="rad",
displayUnit="deg");
```
代表Angle是个类型,实际上就是实数变量,单位是rad。显式单位是deg。

在三相交流电里头,还涉及到了复数。通常不用。暂时忽略。

此外Modelica的标准库的Units还定义非国际单位制的单位,以及单位转换。

0 comments on commit 722b8cd

Please sign in to comment.