【发布时间】:2021-10-14 13:58:25
【问题描述】:
Dymola 模拟的结果是 .mat 文件,可能很大。这里是一个Power Plant模型的一系列结果,仿真时间间隔是0-100000s,但是我只需要90000到100000s之间的数据,那么有没有什么办法让Dymola只输出90000到100000s的数据?
【问题讨论】:
Dymola 模拟的结果是 .mat 文件,可能很大。这里是一个Power Plant模型的一系列结果,仿真时间间隔是0-100000s,但是我只需要90000到100000s之间的数据,那么有没有什么办法让Dymola只输出90000到100000s的数据?
【问题讨论】:
Dymola 用户手册中有一节叫做“输出点的可变频率”。在那里你会找到关于Advanced.Simulation.VariableInterval=true 和类似声明的解释
when time >=… then
Dymola.Simulation.SetOutputInterval(…);
end when;
将使您能够根据模拟时间设置输出间隔。
那里显示的例子是:
model VariableOutputInterval "demonstrate the use of variable output interval in a model"
Real x;
equation
x = sin(10*time);
when initial() then
Dymola.Simulation.SetOutputInterval(0.1);
end when;
when time >= 0.5 then
Dymola.Simulation.SetOutputInterval(0.05);
end when;
when time >= 1.1 then
Dymola.Simulation.SetOutputInterval(0.002);
end when;
end VariableOutputInterval;
还有两个注意事项:
【讨论】: