Skip to content

Commit

Permalink
document in Particulator's condensation routine that dthd_dt_pred and…
Browse files Browse the repository at this point in the history
… dqv_dt_pred are always 0 for Parcel env, while rhod is constant-in-time for kinematic simulations; mark volume as updated. Closes open-atmos#792
  • Loading branch information
slayoo committed Aug 19, 2023
1 parent 3e62ed0 commit 1739c76
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions PySDM/particulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ def update_TpRH(self):
)

def condensation(self, *, rtol_x, rtol_thd, counters, RH_max, success, cell_order):
""" Updates droplet volumes by simulating condensation driven by prior changes
in environment thermodynamic state, updates the environment state.
In the case of parcel environment, condensation is driven solely by changes in
the dry-air density (theta and qv should not be changed by other dynamics).
In the case of prescribed-flow/kinematic environments, the dry-air density is
constant in time throughout the simulation.
This function should only change environment's `thd` and `qv` (and not `rhod`).
"""
self.backend.condensation(
solver=self.condensation_solver,
n_cell=self.mesh.n_cell,
Expand Down Expand Up @@ -129,6 +137,7 @@ def condensation(self, *, rtol_x, rtol_thd, counters, RH_max, success, cell_orde
success=success,
cell_id=self.attributes["cell id"],
)
self.attributes.mark_updated("volume")

def collision_coalescence_breakup(
self,
Expand Down

0 comments on commit 1739c76

Please sign in to comment.