You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a Ph.D. student from Peking University, interested in pore network modeling, and I'm trying to construct a 3D pore network with different hydrate saturation and morphologies, which will be imported into Comsol for FEM simulation. But there are a few errors that occurred during my attempts.
(1) I followed the examples to extract the pore network and want to plot the connections and coordinates on the same graph, but it either shows "'Line3DCollection' object has no property 'ax'" or "inner() got multiple values for argument 'ax'". I can only plot them separately. The codes I used are as below.
(2) I also want to calculate the tortuosity of the pore networks, but it didn't give me a correct value. Do you have any examples to do that for 3D images?
(3)Last step is the most challenging one for me, I need to distribute gas hydrate(solid phase) into the constructed pore network with different locations to generate various morphologies(cementing, grain contacting, and pore-filling) via morphological operations(erosion, dilation). But for 3D pore network, it seems that the fftmorphology in porespy doesn't work for me. I also need to control the hydrate content(effective porosity would be a controlling parameter), how can I create such pore networks with a specific hydrate saturation and morphology?
Your reply will be greatly appreciated!
Hi @Camelot18
That's a lot going on, let me try to address it in order:
For plotting large networks, use Paraview. We are in the middle of reorganizing our docs, and also releasing V3, and it's taking ages (sorry!). We realized that somehow the paraview tutorial got lost. I have uploaded it here temporarily. Trying to plot all these together in matplotlib (which is what plot_connections etc uses, is a bit more than it can handle.
Tortuosity of the network comes from computing the effective diffusivity using the FickianDiffusion class, then normalizing by the open-space diffusivity and porosity accordingly. This means you need to get the effective diffusivity correct. The snow network …
Hi @Camelot18
That's a lot going on, let me try to address it in order:
For plotting large networks, use Paraview. We are in the middle of reorganizing our docs, and also releasing V3, and it's taking ages (sorry!). We realized that somehow the paraview tutorial got lost. I have uploaded it here temporarily. Trying to plot all these together in matplotlib (which is what plot_connections etc uses, is a bit more than it can handle.
Tortuosity of the network comes from computing the effective diffusivity using the FickianDiffusion class, then normalizing by the open-space diffusivity and porosity accordingly. This means you need to get the effective diffusivity correct. The snow network extraction usually does a decent job but sometime you need to override the properties with ones that make more sense for your material. I'm going to direct you you a unit test we have that does this for Berea sandstone which may help: https://github.com/PMEAL/OpenPNM/blob/readd_paraview/tests/integration/PoreSpyIO_on_Berea.py
If fftmorphology does not work, then just try using the standard scipy.ndimage.binary_dilation/erosion/etc. They may be more robust. I assume you're adding these hydrates before you extract the network? If you want to add them to the network after extraction, then the image processing tools no longer apply and you should use other logic to figure out which pores are filled with hydrates, like percolation, or some other physics-based algorithm.
I think I am kind of figured it out, will try if it works.
In OpenPNM package, can I do the subtract operation? For pore-filling hydrate, I need to delete/remove the hydrate(treated as a sphere) part in the pore space to generate a new pore network.
Besides, how should I export the newly constructed pore network as a comsol file(geometry) for the later simulation?
You can 'delete pores' using openpnm.topotools.trim but that is not the normal way to do it. Normally you'd set transport conductances of those pores and their adjacent throats to negligible value.
Thank you for your kind reply.
Since the radius of the hydrate(although smaller than the pore radius) is to be determined by the saturation and the position could be random in the pore, which means "deleting the pore" is not correct. Rather, I need to "put" the hydrate into the pore first and then subtract this part by pore in order to obtain a new network(needs to be visualized and analyzed) corresponding to the hydrate-bearing samples with a specific saturation. Is it possible to export these 3D pore networks into Comsol format or should I perform the FEM simulation within python?
There is nothing quite as simple as a subtraction, but you can recompute the pore volume and throat diameters based on the size of the hydrates, then you can recompute the transport conductance, which will be reduced by the presence of the solid.
Yes, like in Comsol I can just perform the "difference" operation for the two objects. Hydrate can be present in a random position of pores, which will produce a different pore network. I can recalculate the pore volume, but the new network connectivity can only be visualized by this sort of operation.
Could you also answer my second question that if I can export 3D pore network in Comsol format? Openpnm only supports 2D network while porespy handles with voxel image.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Hi @Camelot18
That's a lot going on, let me try to address it in order:
For plotting large networks, use Paraview. We are in the middle of reorganizing our docs, and also releasing V3, and it's taking ages (sorry!). We realized that somehow the paraview tutorial got lost. I have uploaded it here temporarily. Trying to plot all these together in matplotlib (which is what
plot_connectionsetc uses, is a bit more than it can handle.Tortuosity of the network comes from computing the effective diffusivity using the FickianDiffusion class, then normalizing by the open-space diffusivity and porosity accordingly. This means you need to get the effective diffusivity correct. The
snownetwork …