---
url: /dyad/stable/stdlib/MultibodyComponents/examples/tests.PointGravityOrbit.md
description: >-
  Dyad tests.PointGravityOrbit docs.  Free-floating body in a point-gravity
  field (structural point_gravity = true on Body): started on a circular orbit,
  the orbital radius must ...
---

# `tests.PointGravityOrbit` {#tests.PointGravityOrbit}

Free-floating body in a point-gravity field (structural `point_gravity = true` on `Body`): started on a circular orbit, the orbital radius must stay constant. Also serves as a regression test that the unused uniform-field branch (and the `point_gravity` symbol itself) never enters the equations.

## Usage {#Usage}

`MultibodyComponents.tests.PointGravityOrbit(r_orbit=7e6, v_orbit=sqrt(3.986004418e14 / r_orbit))`

## Parameters: {#Parameters:}

|      Name |                Description | Units | Default value |
| ---------:| --------------------------:| -----:| -------------:|
| `r_orbit` | Orbit radius \[m] (LEO-ish) |     – |           7e6 |

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
Free-floating body in a point-gravity field (structural `point_gravity = true`
on `Body`): started on a circular orbit, the orbital radius must stay constant.
Also serves as a regression test that the unused uniform-field branch (and the
`point_gravity` symbol itself) never enters the equations.
"""
example component PointGravityOrbit
  world = MultibodyComponents.World() {}
  body = MultibodyComponents.Body(m = 1, orientation_state = OrientationState.Euler(), statePriority = 1000, linearStatePriority = 1000, point_gravity = true, render = false, r_0(initial = [r_orbit, 0, 0]), v_0(initial = [0, v_orbit, 0])) {}
  "Orbit radius [m] (LEO-ish)"
  parameter r_orbit::Real = 7e6
  "Circular orbit speed for the default field constant"
  final parameter v_orbit::Real = sqrt(3.986004418e14 / r_orbit)
relations
end
```

```dyad
"""
Free-floating body in a point-gravity field (structural `point_gravity = true`
on `Body`): started on a circular orbit, the orbital radius must stay constant.
Also serves as a regression test that the unused uniform-field branch (and the
`point_gravity` symbol itself) never enters the equations.
"""
example component PointGravityOrbit
  world = MultibodyComponents.World() {}
  body = MultibodyComponents.Body(m = 1, orientation_state = OrientationState.Euler(), statePriority = 1000, linearStatePriority = 1000, point_gravity = true, render = false, r_0(initial = [r_orbit, 0, 0]), v_0(initial = [0, v_orbit, 0])) {}
  "Orbit radius [m] (LEO-ish)"
  parameter r_orbit::Real = 7e6
  "Circular orbit speed for the default field constant"
  final parameter v_orbit::Real = sqrt(3.986004418e14 / r_orbit)
relations
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
