何时在 Modelica 语言中使用 noEvent 运算符? [英] When to use noEvent operator in Modelica language?

查看:66
本文介绍了何时在 Modelica 语言中使用 noEvent 运算符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Modelica 中的 noEvent 运算符不使用迭代来查找触发事件的精确时刻.

这似乎会导致计算错误,这是我在以下网站上找到的示例

解决方案

基于两种不同的事件处理方式.如果使用 noEvent 算子,积分不会停止,但数值求解器假设函数应该是光滑的,如果函数不光滑,就会出现数值误差.

The noEvent operator in Modelica doesn't use iteration to find the precise time instant in which the event was triggered.

It seems this would cause calculation error, here is an example I find on the following website https://mbe.modelica.university/behavior/discrete/decay/ So Do I have to ensure the function is smooth when using noEvent operator? What's the purpose of using noEvent operator if it can't ensure accuracy?

解决方案

Based on the two different ways of dealing with the event. If using noEvent operator, there is no halt of the integration, but the numerical solver assumes that the function should be smooth, with unsmooth functions, there would be numerical errors.

这篇关于何时在 Modelica 语言中使用 noEvent 运算符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