Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bhiogade
Copy link
Collaborator

No description provided.

@slayoo slayoo changed the title improving doctoring for diffusion kinetics improving docstring for diffusion kinetics Feb 14, 2024
@slayoo slayoo changed the title improving docstring for diffusion kinetics improving docstring (and definitio?!) of mean free path in diffusion kinetics Mar 16, 2024
@slayoo
Copy link
Member

slayoo commented Mar 16, 2024

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:

return D / np.sqrt(2 * const.Rv * T)

and
return D / np.sqrt(2 * const.Rd * T)

and
return D / np.sqrt(2 * const.Rv * T)

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

@slayoo slayoo changed the title improving docstring (and definitio?!) of mean free path in diffusion kinetics improving docstring (and definition?!) of mean free path in diffusion kinetics Mar 16, 2024
Copy link

Stale pull request message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants