porespy.simulations.tortuosity_fd#
- porespy.simulations.tortuosity_fd(im, axis, solver=None, tol=None, ftol=0.001)#
Calculates the tortuosity of image in the specified direction.
- Parameters:
im (ndarray) – The binary image to analyze with
Trueindicating phase of interestaxis (int) – The axis along which to apply boundary conditions
solver (openpnm Solver, optional) – A pre-built OpenPNM solver. When given, a single solve is performed and
ftolis used only as a post-hoc convergence check.tol (float, optional) – Residual relative tolerance passed to the default PyAMG solver. If given, a single solve at this tolerance is performed (no iterative tightening) and
ftolis used only as a post-hoc check. Ignored whensolveris given.ftol (float, optional) – Target relative inlet/outlet flux mismatch. When neither
solvernortolis given, the residual tolerance is tightened iteratively until the achieved flux balance falls underftol. Default is1e-3.
- Returns:
results – The following values are computed and returned as attributes:
Attribute
Description
tortuosity
Calculated using the
effective_porosityas \(\tau = \frac{D_{AB}}{D_{eff}} \cdot \varepsilon\).effective_porosity
Porosity of the image after applying
trim_nonpercolating_paths. This removes disconnected voxels which cause singular matrices.original_porosity
Porosity of the as-received the image
formation_factor
found as \(D_{AB}/D_{eff}\).
im_conc
An image containing the concentration values from the simulation.
converged
Whether the achieved inlet/outlet flux mismatch falls under
ftol. Users who need a finer picture (e.g. layer-by-layer flux constancy) can runporespy.beta.fluxonim_conc.- Return type:
Results object
Examples
Click here to view online example.