Atomic functions.
More...
|
file | atomic.h |
| API header file for atomics in zscilib.
|
|
|
int | zsl_phy_atom_nucl_radius (uint8_t a, zsl_real_t *r) |
| Calculates an approximation of the nuclear radius of an atom of mass number 'a'. More...
|
|
int | zsl_phy_atom_bohr_orb_radius (uint8_t z, uint8_t n, zsl_real_t *r) |
| Calculates the radius of the orbit of an electron in the n-th orbit of an atom with 'z' atomic number, according to the atomic Bohr model. More...
|
|
int | zsl_phy_atom_bohr_orb_vel (uint8_t z, uint8_t n, zsl_real_t *v) |
| Calculates the velocity in kilometers per second of an electron in the n-th orbit of an atom with 'z' atomic number, according to the Bohr model of the atom. More...
|
|
int | zsl_phy_atom_bohr_orb_ener (uint8_t z, uint8_t n, zsl_real_t *e) |
| Calculates the energy in electronvolts of an electron in the n-th orbit of an atom with 'z' atomic number, according to the Bohr model of the atom. More...
|
|
int | zsl_phy_atom_rad_decay (zsl_real_t qi, zsl_real_t t, zsl_real_t lambda, zsl_real_t *qf) |
| Calculates the radioactive activity in becquerels of a sample of radioactive material based on the initial activity (qi), the time (t) and the radioactive decay constant (lambda). More...
|
|
int | zsl_phy_atom_bragg (uint8_t n, zsl_real_t theta, zsl_real_t lambda, zsl_real_t *d) |
| Calculates the average distance in meters between the atoms of a crystalline system according to the Bragg's condition of constructive interferences. More...
|
|
Atomic functions.
◆ zsl_phy_atom_bohr_orb_ener()
int zsl_phy_atom_bohr_orb_ener |
( |
uint8_t |
z, |
|
|
uint8_t |
n, |
|
|
zsl_real_t * |
e |
|
) |
| |
Calculates the energy in electronvolts of an electron in the n-th orbit of an atom with 'z' atomic number, according to the Bohr model of the atom.
- Parameters
-
z | Atomic number of the atom. |
n | Number of the orbit. |
e | Pointer to the output energy in electronvolts. Will be set to NAN if the atomic number is zero. |
- Returns
- 0 if everything executed properly, error code on failure.
◆ zsl_phy_atom_bohr_orb_radius()
int zsl_phy_atom_bohr_orb_radius |
( |
uint8_t |
z, |
|
|
uint8_t |
n, |
|
|
zsl_real_t * |
r |
|
) |
| |
Calculates the radius of the orbit of an electron in the n-th orbit of an atom with 'z' atomic number, according to the atomic Bohr model.
- Parameters
-
z | Atomic number of the atom. |
n | Number of the orbit. |
r | Pointer to the output radius in nanometers. Will be set to NAN if the atomic is zero. |
- Returns
- 0 if everything executed properly, error code on failure.
◆ zsl_phy_atom_bohr_orb_vel()
int zsl_phy_atom_bohr_orb_vel |
( |
uint8_t |
z, |
|
|
uint8_t |
n, |
|
|
zsl_real_t * |
v |
|
) |
| |
Calculates the velocity in kilometers per second of an electron in the n-th orbit of an atom with 'z' atomic number, according to the Bohr model of the atom.
- Parameters
-
z | Atomic number of the atom. |
n | Number of the orbit. |
v | Pointer to the output velocity in kilometers per second. Will be set to NAN if the atomic number is zero. |
- Returns
- 0 if everything executed properly, error code on failure.
◆ zsl_phy_atom_bragg()
Calculates the average distance in meters between the atoms of a crystalline system according to the Bragg's condition of constructive interferences.
- Parameters
-
n | Positive integer. |
theta | Angle of incision in radians. |
lambda | Wavelenght in meters. |
d | Pointer to the output distance in meters. Will be set to NAN if lambda is negative or if sin(theta) is negative or zero. |
- Returns
- 0 if everything executed properly, error code on failure.
◆ zsl_phy_atom_nucl_radius()
int zsl_phy_atom_nucl_radius |
( |
uint8_t |
a, |
|
|
zsl_real_t * |
r |
|
) |
| |
Calculates an approximation of the nuclear radius of an atom of mass number 'a'.
- Parameters
-
a | Mass number of the atom. |
r | Pointer to the output radius in femtometers. Will be set to NAN if the mass number is zero. |
- Returns
- 0 if everything executed properly, error code on failure.
◆ zsl_phy_atom_rad_decay()
Calculates the radioactive activity in becquerels of a sample of radioactive material based on the initial activity (qi), the time (t) and the radioactive decay constant (lambda).
- Parameters
-
qi | Initial radioactive activity in becquerels. |
t | Time in seconds. |
lambda | Radioactive decay constant defined as nuclear desintegrations per second. |
qf | Pointer to the output radioactivity in becquerels. Will be set to NAN if either lambda or the time are negative. |
- Returns
- 0 if everything executed properly, error code on failure.