amr-wind
amr-wind copied to clipboard
Enable changing velocity in turbine simulations from precurors
Can we add the ability to prescribe varying wind speeds and wind directions in the precursor, and then use in turbine simulations? @mbkuhn and I think this could be accomplished by adding two features:
- The ability to prescribe the wind speed value at the hub height as a time series rather than a constant value in the precursor simulation
- Allowing the forcing for driving the flow (body forcing) to be a time series. This would involve collecting it as a time series in the precursor simulations, and then implementing it as a time series in the turbine simulation.
Hi @genevievestarke , I believe the feature you are requesting is already available in the code. This PR has the information.
This is great, @tonyinme, thanks for chiming in! I think that this PR addresses point 1 from Gen's request. However, I would think in a simulation where the target velocity is changing, the abl forcing value would be changing quite a bit too. Therefore, it would seem that in a subsequent inflow-outflow simulation, applying a uniform, constant bodyforce would be insufficient. Gen's point 2 is asking for the ability to output the abl forcing value during the precursor sim and then read it in during the inflow/outflow simulation. We don't have that, right?
Oh, that's a good point. The PR I shared only addresses the first issue. It can also be used as a guide to implement the feature requested in the second point.
Hi @genevievestarke, @mbkuhn,
It could be worth asking @ewquon, what you're asking for might be very closely related to the meso-microscale coupling. Beyond just specifying the MMC profiles, there is also an (undocumented) option to put in a bodyforce-file
file
https://github.com/Exawind/amr-wind/blob/main/amr-wind/equation_systems/icns/source_terms/BodyForce.cpp which reads in a z-varying body-force height. BodyForce
can also be sinusoidal, so the next logical step might be to make it vary in time and z and be usable for multiple scenarios.
Lawrence
@lawrenceccheung, thanks for the input. I noticed that there's no reg test for the height-varying body force; do you know of any one using that capability? I know that the meso-microscale coupling has inputs to change the forcing in a periodic simulation, but I'm trying to address the need for replicating the forcing from a periodic simulation in a subsequent inflow-outflow simulation. I like the concept of making the Body Force implementation as general as possible, but I'm not seeing a good way to harmonize a uniform, time-varying body force with the height-varying approach (because the first needs only 1 file, the second would have to use multiple files to vary in time as well), or harmonizing a time-varying body force that follows an analytical profile (sinusoidal) with one that follows a time table. That's why I think I'll keep these three as distinct options.
For the MMC profile assimilation in practice, you would save the time- and height-varying body force from the precursor, and then you can re-apply those to be consistent with your saved boundary inflow data in the inflow-outflow simulation.
I think it would be great to be able to save time- and space-varying forcing data to reapply in an inflow-outflow sim. However, I think that is beyond the scope of this PR because in the short term we still need to be able to save time-varying, uniform forcing data and be able to reapply it.
Oh, I thought that already existed. We implemented that a long time ago in SOWFA and it even predates the MMC work.
This is a helpful discussion, and it points to a need for having a more complete implementation in the future, one that uses time- and space-varying force data. However, for now, PR #1025 addresses the original impetus behind this issue, and it includes the ability to output ABLForcing as a uniform, time-varying vector, the ability to input BodyForce as a uniform, time-varying vector, and the ability to input the target velocity of Geostrophic forcing as a function of time. When a need arises for the combination of time- and space-varying, we will create a new issue.