Condensation

Droplets.apply_thermo_feedback!Method
apply_thermo_feedback!(dynamics.thermo_feedback, state, z, dqv, constants)
Apply thermodynamic feedback to the state variables based on condensation/evaporation.
Turned off for prescribed thermodynamics (such as KiD)

# Arguments
- `dynamics.thermo_feedback`: A flag indicating whether to apply thermodynamic feedback.
- `state`: The current state of the system, containing temperature, pressure, and mixing ratios.
- `z`: The index of the grid cell being updated.
- `dqv`: The change in water vapor mixing ratio due to condensation/evaporation.
- `constants`: Physical constants used in calculations.

# Returns
Updates the state variables in place based on the condensation/evaporation process.
source
Droplets.dXkappakohler_bisectionMethod
dXkappakohler_bisection(REM::DynOFF, droplets::droplet_attributes{FT}, i::Int, kappa::FT, T::FT, Senv::FT, c::FT, radcoeff::FT, constants::Constants{FT},
raddata::Rad,timestep::FT, iters::Int, depth::Int=0, max_depth::Int=6) where {FT, Rad}

Update the volume of a droplet using the Köhler equation with kappa parameterization and bisection method (Arabas and Shima 2017) using square radius.

Built for use inside spatial condensation step, some cell-level quantities are pre-calculated and passed in as arguments.

with REM::DynON, droplet radiative heating is considered in the growth rate.
source
Droplets.dXkohler_function_of_radiusMethod
dXkohler_function_of_radius(R, M, m, T, Senv, timestep)

Calculate the change in droplet volume due to condensation using the Kohler equation.

Arguments

  • R: Droplet radius
  • M: Molecular weight of the droplet substance
  • m: Molecular weight of the dry air
  • T: Temperature
  • Senv: Saturation of the environment
  • timestep: Time step

Returns

  • dX: Change in droplet mass
source
Droplets.dXkohler_function_of_radiusMethod
dXkohler_function_of_radius(R, M, m, T, qv, P, timestep)

Calculate the change in droplet volume due to condensation using the Kohler equation.

Arguments

  • R: Droplet radius
  • M: Molecular weight of the droplet substance
  • m: Molecular weight of the dry air
  • T: Temperature
  • qv: Water vapor mixing ratio
  • P: Pressure
  • timestep: Time step

Returns

  • dX: Change in droplet volume
source
Droplets.dXkohler_function_of_radius_activatedMethod
dXkohler_function_of_radius_activated(R, T, Senv, timestep)

Calculate the change in droplet volume due to condensation using the Kohler equation for activated droplets, neglecting solute.

Arguments

  • R: Droplet radius
  • T: Temperature
  • Senv: Saturation of the environment
  • timestep: Time step

Returns

  • dX: Change in droplet mass
source
Droplets.dq_liq_condMethod
dq_liq_cond(R, M, m, T, Senv, timestep, ρ_air)

Calculate the change in q, liquid mixing ratio due to condensation of droplets, using droplet solute information.

Arguments

  • R: Droplet radius, meters
  • M: Molecular weight of the droplet
  • m: Molecular weight of the solute
  • T: Temperature
  • Senv: Environmental saturation
  • timestep: Time step
  • ρ_air: Density of air

Returns

  • dql: Change in liquid water mass
source
Droplets.dq_liq_cond_activatedMethod
dq_liq_cond_activated(R, T, Senv, timestep, ρ_air)
dq_liq_cond_activated(R, M, m, T, Senv, timestep, ρ_air)

Calculate the change in liquid water mass due to condensation of activated droplets.

Arguments

  • R: Droplet radius, meters
  • T: Temperature
  • Senv: Environmental saturation
  • timestep: Time step
  • ρ_air: Density of air

Returns

  • dql: Change in liquid water mass
source
Droplets.drkappakohlerMethod
drkappakohler(R, dry_r3, kappa, T, Senv, constants, timestep; rad_term=0.0)
Calculate the change in droplet radius over a timestep using the Köhler equation with kappa parameterization.
source
Droplets.drkohlerMethod
-drkohler(R, M, m, T, qv, P, timestep)
-drkohler(R, M, m, T, Senv, timestep)

RHS of the Köhler equation.

Arguments

  • R: Droplet radius (m)
  • M: Molecular weight of the solute (kg/mol)
  • m: Molar mass of the solute (g/mol)
  • T: Temperature (K)
  • qv: Water vapor mixing ratio (kg/kg)
  • P: Atmospheric pressure (Pa)
  • Senv: Environmental saturation (dimensionless)
  • timestep: Time step (s)

Returns

  • dr: Change in droplet radius over the timestep (m)
source
Droplets.drkohler_activatedMethod
drkohler_activated(R, T, Senv, timestep)

Compute the rate of change of droplet radius for activated droplets, neglecting differences in solutes.

Arguments

  • R: Radius of the droplets.
  • T: Temperature.
  • Senv: Environmental supersaturation.
  • timestep: simulation Time step.

Returns

dr: rate of change of droplet radius.

source
Droplets.find_equilibrium_radiusMethod
find_equilibrium_radius(droplets, drop_idx, kappa, T, S_env, constants; max_iter=100, tol=1e-12)
Find the equilibrium radius of a droplet given its dry radius and environmental conditions.

# Arguments
- `droplets`: A structure containing droplet attributes.
- `drop_idx`: Index of the droplet to find the equilibrium radius for.
- `kappa`: Hygroscopicity parameter of the droplet.
- `T`: Temperature (K).
- `S_env`: Environmental saturation (dimensionless). Caps at 1 to have solution
- `constants`: Physical constants used in calculations.
- `max_iter`: Maximum number of iterations for the bisection method (default: 100).
- `tol`: Tolerance for convergence (default: 1e-12).

# Returns
Updates the droplet's volume in the `droplets` structure to reflect the equilibrium radius.
source
Droplets.limitsatMethod
limitsat(dynamics.spinupsaturation, S)
Limit the supersaturation to 1%, used for spinup
source
Droplets.satMethod
sat(qv, P)
Calculate the environmntal vapor pressure based on the mixing ratio of water vapor to air
source
Droplets.set_X_crit!Method
set_X_crit!(droplets, i, kappa, T)
Set droplet to volume corresponding to critical radius for condensation for a specific droplet
source