Openmodelica如何获取模型输入和使用OMshell

问题描述

我是openModelica的新手

这是“有效的”,但是我想使用OMshell在此模型文件中输入

如何获取输入,而不是= 10; 我没有使用过函数,因为函数中不允许使用der()

  model Fluid
  parameter Real Fci(unit = "kg/h")=10 "Feed cold in/out";
  parameter Real Fhi(unit = "kg/h")=10 "Feed hot in/out";
  parameter Real Tci(unit = "K")=10 "Temp cold in";
  parameter Real Thi(unit = "K")=0 "Temp hot in";
  parameter Real Tho(unit = "K")=-1 "Temp hot out";
  parameter Real U(unit = "kg/Km^2s^2")=10 "Heat transfer coefficient";
  parameter Real Area(unit = "m^2")=10 "Area";
  parameter Real Volume(unit = "m^3")=10 "Volume";
  parameter Real Density(unit = "kg/m^3")=10 "Density"; 
  parameter Real Cp(unit = "Jkg^-1K-1")=10 "Specific Heat";
  
  Real Tco; 
equation
  der(Tco)=(Fci*CP*Density*(Tci-Tco)-U*Area*((Tci-Thi)-(Tco-Tho))/log((Tci-Thi)/(Tco-Tho)))/(Volume*CP*Density);    
  
end Fluid;

我想要这样的东西

enter image description here

我想要在OMshell中使用

>loadFile("Fluid.mo")
>Fluid(1,2,3,4,5,6,7,8,9,10)
>simulate(Fluid,startTime=0,stopTime=5)
>plot(Tco)

6

解决方法

您想要这个:

value

但是您应该可以使用:

loadFile("Fluid.mo")
Fluid(1,2,3,4,5,6,7,8,9,10)
simulate(Fluid,startTime=0,stopTime=5)
plot(Tco)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...