Zephyr Scientific Library (zscilib)
|
API header file for energy in zscilib. More...
#include <zsl/zsl.h>
Go to the source code of this file.
Functions | |
int | zsl_phy_ener_kin (zsl_real_t v, zsl_real_t m, zsl_real_t *ke) |
Calculates the kinetic energy of a moving object based on its mass (m) and velocity (v). More... | |
int | zsl_phy_ener_rot (zsl_real_t omega, zsl_real_t i, zsl_real_t *rke) |
Calculates the angular kinetic energy of a rotating object based on its angular velocity (omega) and moment of inertia (i). More... | |
int | zsl_phy_ener_grav_pot (zsl_real_t m, zsl_real_t h, zsl_real_t *ug) |
Calculates the gravitational potential energy in joules of an object based on its mass (m) and its height (h) with respect to a chosen initial height. More... | |
int | zsl_phy_ener_elas_pot (zsl_real_t k, zsl_real_t dist, zsl_real_t *ue) |
Calculates the elastic potential energy of a spring based on the distance it has been compressed/expanded and its characteristic 'k' constant. More... | |
int | zsl_phy_ener_power (zsl_real_t ener, zsl_real_t time, zsl_real_t *power) |
Calculates the power by dividing energy or work by time. More... | |
int | zsl_phy_ener_fric (zsl_real_t fric, zsl_real_t dist, zsl_real_t *e) |
Calculates the energy lost due to a friction force based on the distance the object experiencing the friction has moved. More... | |
int | zsl_phy_ener_mec (zsl_real_t ke, zsl_real_t rke, zsl_real_t ug, zsl_real_t ue, zsl_real_t *me) |
Calculates the total mechanical energy of a system by adding kinetic energy (linear and angular) and potential energy (gravitational and elastic). More... | |
int | zsl_phy_ener_final (zsl_real_t ei1, zsl_real_t ei2, zsl_real_t ei3, zsl_real_t ei4, zsl_real_t ef1, zsl_real_t ef2, zsl_real_t ef3, zsl_real_t *ef4) |
Given the initial values of the two kinetic (linear and rotational) and the two potential (gravitational and elastic) energies, and three of the four final values of these energies, this function calculates the fourth value of the unknown final energy using the conservation of mechanical energy. More... | |
int | zsl_phy_ener_photon (zsl_real_t f, zsl_real_t *e) |
Calculates the energy in electron volts of a photon based on it's frequency in hertz. More... | |
int | zsl_phy_ener_photon2 (zsl_real_t lambda, zsl_real_t *e) |
Calculates the energy in electron volts of a photon based on it's wavelength in ???. More... | |
API header file for energy in zscilib.
This file contains the zscilib energy APIs
Definition in file energy.h.