#Mandyoc, a finite element simulator for the mantle
Mandyoc is a finite element code written on top of the PETSc library to simulate thermo-chemical convection of the Earth's mantle. Different linear and non-linear rheologies can be adopted, appropriately simulating the strain and stress pattern in the Earth's crust and mantle, both in extensional or collisional tectonics.
In this opportunity, we will present a showcase to simulate the evolution of divergent margins taking into account the plastic rheology and the sin-rift geodynamics. So we'll explain how to create the input file for this scenario, run the model using Mandyoc and plot the results.
#Before the tutorial
Make sure you've done these things before the tutorial on Monday:
- Sign-up for the Software Underground Slack
- Join the channel
t22-mon-mandyoc. This is where all communication will happen.
- Set up your computer (instructions below). We will not have time to solve many computer issues during the tutorial so make sure you do this ahead of time. If you need any help, ask at the Slack channel.
- Some knowledge of Python is assumed (for example, you might want to attend this or this tutorial).
- All coding will be done in Jupyter notebooks. We'll explain how they work briefly but it will help if you've used them before.
- We'll also use numpy, pandas and matplotlib. You don't need to be an expert in these tools but some familiarity will help.
There are a few things you'll need to follow the tutorial:
- A working Python installation (Anaconda or Miniconda).
- The Mandyoc tutorial conda environment installed.
- A web browser that works with Jupyter notebooks. (basically anything except Internet Explorer)
- Install Mandyoc following the installation instruction on its website.
To get things setup, please do the following.
If you have any trouble, please ask for help in the
t22-mon-mandyoc channel on the Software Underground slack.
Windows users: When you see "terminal" in the instructions, this means the "Anaconda Prompt" program for you.
Install a Python distribution:
In this tutorial, we will be using the Anaconda Python distribution along with the
conda package manager. If you already have Anaconda or Miniconda installed, you can skip this step.
If not, please follow the instructions for getting Anaconda up and running in your system: https://docs.anaconda.com/anaconda/install/
t22-mon-mandyoc conda environment:
- Download the
environment.ymlfile from here (right-click and select "Save page as" or similar)
- Make sure that the file is called
environment.yml. Windows sometimes adds a
.txtto the end, which you should remove.
- Open a terminal (Anaconda Prompt if you are running Windows). The following steps should be done in the terminal.
- Navigate to the folder that has the downloaded environment file (if you don't know how to do this, take a moment to read the Software Carpentry lesson on the Unix shell).
- Create the conda environment by running
conda env create --file environment.yml(this will download and install all of the packages used in the tutorial).
- Windows users: Make sure you set a default browser that is not Internet Explorer.
- Activate the conda environment:
conda activate t22-mon-mandyoc
- Start the JupyterLab server:
- Jupyter should open in your default web browser. We'll start from here in the tutorial and create a new notebook together.
Go to the Mandyoc website and follow the instruction to install Mandyoc in your computer.