Lor*_*llo 3 modelica openmodelica
我想用这些单位创建一个变量:((rad/s)/((N/m)^0.5))
我尝试了很多设置,但仍然不起作用。
这是我最后一次尝试:
Real Cap_fact (quantity = "CapacityFactor", unit = "((rad/s)/((N/m)^0.5))");
Run Code Online (Sandbox Code Playgroud)
我也尝试过:
Real Cap_fact (final unit = ((rad/s)/((N/m)^0.5)));
Run Code Online (Sandbox Code Playgroud)
单位定义中不支持平方根,因为您必须使用整数作为指数。
Modelica 规范在第19.1 章“单位表达式的语法”中定义:
unit_factor:
unit_operand [ unit_exponent ]
unit_exponent:
[ "+" | "-" ] integer
The SI standard uses super-script for the exponentation, and does thus
not define any operator symbol for exponentiation. A unit_factor
consists of a unit_operand possibly suffixed by a possibly signed
integer number, which is interpreted as an exponent.
Run Code Online (Sandbox Code Playgroud)
^请注意,定义指数时还必须删除该字符。
| 归档时间: |
|
| 查看次数: |
69 次 |
| 最近记录: |