Rotational mechanics

Library to model 1-dimensional, rotational mechanical systems

Rotational provides 1-dimensional, rotational mechanical components to model in a convenient way drive trains with frictional losses.

These components are modeled after the Modelica.Mechanics.Rotational library.

NOTE: these need more testing.

Basic models

Inertia

FunctionalModels.Lib.InertiaFunction

1D-rotational component with inertia

Rotational component with inertia at a flange (or between two rigidly connected flanges).

Inertia(flange_a::Flange; J::Real)
Inertia(flange_a::Flange, flange_b::Flange; J::Real)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]

Keyword/Optional Arguments

  • J::Real : Moment of inertia [kg.m^2]
source

Disc

FunctionalModels.Lib.DiscFunction

1-dim. rotational rigid component without inertia, where right flange is rotated by a fixed angle with respect to left flange

Rotational component with two rigidly connected flanges without inertia. The right flange is rotated by the fixed angle "deltaPhi" with respect to the left flange.

Disc(flange_a::Flange, flange_b::Flange; deltaPhi)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]

Keyword/Optional Arguments

  • deltaPhi::Signal : rotation of left flange with respect to right flange (= flangeb - flangea) [rad]
source

Spring

FunctionalModels.Lib.SpringFunction

Linear 1D rotational spring

A linear 1D rotational spring. The component can be connected either between two inertias/gears to describe the shaft elasticity, or between a inertia/gear and the housing (component Fixed), to describe a coupling of the element with the housing via a spring.

Spring(flange_a::Flange, flange_b::Flange; c::Real, phi_rel0 = 0.0)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]

Keyword/Optional Arguments

  • c: spring constant [N.m/rad]
  • phi_rel0 : unstretched spring angle [rad]
source

Damper

FunctionalModels.Lib.DamperFunction

Linear 1D rotational damper

Linear, velocity dependent damper element. It can be either connected between an inertia or gear and the housing (component Fixed), or between two inertia/gear elements.

Damper(flange_a::Flange, flange_b::Flange; d::Signal)
Damper(flange_a::Flange, flange_b::Flange, hp::HeatPort; d::Signal)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]
  • hp::HeatPort : heat port [K]

Keyword/Optional Arguments

  • d: damping constant [N.m.s/rad]
source

SpringDamper

FunctionalModels.Lib.SpringDamperFunction

Linear 1D rotational spring and damper in parallel

A spring and damper element connected in parallel. The component can be connected either between two inertias/gears to describe the shaft elasticity and damping, or between an inertia/gear and the housing (component Fixed), to describe a coupling of the element with the housing via a spring/damper.

SpringDamper(flange_a::Flange, flange_b::Flange, c::Signal, d::Signal)
SpringDamper(flange_a::Flange, flange_b::Flange, hp::HeatPort, c::Signal, d::Signal)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]
  • hp::HeatPort : heat port [K]

Keyword/Optional Arguments

  • c: spring constant [N.m/rad]
  • d: damping constant [N.m.s/rad]
source

IdealGear

FunctionalModels.Lib.IdealGearFunction

Ideal gear without inertia

This element characterices any type of gear box which is fixed in the ground and which has one driving shaft and one driven shaft. The gear is ideal, i.e., it does not have inertia, elasticity, damping or backlash. If these effects have to be considered, the gear has to be connected to other elements in an appropriate way.

IdealGear(flange_a::Flange, flange_b::Flange, ratio)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]

Keyword/Optional Arguments

  • ratio : transmission ratio (flangea / flangeb)
source

Miscellaneous

MBranchHeatPort

FunctionalModels.Lib.MBranchHeatPortFunction

Wrap argument model with a heat port that captures the power generated by the device. This is vectorizable.

MBranchHeatPort(flange_a::Flange, flange_b::Flange, hp::HeatPort,
                model::Function, args...)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]
  • hp::HeatPort : Heat port [K]
  • model::Function : Model to wrap
  • args... : Arguments passed to model
source

Sensors

SpeedSensor

FunctionalModels.Lib.SpeedSensorFunction

Ideal sensor to measure the absolute flange angular velocity

Measures the absolute angular velocity w of a flange in an ideal way and provides the result as output signal w.

SpeedSensor(flange::Flange; w::Signal)

Arguments

  • flange::Flange : left flange of shaft [rad]

Keyword/Optional Arguments

  • w::Signal: absolute angular velocity of the flange [rad/sec]
source

AccSensor

FunctionalModels.Lib.AccSensorFunction

Ideal sensor to measure the absolute flange angular acceleration

Measures the absolute angular velocity a of a flange in an ideal way and provides the result as output signal a.

SpeedSensor(flange::Flange; a::Signal)

Arguments

  • flange::Flange : left flange of shaft [rad]

Keyword/Optional Arguments

  • a::Signal: absolute angular acceleration of the flange [rad/sec^2]
source

Sources

SignalTorque

FunctionalModels.Lib.SignalTorqueFunction

Input signal acting as external torque on a flange

The input signal tau defines an external torque in [Nm] which acts (with negative sign) at a flange connector, i.e., the component connected to this flange is driven by torque tau.

SignalTorque(flange_a::Flange, flange_b::Flange; tau)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]

Keyword/Optional Arguments

  • tau : Accelerating torque acting at flangea relative to flangeb (normally a support); a positive value accelerates flange_a
source

QuadraticSpeedDependentTorque

FunctionalModels.Lib.QuadraticSpeedDependentTorqueFunction

Quadratic dependency of torque versus speed

Model of torque, quadratic dependent on angular velocity of flange. Parameter TorqueDirection chooses whether direction of torque is the same in both directions of rotation or not.

QuadraticSpeedDependentTorque(flange_a::Flange, flange_b::Flange;
                              tau_nominal::Signal, TorqueDirection::Bool, w_nominal::Signal)

Arguments

  • flange_a::Flange : left flange of shaft [rad]
  • flange_b::Flange : right flange of shaft [rad]

Keyword/Optional Arguments

  • tau_nominal::Signal : nominal torque (if negative, torque is acting as a load) [N.m]
  • TorqueDirection::Bool : same direction of torque in both directions of rotation
  • AngularVelocity::Signal : nominal speed [rad/sec]
source