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

Ideal Clutch

Ideal Clutch

I'd like to model an ideal clutch, as this user already tried to do here
http://www.modelica-forum.com/forums/in … &p=289

The clutch should connect two flanges when locked, and let the flanges spin freely when not.
The core concept is this

Code:


  if pre(locked) then
    der(flange_a.phi) = der(flange_b.phi);
    flange_a.tau + flange_b.tau = 0;
  else
    flange_a.tau = 0;
    flange_b.tau = 0;
  end if;

but this always give me the following error:
division by zero at time 0, (a=-3.5) / (b=0), where divisor b expression is: if $PRE.clutchDiscrete1.locked then 0.0 else -1.0

I tried with many different scenarios, but I always get this error.
I attach the demo code
IdealClutch.mo

Please: any advice will be greatly appreciated

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