Skip to main content
. 2025 Apr 25;18(9):1955. doi: 10.3390/ma18091955
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+(1fs)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+(1fs)Dl);interface normal angle   angle=(xfs>0)acos(xfs/ sqrt(xfs2+yfs2))+(xfs0   &&(xfs||yfs))(2πacos(xfs/ sqrt(xfs2+yfs2)))