ImplicitCondensation not immediate anymore #447
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #445
Explicit immediate condensation of humidity$q_i$ at time step $i$ given its saturation $q^\star$ calculated from temperature $T_i$ would be ($q > q^\star$ else $0$ )
with latent heat release of that condensation in the second equation. However, treating this explicitly poses the problem that because the saturation humidity is calculated from the current temperature$T_i$ , which is increased due to the latent heat release, the humidity after this time step will be undersaturated. Ideally, one would want to condense towards the new saturation humidity $q^\star(T_{i+1})$ so that condensation draws the humidity back down to 100% not below it.$i$ with $\delta T = T_{i+1} - T_i$ (and $\delta q$ similarly) to first order yields
Taylor expansion at
Now we make a linear approximation to the derivative, drop the$O(\delta T^2)$ term. Now inserting the (explicit) latent heat release
And solving for$\delta q$ yields
meaning that the implicit immediate condensation can be formulated as
With Euler forward time stepping this is great, but with our leapfrog timestepping + RAW filter this is very dispersive (see #445) although the implicit formulation is already much better. We therefore introduce a timestep$\Delta t_c$ which makes the implicit condensation not immediate anymore but over several time steps $\Delta t$ of the leapfrogging.
For$\Delta t = \Delta t_c$ we have an immediate condensation, for $n = \frac{\Delta t_c}{\Delta t}$ condensation takes place over $n$ time steps.