View full-text article in PMC Materials (Basel). 2025 Apr 25;18(9):1955. doi: 10.3390/ma18091955 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 2. Two methods for solute diffusion coefficient and interface normal angle. naive versioncoeiffocient of solute diffusion 1. if(fs==1) then 2. D=0; 3. else 4. D=fsDs+(1−fs)Dl; 5. endifinterface normal angle 6. if (∂xfs>0) then 7. angle=acos(∂xfs/ sqrt(∂xfs2+∂yfs2)) 8. elseif (∂xfs||∂yfs) 9. angle=2π−acos(−∂xfs/ sqrt(∂xfs2+∂yfs2)) 10.endifred esigned versioncoeiffocient of solute diffusion D=(fs==1)⋅0+(fs< 1)⋅(fsDs+(1−fs)Dl);interface normal angle angle=(∂xfs>0)⋅acos(∂xfs/ sqrt(∂xfs2+∂yfs2))+(∂xfs≥0 &&(∂xfs||∂yfs))⋅(2π−acos(−∂xfs/ sqrt(∂xfs2+∂yfs2)))