-
Notifications
You must be signed in to change notification settings - Fork 34
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
Implement piecewise-linear rhod profile in condensation methods #1106
Implement piecewise-linear rhod profile in condensation methods #1106
Conversation
Thank you, @mikhailmints ! |
Also, the plot you included seems a ready-to-use base for a new unit test! Asserting that the two lines match.
|
Thank you @mikhailmints - looking great! Can you check for convergence with this new linear rhod profile with dz steps rather than dt steps? (Using dz rather than dt will remove the w dependence.) Maybe ranging from dz=0.01 to dz=10m? That would be helpful to know for the examples. You could add this as a plot/convergence test as a unit test, as Sylwester suggested above. |
Looks like I'm bumping this PR, because I think it's a really beneficial update to the default behavior ;) |
@trontrytel @mikhailmints @claresinger Concerning the timeouts on macOS (which occur within SciPy code, not the PySDM solver), I'd say let's just increase the timeout. We have also the TODO of matching the changes in the ThrustRTC backend, but if well labelled and marked with a new issue, we can defer it for later. Thanks! |
The README parcel example is also a good test case here. If we run it for double the ascent altitude, there is some noise present, which disappears with the changes in this PR. Aiming at committing a README-based test case here soon. |
closing and reopening to fix commit list |
… passes; last, first name
…aused by inconsistent density discretisation
fc4d4fa
to
00e7de0
Compare
… dqv_dt_pred are always 0 for Parcel env, while rhod is constant-in-time for kinematic simulations; mark volume as updated. Closes open-atmos#792
… passes; last, first name
…aused by inconsistent density discretisation
… dqv_dt_pred are always 0 for Parcel env, while rhod is constant-in-time for kinematic simulations; mark volume as updated. Closes open-atmos#792
Closes #746, closes #765.
This implements a piecewise-linear
rhod
profile in the condensation methods instead of usingrhod_mean
. This change makes the condensation solver much less dependent on the timestep in the parcel environment, particularly for parcels with low velocities. For example, before the change, a particular run of the parcel model resulted in the following:There was a very significant difference between the predicted supersaturation for different timestep values, which caused the solver to significantly overestimate the peak supersaturation and activation fraction unless the timestep was set to a very low value.
After the change, the results for different timesteps become nearly identical:
TODO: implement the same changes in the ThrustRTC backend.