---
url: /dyad/stable/stdlib/MultibodyComponents/examples/tests.PrescribedVelocityTest.md
description: >-
  Dyad tests.PrescribedVelocityTest docs.  A body whose frame_a is driven by a
  PrescribedVelocity component with constant velocity inputs. The body should
  move with constant velocity ...
---

# `tests.PrescribedVelocityTest` {#tests.PrescribedVelocityTest}

# Prescribed Velocity Test {#Prescribed-Velocity-Test}

A body whose `frame_a` is driven by a `PrescribedVelocity` component with constant velocity inputs. The body should move with constant velocity in each axis, starting from `r_start`.

## Usage {#Usage}

`MultibodyComponents.tests.PrescribedVelocityTest()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
# Prescribed Velocity Test

A body whose `frame_a` is driven by a `PrescribedVelocity` component with
constant velocity inputs. The body should move with constant velocity in
each axis, starting from `r_start`.
"""
example component PrescribedVelocityTest
  world = MultibodyComponents.World() {}
  prescribed = MultibodyComponents.PrescribedVelocity(r_start = [0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, r_cm = [0, 0, 0]) {}
relations
  prescribed.v_x = 1.0
  prescribed.v_y = 2.0
  prescribed.v_z = 0.5
  connect(prescribed.frame_b, body.frame_a) {}
end
```

```dyad
"""
# Prescribed Velocity Test

A body whose `frame_a` is driven by a `PrescribedVelocity` component with
constant velocity inputs. The body should move with constant velocity in
each axis, starting from `r_start`.
"""
example component PrescribedVelocityTest
  world = MultibodyComponents.World() {}
  prescribed = MultibodyComponents.PrescribedVelocity(r_start = [0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, r_cm = [0, 0, 0]) {}
relations
  prescribed.v_x = 1.0
  prescribed.v_y = 2.0
  prescribed.v_z = 0.5
  connect(prescribed.frame_b, body.frame_a) {}
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`Body`](tests.PrescribedVelocityTest.md)

  * [`PrescribedVelocity`](tests.PrescribedVelocityTest.md)

  * [`World`](tests.PrescribedVelocityTest.md)
