https://github.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox
https://github.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox
- Owner: Plant-Root-Soil-Interactions-Modelling
- License: gpl-3.0
- Created: 2017-06-22T11:19:57.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-24T08:16:43.000Z (17 days ago)
- Last Synced: 2025-04-25T12:09:47.986Z (16 days ago)
- Language: Python
- Size: 1.31 GB
- Stars: 57
- Watchers: 8
- Forks: 19
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- open-sustainable-technology - CRootBox - The focus of CRootBox is the simulation of different types of root architecture, and to provide a generic interface for coupling with arbitrary soil/environmental models, e.g., in order to determine the impact of specific root architectures on function. (Biosphere / Plants and Vegetation)
README
# Hi, I am CPlantBox
[](https://www.youtube.com/watch?v=jNbvjW-WFvk "CPlantBox Simulations -- 8K resolution")## I can :
1. Create multiple plant structures
2. Simulate the carbon transport (coupling with PiafMunch) and water flow inside of the plant
3. Simulate the solute transport and water flow in the soil (coupling with DuMux)## Try me 1 click
You can discover CPlantBox with
[this web-based application](http://cplantbox.com) designed for conduct and visualize plant growth simulations. It is part of Xiaoran Zhou's PhD thesis. the source code is avialable at github-xiaoranzhouCloud-based notebooks are also available:
1. [Structure definition and analysis](https://mybinder.org/v2/gh/Plant-Root-Soil-Interactions-Modelling/CPlantBox/workshop_1111?labpath=tutorial%2Fjupyter%2Fworkshop_11_11_2024%2F1_cplantbox.ipynb)
2. [water flow in CPlantBox](https://mybinder.org/v2/gh/Plant-Root-Soil-Interactions-Modelling/CPlantBox/workshop_1111?labpath=tutorial%2Fjupyter%2Fworkshop_11_11_2024%2F2_water_flux.ipynb)# build local
## semi-automated CPlantBox (with dumux-rosi) installation via python script (recommended)
### Linux
This installation method requires ubuntu >= 20.04 and python >= 3.7.\
For CPlantBox __without__ the dumux-rosi extension, download the python file "installCPlantBox.py".\
Run
```bash
sudo apt-get update
sudo apt-get upgrade
[ ! -d 'cpbenv' ] && python3 -m venv cpbenv && source cpbenv/bin/activate || source cpbenv/bin/activate
wget https://raw.githubusercontent.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox/master/installCPlantBox.py
python3 installCPlantBox.py
```
It will create a "CPB" folder and install inside the dependencies necessary to run CPlantBox.\
For CPlantBox __with__ the dumux-rosi extension, download the python file "installDumuxRosi_Ubuntu.py" (based on the dumux installation file).\
run
```bash
sudo apt-get update
sudo apt-get upgrade
[ ! -d 'cpbenv' ] && python3 -m venv cpbenv && source cpbenv/bin/activate || source cpbenv/bin/activate
wget https://raw.githubusercontent.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox/master/installDumuxRosi_Ubuntu.py
python3 installDumuxRosi_Ubuntu.py
```
This will create a "DUMUX" folder and install inside the dependencies necessary to run dumux-rosi.
CPlantBox is setup within the virtual environment 'cpbenv'. \
**Do not forget to reactivate the 'cpbenv' environment when using CPlantBox:**
```bash
source cpbenv/bin/activate
```
This script might work on other linux OS but has not been tested.### windows
CPlantBox is currently not available on windows.
Some pointers to setup a linux environment on windows are given on the [wiki](https://github.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox/wiki/Help-for-windows-users).## manual linux installation
Clone the repository by running:
```bash
git clone --depth 1 -b master https://github.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox.git
```
Run CMake which configures the CPlantBox libraries by
```bash
cmake . && make
```
in the root folder, and run some Python tutorial examples (see tutorial/latex/PlantBox_RootSytem), e.g
```bash
cd tutorial/examples/python
python3 example1a.py
```The dependecies are listed in the requirements.txt file.
## Installation on the JSC agrocluster
Refer to the wiki:\
https://github.com/Plant-Root-Soil-Interactions-Modelling/CPlantBox/wiki/CPlantBox-on-the-J%C3%BClich-Supercomputer-cluster
# Folder sructure`/modelparameter` Plant parameter files\
`/src` CPlantBox C++ codes\
`/test` Python tests for all CPlantBox classes\
`/tutorial` learn to use CPlantBox\
`/experimental` Specific applications (in sub-folders). contrary to scripts in `/tutorial`, might not be kept up to date# Code documentation
Create the documentation by running doxygen in the folder
$ doxygen doxy_configThe documentation will be located in the folder /doc. Compile doc/latex/refman.tex to generate the full doxygen documentation in doc/latex/refman.pdf.
Collaboration diagrams give an overview of the code in folder /docs.
# Examples
Simulation videos availabe in Youtube Channel https://www.youtube.com/channel/UCPK-pFfpK94jiamgwHxX32Q