From 6d3bf1ea8907de654dade1dbb91e88e3657261d6 Mon Sep 17 00:00:00 2001 From: Jan Drewniok <97012901+Drewniok@users.noreply.github.com> Date: Wed, 19 Apr 2023 11:14:49 +0200 Subject: [PATCH] :art: Changed the unit of the lambda-tf physical parameter from meter to nanometer (#188) * :art: Unit of `lambda_tf` is changed from meter to nanometer. * :art: `epsilon_r` is unit-less. --- .../sidb/sidb_simulation_parameters.hpp | 20 +++++++++---------- .../charge_distribution_surface.hpp | 2 +- .../charge_distribution_surface.cpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/fiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp b/include/fiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp index da8db5c17..c684c363f 100644 --- a/include/fiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp +++ b/include/fiction/algorithms/simulation/sidb/sidb_simulation_parameters.hpp @@ -27,14 +27,14 @@ struct sidb_simulation_parameters * @param mu_minus it is the energy transition level (0/-). * @param relative_permittivity it describes the electric field reduction due to polarization. * @param screening_distance also known as "Thomas-Fermi screening" and it describes the electric field screening - * due to free charges. + * due to free charges in nm. * @param a lattice constant in Å (Ångström). * @param b lattice constant in Å. * @param c lattice constant in Å. */ constexpr explicit sidb_simulation_parameters(const uint8_t base_number = 3, const double mu_minus = -0.32, const double relative_permittivity = 5.6, - const double screening_distance = 5.0 * 1E-9, const double a = 3.84, + const double screening_distance = 5.0, const double a = 3.84, const double b = 7.68, const double c = 2.25) : lat_a{a}, lat_b{b}, @@ -51,35 +51,35 @@ struct sidb_simulation_parameters } /** - * lat_a is the lattice vector in x-direction. + * lat_a is the lattice vector in x-direction (unit: Å). */ double lat_a; /** - * lat_b is the lattice vector in y-direction. + * lat_b is the lattice vector in y-direction (unit: Å). */ double lat_b; /** - * lat_c is the dimer pair separation. + * lat_c is the dimer pair separation (unit: Å). */ double lat_c; /** - * epsilon_r is the electric permittivity. It is a material specific number. + * epsilon_r is the electric permittivity. It is a material specific number (unit-less). */ double epsilon_r; /** - * k is the Coulomb constant and is inversely proportional to the electric permittivity. + * k is the Coulomb constant and is inversely proportional to the electric permittivity (unit: SI). */ double k; /** - * lambda_tf is the Thomas-Fermi screening distance. + * lambda_tf is the Thomas-Fermi screening distance (unit: nm). */ double lambda_tf; /** - * µ- is the energy transition level (0/-) + * µ- is the energy transition level (0/-) (unit: eV). */ double mu; /** - * µ+ is the energy transition level (+/0) + * µ+ is the energy transition level (+/0) (unit: eV). */ double mu_p; /** diff --git a/include/fiction/technology/charge_distribution_surface.hpp b/include/fiction/technology/charge_distribution_surface.hpp index 1be588511..6ed91c72e 100644 --- a/include/fiction/technology/charge_distribution_surface.hpp +++ b/include/fiction/technology/charge_distribution_surface.hpp @@ -481,7 +481,7 @@ class charge_distribution_surface : public Lyt } return (strg->phys_params.k / (strg->nm_dist_mat[index1][index2] * 1E-9) * - std::exp(-strg->nm_dist_mat[index1][index2] * 1E-9 / strg->phys_params.lambda_tf) * + std::exp(-strg->nm_dist_mat[index1][index2] / strg->phys_params.lambda_tf) * physical_constants::ELECTRIC_CHARGE); } /** diff --git a/test/technology/charge_distribution_surface.cpp b/test/technology/charge_distribution_surface.cpp index a344baabb..8ebdade55 100644 --- a/test/technology/charge_distribution_surface.cpp +++ b/test/technology/charge_distribution_surface.cpp @@ -417,7 +417,7 @@ TEMPLATE_TEST_CASE( SECTION("using chargeless and normal potential function") { TestType lyt_new{{11, 11}}; - const sidb_simulation_parameters params{3, -0.32, 5.0 * 1E-9, 3.84 * 1E-10, 7.68 * 1E-10, 2.25 * 1E-10}; + const sidb_simulation_parameters params{3, -0.32, 5.0, 3.84, 7.68, 2.25}; lyt_new.assign_cell_type({0, 0, 1}, TestType::cell_type::NORMAL); lyt_new.assign_cell_type({1, 3, 0}, TestType::cell_type::NORMAL);