Follow water–organic mixing from composition to water activity
Follow water–organic mixing from composition to water activity
Section titled “Follow water–organic mixing from composition to water activity”Can one water activity correspond to different liquid compositions? The Binary Activity Thermodynamics (BAT) model provides a reduced description of nonideal water–organic mixing. We first inspect composition-dependent activities, then ask for phase properties at prescribed water activities. This connects a composition calculation to the humidity-controlled inputs used in organic partitioning.
The model and its calibration are described by Gorkowski, Preston, and Zuend (2019). These calculations illustrate its response to idealized molecular descriptors; they are not measurements of a named organic compound or a simulation of phase-separation kinetics.
Python · section 1
# In Colab uncomment the following command to install particula:# Install from the repository root: `python -m pip install -e ".[extra]"`import matplotlib.pyplot as plt # For plotting graphsimport numpy as np # For numerical operations
# Specific functions from the particula package for activity calculationsfrom particula.activity import ( activity_coefficients, phase_separation, water_activity,)from particula.particles.properties.organic_density_module import ( get_organic_density_estimate,)Describe one generic organic component
Section titled “Describe one generic organic component”The organic has molar mass 100 g/mol and O:C=0.225. The water-to-organic molar-mass ratio is dimensionless; the density helper takes g/mol and returns kg/m³. Its default elemental assumptions are part of this illustrative density estimate, not independently measured composition.
Sweep organic mole fraction from 0.001 to 1. The returned arrays contain water
and organic activities, mass fractions, and activity coefficients. Keep those
quantities distinct:
Python · section 2
# Define a range of organic mole fractions for the calculationorganic_mole_fraction = np.linspace(0.001, 1, 1000)
# Define other necessary parametersoxygen2carbon = 0.225 # Oxygen to carbon ratiomolar_mass_ratio = 18.016 / 100 # Water to organic molecular weight ratiodensity = get_organic_density_estimate( 18.016 / molar_mass_ratio, oxygen2carbon,) # Estimate of organic compound density
# Calculate activity coefficients using the binary_activity function( activity_water, activity_organic, mass_water, mass_organic, gamma_water, gamma_organic,) = activity_coefficients.bat_activity_coefficients( molar_mass_ratio, organic_mole_fraction, oxygen2carbon, density, functional_group=None,)Read activities and coefficients separately
Section titled “Read activities and coefficients separately”The horizontal coordinate is water mole fraction, the complement of the input organic fraction. The first plot shows activities; the second shows activity coefficients. Departures from ideal molar behavior reflect the BAT model’s nonideality for these descriptors.
The separation helper inspects activity-curve monotonicity to select branches. Nonmonotonic curves can signal a region requiring a phase treatment in this model. Neither an arbitrary activity above one nor a large coefficient alone constitutes experimental proof of liquid–liquid separation.
Python · section 3
fig, ax = plt.subplots()ax.plot( 1 - organic_mole_fraction, activity_water, label="water", linestyle="dashed",)ax.plot( 1 - organic_mole_fraction, activity_organic, label="organic",)ax.set_ylim()ax.set_xlabel("water mole fraction")ax.set_ylabel("activity")ax.legend()plt.show()
fig, ax = plt.subplots()ax.plot( 1 - organic_mole_fraction, gamma_water, label="water", linestyle="dashed")ax.plot( 1 - organic_mole_fraction, gamma_organic, label="organic",)ax.set_ylim()ax.set_xlabel("water mole fraction")ax.set_ylabel("activity coefficient")ax.legend()plt.show()

