Skip to content

Commit

Permalink
reset msol using radius assuming radius=dryradius
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctoyotta1024 committed Jan 17, 2024
1 parent 02470e0 commit 1e8ade7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion libs/cartesiandomain/cartesianmotion_withreset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Author: Clara Bayley (CB)
* Additional Contributors:
* -----
* Last Modified: Tuesday 2nd January 2024
* Last Modified: Wednesday 17th January 2024
* Modified By: CB
* -----
* License: BSD 3-Clause "New" or "Revised" License
Expand Down Expand Up @@ -152,11 +152,23 @@ struct ResetSuperdrop

const auto radius = new_radius(log10rlow, log10rup, urbg);
const auto xi = new_xi(gbxvol, log10rlow, log10rup, radius);
const auto msol = new_msol(radius);

drop.set_msol(msol);
drop.set_radius(radius);
drop.set_xi(xi);
}

KOKKOS_FUNCTION double
new_msol(const double dryradius) const
/* returns msol given dry radius */
{
constexpr double msolconst = 4.0 * Kokkos::numbers::pi *
dlc::Rho_sol / 3.0;

return msolconst * dryradius * dryradius * dryradius;
}

KOKKOS_FUNCTION double
new_radius(const double log10rlow,
const double log10rup,
Expand Down

0 comments on commit 1e8ade7

Please sign in to comment.