This repository hosts the classical network flow code for the simulation of ostwald ripening, written in python. This code extends the capabilities of pnflowPy.
- Install your favorite Python distribution if you don't already have one (we used Anaconda). You may want to choose a distribution that has the standard packages pre-installed
- Install required libraries (check the Dependencies below)
- Download the code
- Run the examples.
There are a few extra libraries to install:
- pandas
- scipy
- sortedcontainers
- numpy_indexed
- petsc4py
Quick installation can be achieved by replicating the environment in Anaconda:
- Clone the repo
git clone https://github.com/ImperialCollegeLondon/pnflowPy.git
- Configure conda
conda update conda conda config --set ssl_verify false
- Replicate the environment:
conda env create -f environment.yml
- Activate the environment:
conda activate flowmodel
- If numba was not installed, try:
conda install -c numba numba
- If numpy-indexed was not installed, try:
pip install numpy-indexed
To run the OstRipening code, you should first generate the networks from the images using the pnextract or poreXtractor module, see the documentation of pnextract executable. Then you should copy the generated networks into the data folder and edit the input_pnflow.dat by setting the NETWORK keyword and other keywords. Full descriptions of the keywords in the input_pnflow.dat can be found in doc/pnflow_guide.pdf inside the pnflow module. However, only the keywords inside the input_pnflow.dat have been implemented, others might be added later for more robustness.
You can then run the pnflowPy by doing the following:
- Change directory into the OstRipening folder.
- Running the following command in terminal or in Windows command-prompt (cmd):
python main.py data/input_pnflow.dat
The generated network files of a 1000 cube water-wet Bentheimer sandstone have been provided in the data folder (image can be found in https://www.imperial.ac.uk/earth-science/research/research-groups/pore-scale-modelling/micro-ct-images-and-networks/) and this could be used for an example.
It would be very great to make any contributions to this project to make it better. If you would like to contribute, please fork the repo and create a pull request or simply open an issue with the tag "contribution". Please give this project a star. Thank you!
Distributed under the MIT License.
For contacts and references please see: https://www.imperial.ac.uk/earth-science/research/research-groups/pore-scale-modelling
Alternatively, contact Ademola Adebimpe:
- Email: [email protected]
- Additional Email: [email protected]