---
url: /dyad/stable/stdlib/MultibodyComponents/examples/tests.PrescribedAccelerationTest.md
description: >-
  Dyad tests.PrescribedAccelerationTest docs.  A body whose frame_a is driven by
  a PrescribedAcceleration component with constant acceleration inputs. Position
  should evolve as r(t) = r_s...
---

# `tests.PrescribedAccelerationTest` {#tests.PrescribedAccelerationTest}

# Prescribed Acceleration Test {#Prescribed-Acceleration-Test}

A body whose `frame_a` is driven by a `PrescribedAcceleration` component with constant acceleration inputs. Position should evolve as `r(t) = r_start + v_start*t + 0.5*a*t^2` and velocity as `v(t) = v_start + a*t`.

## Usage {#Usage}

`MultibodyComponents.tests.PrescribedAccelerationTest()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
# Prescribed Acceleration Test

A body whose `frame_a` is driven by a `PrescribedAcceleration` component
with constant acceleration inputs. Position should evolve as
`r(t) = r_start + v_start*t + 0.5*a*t^2` and velocity as
`v(t) = v_start + a*t`.
"""
example component PrescribedAccelerationTest
  world = MultibodyComponents.World() {}
  prescribed = MultibodyComponents.PrescribedAcceleration(r_start = [0, 0, 0], v_start = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, r_cm = [0, 0, 0]) {}
relations
  prescribed.a_x = 0.0
  prescribed.a_y = 2.0
  prescribed.a_z = -1.0
  connect(prescribed.frame_b, body.frame_a) {}
end
```

```dyad
"""
# Prescribed Acceleration Test

A body whose `frame_a` is driven by a `PrescribedAcceleration` component
with constant acceleration inputs. Position should evolve as
`r(t) = r_start + v_start*t + 0.5*a*t^2` and velocity as
`v(t) = v_start + a*t`.
"""
example component PrescribedAccelerationTest
  world = MultibodyComponents.World() {}
  prescribed = MultibodyComponents.PrescribedAcceleration(r_start = [0, 0, 0], v_start = [1.0, 0, 0]) {}
  body = MultibodyComponents.Body(m = 1, r_cm = [0, 0, 0]) {}
relations
  prescribed.a_x = 0.0
  prescribed.a_y = 2.0
  prescribed.a_z = -1.0
  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.PrescribedAccelerationTest.md)

  * [`PrescribedAcceleration`](tests.PrescribedAccelerationTest.md)

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