Sg/kl model dev#31
Conversation
| Gamma_0 = 0.5 * D * rotor.REWS * rotor.Ct * np.sin(eff_yaw) | ||
| Gamma_i = ( | ||
| Gamma_0 * 4 * r_i / (self.N_vortex * D**2 * np.sqrt(1 - (2 * r_i / D) ** 2)) | ||
| Gamma_0 * 4 * r_i / (self.N_vortex * D * np.sqrt(1 - (2 * r_i / D) ** 2)) |
| kernel_z = np.arange(-10, 11)[None, :] * dz | ||
|
|
||
| # turb = ((yG - yt) ** 2 + (zG - zt) ** 2) < R**2 | ||
| turb = (((yG - yt) / ay) ** 2 + ((zG - zt) / az) ** 2) < 1.0 |
There was a problem hiding this comment.
This code works for tilt OR yaw but unfortunately does not generalize to tilt and yaw. The initial condition, following Bastankhah and Porte-Agel (2016) should be an ellipse of semi-major radius ay and the rotation angle about the y-effective axis (seems like this is cos(yaw)cos(tilt)? from UnifiedMomentumModel). Then the equation that should be in line 849 is:
where
There was a problem hiding this comment.
I don't think I fully understand what is going on here, but I will take a look at the paper and try to understand it.
| beta=beta, cached=cached, v4_correction=v4_correction, **kwargs | ||
| ) | ||
| self.alpha = alpha | ||
|
|
There was a problem hiding this comment.
Any code that is just
def function(self, *args, **kwargs):
return super().function(*args, **kwargs)
is automatically inherited and can be omitted, correct? The code runs if I comment these lines out. And perhaps it is a bit more future-proof
| ) | ||
| ay = r4 * np.cos(rotor.yaw) | ||
| az = r4 # TODO: could factor in rotor tilt later on | ||
| az = r4 * np.cos(rotor.tilt) |
There was a problem hiding this comment.
We can commit these for now, but after updating mitrotor and UMM we'll want to get rid of the branch= flag, maybe hold off on bumping the version until we PR into main
There was a problem hiding this comment.
Yep!! It is going to have to be a one-by-one merge again
kirbyh
left a comment
There was a problem hiding this comment.
Looks great! Just one comment on the IC stencil function, which should be a rotated ellipse where r4 is kept as the semi-major axis rather than both the semi-major and semi-minor axis changing due to combined effects of yaw and tilt
|
I think that I fixed the problem @kirbyh. See code changes in
|
* Update BEM rotor to allow for tilt input * Update plotting to allow any slice * Add new yaw and tilt example * Debugging new tilt example * Finish debugging MITWindFarm yaw/tilt * Add in optimization timing * Add in timing * Rename example file * Example cleanup for PR * New example with yaw and tilt comparisons added * Clean up pre-merge * Final example cleanup
* Adding custom Unified + TI for benchmarking with Curled wake model * Adding numerics utilities for curled wake model marching * Adding working Curled Wake model code and new CurledWindFarm class * moved curled wake example to ./examples/ * Plots at hub height slice or arbitrary, user-defined z * Adding a powerlaw base wind profile to curled wake example * Adding example comments and changing interpolation function in lmix * Fix rotor solution indexing * Sg/kl model dev (#31) * Finalize first try at implementation with tilt * Example runs with zero tilt * Debug plotting with tilt * Finish testing curled wake model * Update dependencies * Add back in factor of D * Add tests for rotor differences * Changed tests * Finish tests and put back in kirby rotor code * Update gaussian smoothing to account for tilt * Update UMM compatibility * Update UMM and MITRotor packages * Update package version * Sg/tilted bem dev (#32) * Update BEM rotor to allow for tilt input * Update plotting to allow any slice * Add new yaw and tilt example * Debugging new tilt example * Finish debugging MITWindFarm yaw/tilt * Add in optimization timing * Add in timing * Rename example file * Example cleanup for PR * New example with yaw and tilt comparisons added * Clean up pre-merge * Final example cleanup * Finalize examples * Clean up unneeded calls to super --------- Co-authored-by: Kirby Heck <kirby.heck@gmail.com>







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!
This PR adds tilt into the k-l model as implemented by @kirbyh. I am opening a PR into the existing kl-dev branch so that it is obvious what is changed from his implementation. When just opening a PR into the main branch, it is much harder to see what the actual changes are.
The changes I made are as follows:
CurledWake.py. The big idea is that I put the column of vortices on the z-axis in the "yaw-only" frame and then I rotated it back into the ground frame and used the y and z locations of that rotated line as the vortex positions.x,y, orzand it will slice at the provided value.pre_processingcalls to the super function. I also updated the UMM code base (see this PR first) slightly for needed function.I am also trying to get non-zero TI slices of yawed and tilted turbines to make a nice figure of LES compared to MITWindfarm.