diff --git a/src/pymatgen/analysis/elasticity/elastic.py b/src/pymatgen/analysis/elasticity/elastic.py index c4826a9dfdc..d54a82df76c 100644 --- a/src/pymatgen/analysis/elasticity/elastic.py +++ b/src/pymatgen/analysis/elasticity/elastic.py @@ -135,6 +135,8 @@ class ElasticTensor(NthOrderElasticTensor): in units of eV/A^3. """ + eV_A3_to_GPa = Unit("eV ang^-3").get_conversion_factor(Unit("GPa")) + def __new__(cls, input_array, tol: float = 1e-4) -> Self: """ Create an ElasticTensor object. The constructor throws an error if the shape of @@ -201,7 +203,7 @@ def y_mod(self) -> float: Calculates Young's modulus (in SI units) using the Voigt-Reuss-Hill averages of bulk and shear moduli. """ - return 9.0e9 * self.k_vrh * self.g_vrh / (3 * self.k_vrh + self.g_vrh) + return 9.0e9 * self.k_vrh * self.g_vrh * self.eV_A3_to_GPa / (3 * self.k_vrh + self.g_vrh) def directional_poisson_ratio(self, n: ArrayLike, m: ArrayLike, tol: float = 1e-8) -> float: """ diff --git a/tests/analysis/elasticity/test_elastic.py b/tests/analysis/elasticity/test_elastic.py index 90526a7edb9..83a6b5e5f91 100644 --- a/tests/analysis/elasticity/test_elastic.py +++ b/tests/analysis/elasticity/test_elastic.py @@ -94,7 +94,7 @@ def test_properties(self): # voigt notation tensor assert_allclose(self.elastic_tensor_1.voigt, self.voigt_1) # young's modulus - assert self.elastic_tensor_1.y_mod == approx(54087787667.160583) + assert self.elastic_tensor_1.y_mod == approx(8665818958507.804) # prop dict prop_dict = self.elastic_tensor_1.property_dict @@ -127,7 +127,7 @@ def test_structure_based_methods(self): assert self.elastic_tensor_1.snyder_opt(struct) == approx(0.18937465) assert self.elastic_tensor_1.snyder_total(struct) == approx(18.25064540) # Clarke - assert self.elastic_tensor_1.clarke_thermalcond(struct) == approx(0.3450307) + assert self.elastic_tensor_1.clarke_thermalcond(struct) == approx(4.367299105244635) # Cahill cahill_thermal_cond = self.elastic_tensor_1.cahill_thermalcond(struct) assert cahill_thermal_cond == approx(0.37896275)