-
Notifications
You must be signed in to change notification settings - Fork 97
Terrain Drag Marking Update #1668
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
base: main
Are you sure you want to change the base?
Conversation
@@ -8,7 +8,8 @@ | |||
#include "amr-wind/utilities/IOManager.H" | |||
#include "amr-wind/utilities/io_utils.H" | |||
#include "amr-wind/utilities/linear_interpolation.H" | |||
|
|||
#include "amr-wind/fvm/gradient.H" | |||
#include "amr-wind/utilities/constants.H" |
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.
I don't think these includes are necessary?
@@ -183,6 +199,36 @@ void KransAxell::operator()( | |||
terrainforcing = | |||
(ustar * ustar / (Cmu * Cmu) + rans_b - tke_arr(i, j, k)) / | |||
dt; | |||
if (drag_arr(i, j, k) > 1) { | |||
//! West | |||
ustar = compute_target_ustar( |
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.
can we do a for loop? if you cast as iv and then loop on dir and to iv +/- thedimensionvector(dir) it should do this automatically.
} else { | ||
levelDrag[nbx](i, j, k, 0) = 0; | ||
} | ||
const int blankxp = std::abs( |
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.
can we do a for loop? see comment above
amrex::Real bc_forcing_t = -(tTarget - theta) / dt; | ||
//! West | ||
if (drag(i, j, k) > 1) { | ||
amrex::Real tmp_temp_target = compute_target_theta( |
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.
Another for loop opportunity
compute_target_wind( | ||
vel(i - 1, j, k, 2), vel(i - 1, j, k, 1), dx[0], z0, | ||
kappa); | ||
bc_forcing_z += |
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.
for loop opportunity (see comments below)
Summary
The existing approach for marking terrain is rudimentary. We only check the terrain height. This works well for neutral boundary layer as the terrain is forced to zero wind speed. However, for non-neutral condition at very stable or unstable states, soil temperature leaks into the domain providing a unrealistic stratification effect. This PR updates the terrain marking algorithm to account for the terrain effects in the horizontal direction. The horizontal wall function is computed using MOST.
Please check the type of change introduced:
Checklist
The following is included:
This PR was tested by running:
Additional background
Before
After