Exawind / amr-wind

AMReX-based structured wind solver
https://exawind.github.io/amr-wind
Other
103 stars 78 forks source link

Time varying abl bodyforce #1025

Closed mbkuhn closed 2 months ago

mbkuhn commented 2 months ago

Summary

This PR adds 2 features that work together: the ability to output the ABL forcing values to a text file and the ability to read in forces from a text file to apply uniformly using BodyForce.

Pull request type

Please check the type of change your PR introduces:

Checklist

The following should accompany this PR:

This PR was tested by running:

Additional background

This feature is well suited to be used with velocity timetable, but it does not have to be. It can be used independently. Likewise, the body force feature can be used with a text file that has been set up manually or through another means; it does not have to come from an ABL Forcing output.

Issue Number: #1022

mbkuhn commented 2 months ago

Just getting this out there for now, but it does need unit tests and documentation

mbkuhn commented 2 months ago

Should this PR also include a forcing timetable output from Geostrophic Forcing? I know that some ABL precursors use Geostrophic Forcing instead of ABL Forcing.

mchurchf commented 2 months ago

Yes, having time-varying geostrophic wind would be useful too. I think just a general code class that handles time tables and interpolates within them in time would be handy. Eliot's pull request from earlier this year does this for arbitrary time-height varying forcing, so maybe you can draw upon that instead of duplicating. What I don't like about Eliot's code is that it has to read in a netcdf input file. The input can get sort of large because it might be a full day's worth time history of an evolving height profile, so netcdf is good, I suppose, but you can't just open up a netcdf file in a text editor and look at it and modify it, and the size of data is really not that big in the grand scheme of things.

mbkuhn commented 2 months ago

I added the same text file output for Geostrophic Forcing, but it looks like it doesn't need that. Unlike ABL forcing, Geostrophic Forcing should be reproducible in an inflow-outflow sim because it's not based on the current velocities of a sim.

mbkuhn commented 2 months ago

With documentation now added, I think that the only thing remaining is unit tests.