forked from PMEAL/OpenPNM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'move_examples' into dev
- Loading branch information
Showing
47 changed files
with
61,052 additions
and
0 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 |
---|---|---|
|
@@ -8,3 +8,5 @@ docs/_build/ | |
|
||
build/ | ||
dist/ | ||
|
||
*\.ipynb_checkpoints/ |
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,36 @@ | ||
[![Travis](https://travis-ci.org/PMEAL/OpenPNM-Examples.svg?branch=master)](https://travis-ci.org/PMEAL/OpenPNM-Examples) | ||
|
||
# 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](https://imgur.com). These can then be linked to using the appropriate notations as given in the [MarkDown Cheatsheet]. | ||
|
||
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. | ||
|
||
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. | ||
|
||
[MarkDown CheatSheet]: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet |
12,546 changes: 12,546 additions & 0 deletions
12,546
examples/fixtures/ICL-Sandstone(Berea)/Berea_link1.dat
Large diffs are not rendered by default.
Oops, something went wrong.
12,545 changes: 12,545 additions & 0 deletions
12,545
examples/fixtures/ICL-Sandstone(Berea)/Berea_link2.dat
Large diffs are not rendered by default.
Oops, something went wrong.
6,299 changes: 6,299 additions & 0 deletions
6,299
examples/fixtures/ICL-Sandstone(Berea)/Berea_node1.dat
Large diffs are not rendered by default.
Oops, something went wrong.
6,298 changes: 6,298 additions & 0 deletions
6,298
examples/fixtures/ICL-Sandstone(Berea)/Berea_node2.dat
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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 @@ | ||
This directory contains files that are used by the various examples, such as importing networks from saved files. |
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,55 @@ | ||
throat.Air_DpwAj,throat.Cube_and_Cuboid_ajCtf,throat.Standard_OEOsI,throat.all,throat.area,throat.conns,throat.diameter,throat.length,throat.seed,throat.surface_area,throat.volume,pore.Air_DpwAj,pore.Cube_and_Cuboid_ajCtf,pore.Standard_OEOsI,pore.all,pore.area,pore.back,pore.bottom,pore.coords,pore.diameter,pore.front,pore.index,pore.internal,pore.left,pore.right,pore.seed,pore.top,pore.volume | ||
True,True,True,True,2.316259765744186e-10,0 1,1.5219263338756532e-05,0.9999838129283244,0.3787326548845733,6.087606793380007e-05,2.3162222722813385e-10,True,True,True,True,2.316259765744186e-10,False,True, 0.5 0.5 0.5,1.5219263338756532e-05,True,0.0,True,True,False,0.3787326548845733,False,3.525176733582728e-15 | ||
True,True,True,True,1.964276133529633e-10,1 2,1.4015263584855023e-05,0.9999844149282013,0.0006664921789257816,5.6060180623863104e-05,1.9642455201450595e-10,True,True,True,True,2.94289908239557e-10,False,False, 0.5 0.5 1.5,1.7154880012391722e-05,True,1.0,True,True,False,0.8620969485483265,False,5.0485080647073705e-15 | ||
True,True,True,True,2.743380145504277e-10,3 4,1.6563152313204987e-05,0.9999833512150756,0.765624403590548,6.625150622737782e-05,2.7433344715582687e-10,True,True,True,True,1.964276133529633e-10,False,False, 0.5 0.5 2.5,1.4015263584855023e-05,True,2.0,True,True,False,0.0006664921789257816,True,2.7529847764857686e-15 | ||
True,True,True,True,2.4928178161400284e-10,4 5,1.578865990557789e-05,0.9999837384612794,0.5707685826732893,6.315361263069396e-05,2.4927772790865876e-10,True,True,True,True,2.743380145504277e-10,False,True, 0.5 1.5 0.5,1.6563152313204987e-05,True,3.0,True,False,False,0.765624403590548,False,4.54390232030098e-15 | ||
True,True,True,True,2.1652583999712816e-10,6 7,1.4714817022210237e-05,0.9999844323806525,0.19238665016866474,5.8858351790160267e-05,2.1652246920527217e-10,True,True,True,True,2.8004073025523763e-10,False,False, 0.5 1.5 1.5,1.6734417535583293e-05,True,4.0,True,False,False,0.7978298894249769,False,4.686318507060799e-15 | ||
True,True,True,True,2.0139725924068366e-10,7 8,1.419145021626344e-05,0.9999846940640555,0.029182564542458156,5.676493201134188e-05,2.0139417666713432e-10,True,True,True,True,2.4928178161400284e-10,False,False, 0.5 1.5 2.5,1.578865990557789e-05,True,5.0,True,False,False,0.5707685826732893,True,3.9358252705600305e-15 | ||
True,True,True,True,2.5808889643910864e-10, 9 10,1.6065145391159977e-05,0.9999835854965223,0.6498013720635281,6.425952675910034e-05,2.580846600380205e-10,True,True,True,True,2.1652583999712816e-10,False,True, 0.5 2.5 0.5,1.4714817022210237e-05,True,6.0,True,False,True,0.19238665016866474,False,3.1861381161381114e-15 | ||
True,True,True,True,2.1450898090491886e-10,10 11,1.4646125115706163e-05,0.9999846443647465,0.16775150446984544,5.858360086060404e-05,2.145056869832495e-10,True,True,True,True,2.696302479108202e-10,False,False, 0.5 2.5 1.5,1.6420421672747025e-05,True,7.0,True,False,True,0.7358789861771775,False,4.4274423664229855e-15 | ||
True,True,True,True,2.0912245369997444e-10,12 13,1.4461066824407335e-05,0.9999852366151001,0.10478204990183171,5.784341332044697e-05,2.0911936634469925e-10,True,True,True,True,2.0139725924068366e-10,False,False, 0.5 2.5 2.5,1.419145021626344e-05,True,8.0,True,False,True,0.029182564542458156,True,2.858119178206064e-15 | ||
True,True,True,True,2.0912245369997444e-10,13 14,1.4461066824407335e-05,0.9999847017098316,0.10478204990183171,5.784338237924364e-05,2.09119254483997e-10,True,True,True,True,2.8102705454476624e-10,False,True, 1.5 0.5 0.5,1.6763861564232933e-05,False,9.0,True,True,False,0.8029970075119447,False,4.711098638192599e-15 | ||
True,True,True,True,2.1764498268751575e-10,15 16,1.4752795758347492e-05,0.999984945958301,0.20620091655133466,5.9010294676579876e-05,2.176417062508708e-10,True,True,True,True,2.5808889643910864e-10,False,False, 1.5 0.5 1.5,1.6065145391159977e-05,False,10.0,True,True,False,0.6498013720635281,False,4.146235645138311e-15 | ||
True,True,True,True,2.3578485849590965e-10,16 17,1.5355287639634423e-05,0.9999844562122605,0.42755032836220774,6.14201958412107e-05,2.35781193506117e-10,True,True,True,True,2.1450898090491886e-10,False,False, 1.5 0.5 2.5,1.4646125115706163e-05,False,11.0,True,True,False,0.16775150446984544,True,3.1417253727760657e-15 | ||
True,True,True,True,2.1085123296822032e-10,18 19,1.4520717370991708e-05,0.9999848565978177,0.1244026532980228,5.808198991171433e-05,2.1084803996319884e-10,True,True,True,True,2.2697540614667985e-10,False,True, 1.5 1.5 0.5,1.506570297552291e-05,False,12.0,True,False,False,0.32224124999067927,False,3.4195440517545556e-15 | ||
True,True,True,True,2.1085123296822032e-10,19 20,1.4520717370991708e-05,0.9999835201525861,0.1244026532980228,5.808191228714037e-05,2.1084775817207397e-10,True,True,True,True,2.0912245369997444e-10,False,False, 1.5 1.5 1.5,1.4461066824407335e-05,False,13.0,True,False,False,0.10478204990183171,False,3.0241337774393593e-15 | ||
True,True,True,True,2.705411191232595e-10,21 22,1.6448134214045662e-05,0.9999835406035648,0.7418664149964009,6.579145395073604e-05,2.705366661797278e-10,True,True,True,True,2.6035479631013957e-10,False,False, 1.5 1.5 2.5,1.6135513512440178e-05,False,14.0,True,False,False,0.6682381169488862,True,4.200958333890868e-15 | ||
True,True,True,True,2.7128259657987506e-10,22 23,1.6470658656528434e-05,0.9999830669945252,0.7466570952523356,6.588151903510092e-05,2.7127800295018195e-10,True,True,True,True,2.1764498268751575e-10,False,True, 1.5 2.5 0.5,1.4752795758347492e-05,False,15.0,True,False,True,0.20620091655133466,False,3.2108719774179952e-15 | ||
True,True,True,True,2.206978786206851e-10,24 25,1.4855903830487229e-05,0.9999847373769806,0.244184309956049,5.9422708361709806e-05,2.2069451019216253e-10,True,True,True,True,2.3578485849590965e-10,False,False, 1.5 2.5 1.5,1.5355287639634423e-05,False,16.0,True,False,True,0.42755032836220774,False,3.620544323275193e-15 | ||
True,True,True,True,2.434050371564424e-10,25 26,1.5601443431825223e-05,0.99998436460718,0.5115461352567262,6.240479798851443e-05,2.4340123142307207e-10,True,True,True,True,2.4750488066324675e-10,False,False, 1.5 2.5 2.5,1.5732287839448106e-05,False,17.0,True,False,True,0.5534004252592022,True,3.8938180242624515e-15 | ||
True,True,True,True,2.316259765744186e-10,0 3,1.5219263338756532e-05,0.999984108792174,0.3787326548845733,6.087608594511943e-05,2.3162229575788695e-10,True,True,True,True,2.485694990897691e-10,True,True, 2.5 0.5 0.5,1.576608699360019e-05,False,18.0,True,True,False,0.5638632569908292,False,3.9189683466049235e-15 | ||
True,True,True,True,2.8004073025523763e-10,1 4,1.6734417535583293e-05,0.999983055351226,0.7978298894249769,6.693653590702286e-05,2.80035985063421e-10,True,True,True,True,2.1085123296822032e-10,True,False, 2.5 0.5 1.5,1.4520717370991708e-05,False,19.0,True,True,False,0.1244026532980228,False,3.0617111612566566e-15 | ||
True,True,True,True,1.964276133529633e-10,2 5,1.4015263584855023e-05,0.9999850980382547,0.0006664921789257816,5.606021891973293e-05,1.964246861961834e-10,True,True,True,True,3.399958896535616e-10,True,False, 2.5 0.5 2.5,1.843897745683208e-05,False,20.0,True,True,False,0.9633588334692853,True,6.269176544737591e-15 | ||
True,True,True,True,2.1652583999712816e-10,3 6,1.4714817022210237e-05,0.9999843610153323,0.19238665016866474,5.8858347589649756e-05,2.165224537528363e-10,True,True,True,True,2.705411191232595e-10,True,True, 2.5 1.5 0.5,1.6448134214045662e-05,False,21.0,True,False,False,0.7418664149964009,False,4.4498966377574876e-15 | ||
True,True,True,True,2.696302479108202e-10,4 7,1.6420421672747025e-05,0.9999834225803959,0.7358789861771775,6.568059785810751e-05,2.696257781370626e-10,True,True,True,True,2.7128259657987506e-10,True,False, 2.5 1.5 1.5,1.6470658656528434e-05,False,22.0,True,False,False,0.7466570952523356,False,4.46820304772383e-15 | ||
True,True,True,True,2.0139725924068366e-10,5 8,1.419145021626344e-05,0.9999850099449391,0.029182564542458156,5.676494994257322e-05,2.0139424028467853e-10,True,True,True,True,3.02598281400143e-10,True,False, 2.5 1.5 2.5,1.739535229307366e-05,False,23.0,True,False,False,0.8905169427476125,True,5.2638037082341256e-15 | ||
True,True,True,True,2.2697540614667985e-10, 9 12,1.506570297552291e-05,0.9999840852177301,0.32224124999067927,6.026185283256124e-05,2.269717938825104e-10,True,True,True,True,2.206978786206851e-10,True,True, 2.5 2.5 0.5,1.4855903830487229e-05,False,24.0,True,False,True,0.244184309956049,False,3.2786664603814414e-15 | ||
True,True,True,True,2.0912245369997444e-10,10 13,1.4461066824407335e-05,0.9999847368938922,0.10478204990183171,5.784338441443985e-05,2.091192618417741e-10,True,True,True,True,2.455282852396512e-10,True,False, 2.5 2.5 1.5,1.5669342208262963e-05,False,25.0,True,False,True,0.533528487676141,False,3.847266723228095e-15 | ||
True,True,True,True,2.1450898090491886e-10,11 14,1.4646125115706163e-05,0.9999846091806859,0.16775150446984544,5.858359879936342e-05,2.145056794359525e-10,True,True,True,True,2.434050371564424e-10,True,False, 2.5 2.5 2.5,1.5601443431825223e-05,False,26.0,True,False,True,0.5115461352567262,True,3.797469918217553e-15 | ||
True,True,True,True,2.1764498268751575e-10,12 15,1.4752795758347492e-05,0.999985090750633,0.20620091655133466,5.901030322094668e-05,2.1764173776419538e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.0912245369997444e-10,13 16,1.4461066824407335e-05,0.999985091822768,0.10478204990183171,5.784340494504061e-05,2.0911933606537147e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.4750488066324675e-10,14 17,1.5732287839448106e-05,0.9999840660993241,0.5534004252592022,6.292814865094507e-05,2.4750093694506145e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.485694990897691e-10,18 21,1.576608699360019e-05,0.9999838928893962,0.5638632569908292,6.306333218997278e-05,2.4856549535335454e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.1085123296822032e-10,19 22,1.4520717370991708e-05,0.9999845043119863,0.1244026532980228,5.808196944994236e-05,2.1084796568329695e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,3.02598281400143e-10,20 23,1.739535229307366e-05,0.999982082835125,0.8905169427476125,6.958016247071426e-05,3.0259285969684426e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.206978786206851e-10,21 24,1.4855903830487229e-05,0.9999843479809777,0.244184309956049,5.942268522239152e-05,2.2069442425329075e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.455282852396512e-10,22 25,1.5669342208262963e-05,0.9999839299995676,0.533528487676141,6.267636160770761e-05,2.4552433960000125e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.434050371564424e-10,23 26,1.5601443431825223e-05,0.9999835016021376,0.5115461352567262,6.240474413201703e-05,2.4340102136329767e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.316259765744186e-10,0 9,1.5219263338756532e-05,0.9999840084375485,0.3787326548845733,6.0876079835825537e-05,2.3162227251314882e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.5808889643910864e-10, 1 10,1.6065145391159977e-05,0.9999833899872982,0.6498013720635281,6.425951419556389e-05,2.580846095792606e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,1.964276133529633e-10, 2 11,1.4015263584855023e-05,0.9999856693056497,0.0006664921789257816,5.60602509455854e-05,1.9642479840887436e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.2697540614667985e-10, 3 12,1.506570297552291e-05,0.9999841855723557,0.32224124999067927,6.026185888021317e-05,2.2697181666054232e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.0912245369997444e-10, 4 13,1.4461066824407335e-05,0.99998440225782,0.10478204990183171,5.784336505766144e-05,2.0911919186185758e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.4928178161400284e-10, 5 14,1.578865990557789e-05,0.999984037913291,0.5707685826732893,6.315363154247784e-05,2.492778025565897e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.1652583999712816e-10, 6 15,1.4714817022210237e-05,0.9999852661936097,0.19238665016866474,5.885840086778065e-05,2.1652264974732316e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.3578485849590965e-10, 7 16,1.5355287639634423e-05,0.9999841121453438,0.42755032836220774,6.14201747082248e-05,2.3578111238034773e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.0139725924068366e-10, 8 17,1.419145021626344e-05,0.9999850381309722,0.029182564542458156,5.6764951542575955e-05,2.0139424596126832e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.485694990897691e-10, 9 18,1.576608699360019e-05,0.9999837350257211,0.5638632569908292,6.306332223440305e-05,2.485654561132599e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.1085123296822032e-10,10 19,1.4520717370991708e-05,0.999984707068619,0.1244026532980228,5.8081981226629396e-05,2.1084800843478295e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.1450898090491886e-10,11 20,1.4646125115706163e-05,0.9999834574487138,0.16775150446984544,5.8583531325721164e-05,2.1450543237910087e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.2697540614667985e-10,12 21,1.506570297552291e-05,0.9999842430814052,0.32224124999067927,6.0261862345870206e-05,2.2697182971368219e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.0912245369997444e-10,13 22,1.4461066824407335e-05,0.9999845341372595,0.10478204990183171,5.784337268613099e-05,2.0911921944080956e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.6035479631013957e-10,14 23,1.6135513512440178e-05,0.9999832345670973,0.6682381169488862,6.454097197428414e-05,2.603504313492711e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.1764498268751575e-10,15 24,1.4752795758347492e-05,0.9999851956502056,0.20620091655133466,5.901030941119456e-05,2.1764176059506103e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.3578485849590965e-10,16 25,1.5355287639634423e-05,0.9999844876850761,0.42755032836220774,6.142019777430723e-05,2.357812009269304e-10,,,,,,,,,,,,,,,,, | ||
True,True,True,True,2.434050371564424e-10,17 26,1.5601443431825223e-05,0.9999843331343644,0.5115461352567262,6.240479602442902e-05,2.434012237624302e-10,,,,,,,,,,,,,,,,, |
Binary file not shown.
Oops, something went wrong.