---
url: /dyad/stable/stdlib/MultibodyComponents/examples/tests.SlipWheelOnSurface.md
description: >-
  Dyad tests.SlipWheelOnSurface docs.  Exercises the surface option of
  SlippingWheel/SlipWheelJoint. The wheel's surface_frame is driven directly: a
  flat road whose height oscilla...
---

# `tests.SlipWheelOnSurface` {#tests.SlipWheelOnSurface}

# Slip Wheel on a moving surface {#Slip-Wheel-on-a-moving-surface}

Exercises the `surface` option of `SlippingWheel`/`SlipWheelJoint`. The wheel's `surface_frame` is driven directly: a flat road whose height oscillates in time. The frame's x,z coordinates are left free, so the contact patch stays under the wheel (solved by the contact constraints) while the imposed y prescribes the road height. A spinning wheel (`der_angles[2] = 25`) rolls while the ground heaves.

## Usage {#Usage}

`MultibodyComponents.tests.SlipWheelOnSurface()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
# Slip Wheel on a moving surface

Exercises the `surface` option of `SlippingWheel`/`SlipWheelJoint`. The wheel's
`surface_frame` is driven directly: a flat road whose height oscillates in time.
The frame's x,z coordinates are left free, so the contact patch stays under the
wheel (solved by the contact constraints) while the imposed y prescribes the road
height. A spinning wheel (`der_angles[2] = 25`) rolls while the ground heaves.
"""
example component SlipWheelOnSurface
  world = MultibodyComponents.World() {}
  wheel = MultibodyComponents.SlippingWheel(surface = true, radius = 0.3, m = 2, mu_A = 0.95, mu_S = 0.5, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15, x(initial = 0.2), z(initial = 0.2), angles(initial = [0, 0, 0]), der_angles(initial = [0, 25, 0.1])) {}
relations
  # Road profile imposed on the wheel's surface frame (x,z free, y prescribed).
  wheel.surface_frame.r_0[2] = 0.02 * sin(2 * π * 3 * time)
  wheel.surface_frame.R = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
end
```

```dyad
"""
# Slip Wheel on a moving surface

Exercises the `surface` option of `SlippingWheel`/`SlipWheelJoint`. The wheel's
`surface_frame` is driven directly: a flat road whose height oscillates in time.
The frame's x,z coordinates are left free, so the contact patch stays under the
wheel (solved by the contact constraints) while the imposed y prescribes the road
height. A spinning wheel (`der_angles[2] = 25`) rolls while the ground heaves.
"""
example component SlipWheelOnSurface
  world = MultibodyComponents.World() {}
  wheel = MultibodyComponents.SlippingWheel(surface = true, radius = 0.3, m = 2, mu_A = 0.95, mu_S = 0.5, sAdhesion = 0.04, sSlide = 0.12, vAdhesion_min = 0.05, vSlide_min = 0.15, x(initial = 0.2), z(initial = 0.2), angles(initial = [0, 0, 0]), der_angles(initial = [0, 25, 0.1])) {}
relations
  # Road profile imposed on the wheel's surface frame (x,z free, y prescribed).
  wheel.surface_frame.r_0[2] = 0.02 * sin(2 * π * 3 * time)
  wheel.surface_frame.R = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
