RNAlib-2.4.14
Unit Conversion

Functions to convert between various physical units. More...

Detailed Description

Functions to convert between various physical units.

+ Collaboration diagram for Unit Conversion:

Files

file  units.h
 Physical Units and Functions to convert them into each other.
 

Enumerations

Functions

double vrna_convert_energy (double energy, vrna_unit_energy_e from, vrna_unit_energy_e to)
 Convert between energy / work units. More...
 
double vrna_convert_temperature (double temp, vrna_unit_temperature_e from, vrna_unit_temperature_e to)
 Convert between temperature units. More...
 

Enumeration Type Documentation

#include <ViennaRNA/units.h>

Energy / Work Units.

See also
vrna_convert_energy()
Enumerator
VRNA_UNIT_J 

Joule ( $ 1~J = 1~kg \cdot m^2 s^{-2} $ )

VRNA_UNIT_KJ 

Kilojoule ( $ 1~kJ = 1,000~J $ )

VRNA_UNIT_CAL_IT 

Calorie (International (Steam) Table, $ 1~cal_{IT} = 4.1868~J $ )

VRNA_UNIT_DACAL_IT 

Decacolorie (International (Steam) Table, $ 1~dacal_{IT} = 10~cal_{IT} = 41.868~J $ )

VRNA_UNIT_KCAL_IT 

Kilocalorie (International (Steam) Table, $ 1~kcal_{IT} = 4.1868~kJ $ )

VRNA_UNIT_CAL 

Calorie (Thermochemical, $ 1~cal_{th} = 4.184~J $ )

VRNA_UNIT_DACAL 

Decacalorie (Thermochemical, $ 1~dacal_{th} = 10~cal_{th} = 41.84~J $ )

VRNA_UNIT_KCAL 

Kilocalorie (Thermochemical, $ 1~kcal_{th} = 4.184~kJ $ )

VRNA_UNIT_G_TNT 

g TNT ( $ 1~g~\mathrm{TNT} = 1,000~cal_{th} = 4,184~J $ )

VRNA_UNIT_KG_TNT 

kg TNT ( $ 1~kg~\mathrm{TNT} = 1,000~kcal_{th} = 4,184~kJ $ )

VRNA_UNIT_T_TNT 

ton TNT ( $ 1~t~\mathrm{TNT} = 1,000,000~kcal_{th} = 4,184~MJ $ )

VRNA_UNIT_EV 

Electronvolt ( $ 1~eV = 1.602176565 \times 10^{-19}~J $ )

VRNA_UNIT_WH 

Watt hour ( $ 1~W \cdot h = 1~W \cdot 3,600 s = 3,600~J = 3.6~kJ $ )

VRNA_UNIT_KWH 

Kilowatt hour ( $ 1~kW \cdot h = 1~kW \cdot 3,600~s = 3,600~kJ = 3.6~MJ $ )

#include <ViennaRNA/units.h>

Temperature Units.

See also
vrna_convert_temperature()
Enumerator
VRNA_UNIT_K 

Kelvin (K)

VRNA_UNIT_DEG_C 

Degree Celcius (°C) ( $ [^{\circ}C] = [K] - 273.15 $ )

VRNA_UNIT_DEG_F 

Degree Fahrenheit (°F) ( $ [^{\circ}F] = [K] \times \frac{9}{5} - 459.67 $ )

VRNA_UNIT_DEG_R 

Degree Rankine (°R) ( $ [^{\circ}R] = [K] \times \frac{9}{5} $ )

VRNA_UNIT_DEG_N 

Degree Newton (°N) ( $ [^{\circ}N] = ([K] - 273.15) \times \frac{33}{100} $ )

VRNA_UNIT_DEG_DE 

Degree Delisle (°De) ( $ [^{\circ}De] = (373.15 - [K]) \times \frac{3}{2} $ )

VRNA_UNIT_DEG_RE 

Degree Réaumur (°Ré) ( $ [^{\circ}R{\acute e}] = ([K] - 273.15) \times \frac{4}{5} $ )

VRNA_UNIT_DEG_RO 

Degree Rømer (°Rø) ( $ [^{\circ}\text{R{\o}}] = ([K] - 273.15) \times \frac{21}{40} + 7.5 $ )

Function Documentation

double vrna_convert_energy ( double  energy,
vrna_unit_energy_e  from,
vrna_unit_energy_e  to 
)

#include <ViennaRNA/units.h>

Convert between energy / work units.

See also
vrna_unit_energy_e
Parameters
energyInput energy value
fromInput unit
toOutput unit
Returns
Energy value in Output unit
double vrna_convert_temperature ( double  temp,
vrna_unit_temperature_e  from,
vrna_unit_temperature_e  to 
)

#include <ViennaRNA/units.h>

Convert between temperature units.

See also
vrna_unit_temperature_e
Parameters
tempInput temperature value
fromInput unit
toOutput unit
Returns
Temperature value in Output unit