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

Negative values for tortuosity #92

Closed
isaacbasil opened this issue Sep 8, 2023 · 4 comments
Closed

Negative values for tortuosity #92

isaacbasil opened this issue Sep 8, 2023 · 4 comments

Comments

@isaacbasil
Copy link

isaacbasil commented Sep 8, 2023

  • TauFactor version: 1.1.0
  • Python version: 3.9
  • Operating System: Windows 10 Enterprise LTSC

Description

I am running the taufactor solver for a large number of tif images using a loop. For the majority of the images it appears to work fine, but sometimes it returns a negative value for tortuosity. In these cases, I believe that the structure is actually impermeable (has an infinite tortuosity), but for some reason the solver converges to a negative value instead.

I have attached an example of a tif image which returns a negative tortuosity value for directions 2 and 3 (tau_yy and tau_zz).

I am calling the solver as follows:

img = tifffile.imread(filepath)
# ensure 1s for conductive phase and 0s otherwise.
img[img == 255] = 1
img[img == 2] = 1
s = tau.Solver(img)
# call solver 
s.solve(iter_limit=10000)

I then rotate the image and repeat. For the image attached, I get the following output:

converged to: 1.3490620851516724 after: 201 iterations in: 0.123 seconds at a rate of 0.0006 s/iter
converged to: -14.758493423461914 after: 101 iterations in: 0.0612 seconds at a rate of 0.0006 s/iter
converged to: -161.89920043945312 after: 101 iterations in: 0.0622 seconds at a rate of 0.0006 s/iter

patch_1_1_2.zip

I should also mention that I am running Taufactor using cpu rather than cuda.

Thanks,

Isaac

@amirDahari1
Copy link
Member

amirDahari1 commented Nov 13, 2023

Hi Isaac,

Thanks for raising an issue!
I've looked into your volume, and there really aren't any percolating paths along the 2nd and 3rd dimensions in your volume. The output should be
Warning: not converged ; unconverged value of tau: 2448267.0

Our next release should solve this issue, and return a "not converged" message for the 2nd and 3rd dimensions.
#95 should fix the wrong convergence (there was no convergence, just very negative flux) and #96 should fix the iter_limit problem where currently it has no effect.

Thanks,
Amir

@renxiaosa00
Copy link

                # Warning: not converged unconverged value of tau: 17.588836669921875                   after: 15901 iterations in: 703.4496                    seconds at a rate of 0.0442 s/iter tensor(0.0098) tensor(17.5888, device='cuda:0')

There are my results, can anyone tell me is this is right or wrong?

@amirDahari1
Copy link
Member

Hi @renxiaosa00, this depends on your microstructure, does it have percolating paths in the phase you're calculating tau for?

@amirDahari1
Copy link
Member

Solved by #97

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

3 participants