Air
object has no attribute get_comp_vals
#2714
-
Greetings. I'm trying to set up an Air phase in order to perform Fickian Diffusion simulation, to calculate Network tortuosity. The code I'm trying to run is: air = pnm.phase.Air(network=Net, name='air')
air['pore. Temperature'] = 293.15
air['throat. Temperature'] = 293.15 #24ºC = 297.15K
# set T = 20ºC
air.add_model(propname='throat.diffusive_size_factors',
model=pnm.models.geometry.diffusive_size_factors.spheres_and_cylinders)
# air.add_model(propname='pore.diffusivity',
# model=pnm.models.phase.diffusivity.gas_mixture_ce(phase=air, MWs=air.params['molecular_weight']))
# air.add_model(propname='throat.diffusivity',
# model=pnm.models.phase.diffusivity.gas_mixture_ce(phase=air, MWs=air.params['molecular_weight']))
# tryed this way and nothing
air.add_model(propname='pore.diffusivity',
model=pnm.models.phase.diffusivity.gas_mixture_ce(phase=air))
air.add_model(propname='throat.diffusivity',
model=pnm.models.phase.diffusivity.gas_mixture_ce(phase=air))
air.add_model(propname='throat.diffusive_conductance',
model=pnm.models.physics.diffusive_conductance.generic_diffusive) The error raised is the following: It seems I'm unable to define diffusity and that "gas_misture_ce" has not been able to fetch or reach air.params of Molecular Weight? With gas_mixture_fesg(), the result is the same. Whats going on? Am I missing something? Regards |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi. There are a couple of issues with your code:
Have you looked at this example? It explains how to compute tortuosity of a network. |
Beta Was this translation helpful? Give feedback.
-
Hey there. Thanks for the quick answer. Its solved. I added the diffusive size factors to the Network and then, I deleted diffusivity models and it does the trick. The temperature was a typo when I wrote it on Github. Now the code is: air = pnm.phase.Air(network=Net, name='air')
air.add_model_collection(pnm.models.collections.physics.basic)
air['pore.temperature'] = 293.15
air['throat.temperature'] = 293.15 #24ºC = 297.15K
# set T = 20ºC
air.add_model(propname='throat.diffusive_conductance',
model=pnm.models.physics.diffusive_conductance.generic_diffusive)
print('Phase and physics set') Thanks for the help. Should I delete the thread? |
Beta Was this translation helpful? Give feedback.
Hi. There are a couple of issues with your code:
gas_mixture_ce
instead ofgas_mixture_ce(...)
.Air
is already a mixture so I assume it should already have a model for diffusivity, so I guess you don't need to add those models yourself.temperature
instead ofTemperature
.Have you looked at this example? It explains how to compute tortuosity of a network.