Skip to content

particula.activity.convert_functional_group

OH equivalent for the oxygen to carbon ratio and molar mass ratio.

Gorkowski, K., Preston, T. C., & Zuend, A. (2019). Relative-humidity-dependent organic aerosol thermodynamics Via an efficient reduced-complexity model. Atmospheric Chemistry and Physics https://doi.org/10.5194/acp-19-13383-2019

Attributes

NameDescription
FloatArrayNo description.
SUPPORTED_FUNCTIONAL_GROUPSNo description.
_FUNCTIONAL_GROUP_ADJUSTMENTSNo description.

Functions

NameDescription
_normalize_functional_groupNo description.
convert_to_oh_equivalentConvert oxygen and molar mass ratios for BAT functional groups.

FloatArrayattributemodule attribute#

FloatArray = Union[float, NDArray[np.float64]]

SUPPORTED_FUNCTIONAL_GROUPSattributemodule attribute#

SUPPORTED_FUNCTIONAL_GROUPS = (None, *tuple(_FUNCTIONAL_GROUP_ADJUSTMENTS.keys()))

_FUNCTIONAL_GROUP_ADJUSTMENTSattributemodule attribute#

_FUNCTIONAL_GROUP_ADJUSTMENTS = {'alcohol': (1.0, 16.0), 'ether': (1.0, 16.0), 'carboxylic_acid': (2.0, 45.0)}

_normalize_functional_groupfunction#

def _normalize_functional_group(functional_group: Optional[Union[str, Sequence[str]]]) -> Optional[str]

convert_to_oh_equivalentfunction#

def convert_to_oh_equivalent(oxygen2carbon: FloatArray, molar_mass_ratio: FloatArray, functional_group: Optional[Union[str, Sequence[str]]] = None) -> Tuple[FloatArray, FloatArray]

Convert oxygen and molar mass ratios for BAT functional groups.

Parameters

NameTypeDefaultDescription
oxygen2carbonFloatArrayrequiredThe oxygen to carbon ratio.
molar_mass_ratioFloatArrayrequiredThe molar mass ratio of water to organic matter.
functional_groupOptional[Union[str, Sequence[str]]]NoneOptional functional group requiring adjustments. Supported values are None, "alcohol", "ether", and "carboxylic_acid".

Returns

FloatArray
Tuple containing the converted oxygen2carbon and molar_mass_ratio.
FloatArray
Scalar inputs return scalars, array inputs return np.ndarray.

Raises

ValueError
If functional_group is not one of the supported values.

Examples

>>> from particula.activity.convert_functional_group import (
... convert_to_oh_equivalent,
... )
>>> convert_to_oh_equivalent(
... oxygen2carbon=0.3,
... molar_mass_ratio=0.1,
... functional_group="carboxylic_acid",
... )
(2.3, 45.1)