Understand the phase-transition weight
Section titled “Understand the phase-transition weight”The helper extracts a separation activity and constructs a smooth
The plot shows how that parameter varies with the computed water activity; it does not evolve particles through a separation event.
Python · section 4
# Finding phase separation points and calculating q_alphaphase_sep_aw = phase_separation.find_phase_separation( activity_water, activity_organic)q_alpha = phase_separation.q_alpha( seperation_activity=phase_sep_aw["upper_seperation"], activities=activity_water,)
# Plotting q_alphafig, ax = plt.subplots()plt.plot(activity_water, q_alpha)plt.xlabel("Water Activity")plt.ylabel("$q^{\\alpha}$ [Organic Rich to Water Rich]")plt.show()
Prescribe water activity instead of composition
Section titled “Prescribe water activity instead of composition”Now set O:C=0.25 and ask for properties over
The first two returned objects hold phase properties; row 2 contains each
phase’s water mass fraction. The beta object may be None when only one branch
is used. Plot water fractions alongside
Python · section 5
# select the water activity desiredwater_activity_desired = np.linspace(0.5, 1, 100)oxygen2carbon = 0.25
# calculate the mass fraction of water in the alpha and beta phases# for each water activityalpha_raw, beta_raw, q_alpha_raw = water_activity.fixed_water_activity( water_activity=water_activity_desired, molar_mass_ratio=molar_mass_ratio, oxygen2carbon=oxygen2carbon, density=density,)alpha = np.atleast_1d(np.asarray(alpha_raw, dtype=float))q_alpha = np.atleast_1d(np.asarray(q_alpha_raw, dtype=float))beta = ( np.atleast_1d(np.asarray(beta_raw, dtype=float)) if beta_raw is not None else None)
# plot the results vs water activityfig, ax = plt.subplots()ax.plot( water_activity_desired, alpha[2], label="alpha phase mass fraction water",)ax.plot( water_activity_desired, q_alpha, label="q_alpha",)if beta is not None: ax.plot( water_activity_desired, beta[2], label="beta phase mass fraction water", )ax.set_ylim()ax.set_xlabel("Water activity")ax.set_ylabel("Water mass fraction or phase weight")plt.legend()plt.show()
Increase oxygenation while holding other descriptors fixed
Section titled “Increase oxygenation while holding other descriptors fixed”Repeat at O:C=0.6 with the same molar mass, density, and activity grid. In this
parameter comparison the higher-oxygenation case uses a single branch, with
Real oxidation can change molar mass, density, volatility, and functionality together. This controlled descriptor change does not represent those coupled processes or establish a universal O:C threshold for every organic aerosol.
Python · section 6
# select the water activity desiredwater_activity_desired = np.linspace(0.5, 1, 100)# select the oxygen to carbon ratiooxygen2carbon = 0.6
# calculate the mass fraction of water in the alpha and beta phases# for each water activityalpha_raw, beta_raw, q_alpha_raw = water_activity.fixed_water_activity( water_activity=water_activity_desired, molar_mass_ratio=molar_mass_ratio, oxygen2carbon=oxygen2carbon, density=density,)alpha = np.atleast_1d(np.asarray(alpha_raw, dtype=float))q_alpha = np.atleast_1d(np.asarray(q_alpha_raw, dtype=float))beta = ( np.atleast_1d(np.asarray(beta_raw, dtype=float)) if beta_raw is not None else None)
# plot the results vs water activityfig, ax = plt.subplots()ax.plot( water_activity_desired, alpha[2], label="alpha phase mass fraction water",)ax.plot( water_activity_desired, q_alpha, label="q_alpha",)if beta is not None: ax.plot( water_activity_desired, beta[2], label="beta phase mass fraction water", )ax.set_ylim()ax.set_xlabel("Water activity")ax.set_ylabel("Water mass fraction or phase weight")plt.legend()plt.show()
Carry the phase information into a research question
Section titled “Carry the phase information into a research question”The model can associate prescribed water activity with different phase compositions and a transition weight. Those are distinct outputs: the amount of water within a phase is not the weight assigned to that phase. The comparison also shows why molecular descriptors matter when selecting a phase treatment.
A next investigation could vary O:C and molar mass together, record the water activity at which the beta branch disappears, and compare that map with measured phase-separation humidity. Include density sensitivity and the model’s calibration domain. To predict condensed organic mass rather than phase properties alone, continue with liquid–vapor partitioning.
Explore this topic: Phase equilibrium and partitioning