Group Abstract Group Abstract

Message Boards Message Boards

Applying Limits to a Continuous Variable in SystemModeler

GROUPS:

Greetings to all,

I'm trying to model an actuator. When I use the following line of code to define the limits of the extended and retracted length of the actuator, I get the following graph:

s_rel=smooth(0, if strokeUpperLimit then l_cyl else if strokeLowerLimit then l_cyl + l_rod else flange_a.s - flange_b.s);

Results obtained by fixing one end and applying force on the other end

What is the best way to put limits to a variable ?

POSTED BY: Mohamed Mahmoud
Answer
4 months ago

It's hard to give advice based on one line of a model code without the context. (Which are the parameters, variables, which interfaces are involved, etc.) I'd recommend to take a look at: Modelica.Mechanics.Translational.Components.MassWithStopAndFriction which includes limits to where the mass can travel: Example using the mass with stop

POSTED BY: Johan Rhodin
Answer
4 months ago