Skip to content
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

Enable changing velocity in turbine simulations from precurors #1022

Closed
genevievestarke opened this issue Apr 18, 2024 · 9 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@genevievestarke
Copy link

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.
@tonyinme
Copy link
Contributor

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

@mbkuhn mbkuhn added the enhancement New feature or request label Apr 18, 2024
@mbkuhn
Copy link
Contributor

mbkuhn commented Apr 18, 2024

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?

@tonyinme
Copy link
Contributor

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.

@lawrenceccheung
Copy link
Contributor

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

@mbkuhn
Copy link
Contributor

mbkuhn commented Apr 19, 2024

@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 mbkuhn self-assigned this Apr 19, 2024
@mbkuhn mbkuhn mentioned this issue Apr 22, 2024
14 tasks
@ewquon
Copy link
Contributor

ewquon commented Apr 23, 2024

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.

@mbkuhn
Copy link
Contributor

mbkuhn commented Apr 23, 2024

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.

@ewquon
Copy link
Contributor

ewquon commented Apr 23, 2024

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

@mbkuhn
Copy link
Contributor

mbkuhn commented Apr 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants