Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

noEvent() and smooth()

noEvent() and smooth()

Hey guys,

I am new to modelica and I have a question about the smooth operator.

What is the acutal usage of smooth().

The description of a smooth()  I found reads like:

"Hey, use it instead of noEvent because of performence. But sometimes you still need noEvent, but we do not tell you when  exactly, LOL."

"The smooth operator should be used instead of noEvent, in order to avoid events for efficiency reasons. A tool is free to not generate events for expressions inside smooth. However, smooth does not guarantee that no events will be generated, and thus it can be necessary to use noEvent inside smooth. [Note that smooth does not guarantee a smooth output if any of the occurring variables change discontinuously."

Re: noEvent() and smooth()

https://mbe.modelica.university/behavio … ete/decay/
https://mbe.modelica.university/behavio … te/events/

Hi, above link give you an example and can better explain the different than me. Hope it helps.

Edited by: Arinomo23 - Nov-08-19 09:01:48

Re: noEvent() and smooth()

It is hard for a Modelica compiler to reliably determine that such a function is continuous and has continuous derivatives. For this reason, Modelica includes the smooth operator to explicitly express such conditions

But how exactly does the smooth operator solve the problem?

What I understood is that the smooth operator lets the solver know that the Expression can be continuous differentiated p times.

I think my problem is that I do not know how exactly modelica solves the equations, Maybe you have a link that describes this?

There are 0 guests and 0 other users also viewing this topic
You are here: