Superdrop¶
Header file: <libs/superdrops/superdrop.hpp>
[source]
-
class Superdrop¶
Class representing a super-droplet (synonyms: superdroplet, superdrop, SD).
This class defines properties and operations of a super-droplet (synonyms: superdroplet, superdrop, SD).
Public Functions
-
inline Superdrop(const unsigned int i_sdgbxindex, const double i_coord3, const double i_coord1, const double i_coord2, const SuperdropAttrs i_attrs, const IDType i_sdId)¶
Parameterized constructor.
- Parameters:
i_sdgbxindex – Index of the gridbox the superdrop occupies.
i_coord3 – 3rd spatial coordinate of the superdroplet.
i_coord1 – 1st spatial coordinate of the superdroplet.
i_coord2 – 2nd spatial coordinate of the superdroplet.
i_attrs – Attributes of the superdroplet.
i_sdId – Unique ID of the superdroplet.
-
inline auto get_sdgbxindex() const¶
Get the index of the Gridbox the superdrop currently occupies.
- Returns:
Gridbox Index.
-
inline auto get_coord3() const¶
Get the 3rd spatial coordinate of the superdroplet.
- Returns:
3rd spatial coordinate.
-
inline auto get_coord1() const¶
Get the 1st spatial coordinate of the superdroplet.
- Returns:
1st spatial coordinate.
-
inline auto get_coord2() const¶
Get the 2nd spatial coordinate of the superdroplet.
- Returns:
2nd spatial coordinate.
-
inline auto is_solute() const¶
Returns ‘true’ if the super-droplet has solute.
This function checks whether the super-droplet contains solute.
- Returns:
true if the super-droplet has solute, false otherwise.
-
inline auto get_solute() const¶
Get the solute of the superdroplet.
- Returns:
super-droplet’s solute
-
inline auto get_rho_sol() const¶
Get the density of the super-droplet’s solute.
- Returns:
density of the super-droplet’s solute.
-
inline auto get_mr_sol() const¶
Get the molecular mass of the super-droplet’s solute.
- Returns:
molecular mass of the super-droplet’s solute.
-
inline auto get_ionic() const¶
Get the van’t Hoff ionic factor of the super-droplet’s solute.
- Returns:
van’t Hoff ionic factor of the super-droplet’s solute.
-
inline auto get_xi() const¶
Get the multiplicity ‘xi’ of the super-droplet.
- Returns:
multiplicity ‘xi’ of the super-droplet.
-
inline auto get_radius() const¶
Get the spherical radius of the super-droplet.
- Returns:
spherical radius of the super-droplet.
-
inline auto get_msol() const¶
Get the mass of solute dissolved in the super-droplet.
- Returns:
mass of solute in the super-droplet.
-
inline double mass() const¶
Get the mass of the super-droplet.
- Returns:
mass of the super-droplet.
-
inline double vol() const¶
Get the volume of the super-droplet.
- Returns:
volume of the super-droplet.
-
inline double rcubed() const¶
Get the radius of the super-droplet cubed.
- Returns:
radius of the super-droplet cubed.
-
inline void set_xi(const uint64_t i_xi)¶
Set the multiplicity ‘xi’ of the super-droplet.
This function sets the value of the super-droplet’s multiplicity ‘xi’ to the specified value.
- Parameters:
i_xi – The value to set for xi
-
inline void set_radius(const double i_radius)¶
Set the radius of the super-droplet.
This function sets the value of the super-droplet’s radius to the specified value.
Note: See also change_radius which limits super-droplet radius to its dry radius.
- Parameters:
i_radius – The value to set for radius.
-
inline void set_msol(const double i_msol)¶
Sets the value of the super-droplet’s mass of solute.
This function sets the value of the super-droplet’s solute mass to the specified value.
- Parameters:
i_msol – The value to set for msol.
-
inline double change_radius(const double newr)¶
Set the radius of the super-droplet no less than its dry radius.
This function sets the value of the super-droplet’s radius to the specified value if its new radius >= its dry radius. Return is difference in radius accoding to super-droplet’s attributes struct.
Note: See also set_radius which allows super-droplet radius less than its dry radius
- Parameters:
newr – The value to set the radius >= dry radius.
- Returns:
change in radius of the super-droplet.
-
inline void set_sdgbxindex(const unsigned int i_sdgbxindex)¶
Sets the value of the super-droplet’s Gridbox index.
This function sets the value of the super-droplet’s sdgbxindex to the specified value.
- Parameters:
i_sdgbxindex – The value to set for sdgbxindex.
-
inline void set_coord3(const double i_coord3)¶
Sets the value of the 3rd coordinate.
This function sets the value of coord3 of the super-droplet to the specified value.
- Parameters:
i_coord3 – The value to set for coord3.
-
inline void set_coord1(const double i_coord1)¶
Sets the value of the 1st coordinate.
This function sets the value of coord1 of the super-droplet to the specified value.
- Parameters:
i_coord1 – The value to set for coord1.
-
inline void set_coord2(const double i_coord2)¶
Sets the value of the 2nd coordinate.
This function sets the value of coord2 of the super-droplet to the specified value.
- Parameters:
i_coord2 – The value to set for coord2.
-
inline void set_coords(const double i_coord3, const double i_coord1, const double i_coord2)¶
Sets the values of the 3rd, 1st and 2nd coordinates.
This function sets the coordinates of the super-droplet along each dimension.
- Parameters:
i_coord3 – The value to set for coord3.
i_coord1 – The value to set for coord1.
i_coord2 – The value to set for coord2.
-
inline void increment_coords(const double delta3, const double delta1, const double delta2)¶
Increments the coordinates by the specified deltas.
This function increments the coordinates of the super-droplet by the specified deltas along each dimension.
- Parameters:
delta3 – The delta for the third coordinate (coord3).
delta1 – The delta for the first coordinate (coord1).
delta2 – The delta for the second coordinate (coord2).
-
inline void serialize_double_components(std::vector<double>::iterator target) const¶
-
inline void serialize_uint_components(std::vector<unsigned int>::iterator target)¶
-
inline void serialize_uint64_components(std::vector<uint64_t>::iterator target)¶
-
inline void deserialize_components(std::vector<unsigned int>::iterator uint_source, std::vector<uint64_t>::iterator uint64_source, std::vector<double>::iterator double_source)¶
Public Members
-
IDType sdId¶
instance of super-droplet identity of Superdrop::IDType
Private Members
-
unsigned int sdgbxindex¶
Index of the gridbox the superdrop occupies
-
double coord3¶
3rd spatial coordinate of the superdrop (vertical)
-
double coord1¶
1st spatial coordinate of the superdrop (eastwards)
-
double coord2¶
2nd spatial coordinate of the superdrop (northwards)
-
SuperdropAttrs attrs¶
instance of SuperdropAttrs for attributes of the super-droplet
-
inline Superdrop(const unsigned int i_sdgbxindex, const double i_coord3, const double i_coord1, const double i_coord2, const SuperdropAttrs i_attrs, const IDType i_sdId)¶