Skip to content

Commit

Permalink
Updated the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tueboesen committed Mar 16, 2023
1 parent 7cd4fea commit 0766f80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# .github/workflows/build.yaml
name: multibodypendulum CI
name: Testing CI

on:
push:
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ and the energy:
## Quick start
A quick usecase to simulate a 5 pendulum system could look like this

import multibodypendulum as mbp
n = 5
dt = 0.001
g = 9.82
mbp = MultiBodyPendulum(n, dt,g=g)
model = mbp.MultiBodyPendulum(n, dt,g=g)
theta0 = 0.5*math.pi*torch.ones(n)
dtheta0 = 0.0*torch.ones(n)
nsteps = 100
times, thetas, dthetas = mbp.simulate(nsteps,theta0,dtheta0)
mbp.plot_energy()
mbp.animate_pendulum()
times, thetas, dthetas = model.simulate(nsteps,theta0,dtheta0)
model.plot_energy()
model.animate_pendulum()

## Limitations
The code has some limitations:
Expand Down
1 change: 1 addition & 0 deletions multibodypendulum/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from npendul import MultiBodyPendulum

0 comments on commit 0766f80

Please # to comment.