Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Total surface area of the network is greater than the area obtained directly from the image #825

Closed
avlmachado opened this issue Apr 26, 2023 · 2 comments

Comments

@avlmachado
Copy link

Hi everyone,

I noticed that there is an increase in surface area during the network extraction process when accuracy is set to 'high', around 30% in the test below.

I was wondering, when the area of each region is calculated, is the area of intersection between the regions included in this calculation? Is this difference due to this?

I thought it could be due to the boundary pores, but if you exclude them in the calculation, the difference also occurs.

Note: If you use the standard calculation method, the area is about 20% smaller.

I'm using version 2.2.2

import numpy as np
import porespy as ps
import openpnm as op
import matplotlib.pyplot as plt
ps.visualization.set_mpl_style()
np.random.seed(10)

im = ps.generators.blobs(shape=[200, 200,200], porosity=0.3, blobiness=2)
fig, ax = plt.subplots()
ax.imshow(im[:,:,100])

mesh1 = ps.tools.mesh_region(region=im)
areaImage = ps.metrics.mesh_surface_area(mesh=mesh1)

snow_output = ps.networks.snow2(im, voxel_size=1, accuracy='high')

pn = op.io.network_from_porespy(snow_output.network)

pn['pore.internal'] = True
pn['pore.internal'][pn['pore.boundary']] = False

areaInternalRegions = pn['pore.surface_area'][pn['pore.internal']].sum()
areaAllnetwork = pn['pore.surface_area'].sum()

print('Surface area from the image =',areaImage )
print('Surface area of all internal pores =', areaInternalRegions)
print('Surface area of all network pores =', areaAllnetwork)
print('Relative error, all internal pores, % =', 100*(areaInternalRegions/areaImage-1))
print('Relative error, all network pores, % =', 100*(areaAllnetwork/areaImage-1))
@avlmachado
Copy link
Author

Hello everyone,
I continued the investigation and verified that the cross-sectional area of the throats was being included in the surface area of the pores. I proposed the correction in #827.

Attached are some figures demonstrating the problem for the test case.
subregions3
subregions4

@jgostick
Copy link
Member

The problem with this is that it depends on what shape the user wants to assume for their throats. If we assume cuboids then the subtraction looks different. We have tried to make snow2 to not make any assumptions on behalf of the user, so this needs to be addressed in the openpnm part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants