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

divided by zero

divided by zero

Hello

I have a problem with a following equation (I think).
When I run the calculation, openmodelica warns me of a division by zero when calculating a reynolds.
So I think that this comes from the mu_in variable which is not initialized during the launch of the computation at t = 0s.

ReynoldsNumber = (if Vdot <> 0 then d_in * abs (Vdot / A) * Diameter / mu_in else 1);

Can I define an initialization in the first part of the code? I have to reconsider the calculation of the reynolds?

I put part of the code attached to this post.
problem-divided-0.zip

There are 0 guests and 0 other users also viewing this topic