-
Notifications
You must be signed in to change notification settings - Fork 82
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
Terrain-Aware Immersed Forcing Method #1115
base: main
Are you sure you want to change the base?
Conversation
@hgopalan Great to see the PR and all of the progress. I have several suggestions that should be considered before this is merged.
Thanks, and I know the team is excited to get this merged. |
Included the reference in the main text. They did not test for order of accuracy in space and time in any of the reference papers.
I am not sure from the top of my mind why the accuracy drops to first-order. We will need to look at the forcing terms and see what may be causing it. The test case is one of the test files which comes with AMR-Wind and I tweaked it for Immersed Boundary.
I do not think it will be necessary.
I am thinking of how to best do it while focusing only on the IBM and wall-model.
We are already running cases for Total with WFIP2 terrain on GPUs in Kestrel.
|
Need to perform one more test for turbulence + wall function and compare IB/no-IB methods. @rthedin has tested the output data with FAST.Farm and Misha has tested the data with FLORIS and one-way coupling works for both the cases. |
const amrex::Real uxTarget = | ||
uTarget * ux2 / (1e-5 + std::sqrt(ux2 * ux2 + uy2 * uy2)); | ||
const amrex::Real uyTarget = | ||
uTarget * uy2 / (1e-5 + std::sqrt(ux2 * ux2 + uy2 * uy2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these 1e-5 numbers seem kind of large to just avoid dividing by 0, which seems like what's happening here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it was added to avoid divide by zero. I can reduce it. Is there any default amex variable I can use?
const amrex::Real uy2 = vel(i, j, k + 1, 1); | ||
const amrex::Real m2 = std::sqrt(ux2 * ux2 + uy2 * uy2); | ||
const amrex::Real kappa = 0.41; | ||
const amrex::Real z0 = std::max(terrainz0(i, j, k), 1e-4); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the minimum value of z0 have some significance? Seems like it should be specified in a more obvious place or should be an input argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible to have a -999 in the input file for water bodies sometimes. I can change it to a minimum roughness length variable.
I don't see any parameters in input file showing immersed boundary method is used. |
Hi Maxime, The terrain is setup in three steps.
Step 1 is called when the solver starts. It reads the terrain.amrwind file and setups up the terrain_blank, terrain_drag, terrain_height and terrainz0 variables. terrain_blank is used to enforce the zero velocity within the terrain and the fixed temperature. terrain_drag enforces the MOST boundary condition at the first cell above the terrain. terrain_blank is also used to force the turbulent viscosity and diffusivity to zero within the terrain (currently only using Kosovic LES model). For RANS modeling, the turbulent kinetic energy is enforced also enforced based on the terrain_drag variable. A typical terrain setup is available here: https://github.com/hgopalan/amr-wind/blob/hgopalan-terrain/test/test_files/nrel_terrain/nrel_terrain.inp |
Summary
This draft PR introduces an immersed forcing method for representing terrain within AMR-Wind. The terrain is generated outside amr-wind and this method does not rely on the existing immersed boundary method. The terrain runs are performed in steps:
The method can also be used to run cases without terrain such as an array of bluff bodies. The user has to create a XYZ file with the relevant information to do perform these simulations. The user can also use the stl2XYZ.py in tools/terrain folder to convert a STL file to XYZ file for AMR-Wind. It is recommended to have a smooth boundary near the inflow and outflow to reduce the number of iterations of the nodal and Mac projections.
The terrain modules have been designed to run with the Kosovic turbulence model. To use other turbulence models, the terrainBlanking information should be used to set the turbulent viscosity to zero in the solid region. It is also possible to specify a roughness file to include non-uniform roughness in the simulations.
The method is first-order accurate.
Reference Paper: https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2020MS002141
Implemented Code: FastEddy for urban microclimate without log-law. handling
Not included in the current PR:
Pull request type
PR is almost ready to be reviewed.
Please check the type of change introduced:
Checklist
The following is included:
This PR was tested by running: