Closed jhinebau closed 10 years ago
Try setting OP.update(Pc=0)
The errors might be coming from 0's in the 'throat.occupancy', so this will ensure no pores are invaded.
On Wed, Jun 18, 2014 at 10:14 AM, James Hinebaugh notifications@github.com wrote:
try:
Fickian_alg.effective_diffusivity(fluid=air)
after the run_script.py
I get a bunch of errors. I tried fixing them, but I wasn't confident that I was being harmless to the function.
— Reply to this email directly or view it on GitHub https://github.com/PMEAL/OpenPNM/issues/147.
No. I'm getting errors like this:
if 'boundary' in self._net._pore_info:
AttributeError: 'Cubic' object has no attribute '_pore_info'
I can fix that one, but as I keep going I get on shaky ground.
Can you revisit this bug? Mahmoud and I have pushed 1 major bug fix, and a 2nd important update to the linear_solver.
Still there. Try to run the updated run_script.py in the main folder. Here's what I get:
Traceback (most recent call last):
File "D:\AFCC code\GitHub projects\OpenPNM\run_script.py", line 70, in <module>
Fickian_alg.effective_diffusivity(fluid='air')
File "D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Algorithms\__FickianDiffusion__.py", line 112, in effective_diffusivity
occupancy=occupancy)
File "D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Algorithms\__LinearSolver__.py", line 325, in _calc_eff_prop
if 'boundary' in self._net._pore_info:
AttributeError: 'Cubic' object has no attribute '_pore_info'
Also, there's a bunch of ugly outputs that shoot out during this script. I don't think it's a problem, but I think it has to do with this new Boundary geometry type:
06-23 15:06 Cubic ERROR Cannot overwrite throat.vector with an array of the wrong length
D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\hydraulic_conductance.py:59: RuntimeWarning: invalid value encountered in true_divide
gp2 = 2.28*(pdia[pores[:,1]]/2)**4/(pdia[pores[:,1]]*mut)
D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\hydraulic_conductance.py:60: RuntimeWarning: invalid value encountered in greater
gp2[~(gp2>0)] = sp.inf #Set 0 conductance pores (boundaries) to inf
D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\diffusive_conductance.py:72: RuntimeWarning: invalid value encountered in true_divide
gp2 = ct*DABt*pdia[Ps[:,1]]**2/(0.5*pdia[Ps[:,1]])
D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\diffusive_conductance.py:73: RuntimeWarning: invalid value encountered in greater
gp2[~(gp2>0)] = sp.inf #Set 0 conductance pores (boundaries) to inf
Those ugly warnings are fine. Numpy can handle division by 0, but warns you just in case, only the first time.
On Mon, Jun 23, 2014 at 4:41 PM, James Hinebaugh notifications@github.com wrote:
Still there. Try to run the updated run_script.py in the main folder. Here's what I get:
Traceback (most recent call last): File "D:\AFCC code\GitHub projects\OpenPNM\run_script.py", line 70, in
Fickian_alg.effective_diffusivity(fluid='air') File "D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\AlgorithmsFickianDiffusion.py", line 112, in effective_diffusivity occupancy=occupancy) File "D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\AlgorithmsLinearSolver.py", line 325, in _calc_eff_prop if 'boundary' in self._net._pore_info: AttributeError: 'Cubic' object has no attribute '_pore_info' Also, there's a bunch of ugly outputs that shoot out during this script. I don't think it's a problem, but I think it has to do with this new Boundary geometry type:
06-23 15:06 Cubic ERROR Cannot overwrite throat.vector with an array of the wrong length D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\hydraulic_conductance.py:59: RuntimeWarning: invalid value encountered in truedivide gp2 = 2.28(pdia[pores[:,1]]/2)__4/(pdia[pores[:,1]]_mut) D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\hydraulic_conductance.py:60: RuntimeWarning: invalid value encountered in greater gp2[~(gp2>0)] = sp.inf #Set 0 conductance pores (boundaries) to inf D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\diffusive_conductance.py:72: RuntimeWarning: invalid value encountered in true_divide gp2 = ct_DABt_pdia[Ps[:,1]]*_2/(0.5_pdia[Ps[:,1]]) D:\AFCC code\GitHub projects\OpenPNM\OpenPNM\Physics\diffusive_conductance.py:73: RuntimeWarning: invalid value encountered in greater gp2[~(gp2>0)] = sp.inf #Set 0 conductance pores (boundaries) to inf
— Reply to this email directly or view it on GitHub https://github.com/PMEAL/OpenPNM/issues/147#issuecomment-46899028.
Sorry, just committed run_script with errors. Try now.
New effective diffusivity in a branch ready to be merged.
try:
after the run_script.py
I get a bunch of errors. I tried fixing them, but I wasn't confident that I was being harmless to the function.