eos_macro
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
eos_macro [2014/01/03 10:17] – created metty | eos_macro [2022/11/03 15:08] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== EoS_Macro ====== | ||
+ | Description: | ||
+ | |||
+ | 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: | ||
+ | |||
+ | <code topas>' | ||
+ | ' 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), | ||
+ | ' between the determination/ | ||
+ | ' 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, | ||
+ | ' 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 " | ||
+ | ' 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" | ||
+ | |||
+ | |||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | 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 | ||
+ | ' | ||
+ | |||
+ | |||
+ | |||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' 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. | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | |||
+ | '# | ||
+ | '# | ||
+ | '# | ||
+ | #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 | ||
+ | |||
+ | |||
+ | ' | ||
+ | |||
+ | prm A0_MVa | ||
+ | prm A0_MVb | ||
+ | prm A0_MVc | ||
+ | |||
+ | ' | ||
+ | |||
+ | prm K0_MVa | ||
+ | prm K0_MVb | ||
+ | prm K0_MVc | ||
+ | |||
+ | ' | ||
+ | |||
+ | prm K0p_MVa 5 min =0; max=10; ' | ||
+ | prm K0p_MVb 5 min =0; max=10; | ||
+ | prm K0p_MVc 5 min =0; max=10; | ||
+ | |||
+ | ' | ||
+ | |||
+ | prm uuu_Ma = 3 * K0_MVa; | ||
+ | prm uuu_Mb = 3 * K0_MVb; | ||
+ | prm uuu_Mc = 3 * K0_MVc; | ||
+ | prm vvv_Ma = 3/ | ||
+ | prm vvv_Mb = 3/ | ||
+ | prm vvv_Mc = 3/ | ||
+ | |||
+ | |||
+ | ' Bulk-Parameters for the inverted Murnaghan EoS as well as for the | ||
+ | ' inverted third order Vinet EoS approximation (Volume/ | ||
+ | |||
+ | |||
+ | prm MVV0 | ||
+ | prm MVK0 | ||
+ | prm MVKp0 5.0 min =0; max=100; | ||
+ | |||
+ | ' | ||
+ | |||
+ | 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)/ | ||
+ | |||
+ | local volume_loc = MVV0 ( (MVKp0/MVK0 ) pressure_loc +1)^(-1/ | ||
+ | |||
+ | 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/ | ||
+ | local lp_b = A0_MVb ( (K0p_MVb/ | ||
+ | local lp_c = A0_MVc ( (K0p_MVc/ | ||
+ | |||
+ | a =lp_a; | ||
+ | b =lp_b; | ||
+ | c =lp_c; | ||
+ | |||
+ | |||
+ | #else #ifdef inv_third_order_vinet_eos_approx_bulk | ||
+ | |||
+ | |||
+ | local prss = pressure_loc; | ||
+ | |||
+ | local multparam = (lp_a_predetermined*lp_b_predetermined*lp_c_predetermined)/ | ||
+ | |||
+ | local vinetfvolume = -(1/ | ||
+ | |||
+ | 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; | ||
+ | |||
+ | local vinetflatticea = -(1/ | ||
+ | |||
+ | ' | ||
+ | ' | ||
+ | |||
+ | ' | ||
+ | |||
+ | local lp_a = vinetflatticea*A0_MVa; | ||
+ | |||
+ | local vinetflatticeb = -(1/ | ||
+ | |||
+ | ' | ||
+ | ' | ||
+ | |||
+ | ' | ||
+ | |||
+ | local lp_b = vinetflatticeb*A0_MVb; | ||
+ | |||
+ | local vinetflatticec = -(1/ | ||
+ | |||
+ | ' | ||
+ | ' | ||
+ | |||
+ | ' | ||
+ | |||
+ | local lp_c = vinetflatticec*A0_MVc; | ||
+ | |||
+ | a =lp_a; | ||
+ | b =lp_b; | ||
+ | c =lp_c; | ||
+ | |||
+ | |||
+ | # | ||
+ | |||
+ | |||
+ | 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" | ||
+ | ' | ||
+ | |||
+ | |||
+ | xdd " | ||
+ | |||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | str / hkl_Is ' | ||
+ | |||
+ | ' | ||
+ | |||
+ | local !pressure_loc 0.0 | ||
+ | |||
+ | ' | ||
+ | |||
+ | local !lp_a_predetermined 5.55696`_0.00007 | ||
+ | local !lp_b_predetermined 5.56405`_0.00009 | ||
+ | local !lp_c_predetermined 7.85508`_0.00011 | ||
+ | |||
+ | |||
+ | ' | ||
+ | ' | ||
+ | |||
+ | |||
+ | 'Use EoS Macro: | ||
+ | |||
+ | EoS_Macro | ||
+ | |||
+ | |||
+ | xdd " | ||
+ | |||
+ | |||
+ | .......... | ||
+ | </ |