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.Droplets.dXkappakohler_bisection — Method
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.Droplets.dXkohler_function_of_radius — Method
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 radiusM: Molecular weight of the droplet substancem: Molecular weight of the dry airT: TemperatureSenv: Saturation of the environmenttimestep: Time step
Returns
dX: Change in droplet mass
Droplets.dXkohler_function_of_radius — Method
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 radiusM: Molecular weight of the droplet substancem: Molecular weight of the dry airT: Temperatureqv: Water vapor mixing ratioP: Pressuretimestep: Time step
Returns
dX: Change in droplet volume
Droplets.dXkohler_function_of_radius_activated — Method
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 radiusT: TemperatureSenv: Saturation of the environmenttimestep: Time step
Returns
dX: Change in droplet mass
Droplets.dq_liq_cond — Method
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, metersM: Molecular weight of the dropletm: Molecular weight of the soluteT: TemperatureSenv: Environmental saturationtimestep: Time stepρ_air: Density of air
Returns
dql: Change in liquid water mass
Droplets.dq_liq_cond_activated — Method
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, metersT: TemperatureSenv: Environmental saturationtimestep: Time stepρ_air: Density of air
Returns
dql: Change in liquid water mass
Droplets.drkappakohler — Method
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.Droplets.drkohler — Method
-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)
Droplets.drkohler_activated — Method
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.
Droplets.find_equilibrium_radius — Method
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.Droplets.limitsat — Method
limitsat(dynamics.spinupsaturation, S)
Limit the supersaturation to 1%, used for spinupDroplets.sat — Method
sat(qv, P)
Calculate the environmntal vapor pressure based on the mixing ratio of water vapor to airDroplets.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