Coalescence

Header file: <libs/superdrops/collisions/coalescence.hpp> [source]

struct DoCoalescence

Public Functions

bool operator()(Superdrop &drop1, Superdrop &drop2, const double prob, const double phi) const

Operator used as an adaptor such that DoCoalescence satisfies the PairEnactX concept and so can be used as the EnactCollision function-like object in the DoCollisions struct.

This operator calls functions to enact the collision-coalescence of two super-droplets.

Parameters:
  • drop1 – The first super-droplet.

  • drop2 – The second super-droplet.

  • prob – The probability of collision-coalescence.

  • phi – Random number in the range [0.0, 1.0].

Returns:

boolean=true if collision-coalescence resulted in null superdrops.

uint64_t coalescence_gamma(const uint64_t xi1, const uint64_t xi2, const double prob, const double phi) const

Calculates the value of the gamma factor in Monte Carlo collision-coalescence.

This function calculates the value of the gamma factor used in Monte Carlo collision-coalescence as described in Shima et al. 2009.

Parameters:
  • xi1 – The multiplicity of the first super-droplet.

  • xi2 – The multiplicity of the second super-droplet.

  • prob – The probability of collision-coalescence.

  • phi – Random number in the range [0.0, 1.0].

Returns:

The calculated value of the coalescence gamma factor.

bool coalesce_superdroplet_pair(const uint64_t gamma, Superdrop &drop1, Superdrop &drop2) const

Coalesces a pair of superdroplets.

This function coalesces a pair of superdroplets by changing their multiplicity, radius, and solute mass according to Shima et al. 2009 Section 5.1.3. part (5).

Parameters:
  • gamma – The coalescence gamma factor.

  • drop1 – The first superdroplet.

  • drop2 – The second superdroplet.

Returns:

True if coalescence results in a null superdroplet, false otherwise.

Private Functions

void twin_superdroplet_coalescence(const uint64_t gamma, Superdrop &drop1, Superdrop &drop2) const

Enacts coalescence of a pair of superdroplets where xi1 = gamma*xi2.

This function coalesces a pair of superdroplets where drop1.get_xi() = gamma* drop2.get_xi() by making twin superdroplets with the same xi, radius, and solute mass. It implements Shima et al. 2009 Section 5.1.3. part (5) option (b).

In rare case where xi1 = xi2 = gamma = 1, new_xi of drop1 = 0 and drop1 should be removed from domain.

Note: Implicit casting of gamma (and therefore droplets’ xi values) from uint64_t to double.

Parameters:
  • gamma – The coalescence gamma factor.

  • drop1 – The first superdroplet.

  • drop2 – The second superdroplet.

void different_superdroplet_coalescence(const uint64_t gamma, Superdrop &drop1, Superdrop &drop2) const

Coalesces a pair of superdroplets where xi1 > gamma*xi2.

This function coalesces a pair of superdroplets where xi1 > gamma*xi2 by growing the radius and mass of drop2 via decreasing the multiplicity of drop1. It implements Shima et al. 2009 Section 5.1.3. part (5) option (a).

Note: Implicit casting of gamma (i.e. therefore droplets’ xi values) from uint64_t to double.

Parameters:
  • gamma – The coalescence gamma factor.

  • drop1 – The first superdroplet.

  • drop2 – The second superdroplet.

template<PairProbability Probability>
inline MicrophysicalProcess auto CollCoal(const unsigned int interval, const std::function<double(unsigned int)> int2realtime, const Probability collcoalprob)

Constructs a microphysical process for collision-coalescence of superdroplets.

This function constructs a microphysical process for collision-coalescence of superdroplets with a constant timestep and probability of collision-coalescence determined by ‘collcoalprob’.

Template Parameters:

Probability – Type satisfying the PairProbability concept.

Parameters:
  • interval – The constant timestep interval.

  • int2realtime – A function that converts an integer timestep to real time.

  • collcoalprob – The probability of collision-coalescence.

Returns:

An instance of MicrophysicalProcess for collision-coalescence.