CurledWake: use non-dimensional Ct in Gamma_0#35
Open
zanig wants to merge 1 commit into
Open
Conversation
…ance The initial circulation Gamma_0 used to stamp the (Delta_v, Delta_w) counter-rotating vortex pair in CurledWakeWindfield.stamp_ic was using the dimensionalized rotor.Ct (= sol.Ct * REWS**2) instead of the non-dimensional rotor.extra.Ct (= sol.Ct). The result was that Gamma_0 scaled as U_REWS**3 instead of U_REWS**1, breaking the freestream-velocity invariance of the model. After the fix, Gamma_0 scales linearly with U_REWS, matching both the dimensional argument ([Gamma] = L^2/T) and the referenced Shapiro et al. (2018) form. Also adds tests/test_uref_invariance.py: it runs a 2-turbine yawed farm with the k-l turbulence model at U_0=1 and U_0=2 and asserts that REWS/U_0 at each turbine is invariant under freestream rescaling.
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.
The initial circulation Gamma_0 in CurledWakeWindfield.stamp_ic was using
the dimensionalized rotor.Ct (= sol.Ct * REWS^2) instead of the
non-dimensional rotor.extra.Ct (= sol.Ct).
After the fix, Gamma_0 scales linearly with U_REWS, matching both the
dimensional argument ([Gamma] = L^2/T) and the referenced Shapiro et al. (2018) form.
Also adds tests/test_uref_invariance.py: it runs a 2-turbine yawed farm with the
k-l turbulence model at U_0=1 and U_0=2 and asserts that REWS/U_0 at each
turbine is invariant under freestream rescaling, and that U_REWS <= U_0 for a Uniform Inflow.
To isolate the bug into a single factor, I ran a 4-turbine inline row (20° yaw, k-l model) at U_0=1 and U_0=8. Because$\Gamma_0 \propto U_{\rm REWS}^3$ instead of $U_{\rm REWS}^1$ , each downstream turbine accumulates a stray U^2 factor and the ratio of $U_{\rm REWS}/U_0$ between the two runs diverges from 1.0, shown below.
rotor.Ct)rotor.extra.Ct)Turbine 1 has no upstream wake so it's invariant either way; T2–T4 sit downstream and pick up the$U_{\rm REWS}^2$ factor. Based on this observation is also the added test.
You're making a pull request to a branch (probably main) of MITWindFarm. Please ensure you have done the following.
If you want more details on best practices, please see the following guide on the Howland Lab Google Drive.
Happy merging!