Skip to content

CurledWake: use non-dimensional Ct in Gamma_0 (take 2) - #37

Merged
kirbyh merged 3 commits into
mainfrom
pr-35
Aug 26, 2026
Merged

CurledWake: use non-dimensional Ct in Gamma_0 (take 2)#37
kirbyh merged 3 commits into
mainfrom
pr-35

Conversation

@kirbyh

@kirbyh kirbyh commented Aug 26, 2026

Copy link
Copy Markdown
Member

The quoted text below is from @zanig in


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.

Turbine current (rotor.Ct) fixed (rotor.extra.Ct)
1 1.0000 1.0000
2 4.0293 0.9995
3 2.0580 1.0001
4 2.3485 1.0000

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.


I've confirmed that the fix to use rotor.extra.Ct is indeed correct, and also made a small normalization fix to compute_x0_with_TI, which was introduced after the original PR.

This pull request also surrounds the package-level import of .FlorisInterface in a try/except block because floris is an optional dependency which may not be installed by all users.

zanig and others added 3 commits August 25, 2026 21:19
…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.
@kirbyh
kirbyh merged commit 7cebe72 into main Aug 26, 2026
5 checks passed
@kirbyh
kirbyh deleted the pr-35 branch August 26, 2026 20:48
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.

2 participants