CurledWake: full divergence form for delta_u diffusion#34
Open
zanig wants to merge 1 commit into
Open
Conversation
Replace the Laplacian-only diffusion term nu_T * (d2u/dy2 + d2u/dz2) with the full divergence form d/dy(nu_T du/dy) + d/dz(nu_T du/dz) in CurledWakeWindfield._step. Drops the now-unused second_der import.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replaces the Laplacian-only diffusion term nu_T * (d2u/dy2 + d2u/dz2)
with the full divergence form d/dy(nu_T du/dy) + d/dz(nu_T du/dz)
in CurledWakeWindfield._step. Also drops the now-unused second_der import.
I believe this is a leftover from previous versions where the turbulence models were a lot simpler (const$\nu_T$ or neglible gradients), since The Δk transport equation in
CurledTurbulenceModel_kl.compute_dkdxuses the full divergence form already for diffusion.A nice side effect of this fix is that with
scipy_rk45, the full divergence form requires only roughly a thrid of integration steps compared to the current Laplacian-only version on example case 08, so this should also improve run time.Impact: Taking example case 08 with the full divergence form vs. the current Laplacian-only implementation, I see the following differences in Cp:
You're making a pull request to a branch (probably main) of MITWindFarm. Please ensure you have done the following.
---> no new functionality so I assume this is not needed?
---> more of a "physical" fix so explicitly testing is difficult
If you want more details on best practices, please see the following guide on the Howland Lab Google Drive.
Happy merging!