anisotropic_crystallite_size
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
anisotropic_crystallite_size [2022/09/22 11:52] – hanslustig | anisotropic_crystallite_size [2024/08/07 10:09] (current) – dectors | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== A generalized geometric approach to anisotropic peak broadening due to domain morphology ====== | ||
+ | As published in J. Appl. Cryst. **48(1)** //(2015)//, 189-194, Ectors et al. | ||
+ | [[http:// | ||
+ | and J. Appl. Cryst. **48(6)** //(2015)//, 1998-2001, Ectors et al. [[http:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Updated with an optional plotting macro PlotAnisoCS for the normals_plot window (Version 5+) | ||
+ | July 2016 | ||
+ | |||
+ | Fixed a bug concerning the automatic orientation tool (Abs(alr) instead of alr). Thank you Remo for the feedback. | ||
+ | January 2018 | ||
+ | |||
+ | For modifications to get error reporting see (updated) link [[https:// | ||
+ | Feb 2024 | ||
+ | |||
+ | Since my website is down heres a link to a quickstart guide. [[https:// | ||
+ | |||
+ | Also an example including a .pro file compatible with TOPAS V7 [[https:// | ||
+ | ---- | ||
+ | |||
+ | Application e.g. for a cylinder in a hexagonal/ | ||
+ | str 'or hkl_Is | ||
+ | ... | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | ... | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | macro AnisoCS( mod, h11, k11, l11, h22, k22, l22, ac, av, bc, bv, cc, cv, pc, pv, tc, tv, nc, nv, sp) | ||
+ | { | ||
+ | ' As published in Ectors et al. (2015) J. Appl. Cryst. 48, 189-194 | ||
+ | ' mod which model to use 1 for ellipsoid 2 for elliptic cylinder 3 for cuboid | ||
+ | ' h11 k11 l11 vector defining the z-axis | ||
+ | ' h22 k22 l22 vector defining the x-axis | ||
+ | ' av bv cv rx ry rz of the model | ||
+ | ' pv tv nv additional rotation parameters theta' theta' nu | ||
+ | ' sp activate special method for triclinic systems 1/0 on/off | ||
+ | ' --------- Code starts here ------ | ||
+ | peak_buffer_step 0 | ||
+ | ' | ||
+ | | ||
+ | #m_argu ac If_Prm_Eqn_Rpt(ac, | ||
+ | #m_argu bc If_Prm_Eqn_Rpt(bc, | ||
+ | #m_argu cc If_Prm_Eqn_Rpt(cc, | ||
+ | #m_argu pc If_Prm_Eqn_Rpt(pc, | ||
+ | #m_argu tc If_Prm_Eqn_Rpt(tc, | ||
+ | #m_argu nc If_Prm_Eqn_Rpt(nc, | ||
+ | ' | ||
+ | local !m11 = Get(a)^2; local !m12 = Get(a)*Get(b)*Cos(Get(ga)*Deg); | ||
+ | local !m21 = m12; local !m22 = Get(b)^2; | ||
+ | local !m31 = m13; local !m32 = m23; local !m33 = Get(c)^2; | ||
+ | ' | ||
+ | local !vol = Get(a)*Get(b)*Get(c)*Sqrt(1-((Cos(Get(al)*Deg))^2)-((Cos(Get(be)*Deg))^2)-((Cos(Get(ga)*Deg))^2)+2*(Cos(Get(al)*Deg)*Cos(Get(be)*Deg)*Cos(Get(ga)*Deg))); | ||
+ | local !ar = (Get(b)*Get(c)*Sin(Get(al)*Deg))/ | ||
+ | local !br = (Get(a)*Get(c)*Sin(Get(be)*Deg))/ | ||
+ | local !cr = (Get(b)*Get(a)*Sin(Get(ga)*Deg))/ | ||
+ | local !alr = (Cos(Get(be)*Deg)*Cos(Get(ga)*Deg)-Cos(Get(al)*Deg))/ | ||
+ | local !ber = (Cos(Get(al)*Deg)*Cos(Get(ga)*Deg)-Cos(Get(be)*Deg))/ | ||
+ | local !gar = (Cos(Get(be)*Deg)*Cos(Get(al)*Deg)-Cos(Get(ga)*Deg))/ | ||
+ | local !r11 = ar^2; local !r12 = ar*br*gar; | ||
+ | local !r21 = r12; local !r22 = br^2; local !r23 = br*cr*alr; | ||
+ | local !r31 = r13; local !r32 = r23; local !r33 = cr^2; | ||
+ | 'Test if special method triclinic is activated | ||
+ | # | ||
+ | local !h1 = 0; local !h2 = If(Abs(alr) <= 0.00001, 0 , 1); | ||
+ | local !k1 = 0; local !k2 = If(Abs(alr) <= 0.00001, 1 , -(r31 / r32)); | ||
+ | local !l1 = 1; local !l2 = 0; | ||
+ | #m_else | ||
+ | local !h1 = h11; local !h2 = h22; | ||
+ | local !k1 = k11; local !k2 = k22; | ||
+ | local !l1 = l11; local !l2 = l22; | ||
+ | #m_endif | ||
+ | ' | ||
+ | local rowh1 = (h1 r11 + k1 r12 + l1 r13)*h1; | ||
+ | local rowk1 = (h1 r21 + k1 r22 + l1 r23)*k1; | ||
+ | local rowl1 = (h1 r31 + k1 r32 + l1 r33)*l1; | ||
+ | local dvec1 = Sqrt(rowh1+rowk1+rowl1); | ||
+ | ' | ||
+ | local rowh2 = (h2 r11 + k2 r12 + l2 r13)*h2; | ||
+ | local rowk2 = (h2 r21 + k2 r22 + l2 r23)*k2; | ||
+ | local rowl2 = (h2 r31 + k2 r32 + l2 r33)*l2; | ||
+ | local dvec2 = Sqrt(rowh2+rowk2+rowl2); | ||
+ | ' | ||
+ | local rowH = (H r11 + K r12 + L r13)*H; | ||
+ | local rowK = (H r21 + K r22 + L r23)*K; | ||
+ | local rowL = (H r31 + K r32 + L r33)*L; | ||
+ | local dvec3 = Sqrt(rowH+rowK+rowL); | ||
+ | ' | ||
+ | local rowg1 = (H r11 + K r12 + L r13)*h1; | ||
+ | local rowg2 = (H r21 + K r22 + L r23)*k1; | ||
+ | local rowg3 = (H r31 + K r32 + L r33)*l1; | ||
+ | local sum1 = rowg1+rowg2+rowg3; | ||
+ | local cosphi = (sum1/ | ||
+ | local sinphi = Sqrt(Abs(1-(cosphi^2))); | ||
+ | ' | ||
+ | local rowp1 = (H r11 + K r12 + L r13)*h2; | ||
+ | local rowp2 = (H r21 + K r22 + L r23)*k2; | ||
+ | local rowp3 = (H r31 + K r32 + L r33)*l2; | ||
+ | local sum2 = rowp1+rowp2+rowp3; | ||
+ | local coseta =(sum2/ | ||
+ | local costheta = If(sinphi <= 0.00001, | ||
+ | local sintheta = Sqrt(Abs(1-(costheta^2))); | ||
+ | ' | ||
+ | local p = h1*(k2*L - l2*K) + k1*(l2*H - h2*L) + l1*(h2*K - k2*H); | ||
+ | local pre = If (p <= 0 , -1 , 1); | ||
+ | ' | ||
+ | local grot11 = (Cos(CeV(tc, | ||
+ | local grot21 = -(Cos(CeV(tc, | ||
+ | local grot31 = Cos(CeV(tc, | ||
+ | local grot12 = (Sin(CeV(tc, | ||
+ | local grot22 = -(Sin(CeV(tc, | ||
+ | local grot32 = Sin(CeV(tc, | ||
+ | local grot13 = -(Sin(CeV(pc, | ||
+ | local grot23 = Sin(CeV(pc, | ||
+ | local grot33 = Cos(CeV(pc, | ||
+ | local cosphirot = (costheta*sinphi*grot31)+(pre*sintheta*sinphi*grot32)+(cosphi*grot33); | ||
+ | local sinphirot = Sqrt(Abs(1-(cosphirot^2))); | ||
+ | local xfac = (costheta*sinphi*grot11)+(pre*sintheta*sinphi*grot12)+(cosphi*grot13); | ||
+ | local costhetarot = If(sinphirot <= 0.0001, 1, xfac / sinphirot); | ||
+ | local sinthetarot = Sqrt(Abs(1-(costhetarot^2))); | ||
+ | ' | ||
+ | ' | ||
+ | #m_ifarg mod 1 | ||
+ | local volop = ((4/3) 3.14159265358979 CeV(ac,av) CeV(bc,bv) CeV(cc, | ||
+ | local areaop = 3.14159265358979 Sqrt(((CeV(cc, | ||
+ | local sizeL = volop / areaop; | ||
+ | #m_endif | ||
+ | ' | ||
+ | #m_ifarg mod 2 | ||
+ | local volop = (3.14159265358979 CeV(ac,av) CeV(bc,bv) (2 * CeV(cc, | ||
+ | local areaop = (Sqrt( ((CeV(ac, | ||
+ | local sizeL = volop / areaop; | ||
+ | #m_endif | ||
+ | ' | ||
+ | #m_ifarg mod 3 | ||
+ | local volop = (8 CeV(ac,av) CeV(bc,bv) CeV(cc, | ||
+ | local areaop = 4 CeV(ac,av) CeV(bc,bv) Abs(cosphirot) + 4 CeV(ac,av) CeV(cc,cv) Abs(sinphirot) Abs(sinthetarot) + 4 CeV(bc,bv) CeV(cc,cv) Abs(costhetarot) Abs(sinphirot) ; | ||
+ | local sizeL = volop / areaop; | ||
+ | #m_endif | ||
+ | 'For Output purposes only | ||
+ | local ax = CeV(ac,av); | ||
+ | local bx = CeV(bc,bv); | ||
+ | local cx = CeV(cc,cv); | ||
+ | local px = CeV(pc,pv); | ||
+ | local tx = CeV(tc,tv); | ||
+ | local nx = CeV(nc,nv); | ||
+ | local modx = mod; | ||
+ | local vole = volop; | ||
+ | local larea = volop^(1/ | ||
+ | local kk = larea / sizeL ; | ||
+ | local areaoe = areaop; | ||
+ | local phi = If(cosphi < -1, 180, If (cosphi > 1, 0, ArcCos(cosphi)*Rad)); | ||
+ | local the = If(costheta < -1, 180, If (costheta > 1, 0, ArcCos(costheta)*Rad)); | ||
+ | local phirot = If(cosphirot < -1, 180, If (cosphirot > 1, 0, ArcCos(cosphirot)*Rad)); | ||
+ | local therot = If(costhetarot < -1, 180, If (costhetarot > 1, 0, ArcCos(costhetarot)*Rad)); | ||
+ | ' | ||
+ | ' | ||
+ | lor_fwhm = 0.1 18.2378130556208 Lam / (Cos(Th) sizeL); | ||
+ | } | ||
+ | |||
+ | macro AnisoCSout(file) { | ||
+ | ' | ||
+ | out file | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | |||
+ | Out_String(" | ||
+ | | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | macro AnisoCSg( tauc, tauv) | ||
+ | { | ||
+ | #m_argu tauc If_Prm_Eqn_Rpt(tauc, | ||
+ | ' | ||
+ | local para = Abs((costhetarot*sinphirot)/ | ||
+ | local parb = Abs((sinthetarot*sinphirot)/ | ||
+ | local parc = Abs((cosphirot)/ | ||
+ | ' | ||
+ | local pard = Sqrt(para^2+parb^2); | ||
+ | local pare = pard/parc; | ||
+ | local parf = Sqrt(1-pare^2); | ||
+ | 'Here comes the tricky part | ||
+ | ' | ||
+ | local ev = If(modx < 2, | ||
+ | ' | ||
+ | If(modx < 3, | ||
+ | 'Eq. (11) | ||
+ | If(pard <= 0.0001, | ||
+ | 'Eq. (12) | ||
+ | If(pard < parc, CeV(tauc, tauv) * ( (2/parc) - (8/ | ||
+ | ((2*parc)/ | ||
+ | 'Eq. (13) | ||
+ | CeV(tauc, tauv)*((16)/ | ||
+ | ' | ||
+ | 'Eq. (8) | ||
+ | If(And(para> | ||
+ | 'Eq. (9) | ||
+ | If(And(parb> | ||
+ | 'Eq. (10) | ||
+ | CeV(tauc, tauv)*(2/ | ||
+ | ); | ||
+ | 'IB calculations Eq. (1-3) | ||
+ | local ibV = 1/ev; | ||
+ | local ibL = 1/ | ||
+ | 'ibG is 0 if ibV < ibL | ||
+ | local ibG = If (ibV > ibL, ((Sqrt((4*ibV^2)-(4.27679864*ibV*ibL)+(0.27679864*ibL^2)))/ | ||
+ | 'CS_G macro | ||
+ | local sizeG = ibG/ | ||
+ | gauss_fwhm = 0.1 Rad Lam sizeG / Cos(Th); | ||
+ | 'For Output purposes only | ||
+ | local taux = CeV(tauc, tauv); | ||
+ | } | ||
+ | |||
+ | macro AnisoCSgout(file) { | ||
+ | out file | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | Out_String(" | ||
+ | | ||
+ | |||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | |||
+ | } | ||
+ | |||
+ | macro PlotAnisoCS | ||
+ | { | ||
+ | ' | ||
+ | | ||
+ | ' | ||
+ | | ||
+ | 1/( ( ((Abs((1/ | ||
+ | ' | ||
+ | 1/( ( ((Abs((1/ | ||
+ | ) | ||
+ | ); | ||
+ | } | ||