Zephyr Scientific Library (zscilib)
Files | Functions
Atomic

Atomic functions. More...

Files

file  atomic.h
 API header file for atomics in zscilib.
 

Functions

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...
 

Detailed Description

Atomic functions.

Function Documentation

◆ 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
zAtomic number of the atom.
nNumber of the orbit.
ePointer 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
zAtomic number of the atom.
nNumber of the orbit.
rPointer 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
zAtomic number of the atom.
nNumber of the orbit.
vPointer 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()

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.

Parameters
nPositive integer.
thetaAngle of incision in radians.
lambdaWavelenght in meters.
dPointer 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
aMass number of the atom.
rPointer 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()

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).

Parameters
qiInitial radioactive activity in becquerels.
tTime in seconds.
lambdaRadioactive decay constant defined as nuclear desintegrations per second.
qfPointer 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.