RUFAS.general_constants module#

class RUFAS.general_constants.GeneralConstants#

Bases: object

Contains general constants used in RuFaS.

Attributes#

BYTES_PER_GBint

Number of bytes in a gigabyte (bytes).

MM_TO_Mfloat

Conversion factor from millimeters to meters (m/mm).

CM_TO_MMfloat

Conversion factor from centimeters to millimeters (mm/cm).

MM_TO_CMfloat

Conversion factor from millimeters to centimeters (cm/mm).

M_TO_KMfloat

Conversion factor from meters to kilometers (km/m).

KM_TO_Mfloat

Conversion factor from kilometers to meters (m/km).

GRAMS_TO_KGfloat

Conversion factor from grams to kilograms (kg/g).

KG_TO_GRAMSfloat

Conversion factor from kilograms to grams (g/kg).

KG_TO_MILLIGRAMSfloat

Conversion factor from kilograms to milligrams (mg/kg).

MILLIGRAMS_TO_KGfloat

Conversion factor from milligrams to kilograms (kg/mg).

MEGAGRAMS_TO_KILOGRAMSfloat

Conversion factor from megagrams to kilograms (kg/Mg).

KILOGRAMS_TO_MEGAGRAMSfloat

Conversion factor from kilograms to megagrams (Mg/kg).

LITERS_TO_CUBIC_METERSfloat

Conversion factor from liters to cubic meters (m³/L).

CUBIC_METERS_TO_LITERSfloat

Conversion factor from cubic meters to liters (L/m³).

KG_TO_CUBIC_METERSfloat

Conversion factor from kilograms to cubic meters (m³/kg).

LITERS_TO_CUBIC_MILLIMETERSfloat

Conversion factor from liters to cubic millimeters (mm³/L).

CUBIC_MILLIMETERS_TO_LITERSfloat

Conversion factor from cubic millimeters to liters (L/mm³).

CUBIC_METERS_TO_CUBIC_MILLIMETERSfloat

Conversion factor from cubic meters to cubic millimeters (mm³/m³).

CUBIC_MILLIMETERS_TO_CUBIC_METERSfloat

Conversion factor from cubic millimeters to cubic meters (m³/mm³).

YEAR_LENGTHint

Number of days in a year (days/year).

LEAP_YEAR_LENGTHint

Number of days in a leap year (days/year).

SECONDS_PER_DAYint

Number of seconds in a day (s/day).

HOURS_PER_DAYint

Number of hours in a day (hr/day).

KCAL_TO_MJfloat

Conversion factor from kilocalories to megajoules (MJ/kcal).

MJ_CH4_TO_G_CH4float

Conversion factor from megajoules of methane to grams of methane (g CH₄/MJ CH₄).

EARTH_ANGULAR_VELOCITYfloat

Earth’s angular velocity (rad/s).

CELSIUS_TO_KELVINfloat

Conversion factor from Celsius to Kelvin (K/°C).

PERCENTAGE_TO_FRACTIONfloat

Conversion factor from percentage to fractional values (unitless).

FRACTION_TO_PERCENTAGEfloat

Conversion factor from fractional values to percentage (unitless).

HECTARES_TO_SQUARE_CENTIMETERSfloat

Conversion factor from hectares to square centimeters (cm²/ha).

SQUARE_CENTIMETERS_TO_HECTARESfloat

Conversion factor from square centimeters to hectares (ha/cm²).

HECTARES_TO_SQUARE_MILLIMETERSfloat

Conversion factor from hectares to square millimeters (mm²/ha).

SQUARE_MILLIMETERS_TO_HECTARESfloat

Conversion factor from square millimeters to hectares (ha/mm²).

SQUARE_KILOMETERS_TO_HECTARESfloat

Conversion factor from square kilometers to hectares (ha/km²).

HECTARES_TO_SQUARE_KILOMETERSfloat

Conversion factor from hectares to square kilometers (km²/ha).

HECTARES_PER_SQUARE_METERfloat

Conversion factor from hectares to square meters (ha/m²).

SQUARE_METERS_TO_HECTARESfloat

Conversion factor from square meters to hectares (m²/ha).

AMBIENT_AIR_MOLE_FRACTION_OF_OXYGENfloat

Mole fraction of oxygen in ambient air (unitless).

GAS_CONSTANTfloat

The ideal gas constant (J/(K·mol)).

IDEAL_GAS_LAW_Rfloat

Value of R in the ideal gas law (L·atm/(mol·K)).

CONSTANTS_TO_UNITSdict

A dictionary mapping constant names to their associated units.

