-
Notifications
You must be signed in to change notification settings - Fork 508
[BugFix] TurbSim calculating grid bottom location #2808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
For backward compatibility and for other use cases, I'd recommend that you just make sure that Zbottom is always greater than zero instead of recalculating as the HubHt - half the grid height. I made a PR with my proposed changes: ptrbortolotti#5 In your example case, this ends up with the grid covering (0, 218] m instead of [1, 219] m, but I think it effectively does what you want without changing the behavior for other cases (e.g., where you'd have a smaller rotor but want to calculate tower aero to the ground) |
TurbSim: if grid goes below ground, shift the bottom point
|
Bonnie- Unless I'm missing something, I don't see a reason to remove the error checking. With your changes, the code will no longer crash (at least not at the same spot) with the following problematic input: |
I set the grid bottom so that it can never be less than |
|
I understand that with the inputs I gave, the overall grid would still have the correct width and height, but should we change the behavior of handling problematic inputs? I think if the user requests |
|
It really doesn't matter to me if you want the user to change the inputs (i.e., cause a fatal error, or what you call "crash"), or if we just simulate more wind up to the height requested. I think it's easier for backward compatibility if we just simulate the extra wind. I don't want to just center the grid vertically because that makes it harder for someone with a single land-based turbine who wants to generate turbulence over the rotor and the full tower. They'd have to generate quite a few more points. Also, they wouldn't be able to re-generate existing wind files with the new code. If you wanted to make a bigger change, we could modify the TurbSim input file so the user explicitly specifies the y-z bounds of the turbulence grid; the code would then calculate |
|
I agree with Bonnie on calculating the extra height - we don't want to limit the grid height to only double the hub height. There is a subtlety here with the hub height and grid height that should be mentioned (I spoke with @rthedin in person about this). If the grid height requested is more than double the hub height, the grid is shifted from centering on the hub height to the bottom being just above ground with the hub height below the center of the grid. This is a desired behavior as there are times we want the grid significantly taller than twice hub-height. |
Issue
This PR tries to fix a long-standing issue with TurbSim, which at times errors out saying that the lowest grid point is underground, although that's not the case.
To generate the error, try setting:
The lowest grid point should be at
110 - 218/2 = 1mabove groundHowever the current TurbSim estimates the rotor diameter as the minimum between height and width, so
156 m. Then, TurbSim estimates the top of the grid as110 + 156/2 = 188, and then errors out complaining that the bottom of the grid is underground at188 - 218 =-30 mThe PR fixes this issue by simply setting Zbottom as:
p_grid%Zbottom = p_grid%Ztop - 0.5*p_grid%GridHeightImpacted areas of the software
TurbSim
Additional supporting information
ws6.00_s0_TI0.06_shear0.20.txt