PMEAL / OpenPNM

A Python package for performing pore network modeling of porous media
http://openpnm.org
MIT License
454 stars 174 forks source link

BCC network spacing is incorrect #2847

Closed mkaguer closed 10 months ago

mkaguer commented 1 year ago

Here is a script that reproduces the bug. The problem is that the spacing returned is 1e-10 when I specified 1e-5. The issue is with line 72 of _bcc.py file. It multiplies the current spacing by the spacing, not realizing that the spacing was already applied correctly on line 50 above. I am making a PR.

import openpnm as op

# make BCC network
spacing = 1e-5
net = op.network.BodyCenteredCubic([5, 3, 3], spacing=spacing)

print(net['pore.coords'])