feat: adds unapproximated nam calc
This commit is contained in:
@@ -137,3 +137,31 @@ def test_nam_eps():
|
||||
np.testing.assert_allclose(
|
||||
eps_to_test(1e17), 1, rtol=1e-6, err_msg="above cutoff bad"
|
||||
)
|
||||
|
||||
|
||||
def test_unapproximated_nam_eps():
|
||||
u_c = 1e15
|
||||
eps_to_test = pyewjn.dielectric.nam_dielectric_coefficient_approximator.get_unapproximated_nam_dielectric(
|
||||
u_c,
|
||||
CalculationParams(
|
||||
omega=1e9, omega_p=3.54491e15, tau=1e-14, v_f=2e6, t_rel=0.8, t_c=1e11
|
||||
),
|
||||
)
|
||||
|
||||
np.testing.assert_allclose(
|
||||
eps_to_test(10),
|
||||
-3.789672906817707e10 + 3.257134605133221e8j,
|
||||
rtol=1e-3,
|
||||
err_msg="below u_l bad",
|
||||
)
|
||||
|
||||
np.testing.assert_allclose(
|
||||
eps_to_test(1e10),
|
||||
-2.645743e8 + 2.293455422222e6j,
|
||||
rtol=1e-3,
|
||||
err_msg="linear region bad",
|
||||
)
|
||||
|
||||
np.testing.assert_allclose(
|
||||
eps_to_test(1e17), 1, rtol=1e-6, err_msg="above cutoff bad"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user