eos_macro
EoS_Macro
Description: Determining equation of state (EoS) parameters
This macro can be used to determine automatically EoS parameters either for the lattice parameters or the cell volume for two different EoS, namely for the inverted Murnaghan EoS (Murnaghan, F. D.; Proc. Natl. Acad. Sci USA, 30, 244–247, 1944) and for the inverted third order Vinet EoS approximation (Etter, M; Dinnebier, R.E.; J. Appl. Crystallogr. 47, (2014), Part 1, pages 384-390). The application of the macro is explained in the comments within the macro.
Contributed by: Martin Etter and Robert E. Dinnebier
Ready-to-use macro:
' ' EoS-Macro by Martin Etter (m.etter@fkf.mpg.de / m.etter.sci@gmail.com) and Robert E. Dinnebier (r.dinnebier@fkf.mpg.de) ' ' This Macro provides routines to determine the equation of state (EoS) parameters ' of an inverted Murnaghan EoS (Murnaghan, F. D.; Proc. Natl. Acad. Sci USA, 30, 244–247, 1944) ' or an inverted third order Vinet EoS approximation (Etter, M; Dinnebier, R.E.; J. Appl. Crystallogr. 47, ' (2014), Part 1, pages 384-390) out of a parametric Rietveld/Le Bail/Pawley refinement. In general it would also be ' possible just to use the results of the aforementioned refinements in order to calculate the parameters. ' In each case (inverted Murnaghan EoS or inverted third order Vinet EoS approximation), there is a choice ' between the determination/optimization of the bulk values (volume at ambient pressure, ' bulk modulus and the first pressure derivative) or the EoS parameters for the lattice parameters. ' Please note that this macro is written for the orthomrhombic case. If you want to use it for the ' tetragonal or cubic case, it must be modified, meaning the a, b, c lattice parameters within the macro ' must be changed. ' If an invalid d spacing error occurs, please change the starting values for the EoS parameters ' or change the min/max values of the corresponding bulk/linear modulus and its pressure derivative ' (Sometimes a smaller min/max range will help). ' In some cases it is convenient, to determine first the Murnaghan EoS parameters and then to use ' the resulting values as start values for the inverted third order Vinet EoS approximation. ' If you want to determine negative values for the pressure derivative for the lattice parameters ' together with the inverted third order Vinet EoS approximation, then you have to switch to the ' negative case within the macro. ' The determination of the bulk EoS parameters must be done by predetermined lattice parameters which ' must be given, as there is at the moment no stable way in TOPAS to refine directly the volume. ' If you have questions about this macro, please feel free to write the authors! ' If you use this macro, please cite "Etter, Martin and Dinnebier, Robert E.: ' Direct parameterization of the volume on pressure dependence by using ' an inverted approximative Vinet equation of state; Journal of ' Applied Crystallography 47, (2014), Part 1, pages 384-390". '---------------------------------------------------------------------------------- 'Global definitions '---------------------------------------------------------------------------------- r_exp 0 r_exp_dash 0 r_wp 0 r_wp_dash 0 r_p 0 r_p_dash 0 weighted_Durbin_Watson 0 gof 0 iters 100000 do_errors 'conserve_memory '----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X- '----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X- ' ' Choice between inverted Murnaghan EoS or inverted third order Vinet EoS approximation and ' bulk or linearized versions. Please comment out the one you want to use. ' If nothing is chosen, lattice parameters will be free refined. ' '----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X- '----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X----X- '#define murnaghan_eos_bulk '#define murnaghan_eos_linear '#define inv_third_order_vinet_eos_approx_bulk #define inv_third_order_vinet_eos_approx_linear '-------------------------------------------------------------------------------------- ' Global parameters '-------------------------------------------------------------------------------------- ' These parameters are common used and they will provide the results for your chosen ' option. As starting values you should provide the best values which you have, as ' this guarantees a stable refinement. ' Parameters for linearized inverted Murnaghan as well as for the ' linearized inverted third order Vinet EoS approximation 'Lattice parameters at ambient pressure prm A0_MVa 5.55904 min =5; max=6; 'Please chose min/max values according to your system prm A0_MVb 5.56612 min =5; max=6; 'Please chose min/max values according to your system prm A0_MVc 7.85481 min =6; max=9; 'Please chose min/max values according to your system 'Linear modulus prm K0_MVa 200 min =0; max=400; prm K0_MVb 200 min =0; max=400; prm K0_MVc 200 min =0; max=400; 'First pressure derivative of linear modulus. prm K0p_MVa 5 min =0; max=10; 'Please change min/max values in case of K' < 0. prm K0p_MVb 5 min =0; max=10; 'Please change min/max values in case of K' < 0. prm K0p_MVc 5 min =0; max=10; 'Please change min/max values in case of K' < 0. 'Calculation values which are needed only for the linearized inverted third order Vinet EoS approximation prm uuu_Ma = 3 * K0_MVa; :0 prm uuu_Mb = 3 * K0_MVb; :0 prm uuu_Mc = 3 * K0_MVc; :0 prm vvv_Ma = 3/2*(K0p_MVa - 1); :0 prm vvv_Mb = 3/2*(K0p_MVb - 1); :0 prm vvv_Mc = 3/2*(K0p_MVc - 1); :0 ' Bulk-Parameters for the inverted Murnaghan EoS as well as for the ' inverted third order Vinet EoS approximation (Volume/Bulk modulus/Pressure derivative) prm MVV0 242.875 min =100; max=400; prm MVK0 200.0 min =0; max=400; prm MVKp0 5.0 min =0; max=100; 'Calculation values which are needed only for the inverted third order Vinet EoS approximation prm uuu = 3 * MVK0; :0 prm vvv = 3/2*(MVKp0 - 1); :0 '-------------------------------------------------------------------------------------- ' EoS Macro '-------------------------------------------------------------------------------------- macro EoS_Macro { #ifdef murnaghan_eos_bulk local multparam = (lp_a_predetermined*lp_b_predetermined*lp_c_predetermined)/(volume_loc); local volume_loc = MVV0 ( (MVKp0/MVK0 ) pressure_loc +1)^(-1/(MVKp0)); local lp_a = multparam * lp_a_predetermined; local lp_b = multparam * lp_b_predetermined; local lp_c = multparam * lp_c_predetermined; a =lp_a; b =lp_b; c =lp_c; #else #ifdef murnaghan_eos_linear local lp_a = A0_MVa ( (K0p_MVa/K0_MVa ) pressure_loc +1)^(-1/(3 K0p_MVa)); local lp_b = A0_MVb ( (K0p_MVb/K0_MVb ) pressure_loc +1)^(-1/(3 K0p_MVb)); local lp_c = A0_MVc ( (K0p_MVc/K0_MVc ) pressure_loc +1)^(-1/(3 K0p_MVc)); a =lp_a; b =lp_b; c =lp_c; #else #ifdef inv_third_order_vinet_eos_approx_bulk local prss = pressure_loc; :0 local multparam = (lp_a_predetermined*lp_b_predetermined*lp_c_predetermined)/(volume_loc); local vinetfvolume = -(1/4)*(-4*uuu*vvv^3-3*uuu*vvv^2)/(uuu*vvv^3)+(1/2)*((1/4)*(-4*uuu*vvv^3-3*uuu*vvv^2)^2/(uuu^2*vvv^6)-(9*uuu*vvv^2-6*prss+6*uuu*vvv^3+6*uuu*vvv)/(uuu*vvv^3)+(36*uuu^2*vvv^3*prss+21*uuu^2*vvv^4*prss+8*uuu^3*vvv^3-8*prss^3+24*uuu*vvv^3*prss^2+24*uuu*vvv*prss^2-6*uuu^2*vvv^2*prss+36*uuu*vvv^2*prss^2+(-(-72*uuu^4*vvv^3-720*uuu^3*vvv^3*prss-756*uuu^2*vvv*prss^2-432*uuu^3*vvv^4*prss-3060*uuu^2*vvv^3*prss^2-3024*prss^3*uuu*vvv-2664*uuu^2*vvv^4*prss^2-1296*uuu^2*vvv^2*prss^2-7920*uuu*vvv^2*prss^3+288*uuu*prss^3-825*uuu^2*vvv^5*prss^2-9576*prss^3*uuu*vvv^3+1152*vvv*prss^4-6000*uuu*vvv^4*prss^3+576*vvv^2*prss^4+1152*prss^4-2304*uuu*vvv^5*prss^3+192*prss^4*vvv^3-512*uuu*vvv^6*prss^3)/vvv)^(1/2)*uuu*vvv^2)^(1/3)/(uuu*vvv^3)+2*(-(uuu^2*vvv^2)-6*uuu*vvv^2*prss+2*prss^2-4*uuu*vvv^3*prss-4*uuu*vvv*prss)/(uuu*vvv^3*(36*uuu^2*vvv^3*prss+21*uuu^2*vvv^4*prss+8*uuu^3*vvv^3-8*prss^3+24*uuu*vvv^3*prss^2+24*uuu*vvv*prss^2-6*uuu^2*vvv^2*prss+36*uuu*vvv^2*prss^2+(-(-72*uuu^4*vvv^3-720*uuu^3*vvv^3*prss-756*uuu^2*vvv*prss^2-432*uuu^3*vvv^4*prss-3060*uuu^2*vvv^3*prss^2-3024*prss^3*uuu*vvv-2664*uuu^2*vvv^4*prss^2-1296*uuu^2*vvv^2*prss^2-7920*uuu*vvv^2*prss^3+288*uuu*prss^3-825*uuu^2*vvv^5*prss^2-9576*prss^3*uuu*vvv^3+1152*vvv*prss^4-6000*uuu*vvv^4*prss^3+576*vvv^2*prss^4+1152*prss^4-2304*uuu*vvv^5*prss^3+192*prss^4*vvv^3-512*uuu*vvv^6*prss^3)/vvv)^(1/2)*uuu*vvv^2)^(1/3))-(-3*uuu*vvv^2+2*prss-2*uuu*vvv^3-2*uuu*vvv)/(uuu*vvv^3))^(1/2)-(1/2)*((1/2)*(-4*uuu*vvv^3-3*uuu*vvv^2)^2/(uuu^2*vvv^6)-(9*uuu*vvv^2-6*prss+6*uuu*vvv^3+6*uuu*vvv)/(uuu*vvv^3)-(36*uuu^2*vvv^3*prss+21*uuu^2*vvv^4*prss+8*uuu^3*vvv^3-8*prss^3+24*uuu*vvv^3*prss^2+24*uuu*vvv*prss^2-6*uuu^2*vvv^2*prss+36*uuu*vvv^2*prss^2+(-(-72*uuu^4*vvv^3-720*uuu^3*vvv^3*prss-756*uuu^2*vvv*prss^2-432*uuu^3*vvv^4*prss-3060*uuu^2*vvv^3*prss^2-3024*prss^3*uuu*vvv-2664*uuu^2*vvv^4*prss^2-1296*uuu^2*vvv^2*prss^2-7920*uuu*vvv^2*prss^3+288*uuu*prss^3-825*uuu^2*vvv^5*prss^2-9576*prss^3*uuu*vvv^3+1152*vvv*prss^4-6000*uuu*vvv^4*prss^3+576*vvv^2*prss^4+1152*prss^4-2304*uuu*vvv^5*prss^3+192*prss^4*vvv^3-512*uuu*vvv^6*prss^3)/vvv)^(1/2)*uuu*vvv^2)^(1/3)/(uuu*vvv^3)-2*(-(uuu^2*vvv^2)-6*uuu*vvv^2*prss+2*prss^2-4*uuu*vvv^3*prss-4*uuu*vvv*prss)/(uuu*vvv^3*(36*uuu^2*vvv^3*prss+21*uuu^2*vvv^4*prss+8*uuu^3*vvv^3-8*prss^3+24*uuu*vvv^3*prss^2+24*uuu*vvv*prss^2-6*uuu^2*vvv^2*prss+36*uuu*vvv^2*prss^2+(-(-72*uuu^4*vvv^3-720*uuu^3*vvv^3*prss-756*uuu^2*vvv*prss^2-432*uuu^3*vvv^4*prss-3060*uuu^2*vvv^3*prss^2-3024*prss^3*uuu*vvv-2664*uuu^2*vvv^4*prss^2-1296*uuu^2*vvv^2*prss^2-7920*uuu*vvv^2*prss^3+288*uuu*prss^3-825*uuu^2*vvv^5*prss^2-9576*prss^3*uuu*vvv^3+1152*vvv*prss^4-6000*uuu*vvv^4*prss^3+576*vvv^2*prss^4+1152*prss^4-2304*uuu*vvv^5*prss^3+192*prss^4*vvv^3-512*uuu*vvv^6*prss^3)/vvv)^(1/2)*uuu*vvv^2)^(1/3))+(-3*uuu*vvv^2+2*prss-2*uuu*vvv^3-2*uuu*vvv)/(uuu*vvv^3)+((9*uuu*vvv^2-6*prss+6*uuu*vvv^3+6*uuu*vvv)*(-4*uuu*vvv^3-3*uuu*vvv^2)/(uuu^2*vvv^6)-2*(-4*uuu*vvv^3-9*uuu*vvv^2-12*uuu*vvv-6*uuu)/(uuu*vvv^3)-(1/4)*(-4*uuu*vvv^3-3*uuu*vvv^2)^3/(uuu^3*vvv^9))/((1/4)*(-4*uuu*vvv^3-3*uuu*vvv^2)^2/(uuu^2*vvv^6)-(9*uuu*vvv^2-6*prss+6*uuu*vvv^3+6*uuu*vvv)/(uuu*vvv^3)+(36*uuu^2*vvv^3*prss+21*uuu^2*vvv^4*prss+8*uuu^3*vvv^3-8*prss^3+24*uuu*vvv^3*prss^2+24*uuu*vvv*prss^2-6*uuu^2*vvv^2*prss+36*uuu*vvv^2*prss^2+(-(-72*uuu^4*vvv^3-720*uuu^3*vvv^3*prss-756*uuu^2*vvv*prss^2-432*uuu^3*vvv^4*prss-3060*uuu^2*vvv^3*prss^2-3024*prss^3*uuu*vvv-2664*uuu^2*vvv^4*prss^2-1296*uuu^2*vvv^2*prss^2-7920*uuu*vvv^2*prss^3+288*uuu*prss^3-825*uuu^2*vvv^5*prss^2-9576*prss^3*uuu*vvv^3+1152*vvv*prss^4-6000*uuu*vvv^4*prss^3+576*vvv^2*prss^4+1152*prss^4-2304*uuu*vvv^5*prss^3+192*prss^4*vvv^3-512*uuu*vvv^6*prss^3)/vvv)^(1/2)*uuu*vvv^2)^(1/3)/(uuu*vvv^3)+2*(-(uuu^2*vvv^2)-6*uuu*vvv^2*prss+2*prss^2-4*uuu*vvv^3*prss-4*uuu*vvv*prss)/(uuu*vvv^3*(36*uuu^2*vvv^3*prss+21*uuu^2*vvv^4*prss+8*uuu^3*vvv^3-8*prss^3+24*uuu*vvv^3*prss^2+24*uuu*vvv*prss^2-6*uuu^2*vvv^2*prss+36*uuu*vvv^2*prss^2+(-(-72*uuu^4*vvv^3-720*uuu^3*vvv^3*prss-756*uuu^2*vvv*prss^2-432*uuu^3*vvv^4*prss-3060*uuu^2*vvv^3*prss^2-3024*prss^3*uuu*vvv-2664*uuu^2*vvv^4*prss^2-1296*uuu^2*vvv^2*prss^2-7920*uuu*vvv^2*prss^3+288*uuu*prss^3-825*uuu^2*vvv^5*prss^2-9576*prss^3*uuu*vvv^3+1152*vvv*prss^4-6000*uuu*vvv^4*prss^3+576*vvv^2*prss^4+1152*prss^4-2304*uuu*vvv^5*prss^3+192*prss^4*vvv^3-512*uuu*vvv^6*prss^3)/vvv)^(1/2)*uuu*vvv^2)^(1/3))-(-3*uuu*vvv^2+2*prss-2*uuu*vvv^3-2*uuu*vvv)/(uuu*vvv^3))^(1/2))^(1/2); :0 local volume_loc = vinetfvolume^3*MVV0; local lp_a = multparam * lp_a_predetermined; local lp_b = multparam * lp_b_predetermined; local lp_c = multparam * lp_c_predetermined; a =lp_a; b =lp_b; c =lp_c; #else #ifdef inv_third_order_vinet_eos_approx_linear local prss = pressure_loc; :0 local vinetflatticea = -(1/4)*(-4*uuu_Ma*vvv_Ma^3-3*uuu_Ma*vvv_Ma^2)/(uuu_Ma*vvv_Ma^3)+(1/2)*((1/4)*(-4*uuu_Ma*vvv_Ma^3-3*uuu_Ma*vvv_Ma^2)^2/(uuu_Ma^2*vvv_Ma^6)-(9*uuu_Ma*vvv_Ma^2-6*prss+6*uuu_Ma*vvv_Ma^3+6*uuu_Ma*vvv_Ma)/(uuu_Ma*vvv_Ma^3)+(36*uuu_Ma^2*vvv_Ma^3*prss+21*uuu_Ma^2*vvv_Ma^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Ma*vvv_Ma^2+2*prss-2*uuu_Ma*vvv_Ma^3-2*uuu_Ma*vvv_Ma)/(uuu_Ma*vvv_Ma^3))^(1/2))^(1/2); :0 'Use this equation in case of negative pressure derivatives of the linear modulus (K' < 0) for lattice 'parameter a and comment the above one. Using the equation above for negative K' will result in complex values! 'local vinetflatticea = -(1/4)*(-4*uuu_Ma*vvv_Ma^3-3*uuu_Ma*vvv_Ma^2)/(uuu_Ma*vvv_Ma^3)-(1/2)*((1/4)*(-4*uuu_Ma*vvv_Ma^3-3*uuu_Ma*vvv_Ma^2)^2/(uuu_Ma^2*vvv_Ma^6)-(9*uuu_Ma*vvv_Ma^2-6*prss+6*uuu_Ma*vvv_Ma^3+6*uuu_Ma*vvv_Ma)/(uuu_Ma*vvv_Ma^3)+(36*uuu_Ma^2*vvv_Ma^3*prss+21*uuu_Ma^2*vvv_Ma^4*prss+8*uuu_Ma^3*vvv_Ma^3-8*prss^3+24*uuu_Ma*vvv_Ma^3*prss^2+24*uuu_Ma*vvv_Ma*prss^2-6*uuu_Ma^2*vvv_Ma^2*prss+36*uuu_Ma*vvv_Ma^2*prss^2+(-(-72*uuu_Ma^4*vvv_Ma^3-720*uuu_Ma^3*vvv_Ma^3*prss-756*uuu_Ma^2*vvv_Ma*prss^2-432*uuu_Ma^3*vvv_Ma^4*prss-3060*uuu_Ma^2*vvv_Ma^3*prss^2-3024*prss^3*uuu_Ma*vvv_Ma-2664*uuu_Ma^2*vvv_Ma^4*prss^2-1296*uuu_Ma^2*vvv_Ma^2*prss^2-7920*uuu_Ma*vvv_Ma^2*prss^3+288*uuu_Ma*prss^3-825*uuu_Ma^2*vvv_Ma^5*prss^2-9576*prss^3*uuu_Ma*vvv_Ma^3+1152*vvv_Ma*prss^4-6000*uuu_Ma*vvv_Ma^4*prss^3+576*vvv_Ma^2*prss^4+1152*prss^4-2304*uuu_Ma*vvv_Ma^5*prss^3+192*prss^4*vvv_Ma^3-512*uuu_Ma*vvv_Ma^6*prss^3)/vvv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6*prss^3)/vvv_Mb)^(1/2)*uuu_Mb*vvv_Mb^2)^(1/3)/(uuu_Mb*vvv_Mb^3)+2*(-(uuu_Mb^2*vvv_Mb^2)-6*uuu_Mb*vvv_Mb^2*prss+2*prss^2-4*uuu_Mb*vvv_Mb^3*prss-4*uuu_Mb*vvv_Mb*prss)/(uuu_Mb*vvv_Mb^3*(36*uuu_Mb^2*vvv_Mb^3*prss+21*uuu_Mb^2*vvv_Mb^4*prss+8*uuu_Mb^3*vvv_Mb^3-8*prss^3+24*uuu_Mb*vvv_Mb^3*prss^2+24*uuu_Mb*vvv_Mb*prss^2-6*uuu_Mb^2*vvv_Mb^2*prss+36*uuu_Mb*vvv_Mb^2*prss^2+(-(-72*uuu_Mb^4*vvv_Mb^3-720*uuu_Mb^3*vvv_Mb^3*prss-756*uuu_Mb^2*vvv_Mb*prss^2-432*uuu_Mb^3*vvv_Mb^4*prss-3060*uuu_Mb^2*vvv_Mb^3*prss^2-3024*prss^3*uuu_Mb*vvv_Mb-2664*uuu_Mb^2*vvv_Mb^4*prss^2-1296*uuu_Mb^2*vvv_Mb^2*prss^2-7920*uuu_Mb*vvv_Mb^2*prss^3+288*uuu_Mb*prss^3-825*uuu_Mb^2*vvv_Mb^5*prss^2-9576*prss^3*uuu_Mb*vvv_Mb^3+1152*vvv_Mb*prss^4-6000*uuu_Mb*vvv_Mb^4*prss^3+576*vvv_Mb^2*prss^4+1152*prss^4-2304*uuu_Mb*vvv_Mb^5*prss^3+192*prss^4*vvv_Mb^3-512*uuu_Mb*vvv_Mb^6*prss^3)/vvv_Mb)^(1/2)*uuu_Mb*vvv_Mb^2)^(1/3))-(-3*uuu_Mb*vvv_Mb^2+2*prss-2*uuu_Mb*vvv_Mb^3-2*uuu_Mb*vvv_Mb)/(uuu_Mb*vvv_Mb^3))^(1/2))^(1/2); :0 'Use this equation in case of negative pressure derivatives of the linear modulus (K' < 0) for lattice 'parameter b and comment the above one. Using the equation above for negative K' will result in complex values! 'local vinetflatticeb =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uuu_Mc*vvv_Mc^3*(36*uuu_Mc^2*vvv_Mc^3*prss+21*uuu_Mc^2*vvv_Mc^4*prss+8*uuu_Mc^3*vvv_Mc^3-8*prss^3+24*uuu_Mc*vvv_Mc^3*prss^2+24*uuu_Mc*vvv_Mc*prss^2-6*uuu_Mc^2*vvv_Mc^2*prss+36*uuu_Mc*vvv_Mc^2*prss^2+(-(-72*uuu_Mc^4*vvv_Mc^3-720*uuu_Mc^3*vvv_Mc^3*prss-756*uuu_Mc^2*vvv_Mc*prss^2-432*uuu_Mc^3*vvv_Mc^4*prss-3060*uuu_Mc^2*vvv_Mc^3*prss^2-3024*prss^3*uuu_Mc*vvv_Mc-2664*uuu_Mc^2*vvv_Mc^4*prss^2-1296*uuu_Mc^2*vvv_Mc^2*prss^2-7920*uuu_Mc*vvv_Mc^2*prss^3+288*uuu_Mc*prss^3-825*uuu_Mc^2*vvv_Mc^5*prss^2-9576*prss^3*uuu_Mc*vvv_Mc^3+1152*vvv_Mc*prss^4-6000*uuu_Mc*vvv_Mc^4*prss^3+576*vvv_Mc^2*prss^4+1152*prss^4-2304*uuu_Mc*vvv_Mc^5*prss^3+192*prss^4*vvv_Mc^3-512*uuu_Mc*vvv_Mc^6*prss^3)/vvv_Mc)^(1/2)*uuu_Mc*vvv_Mc^2)^(1/3))-(-3*uuu_Mc*vvv_Mc^2+2*prss-2*uuu_Mc*vvv_Mc^3-2*uuu_Mc*vvv_Mc)/(uuu_Mc*vvv_Mc^3))^(1/2))^(1/2); :0 'Use this equation in case of negative pressure derivatives of the linear modulus (K' < 0) for lattice 'parameter c and comment the above one. Using the equation above for negative K' will result in complex values! 'local vinetflatticeb = -(1/4)*(-4*uuu_Ma*vvv_Ma^3-3*uuu_Ma*vvv_Ma^2)/(uuu_Ma*vvv_Ma^3)-(1/2)*((1/4)*(-4*uuu_Ma*vvv_Ma^3-3*uuu_Ma*vvv_Ma^2)^2/(uuu_Ma^2*vvv_Ma^6)-(9*uuu_Ma*vvv_Ma^2-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Ma*vvv_Ma^5*prss^3+192*prss^4*vvv_Ma^3-512*uuu_Ma*vvv_Ma^6*prss^3)/vvv_Ma)^(1/2)*uuu_Ma*vvv_Ma^2)^(1/3))-(-3*uuu_Ma*vvv_Ma^2+2*prss-2*uuu_Ma*vvv_Ma^3-2*uuu_Ma*vvv_Ma)/(uuu_Ma*vvv_Ma^3))^(1/2))^(1/2); :0 local lp_c = vinetflatticec*A0_MVc; a =lp_a; b =lp_b; c =lp_c; #else local lp_a 5.551365084 local lp_b 5.555947965 local lp_c 7.845048603 a =lp_a; b =lp_b; c =lp_c; #endif #endif #endif #endif } '-------------------------------------------------------------------------------------- ' list of all data files and corresponding individual parameters, please give ' "local !pressure_loc PRESSURE_VALUE_IN_GPA" for every pattern. '-------------------------------------------------------------------------------------- xdd "FILE_1.xy" 'HEADER INFORMATION: 'Background, zero shift, wavelength, data range, lorentz-polarisation factor, 'convolution step, furter fundamental parameters, ... str / hkl_Is 'Depends on whether you use Rietveld or Le Bail/Pawley. 'Provide here the pressure for the specified pattern. local !pressure_loc 0.0 'Predetermined values of the lattice parameters in order to use the bulk modulus determination local !lp_a_predetermined 5.55696`_0.00007 local !lp_b_predetermined 5.56405`_0.00009 local !lp_c_predetermined 7.85508`_0.00011 'STRUCTURE INFORMATON: 'Space group, crystallite size, strain, structure data (in case of Rietveld), ... 'Use EoS Macro: EoS_Macro xdd "FILE_2.xy" ..........
eos_macro.txt · Last modified: 2022/11/03 15:08 by 127.0.0.1