-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
249 changed files
with
15,451 additions
and
15,313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
[run] | ||
source = | ||
openpnm/ | ||
|
||
[report] | ||
exclude_lines = | ||
raise NotImplementedError | ||
if __name__ == .__main__.: | ||
omit = | ||
*__init__* | ||
test/* | ||
docs/* | ||
tests/* | ||
example.py | ||
setup.py | ||
example_script.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,17 +8,19 @@ | |
|
||
----- | ||
|
||
**Cite as:** | ||
> _Gostick, Jeff, Mahmoudreza Aghighi, James Hinebaugh, Tom Tranter, Michael A. Hoeh, Harold Day, Brennan Spellacy et al._ "**OpenPNM: a pore network modeling package.**" Computing in Science & Engineering 18, no. 4 (2016): 60-74. | ||
**Please cite as:** | ||
> _Gostick et al._ "**OpenPNM: a pore network modeling package.**" Computing in Science & Engineering 18, no. 4 (2016): 60-74. | ||
> [doi:10.1109/MCSE.2016.49](https://ieeexplore.ieee.org/document/7478437) | ||
# Overview of OpenPNM | ||
|
||
*OpenPNM* is an open source project aiming to provide porous media researchers with a comprehensive framework for performing pore network simulations on a wide range of materials. | ||
*OpenPNM* is a comprehensive framework for performing pore network simulations of porous materials. | ||
|
||
For more details about the package can be found in the [on-line documentation](https://openpnm.readthedocs.io/en/master/index.html) | ||
|
||
## Installation and Requirements | ||
|
||
OpenPNM can be installed from the Python Package index using: | ||
OpenPNM can be installed from the [Python Package Index](https://pypi.org/project/openpnm/) using: | ||
|
||
``` | ||
pip install openpnm | ||
|
@@ -52,32 +54,22 @@ mip.run() | |
|
||
``` | ||
|
||
The network can be visualized in [Paraview](http://www.paraview.org) giving the following: | ||
The network can be visualized in [`ParaView`](http://www.paraview.org) giving the following: | ||
|
||
![](https://i.imgur.com/mSDrIBOm.png) | ||
<p align="center"> | ||
<img src="https://user-images.githubusercontent.com/14086031/77927983-dc3dd000-7275-11ea-8700-c96c2d51aa1f.png" width="60%"></img> | ||
</p> | ||
|
||
The drainage curve can be visualized with `MIP.plot_intrusion_curve()` giving something like this: | ||
The drainage curve can be visualized with `mip.plot_intrusion_curve()` giving something like this: | ||
|
||
![](https://i.imgur.com/1C2uXt9m.png) | ||
<p align="center"> | ||
<img src="https://user-images.githubusercontent.com/14086031/77930201-96363b80-7278-11ea-95fd-4a55fb1d6148.png" width="60%"></img> | ||
</p> | ||
|
||
A collection of examples is available in the *examples* folder of this repository: [Examples](https://www.github.com/PMEAL/OpenPNM/tree/master/examples) | ||
|
||
## Release Management and Versioning | ||
|
||
OpenPNM uses [Semantic Versioning](http://semver.org) (i.e. X.Y.Z) to label releases. All major and minor versions (X.Y.z) are available on [PyPI](https://pypi.python.org/pypi), but bugfixe releases (x.y.Z) are not generally pushed unless the bug is important. | ||
|
||
OpenPNM uses the [Github Flow](https://guides.github.com/introduction/flow/) system of Git branching, except instead of merging PRs into *master*, they are merged into a branch called *dev*. Any code added to *dev* is done via Pull Requests (PRs). When new PRs are merged into the *dev* branch, they are *not* given a new version number. Once enough new features have been added, the *dev* branch is merged into the *master* branch, and the minor release number (x.Y.z) will be incremented. An exception to this rule are bugfixes which may be found on *master*. In these cases a PR can be merged into *master* and the version number wil be incremented (x.y.Z) to indicate the fix. | ||
|
||
OpenPNM depends on several other packages widely known as the [Scipy Stack](https://www.scipy.org/stackspec.html). It is our policy to always support the latest version of all these packages and their dependencies. | ||
|
||
The main developer for this project is Prof. Jeff Gostick ([email protected]). | ||
|
||
## Licence and Citation | ||
|
||
OpenPNM is free to use and is offered under the permissive [MIT License](http://opensource.org/licenses/MIT) | ||
|
||
If you do use OpenPNM in an academic work, the developers ask that you cite the following paper, which outlines the design principles and general uses of OpenPNM: | ||
## Contact | ||
|
||
Gostick et al. OpenPNM: A pore network modeling package. Computing in Science & Engineering. 18(4), p60-74. | ||
OpenPNM is developed by the Porous Materials Engineering and Analysis Lab [(PMEAL)](http://pmeal.com), in the [Department of Chemical Engineering](https://uwaterloo.ca/chemical-engineering/) at the [University of Waterloo](https://uwaterloo.ca/) in Waterloo, Ontario, Canada. | ||
|
||
A link to this article can be found [here](http://doi.org/10.1109/MCSE.2016.49). | ||
The lead developer for this project is Prof. Jeff Gostick ([email protected]). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Release Management and Versioning | ||
|
||
OpenPNM uses [Semantic Versioning](http://semver.org) (i.e. X.Y.Z) to label releases. All major and minor versions (X.Y.z) are available on [PyPI](https://pypi.python.org/pypi), but bugfix releases (x.y.Z) are not generally pushed unless the bug is important. Bubfix releases are available via download of the source code from Github. | ||
|
||
OpenPNM uses the [Github Flow](https://guides.github.com/introduction/flow/) system of Git branching, except instead of merging PRs into *master*, they are merged into a branch called *dev*. Any code added to *dev* is done via Pull Requests (PRs). When new PRs are merged into the *dev* branch, they are *not* given a new version number. Once enough new features have been added, the *dev* branch is merged into the *master* branch, and the minor release number (x.Y.z) will be incremented. An exception to this rule are bugfixes which may be found on *master*. In these cases a PR can be merged into *master* and the version number will be incremented (x.y.Z) to indicate the fix. | ||
|
||
OpenPNM depends on several other packages widely known as the [Scipy Stack](https://www.scipy.org/stackspec.html). It is our policy to always support the latest version of all these packages and their dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,9 @@ | ||
[![Travis](https://travis-ci.org/PMEAL/OpenPNM.svg?branch=master)](https://travis-ci.org/PMEAL/OpenPNM) | ||
|
||
# OpenPNM Examples | ||
|
||
A collection of scripts illustrating the use of OpenPNM. The files in these folders are written in MarkDown, which allows for an useful blend of formatted text and highlighted code. You can browse the available files by clicking through the web interface of the repository seen above. | ||
> **Note:** All the examples in this repository are subject to automated testing, so if the build badge above says passing then all of these examples should work. All code within these files is in code-blocks and preceded by the python prompt symbol (>>>). This is annoying for cutting-and-pasting, but is necessary if we want to run automated tests on the code. | ||
## Contents | ||
|
||
The examples are organized in the directory structure of the repository. The folders and files are given somewhat descriptive names to indicate what sort of example they contain. | ||
|
||
## How to Contribute an Example to this Collection | ||
|
||
We strongly encourage you to create an example and post it in this collection. The procedure is straightforward and can be explained in just a few lines: | ||
|
||
1. Fork this repository to your own Github account using the 'Fork' button on the top of this page. This will create an independent version of the repo under your own Github account, and will let you make edits and additions to the repository without needing write permission from us. | ||
|
||
2. Create your example using the instructions below, and push your changes to your forked version of the repository. You can edit and push as many times as needed to check how the document looks when Github renders it. | ||
|
||
3. Make a pull request using the Github website by going the 'Pull Requests' tab on your forked repository, and then selecting the 'New pull request' button. This will trigger the automated testing to ensure your example works. You can help ensure this will pass by running the tests locally by typing `python run_tests` at your command prompt (assuming you have [Pytest installed](https://pytest.org/latest/getting-started.html)). | ||
|
||
## How to Write an Example | ||
|
||
This section introduces a few rules and tips for creating nicely formatted documents that would be suitable for inclusion here. | ||
|
||
1. All files must be written in MarkDown. This is the text formatting language used by Github to create nice looking issues and posts within a given repository. MarkDown files have an *md* file extension. If you need some help on MarkDown formatting and notation, checkout the [MarkDown Cheatsheet]. The style is not very strict, but efforts should be made to be consistent with the existing files. | ||
|
||
2. All code must be not only enclosed with code blocks denoted by triple ticks (\`\`\`) (see the [MarkDown Cheatsheet]), but each line must be preceded by >>> like the Python prompt. The Pytest package which is used for automated testing of examples only recognizes lines of code preceded by the a >>>. Moreover, each code block must end with one blank line before the closing ticks (\`\`\`), or else Pytest reports an error. The flip side of this coin is that if you feel that some could should NOT be tested, this can be accomplished by excluding the >>>. | ||
|
||
3. Any images to be inserted into an examples should be hosted on an external size such as [imgur](http://imgur.com). These can then be linked to using the appropriate notations as given in the [MarkDown Cheatsheet]. | ||
[![](https://github.com/PMEAL/OpenPNM/workflows/Examples/badge.svg)](https://github.com/PMEAL/OpenPNM/actions) | ||
|
||
4. Any files required by an example (such as data files containing network info) should be stored in the 'fixtures' directory at the top level of this repository. | ||
This folder contains a collection of Jupyter Notebooks illustrating the use of OpenPNM. Jupyter Notebooks allows for a helpful combination of formatted text and functioning code. You can browse the available files by clicking through the web interface of the repository seen above. | ||
|
||
5. The file name should be descriptive of the contents since the user only sees these when navigating the repository. Similarly, the file should be placed in an appropriate folder, or a folder should be created if necessary. | ||
The examples are organized by the directory structure, with folders and files given somewhat descriptive names to indicate what sort of example they contain. | ||
|
||
[MarkDown CheatSheet]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet | ||
All these notebooks are subjected to our testing suite on each build of the package. If the badge above says 'passing', then all the examples found here should be functional and compatible with the current version of OpenPNM. |
Oops, something went wrong.