From 1e6037403a51083ce5409955e0fd4bebff2dadf7 Mon Sep 17 00:00:00 2001 From: Clara Levante Date: Thu, 28 Dec 2023 19:02:13 +0100 Subject: [PATCH] radius must be [m] --- .../cartesianmotion_withreset.hpp | 16 +++++++++------- roughpaper/renew_supers.py | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/libs/cartesiandomain/cartesianmotion_withreset.hpp b/libs/cartesiandomain/cartesianmotion_withreset.hpp index 04baf6f48..9bdee552c 100644 --- a/libs/cartesiandomain/cartesianmotion_withreset.hpp +++ b/libs/cartesiandomain/cartesianmotion_withreset.hpp @@ -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); } @@ -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] @@ -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) { diff --git a/roughpaper/renew_supers.py b/roughpaper/renew_supers.py index 6277d0f0e..59725e297 100644 --- a/roughpaper/renew_supers.py +++ b/roughpaper/renew_supers.py @@ -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