PMEAL / OpenPNM

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

Help reduce pore.coordination.number #2859

Closed CDGUERREROB closed 1 year ago

CDGUERREROB commented 1 year ago

I am trying to reduce the coordination number by reducing the throats in the pore network site. However, adjusting/changing the geometry of the network (cubic or other), the coordination number remains the same.

pn = op.network.Voronoi(shape=[30, 30, 30], points=1000)
pn.add_model_collection(op.models.collections.geometry.spheres_and_cylinders)
np.random.seed(0)  # Set the state of the random number generator to "0"
pn['pore.seed'] = np.random.rand(pn.Np)
dst = spst.weibull_min(c=2, loc=1e-7, scale=23e-6)
pn['pore.diameter'] = dst.rvs(pn.Np)

f = op.models.geometry.pore_seed.random
pn.add_model(propname='pore.seed',
             model=f,
             num_range=[0.0, 0.98])
pn.add_model(propname='pore.diameter',
             model=op.models.geometry.pore_size.generic_distribution,
             func=dst,
             seeds='pore.seed')
pn.regenerate_models()
pn.add_model(propname='throat.diameter_1', 
             model=op.models.misc.from_neighbor_pores,
             prop='pore.diameter',
             mode='min')
op.topotools.trim(network=pn, throats=pn['throat.diameter'] > 1e-5)

print(pn['pore.coordination_number'].mean()) 3.99872 the same value independent if pore throats are eliminated.

Thanks a lot

How can I change the coordination number, eliminating pore throats of size x.

jgostick commented 1 year ago

How many throats are you deleting? Maybe the threshold you're applying is to large/small and you're not getting any hits. Count the number before and after. Also you script doesn't show where the pore.coordination_number is coming from, but assuming it is a pore scale model you need to run regenerate_models again.