MECHA

Model of Explicit Cross-section Hydraulic Anatomy






View source code Try it online

What is MECHA?


MECHA is an explicit cross-section model of the root hydraulic anatomy which connects hydraulic concepts across scales.

The model computes horizontal water flow at the level of individual cells, quantifies the contribution of water composite pathways, and predicts root radial permeability (kr), using detailed anatomical descriptions and experimental data on the permeability of cell walls (kw), membranes (Lp) and the conductance of individual plasmodesmata (KPD).

Installing MECHA


MECHA was coded in Python, and is therefore platform independant. It can be run on Windows, Linux and MacOS

1. Download MECHA

The source code of MECHA is available on github: https://github.com/MECHARoot/MECHA

The github repo also contain example parameter files needed to run MECHA. You do not need your own data to try it out.

2. Install Python

The first step before running MECH is to install a working version for Python. Installation of Python are available here: https://www.python.org/downloads/

3. Install required libraries

MECHA is built upon a handfull of external libraries. You will need to install them before using the model.

  • numpy
  • scipy
  • networkx
  • lxml

These libraries can be install using pip. In the Terminal or Console, enter:

pip install numpy
pip install scipy
pip install networkx==1.9.1
pip install lxml
pip install matplotlib

4. Run MECHA

In the Terminal or Console enter the following lines:

cd "$PATH_TO_FOLDER_CONTAINING_MECHA"
python mecha_all.py

Feeling adventurous? Check out the source code.

View source code

Using MECHA


Input files

MECHA uses four parameters files as input, stored in the /in folder in the main MECHA directory:

  • General.xml : General simulation parameters
  • BC.xml : Boundary conditions for the simulation. This is where you choose wether the soil is dry, wet, or only partially touch the root.
  • Geometry.xml : Parameters for the root section geometry. This is where you define which root section to use in the simulation.
  • Hydraulics.xml : Hydraulic parameters of the different variables in the simulation

Ouput files

MECHA output files in a folder defined in the General.xml input file, under the Output tag. Different type of files are generated:

  • *.PVTK files : These are geometry files that can be open in Paraview
  • Macro_prop_i.txt files : Theses files contain synthetic informations about the simulation results. They contain the radial data.

About us


MECHA was developed at the Université catholique de Louvain, in the Earth and Life Insititute, in the lab of Xavier Draye.

The primary developpers of the model are Valentin Couvreur and Marc Faget.

MECHA what first used here:

Going with the flow. Multiscale insights into the composite nature of water transport in roots
Valentin Couvreur, Marc Faget, Guillaume Lobet, Mathieu Javaux, François Chaumont and Xavier Draye
Plant Physiology, 2018


MECHA is released under a GPL licence, which means that redistribution and use in source and binary forms, with or without modification, are permitted under the GNU General Public License v3 and provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
Source code on GitHub View paper