Skip to main content

A thermoelastic and thermodynamic toolkit for the Earth and planetary sciences

Project description

DOI DOI

BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and planetary sciences

About

BurnMan is a Python library for generating thermodynamic and thermoelastic models of planetary interiors.

It began as a working-group at the 2012 CIDER workshop in Santa Barbara.

BurnMan is released under the GNU GPL v2 or newer

Homepage: https://geodynamics.github.io/burnman/

Documentation: http://burnman.readthedocs.io

Source code: https://github.com/geodynamics/burnman

Forums: https://community.geodynamics.org/c/burnman

Authors (as of 2023):

  • Bob (Robert) Myhill (main contributor)
  • Cayman Unterborn
  • Ian Rose
  • Sanne Cottaar
  • Timo Heister

Requirements

  • Python 3.8+
  • Python modules: NumPy, SciPy, SymPy, Matplotlib

Optional, needed for some functionality

  • cvxpy - required for some least squares fitting routines and solution polytope calculations.
  • pycddlib - required for solution polytope calculations.
  • autograd - required for esoteric solution models defined using a single excess function. Not required for the vast majority of users.

Installation

Installation of BurnMan is mostly platform independent. As long as you know how to use a terminal, the process should be straightforward. The following instructions should help, but let us know if you have any problems.

Environment management

We strongly recommend using a python environment manager like conda or pyenv to install BurnMan and its dependencies. This is especially the case for installations on modern Mac systems.

For pyenv, we suggest you select the most recent version of python supported by BurnMan, install all of the dependencies into that environment and set the burnman root directory to use that environment automatically.

For conda, we suggest making a new environment for the burnman installation, install the most recent version of python supported by BurnMan into that environment, and install all of the dependencies into that environment. Remember to activate the environment before installing new dependencies or using BurnMan.

Dependencies

First, make sure you have a sufficiently recent version of python installed on your machine (see above for the latest requirements). To check your version of python, type the following in a terminal: python --version If your version is not recent enough, visit https://www.python.org/ to find out how to install a newer version.

Once you have checked your version of python, you should make sure you have installed the python module pip. We will use this module to install BurnMan. If you don't have it already, you can install it by opening a terminal window and typing:

python -m ensurepip --upgrade

Mac users will also need to install Xcode, which can be found in the MacStore, or can be installed with:

xcode-select --install

Stable version

If you are only interested in using BurnMan (rather than developing the software), and you aren't interested in any of the latest changes, you can install the stable version by typing the following into a terminal window:

python -m pip install burnman

This method of installation does not give you easy access to all the examples, or the test suite. These can be found in the latest release package which can be downloaded from https://github.com/geodynamics/burnman/releases.

Development version

If you want to install the development version of BurnMan (with all the latest features), you will first need to download the source code. The best way to do this is by using git (a version control system). To install git, follow the instructions at https://git-scm.com/downloads.

Then, using a terminal, navigate to the directory into which you want to clone the BurnMan repository, and type

git clone https://github.com/geodynamics/burnman.git

(If you don't want to use git, you can download the current master branch from https://github.com/geodynamics/burnman/archive/master.zip.)

Once the repository is cloned, navigate to the top-level directory by typing cd burnman in the terminal, and then install BurnMan, either in static mode: python -m pip install . or in development mode (if you want to develop or modify the code): python -m pip install -e ..

Checking that the installation worked

To check that the installation has worked, you can run the test suite (./test.sh). This takes a few minutes to run. You may find that you need to install some other dependencies (latex, pycddlib) if you don't already have them on your system.

A more basic check that BurnMan is installed is to navigate to the Burnman examples directory and type:

python example_beginner.py

If figures show up, BurnMan has been installed.

Getting started: The BurnMan Tutorial

An introduction to the tools available in BurnMan can be found in the BurnMan Tutorial. These are ipython notebooks that can be run from inside jupyterlab.

If you want to run these notebooks without installing BurnMan, you can access them on binder.org via the links below.

  1. tutorial_01_material_classes.ipynb (introduces the main classes in BurnMan, which are used to calculate material properties)
  2. tutorial_02_composition_class.ipynb (introduces the composition class, used for processing and converting chemical compositions)
  3. tutorial_03_layers_and_planets.ipynb (introduces the layer and planet classes used to create models of planetary interiors)
  4. tutorial_04_fitting.ipynb (introduces the various functions used to fit model parameters to experimental and analytical data)
  5. tutorial_05_equilibrium.ipynb (introduces the equilibrate function, used to equilibrate mineral assemblages)

More detail: The Examples Suite

The BurnMan tutorials provide a basic but incomplete understanding of what the module can do. To supplement the tutorials, BurnMan includes a large suite of examples that provide more in-depth coverage of the potential uses of the module.

For an up-to-date summary of all the examples, including the generated figures, the user is referred to the BurnMan manual (http://burnman.readthedocs.io).

About scripting in Python

Burnman has the advantage of being adaptable and extensible in easy scripts. As BurnMan is a toolkit, a graphical user interface would be impractical (although we do plan to add GUIs for some functionality in the future). Nevertheless, we hope that we have succeeded in making BurnMan accessible to coding novices. For those of you who have little experience with Python, here are some specific features and pitfalls of the language:

  • Python uses specific indentation. A script might fail if a code block is not indented correctly. We use four spaces and no tabs. Mixing spaces and tabs can cause trouble.
  • Indices should be given inside square brackets and function or method call arguments inside parentheses (different from Matlab).
  • The first index of an array or list is 0 (e.g. x[0]), not 1.
  • Put dots after numbers to make them floats instead of integers.

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

burnman-1.2.0.tar.gz (3.8 MB view hashes)

Uploaded Source

Built Distribution

burnman-1.2.0-py3-none-any.whl (4.0 MB view hashes)

Uploaded Python 3

Supported by

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