Zephyr Scientific Library (zscilib)
|
Work functions. More...
Files | |
file | work.h |
API header file for work in zscilib. | |
Functions | |
int | zsl_phy_work_module (zsl_real_t f, zsl_real_t d, zsl_real_t *w) |
Calculates the module of the work done by a force (f) along a distance (d). More... | |
int | zsl_phy_work_x (zsl_real_t f, zsl_real_t d, zsl_real_t theta, zsl_real_t *w) |
Calculates the horizontal component of the work done by a force (f) along a distance (d). More... | |
int | zsl_phy_work_y (zsl_real_t f, zsl_real_t d, zsl_real_t theta, zsl_real_t *w) |
Calculates the vertical component of the work done by a force (f) along a distance (d). More... | |
int | zsl_phy_work_kin (zsl_real_t k1, zsl_real_t k2, zsl_real_t *w) |
Calculates the work required to change the kinetic energy of an object from 'k1' to 'k2'. More... | |
Work functions.
int zsl_phy_work_kin | ( | zsl_real_t | k1, |
zsl_real_t | k2, | ||
zsl_real_t * | w | ||
) |
Calculates the work required to change the kinetic energy of an object from 'k1' to 'k2'.
k1 | Initial kinetic energy of the object in joules. |
k2 | Final kinetic energy of the object in joules. |
w | Pointer to the output work in joules. |
int zsl_phy_work_module | ( | zsl_real_t | f, |
zsl_real_t | d, | ||
zsl_real_t * | w | ||
) |
Calculates the module of the work done by a force (f) along a distance (d).
f | Applied force in newtons. |
d | Distance in meters. |
w | Pointer to the output work in joules. Will be set to NAN if either the force or the distance are negative. |
int zsl_phy_work_x | ( | zsl_real_t | f, |
zsl_real_t | d, | ||
zsl_real_t | theta, | ||
zsl_real_t * | w | ||
) |
Calculates the horizontal component of the work done by a force (f) along a distance (d).
f | Applied force in newtons. |
d | Distance in meters. |
theta | The angle between the force and distance vectors. |
w | Pointer to the output work in the x-axis in joules. Will be set to NAN if either the force or the distance are negative. |
int zsl_phy_work_y | ( | zsl_real_t | f, |
zsl_real_t | d, | ||
zsl_real_t | theta, | ||
zsl_real_t * | w | ||
) |
Calculates the vertical component of the work done by a force (f) along a distance (d).
f | Applied force in newtons. |
d | Distance in meters. |
theta | The angle between the force and distance vectors. |
w | Pointer to the output work in the y-axis in joules. Will be set to NAN if either the force or the distance are negative. |