Example Script

AMUSE comes with a set of examples scripts, you can find these in the example directory of the source-code and as part of the documentation here.

Simple Examples

The simple examples try to show how to do one specific thing with AMUSE (usually with one code).

Example Description
salpeter Create a initial mass distribution following the Salpeter IMF and plot it. Compare the created distribution with the Salpeter initial mass function. Shows how to make scatter and log/log plots.
cluster Create a plummer sphere and evolve it for several nbody time units (all attributes in nbody units).
hydro_star Evolve a star in a stellar evolution code (Evtwin or Mesa) and convert the star model to a SPH model
hrdiagram Evolve a star in a stellar evolution code and create Hertzsprung-Russell diagram (temperature against luminocity of a star)
sunandearth Evolve a system of particles with the sun and earth in a gravitational dynamics code.
pythagorean Calculate the Pythagorean problem, show the influence of the timestep parameter on the solution.
galactic_center Evolve a cluster rotating around the galactic center. Shows how to evolve a model with an external constant gravity field
kelvin_helmholtz Evolve a Kelvin Helmholtz instabilty in 2d using a grid based hydrodynamics code