Obtaining relative permeability curves from CT scan images and running drainage simulations #2903
Unanswered
EnochMayor
asked this question in
Q&A
Replies: 1 comment 1 reply
-
That error means that you don't have any pore labeled 'pore.left'. You can do |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I am currently working on a project that involves obtaining relative permeability curves from CT scan images during drainage simulations. I am seeking assistance from the community to help me with the following tasks:
To provide some context, my project aims to analyze the fluid flow behavior in porous media using CT scan images. I have access to a dataset of CT scan images of a porous material, and I want to extract the relevant information from these images to obtain the relative permeability curves.
My challenge is currently implementing the workflow I found going through the documentation where. Specifically specifying which pores have boundary conditions. I am currently stuck and keep getting Keyword Error: pore.left
`im = ps.io.openpnm_to_im(pore_net, max_dim=200)
im.shape
fig, ax = plt.subplots(figsize=(5, 5))
plt.imshow(im)
pore_net['pore.diameter'] = pore_net['pore.inscribed_diameter']
pore_net['throat.diameter'] = pore_net['throat.inscribed_diameter']
pore_net['throat.spacing'] = pore_net['throat.total_length']
pore_net.add_model(propname='throat.hydraulic_size_factors',
model=op.models.geometry.hydraulic_size_factors.spheres_and_cylinders, regen_mode='deferred')
pore_net.add_model(propname='throat.diameter',
model=op.models.geometry.throat_size.from_neighbor_pores, mode = 'min',)
pore_net.add_model(propname='pore.diameter',
model=op.models.geometry.pore_size.largest_sphere)
pore_net.regenerate_models()
h = op.utils.check_network_health(pore_net)
print(h)
op.topotools.trim(network=pore_net, pores=h['trim_pores'])
h = op.utils.check_network_health(pore_net)
print(h)
#Define phase objects
H2 = op.phase.Phase(network=pore_net)
#gas['pore.diffusivity'] = 1.0
H2['pore.viscosity'] = 0.000009
H2['pore.surface_tension'] = 0.072
H2['pore.contact_angle'] = 150.0
H2['pore.density'] = 0.08375 # Kg/m^3
H2['pore.molar_density'] = 41.875 #mol/m^3
H2['pore.thermal_conductivity'] = 0.03
H2['pore.vapor_pressure'] = 9868.42
f = op.models.physics.capillary_pressure.washburn
H2.add_model(propname='throat.entry_pressure',
model=f,
surface_tension='throat.surface_tension',
contact_angle='throat.contact_angle',
diameter='throat.diameter',)
#Checks
pore_net.labels()
pore_net.BC()
pore_net['throat.hydraulic_size_factors']
#H2.add_model_collection(op.models.collections.phase.air)
H2.add_model_collection(op.models.collections.physics.basic)
H2.regenerate_models()
water = op.phase.Water(network=pore_net, name='water')
H2['pore.vapor_pressure']
water.add_model_collection(op.models.collections.phase.water)
water.add_model_collection(op.models.collections.physics.basic)
water.regenerate_models()
#Pore Scale Drainage
ip = op.algorithms.InvasionPercolation(network=pore_net, phase=H2)
print (ip)
ip.set_inlet_BC(pores=pore_net.pores('left'))
ip.run(pressures = 20)
Finlets=([Finlets_init[x] for x in range(0, len(Finlets_init), 2)])
#ip.set_inlet_BC(pores=Finlets)
#ip.run()
`
Beta Was this translation helpful? Give feedback.
All reactions