我对DrModelica中的van der Pol示例进行了以下修改:
model FPStirling "Free Piston Stirling engine model"
Real x(start = 1,fixed = true);
Real v(start = 1,fixed = true);
Real T(start = 1,fixed = true);
equation
der(x) = v;
dev(v) = T/x-1;
dev(T) = 1 - x;
end FPStirling;
它计算并返回:{FPStirling}
然后我运行:simulate(FPStirling, startTime=0, stopTime=25 )
但是我得到了输出:
record SimulationResult
resultFile = "",
messages = "Failed to build model: FPStirling"
end SimulationResult;
OMC-ERROR:
"[7:3-7:17] Error: Class dev not found in scope FPStirling (looking for a function or record).
Error: Error occurred while flattening model FPStirling
"
会不会是路径问题?
发布于 2021-03-22 17:12:12
你真的在某个地方定义了一个函数dev
吗?或者这可能是der
的拼写错误。
阿迪尔。
https://stackoverflow.com/questions/66739657
复制相似问题