PySDM icon indicating copy to clipboard operation
PySDM copied to clipboard

improving docstring (and definition?!) of mean free path in diffusion kinetics

Open bhiogade opened this issue 2 years ago • 2 comments

bhiogade avatar Feb 14 '24 09:02 bhiogade

lambdaD is the vapour molecular mean free path, however it seems that we might have a bug in the definition, at least as compared with libcloudph++:

return real_t(2) * (D_0<real_t>() / si::metres_per_second) / (
          real_t(sqrt(
            real_t(2) * real_t((R_v<real_t>() / si::joules * si::kilograms) * T) 
            ))
          );

(https://github.com/igfuw/libcloudphxx/blob/0ca09ab6ba9d8b6a6096ef4dbc516ee22c7d551e/include/libcloudph%2B%2B/common/mean_free_path.hpp#L25-L29)

vs. in PySDM: https://github.com/open-atmos/PySDM/blob/b476bb0a2f4b690580c09c284ea32407686d55ad/PySDM/physics/diffusion_kinetics/fuchs_sutugin.py#L15 and https://github.com/open-atmos/PySDM/blob/b476bb0a2f4b690580c09c284ea32407686d55ad/PySDM/physics/diffusion_kinetics/jensen_and_nugent_2017.py#L14 and https://github.com/open-atmos/PySDM/blob/b476bb0a2f4b690580c09c284ea32407686d55ad/PySDM/physics/diffusion_kinetics/pruppacher_and_klett_2005.py#L15

(BTW, the same definition should not be repeated in the above three places!)

slayoo avatar Mar 16 '24 00:03 slayoo

Stale pull request message

github-actions[bot] avatar Jun 14 '24 14:06 github-actions[bot]