Skip to content
LIBRARY
Components.RollingResistance.md

Components.RollingResistance

Resistance of a rolling wheel.

Simplified model of rolling resistance dependent on vertical wheel load (due to gravity, i.e. static only), inclination and rolling resistance coefficient.

Matches MSL Modelica.Mechanics.Translational.Components.RollingResistance. Since Dyad does not support conditional connectors, the cr and inclination inputs are always visible. Connect them to BlockComponents.Sources.Constant blocks for constant values.

The nominal (unregularised) rolling resistance force is:

fnominal=CrcdotfWeightcdotcos(arctan(textinclination))

The rolling resistance is independent of speed but changes direction with velocity. To avoid numerical problems near zero velocity the force is regularised within [-v0, v0]. The regularisation type is selected by the structural parameter reg (see Regularization enum).

Connect the support flange to a Fixed component for grounded behaviour.

This component extends from TranslationalComponents.Interfaces.PartialForce

Usage

TranslationalComponents.Components.RollingResistance(fWeight, v0=0.1)

Parameters:

NameDescriptionUnitsDefault value
regType of regularisationTranslation...ation.Exp()
fWeightWheel load due to gravityN
v0Regularisation below v0m/s0.1

Connectors

  • flange - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)

  • support - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)

  • cr - This connector represents a real signal as an input to a component (RealInput)

  • inclination - This connector represents a real signal as an input to a component (RealInput)

Variables

NameDescriptionUnits
sDistance between flange and support (= flange.s - support.s)m
fAccelerating force acting at flange (= flange.f)N
vVelocity of flange with respect to support (= der(s))m/s
f_nominalNominal rolling resistance force without regularisationN

Behavior

julia
using TranslationalComponents #hide
using ModelingToolkit #hide
@variables fWeight #hide
@variables v0 #hide
@named sys = TranslationalComponents.Components.RollingResistance(fWeight=fWeight, v0=v0) #hide
full_equations(sys) #hide
<< @example-block not executed in draft mode >>

Source

dyad
"""
Resistance of a rolling wheel.

Simplified model of rolling resistance dependent on vertical wheel load
(due to gravity, i.e. static only), inclination and rolling resistance
coefficient.

Matches MSL `Modelica.Mechanics.Translational.Components.RollingResistance`.
Since Dyad does not support conditional connectors, the `cr` and
`inclination` inputs are always visible. Connect them to
`BlockComponents.Sources.Constant` blocks for constant values.

The nominal (unregularised) rolling resistance force is:
```math
f_{nominal} = -C_r \\cdot f_{Weight} \\cdot \\cos(\\arctan(\\text{inclination}))
```

The rolling resistance is independent of speed but changes direction with
velocity. To avoid numerical problems near zero velocity the force is
regularised within `[-v0, v0]`. The regularisation type is selected by
the structural parameter `reg` (see `Regularization` enum).

Connect the `support` flange to a `Fixed` component for grounded behaviour.
"""
component RollingResistance
  extends TranslationalComponents.Interfaces.PartialForce
  "Rolling resistance coefficient"
  cr = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 150, "x2": 50, "y2": 250}}}}
  "Inclination = tan(angle)"
  inclination = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 700, "x2": 50, "y2": 800}}}}
  "Wheel load due to gravity"
  parameter fWeight::Dyad.Force
  "Type of regularisation"
  structural parameter reg::TranslationalComponents.Components.Regularization = TranslationalComponents.Components.Regularization.Exp()
  "Regularisation below v0"
  parameter v0::Velocity(min = eps(Float64)) = 0.1
  "Velocity of flange with respect to support (= der(s))"
  variable v::Velocity
  "Nominal rolling resistance force without regularisation"
  variable f_nominal::Dyad.Force
relations
  v = der(s)
  f_nominal = -cr * fWeight * cos(atan(inclination))
  switch reg
    case Exp
      f = -f_nominal * (2 / (1 + exp(-v / (0.01 * v0))) - 1)
    case Sine
      f = -f_nominal * ifelse(abs(v) >= v0, sign(v), sin(π / 2 * v / v0))
    case Linear
      f = -f_nominal * ifelse(abs(v) >= v0, sign(v), v / v0)
    case Cosine
      f = -f_nominal * ifelse(abs(v) >= v0, sign(v), sign(v) * (1 - cos(π / 2 * v / v0)))
  end
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/RollingResistance.svg"}}
}
end
Flattened Source
dyad
"""
Resistance of a rolling wheel.

Simplified model of rolling resistance dependent on vertical wheel load
(due to gravity, i.e. static only), inclination and rolling resistance
coefficient.

Matches MSL `Modelica.Mechanics.Translational.Components.RollingResistance`.
Since Dyad does not support conditional connectors, the `cr` and
`inclination` inputs are always visible. Connect them to
`BlockComponents.Sources.Constant` blocks for constant values.

The nominal (unregularised) rolling resistance force is:
```math
f_{nominal} = -C_r \\cdot f_{Weight} \\cdot \\cos(\\arctan(\\text{inclination}))
```

The rolling resistance is independent of speed but changes direction with
velocity. To avoid numerical problems near zero velocity the force is
regularised within `[-v0, v0]`. The regularisation type is selected by
the structural parameter `reg` (see `Regularization` enum).

Connect the `support` flange to a `Fixed` component for grounded behaviour.
"""
component RollingResistance
  "Flange of component"
  flange = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Support/housing of component"
  support = Flange() {"Dyad": {"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050}}}}
  "Distance between flange and support (= flange.s - support.s)"
  variable s::Length
  "Accelerating force acting at flange (= flange.f)"
  variable f::Dyad.Force
  "Rolling resistance coefficient"
  cr = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 150, "x2": 50, "y2": 250}}}}
  "Inclination = tan(angle)"
  inclination = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 700, "x2": 50, "y2": 800}}}}
  "Wheel load due to gravity"
  parameter fWeight::Dyad.Force
  "Type of regularisation"
  structural parameter reg::TranslationalComponents.Components.Regularization = TranslationalComponents.Components.Regularization.Exp()
  "Regularisation below v0"
  parameter v0::Velocity(min = eps(Float64)) = 0.1
  "Velocity of flange with respect to support (= der(s))"
  variable v::Velocity
  "Nominal rolling resistance force without regularisation"
  variable f_nominal::Dyad.Force
relations
  s = flange.s - support.s
  support.f = -flange.f
  f = flange.f
  v = der(s)
  f_nominal = -cr * fWeight * cos(atan(inclination))
  switch reg
    case Exp
      f = -f_nominal * (2 / (1 + exp(-v / (0.01 * v0))) - 1)
    case Sine
      f = -f_nominal * ifelse(abs(v) >= v0, sign(v), sin(π / 2 * v / v0))
    case Linear
      f = -f_nominal * ifelse(abs(v) >= v0, sign(v), v / v0)
    case Cosine
      f = -f_nominal * ifelse(abs(v) >= v0, sign(v), sign(v) * (1 - cos(π / 2 * v / v0)))
  end
metadata {
  "Dyad": {"icons": {"default": "dyad://TranslationalComponents/RollingResistance.svg"}}
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses