Skip to content

Commit

Permalink
radius must be [m]
Browse files Browse the repository at this point in the history
  • Loading branch information
yoctoyotta1024 committed Dec 28, 2023
1 parent 300ce76 commit 1e60374
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions libs/cartesiandomain/cartesianmotion_withreset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ namespace dlc = dimless_constants;
struct ProbDensDistrib
{
private:
double reff;
double REFF;
double nueff;
double n0const;

public:
ProbDensDistrib() : reff(7e-6 / dlc::R0), nueff(0.08), n0const(0.0)
ProbDensDistrib() : REFF(7e-6), nueff(0.08), n0const(0.0)
{
const auto xp = double{(1.0-2.0*nueff)/nueff};
const auto valxp = double{Kokkos::pow(reff*nueff, -xp)};
const auto valxp = double{Kokkos::pow(REFF*nueff, -xp)};
n0const = valxp / Kokkos::tgamma(xp);
}

Expand All @@ -67,8 +67,10 @@ struct ProbDensDistrib
from Poertge et al. 2023 for shallow cumuli (figure 12), ie.
with typical values: reff = 7e-6 m, and nueff = 0.08 */
{
const auto term1 = double{Kokkos::pow(radius, ((1.0-3.0*nueff)/nueff))};
const auto term2 = double{Kokkos::exp(-radius/(reff*nueff))};
const auto RADIUS = radius * dlc::RO;

const auto term1 = double{Kokkos::pow(RADIUS, ((1.0-3.0*nueff)/nueff))};
const auto term2 = double{Kokkos::exp(-RADIUS/(REFF*nueff))};

const auto probdens = double{n0const * term1 * term2}; // dn_dr [prob m^-1]

Expand Down Expand Up @@ -99,8 +101,8 @@ struct ResetSuperdrop

/* make redges linearly spaced in log10(R) space */
auto h_log10redges = Kokkos::create_mirror_view(log10redges);
const auto log10rmin = double{Kokkos::log10(1e-6 / dlc::R0)}; // lowest edge of radius bins
const auto log10rmax = double{Kokkos::log10(5e-5 / dlc::R0)}; // highest edge of radius bins
const auto log10rmin = double{Kokkos::log10(2e-7 / dlc::R0)}; // lowest edge of radius bins
const auto log10rmax = double{Kokkos::log10(3e-5 / dlc::R0)}; // highest edge of radius bins
const auto log10deltar = double{(log10rmax - log10rmin)/nbins};
for (size_t i(0); i < nbins + 1; ++i)
{
Expand Down
4 changes: 2 additions & 2 deletions roughpaper/renew_supers.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''
----- CLEO -----
File: renew_supers_2.py
File: renew_supers.py
Project: roughpaper
Created Date: Monday 18th December 2023
Author: Clara Bayley (CB)
Additional Contributors:
-----
Last Modified: Monday 18th December 2023
Last Modified: Thursday 28th December 2023
Modified By: CB
-----
License: BSD 3-Clause "New" or "Revised" License
Expand Down

0 comments on commit 1e60374

Please sign in to comment.