Skip to main content

Make a star cluster

Project description

MASC

MASC (Make a star cluster) is an AMUSE-based script to generate a star cluster, to be used in N-body simulations or for other purposes. It aims to include all popular distribution models, initial mass functions, and many more features.

Supported features

  • Stellar distributions: Plummer, King, fractal-based
  • Initial mass function: Salpeter, Kroupa, equal-mass
  • Metallicity
  • Virial ratio

Not yet supported features

  • Stars in initial binary/triple/multiple configurations
  • Other particles than stars

Requirements

MASC requires AMUSE (https://github.com/amusecode/amuse) to work.

Usage:

Package version:

from amuse.units import units
from amuse.ext.masc import new_star_cluster
cluster = new_star_cluster(
    number_of_stars=1024,
    # stellar_mass=False,
    initial_mass_function='salpeter',
    upper_mass_limit=125.0 | units.MSun,
    effective_radius=3.0 | units.parsec,
    star_distribution='plummer',
    # star_distribution_w0=7.0,
    # star_distribution_fd=2.0,
    star_metallicity=0.01,
)

Standalone version:

$ python make_a_star_cluster.py -h
usage: make_a_star_cluster.py [-h] [-o CLUSTERNAME] [-type FILE TYPE]
                              [-N NUMBER_OF_STARS] [-M CLUSTER_MASS]
                              [-dist STAR_DISTRIBUTION]
                              [-gasdist GAS_DISTRIBUTION]
                              [-imf INITIAL_MASS_FUNCTION]
                              [-modelnr CLUSTER_MODEL_NUMBER]
                              [-kingw KING_PARAMETER_W0]
                              [-fractald FRACTAL_PARAMETER_FD]
                              [-uml UPPER_MASS_LIMIT] [-Z METALLICITY]
                              [-ibf INITIAL_BINARY_FRACTION]
                              [-R EFFECTIVE_RADIUS] [-vr VIRIAL_RATIO]

optional arguments:
  -h, --help            show this help message and exit
  -o CLUSTERNAME        Outputfile name [auto]
  -type FILE TYPE       Output file type ([amuse]/ascii/starlab/nemo)
  -N NUMBER_OF_STARS    Number of stars
  -M CLUSTER_MASS       Cluster mass (takes precedence over number of stars)
  -dist STAR_DISTRIBUTION
                        Star distribution ([plummer]/king/fractal)
  -gasdist GAS_DISTRIBUTION
                        Gas distribution ([none]/plummer/king/fractal) NOT
                        IMPLEMENTED YET
  -imf INITIAL_MASS_FUNCTION
                        IMF ([kroupa]/salpeter/fixed)
  -modelnr CLUSTER_MODEL_NUMBER
                        Model number
  -kingw KING_PARAMETER_W0
                        King W0 parameter [7.0]
  -fractald FRACTAL_PARAMETER_FD
                        Fractal distribution [2.0]
  -uml UPPER_MASS_LIMIT
                        Upper mass limit (in MSun) [125.]
  -Z METALLICITY        Metallicity [0.01]
  -ibf INITIAL_BINARY_FRACTION
                        Initial binary fraction (0-1) [0.] NOT IMPLEMENTED YET
  -R EFFECTIVE_RADIUS   Cluster radius [3.0] (parsec)
  -vr VIRIAL_RATIO      Virial ration [0.5], 0.5=stable, 0.75=just expelled
                        gas, 0.1=collapsing

COPYRIGHT/LICENSE

See LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amuse-masc-0.3.2.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file amuse-masc-0.3.2.tar.gz.

File metadata

  • Download URL: amuse-masc-0.3.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16

File hashes

Hashes for amuse-masc-0.3.2.tar.gz
Algorithm Hash digest
SHA256 ff4fb4442d9b388518a6aaa257d8e05b96f3a3a45866a0644a93a9c76b6d63f0
MD5 81b303da35c1816a01f3275f9de748b5
BLAKE2b-256 7321b52d47ae68d77df7052762997441e62527ea52d3f0ded7c57eb15e8f83fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page