Package: burnman
BurnMan - a thermoelastic and thermodynamic toolkit for the Earth and planetary sciencesAboutBurnMan 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 newerHomepage:https://geodynamics.github.io/burnman/Documentation:http://burnman.readthedocs.ioSource code:https://github.com/geodynamics/burnmanForums:https://community.geodynamics.org/c/burnmanAuthors (as of 2023):Bob (Robert) Myhill (main contributor)Cayman UnterbornIan RoseSanne CottaarTimo HeisterRequirementsPython 3.8+Python modules:
NumPy, SciPy, SymPy, MatplotlibOptional, needed for some functionalitycvxpy - 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.InstallationInstallation 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 managementWe 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.DependenciesFirst, 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, visithttps://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 --upgradeMac users will also need to install Xcode, which can be found in the MacStore, or can be installed with:xcode-select --installStable versionIf 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 burnmanThis 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 fromhttps://github.com/geodynamics/burnman/releases.Development versionIf 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 athttps://git-scm.com/downloads.Then, using a terminal, navigate to the directory into which you want to clone the BurnMan repository, and typegit clone https://github.com/geodynamics/burnman.git(If you don't want to use git, you can download the current master branch fromhttps://github.com/geodynamics/burnman/archive/master.zip.)Once the repository is cloned, navigate to the top-level directory by typingcd burnmanin 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 workedTo 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.pyIf figures show up, BurnMan has been installed.Getting started: The BurnMan TutorialAn 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.tutorial_01_material_classes.ipynb(introduces the main classes in BurnMan, which are used to calculate material properties)tutorial_02_composition_class.ipynb(introduces the composition class, used for processing and converting chemical compositions)tutorial_03_layers_and_planets.ipynb(introduces the layer and planet classes used to create models of planetary interiors)tutorial_04_fitting.ipynb(introduces the various functions used to fit model parameters to experimental and analytical data)tutorial_05_equilibrium.ipynb(introduces the equilibrate function, used to equilibrate mineral assemblages)More detail: The Examples SuiteThe 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 PythonBurnman 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.