Download data/scripts/example_bundle_of_tubes.py from introvoyz042/OpenPNM: direct link, hf CLI and curl.
- Browser
- Download file 635 Bytes
-
https://huggingface.co/datasets/introvoyz042/OpenPNM/resolve/main/data/scripts/example_bundle_of_tubes.py
- Command line
-
hf download hf://datasets/introvoyz042/OpenPNM/data/scripts/example_bundle_of_tubes.py
-
curl -L -o example_bundle_of_tubes.py https://huggingface.co/datasets/introvoyz042/OpenPNM/resolve/main/data/scripts/example_bundle_of_tubes.py
635 Bytes
| import openpnm as op | |
| from openpnm.materials import BundleOfTubes | |
| ws = op.Workspace() | |
| ws.settings['loglevel'] = 30 | |
| proj = ws.new_project() | |
| net, geo, phase = BundleOfTubes( | |
| shape=50, | |
| spacing=0.0001, | |
| length=0.001, | |
| psd_params={ | |
| 'distribution': 'weibull', | |
| 'loc': 1e-6, | |
| 'scale': 4e-5, | |
| 'shape': 2.2 | |
| }, | |
| settings={'adjust_psd': 'normalize', 'seed': 0} | |
| ) | |
| hg = op.phase.Mercury(network=net) | |
| phys = op.physics.Classic(network=net, phase=hg, geometry=geo) | |
| mip = op.algorithms.Porosimetry(network=net, phase=hg) | |
| mip.set_inlets(pores=net.pores('top')) | |
| mip.run() | |
| mip.plot_intrusion_curve() | |