amr-wind icon indicating copy to clipboard operation
amr-wind copied to clipboard

Enable changing velocity in turbine simulations from precurors

Open genevievestarke opened this issue 2 months ago • 8 comments

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:

  1. 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
  2. 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.

genevievestarke avatar Apr 18 '24 16:04 genevievestarke

Hi @genevievestarke , I believe the feature you are requesting is already available in the code. This PR has the information.

tonyinme avatar Apr 18 '24 17:04 tonyinme

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?

mbkuhn avatar Apr 18 '24 17:04 mbkuhn

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.

tonyinme avatar Apr 19 '24 02:04 tonyinme

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 avatar Apr 19 '24 03:04 lawrenceccheung

@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.

mbkuhn avatar Apr 19 '24 16:04 mbkuhn

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.

ewquon avatar Apr 23 '24 15:04 ewquon

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.

mbkuhn avatar Apr 23 '24 15:04 mbkuhn

Oh, I thought that already existed. We implemented that a long time ago in SOWFA and it even predates the MMC work.

ewquon avatar Apr 23 '24 15:04 ewquon