BYTES_PER_GB = 1073741824#
MM_TO_M = 0.001#
CM_TO_MM = 10.0#
MM_TO_CM = 0.1#
M_TO_KM = 0.001#
KM_TO_M = 1000#
GRAMS_TO_KG = 0.001#
KG_TO_GRAMS = 1000#
KG_TO_MILLIGRAMS = 1000000#
MILLIGRAMS_TO_KG = 1e-06#
MEGAGRAMS_TO_KILOGRAMS = 1000#
KILOGRAMS_TO_MEGAGRAMS = 0.001#
LITERS_TO_CUBIC_METERS = 0.001#
CUBIC_METERS_TO_LITERS = 1000#
KG_TO_CUBIC_METERS = 0.001#
LITERS_TO_CUBIC_MILLIMETERS = 1000000#
CUBIC_MILLIMETERS_TO_LITERS = 1e-06#
CUBIC_METERS_TO_CUBIC_MILLIMETERS = 1000000000#
CUBIC_MILLIMETERS_TO_CUBIC_METERS = 1e-09#
YEAR_LENGTH = 365#
LEAP_YEAR_LENGTH = 366#
SECONDS_PER_DAY = 86400#
HOURS_PER_DAY = 24#
KCAL_TO_MJ = 4.184#
MJ_CH4_TO_G_CH4 = 0.05565#
EARTH_ANGULAR_VELOCITY = 0.2618#
CELSIUS_TO_KELVIN = 273.15#
PERCENTAGE_TO_FRACTION = 0.01#
FRACTION_TO_PERCENTAGE = 100.0#
HECTARES_TO_SQUARE_CENTIMETERS = 100000000#
SQUARE_CENTIMETERS_TO_HECTARES = 1e-08#
HECTARES_TO_SQUARE_MILLIMETERS = 10000000000#
SQUARE_MILLIMETERS_TO_HECTARES = 1e-10#
SQUARE_KILOMETERS_TO_HECTARES = 100#
HECTARES_TO_SQUARE_KILOMETERS = 0.01#
HECTARES_PER_SQUARE_METER = 10000#
SQUARE_METERS_TO_HECTARES = 0.0001#
AMBIENT_AIR_MOLE_FRACTION_OF_OXYGEN: float = 0.21#
GAS_CONSTANT: float = 8.314#
IDEAL_GAS_LAW_R: float = 0.0821#
CONSTANTS_TO_UNITS = {'AMBIENT_AIR_MOLE_FRACTION_OF_OXYGEN': MeasurementUnits.UNITLESS, 'BYTES_PER_GB': MeasurementUnits.BYTES, 'CELSIUS_TO_KELVIN': MeasurementUnits.DEGREES_CELSIUS, 'CM_TO_MM': MeasurementUnits.MILLIMETERS_PER_CENTIMETER, 'CUBIC_METERS_TO_CUBIC_MILLIMETERS': MeasurementUnits.CUBIC_MILLIMETERS_PER_CUBIC_METER, 'CUBIC_METERS_TO_LITERS': MeasurementUnits.LITERS_PER_CUBIC_METER, 'CUBIC_MILLIMETERS_TO_CUBIC_METERS': MeasurementUnits.CUBIC_METERS_PER_CUBIC_MILLIMETER, 'CUBIC_MILLIMETERS_TO_LITERS': MeasurementUnits.LITERS_PER_CUBIC_MILLIMETER, 'EARTH_ANGULAR_VELOCITY': MeasurementUnits.RADIANS_PER_HOUR, 'FRACTION_TO_PERCENTAGE': MeasurementUnits.UNITLESS, 'GAS_CONSTANT': MeasurementUnits.J_PER_K_PER_MOL, 'GRAMS_TO_KG': MeasurementUnits.KILOGRAMS_PER_GRAM, 'HECTARES_PER_SQUARE_METER': MeasurementUnits.HECTARES_PER_SQUARE_METER, 'HECTARES_TO_SQUARE_CENTIMETERS': MeasurementUnits.SQUARE_CENTIMETERS_PER_HECTARE, 'HECTARES_TO_SQUARE_KILOMETERS': MeasurementUnits.SQUARE_KILOMETERS_PER_HECTARE, 'HECTARES_TO_SQUARE_MILLIMETERS': MeasurementUnits.SQUARE_MILLIMETERS_PER_HECTARE, 'HOURS_PER_DAY': MeasurementUnits.HOURS_PER_DAY, 'IDEAL_GAS_LAW_R': MeasurementUnits.L_ATM_PER_MOL_K, 'KCAL_TO_MJ': MeasurementUnits.MCAL_PER_MJ, 'KG_TO_CUBIC_METERS': MeasurementUnits.CUBIC_METERS_PER_KILOGRAM, 'KG_TO_GRAMS': MeasurementUnits.GRAMS_PER_KILOGRAM, 'KG_TO_MILLIGRAMS': MeasurementUnits.MILLIGRAMS_PER_KILOGRAM, 'KILOGRAMS_TO_MEGAGRAMS': MeasurementUnits.MEGAGRAMS_PER_KILOGRAM, 'KM_TO_M': MeasurementUnits.METERS_PER_KILOMETER, 'LEAP_YEAR_LENGTH': MeasurementUnits.DAYS_PER_LEAP_YEAR, 'LITERS_TO_CUBIC_METERS': MeasurementUnits.CUBIC_METERS_PER_LITER, 'LITERS_TO_CUBIC_MILLIMETERS': MeasurementUnits.CUBIC_MILLIMETERS_PER_LITER, 'MEGAGRAMS_TO_KILOGRAMS': MeasurementUnits.KILOGRAMS_PER_MEGAGRAM, 'MILLIGRAMS_TO_KG': MeasurementUnits.KILOGRAMS_PER_MILLIGRAM, 'MJ_CH4_TO_G_CH4': MeasurementUnits.MJ_CH4_PER_G_CH4, 'MM_TO_CM': MeasurementUnits.CENTIMETERS_PER_MILLIMETER, 'MM_TO_M': MeasurementUnits.METERS_PER_MILLIMETER, 'M_TO_KM': MeasurementUnits.KILOMETERS_PER_METER, 'PERCENTAGE_TO_FRACTION': MeasurementUnits.UNITLESS, 'SECONDS_PER_DAY': MeasurementUnits.SECONDS_PER_DAY, 'SQUARE_CENTIMETERS_TO_HECTARES': MeasurementUnits.HECTARES_PER_SQUARE_CENTIMETER, 'SQUARE_KILOMETERS_TO_HECTARES': MeasurementUnits.HECTARES_PER_SQUARE_KILOMETER, 'SQUARE_METERS_TO_HECTARES': MeasurementUnits.SQUARE_METERS_PER_HECTARE, 'SQUARE_MILLIMETERS_TO_HECTARES': MeasurementUnits.HECTARES_PER_SQUARE_MILLIMETER, 'YEAR_LENGTH': MeasurementUnits.DAYS_PER_YEAR}#