# OpenPNM **Repository Path**: Zhou_Chuanyou/OpenPNM ## Basic Information - **Project Name**: OpenPNM - **Description**: A Python package for performing pore network modeling of porous media - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: add_style_check - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-11-29 - **Last Updated**: 2021-11-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [](https://github.com/PMEAL/OpenPNM/actions) [](https://github.com/PMEAL/OpenPNM/actions) [](https://codecov.io/gh/PMEAL/OpenPNM) [](https://pmeal.github.io/OpenPNM/) [](https://pypi.python.org/pypi/openpnm) [](https://anaconda.org/conda-forge/openpnm) ----- # Overview of OpenPNM *OpenPNM* is a comprehensive framework for performing pore network simulations of porous materials. ## More Information For more details about the package can be found in the [on-line documentation](https://openpnm.org) ## Stay Informed It is surprizingly hard to communicate with our users, since Github doesn't allow sending out email newsletters or announcements. To address this gap, we have created a [Substack channel](https://openpnm.substack.com/), where you can subscribe to our feed to receive periodic news about important events and updates. Also, follow us on Twitter [(@OpenPnm)](https://twitter.com/OpenPnm) for periodic announcements about new releases and other important events. ## Installation and Requirements ### Preferred method The preferred way of installing OpenPNM is through [Anaconda Cloud](https://anaconda.org/conda-forge/openpnm) using: ``` conda install -c conda-forge openpnm ``` ### Alternative method OpenPNM can also be installed from the [Python Package Index](https://pypi.org/project/openpnm/) using: ``` pip install openpnm ``` However, we don't recommend installing using `pip` since `pypardiso`, which is a blazing fast direct solver, is not available for Windows users who use Python 3.7+. ### For developers For developers who intend to change the source code or contribute to OpenPNM, the source code can be downloaded from [Github](https://github.com/pmeal/OpenPNM/) and installed by running: ``` pip install -e 'path/to/downloaded/files' ``` The advantage to installing from the source code is that you can edit the files and have access to your changes each time you import *OpenPNM*. OpenPNM requires the *Scipy Stack* (Numpy, Scipy, Matplotlib, etc), which is most conveniently obtained by installing the [Anaconda Distribution](https://conda.io/docs/user-guide/install/download.html). ## Example Usage The following code block illustrates how to use OpenPNM to perform a mercury intrusion porosimetry simulation: ``` python import openpnm as op pn = op.network.Cubic(shape=[10, 10, 10], spacing=0.0001) geo = op.geometry.SpheresAndCylinders(network=pn, pores=pn.Ps, throats=pn.Ts) Hg = op.phases.Mercury(network=pn) phys = op.physics.Standard(network=pn, phase=Hg, geometry=geo) mip = op.algorithms.Porosimetry(network=pn, phase=Hg) mip.set_inlets(pores=pn.pores(['left', 'right', 'top', 'bottom'])) mip.run() ``` The network can be visualized in [`ParaView`](http://www.paraview.org) giving the following: