Ejemplo n.º 1
0
 def test_default(self):
     for rx in [
         get_ionic_radii("Sr", charge=2, coordination=8),
         get_ionic_radii("Mn", charge=2, coordination=8),
         get_ionic_radii("Mg", charge=2, coordination=8),
         get_ionic_radii("Ba", charge=2, coordination=8),
     ]:
         D_j = self.D0 * strain_coefficient(
             self.ri, rx, r0=self.r0, E=self.E, T=self.Tk
         )
         self.assertTrue(D_j > 0.0)
         self.assertTrue(D_j < self.D0)
Ejemplo n.º 2
0
 def test_modulus_not_specified(self):
     rx = get_ionic_radii("Sr", charge=2, coordination=8)
     D_j = self.D0 * strain_coefficient(self.ri, rx, r0=self.r0, z=2, T=self.Tk)
     self.assertTrue(D_j > 0.0)
     self.assertTrue(D_j < self.D0)
Ejemplo n.º 3
0
#
fontsize = 8
fig, ax = plt.subplots(1)

site2labels = ["Na", "Ca", "Eu", "Sr"]
# get the Shannon ionic radii for the elements in the 2+ site
site2radii = [
    get_ionic_radii("Na", charge=1, coordination=8),
    *[
        get_ionic_radii(el, charge=2, coordination=8)
        for el in ["Ca", "Eu", "Sr"]
    ],
]
# plot the relative paritioning curve for cations in the 2+ site
site2Ds = D_Ca * np.array(
    [strain_coefficient(rCa, rx, r0=r02, E=E_2, T=Tk) for rx in site2radii])
ax.scatter(site2radii, site2Ds, color="g", label="$X^{2+}$ Cations")
# create an index of radii, and plot the relative paritioning curve for the site
xs = np.linspace(0.9, 1.3, 200)
curve2Ds = D_Ca * strain_coefficient(rCa, xs, r0=r02, E=E_2, T=Tk)
ax.plot(xs, curve2Ds, color="0.5", ls="--")
# add the element labels next to the points
for l, r, d in zip(site2labels, site2radii, site2Ds):
    ax.annotate(l,
                xy=(r, d),
                xycoords="data",
                ha="left",
                va="bottom",
                fontsize=fontsize)
fig
########################################################################################