Percolation of Fibers
                    Version 1.0.6 (5.74 KB) by  
                  Ayad Al-Rumaithi
                
                
                  Determines the percolation of fibers in a box (cuboid)
                
                  
                  
              This tool include two example files: (Example.m) and (Example_Probability.m):
1- Example.m: determines the percolation of fibers in a box (cuboid). The input values are:
Vf: Volume fraction of fibers in the bigger box
Bx: Side length of the box in x-direction
By: Side length of the box in y-direction
Bz: Side length of the box in z-direction
L: Length of fibers
d: Diameter of fibers 
The fibers are generated in a bigger box of size (Bx+2*L, By+2*L, Bz+2*L), then cropped into the original (smaller) dimensions (Bx, By, Bz). The reason behind that is to ensure that fibers are uniformly distributed across the domain. The volume fraction of fibers in the smaller box is slightly bigger than Vf. Random fibers are omitted so that volume fraction of fibers in the smaller box reaches Vf. The fibers are assumed to be capped cylinders in both end, and cropped fibers are capped in one end only. After that, percolation is determined in z-direction from Z=0 to Z=Bz. The criteria for percolation is that the distance between fibers is d, and the distance between fibers and the planes (Z=0, Z=Bz) is d/2. If there is percolation then the value of Percolation variable is 1, otherwise it is zero.
Three figures are plotted: a-fibers in the bigger box, b-cropped fibers in the smaller box, and c-the fibers with percolation in the smaller box.
The value of Vf can be increased or decreased, and the percolation will change accordingly. 
2-Example_Probability.m: this file repeat the above procedure for a range of volume fraction of fibers. The process is repeated many times for each volume fraction to get the probability of percolation. Additional input are:
Vfmin: Min volume fraction of fibers
dVf: Volume fraction of fibers increment
Vfmax: Max volume fraction of fibers
NRealizations: Number of Realizations for each volume fraction
One figure is plotted: the probability of percolation with the volume fraction of fibers.
Cite As
Ayad Al-Rumaithi (2025). Percolation of Fibers (https://uk.mathworks.com/matlabcentral/fileexchange/135426-percolation-of-fibers), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
              Created with
              R2017b
            
            
              Compatible with any release
            
          Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
