Openmodelica如何获取模型的输入并使用OMshell
我是openModelica的新手 这是“工作”,但我想使用OMshell在这个模型文件中进行输入 如何输入而不是=10; 我没有使用函数,因为函数中不允许使用der()Openmodelica如何获取模型的输入并使用OMshell,openmodelica,Openmodelica,我是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&
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;
我想要这样的东西
我要把这个放在地狱里
>loadFile("Fluid.mo")
>Fluid(1,2,3,4,5,6,7,8,9,10)
>simulate(Fluid,startTime=0,stopTime=5)
>plot(Tco)
您想要这个:
loadFile("Fluid.mo")
Fluid(1,2,3,4,5,6,7,8,9,10)
simulate(Fluid,startTime=0,stopTime=5)
plot(Tco)
但您应该能够使用:
loadFile("Fluid.mo")
simulate(Fluid,startTime=0,stopTime=5,simflags="-override Fci=1,Fhi=2")
plot(Tco)