-
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
Forest Canopy Model #1324
base: main
Are you sure you want to change the base?
Forest Canopy Model #1324
Conversation
|
||
namespace amr_wind::pde::icns { | ||
|
||
/** Adds the forcing term to include the presence of immersed boundary |
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.
out of date comment
amr-wind/physics/ForestDrag.H
Outdated
amrex::Vector<amrex::Real> m_x_forest; | ||
amrex::Vector<amrex::Real> m_y_forest; | ||
amrex::Vector<amrex::Real> m_ht_forest; | ||
amrex::Vector<amrex::Real> m_dia_forest; |
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.
if dia
is diameter, spell it out?
amr-wind/physics/ForestDrag.H
Outdated
amrex::Vector<amrex::Real> m_type_forest; | ||
amrex::Vector<amrex::Real> m_x_forest; | ||
amrex::Vector<amrex::Real> m_y_forest; | ||
amrex::Vector<amrex::Real> m_ht_forest; |
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.
ht -> height
amr-wind/physics/ForestDrag.H
Outdated
amrex::Vector<amrex::Real> m_dia_forest; | ||
amrex::Vector<amrex::Real> m_cd_forest; | ||
amrex::Vector<amrex::Real> m_lai_forest; | ||
amrex::Vector<amrex::Real> m_lm_forest; |
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.
spell out lm
amr-wind/physics/ForestDrag.cpp
Outdated
levelDrag(i, j, k) = 0.0; | ||
for (unsigned ii = 0; ii < forestSize; ++ii) { | ||
const amrex::Real radius = std::sqrt( | ||
std::pow(x - x_forest_ptr[ii], 2) + |
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.
pow 2 should be written out as x * x
for performance.
const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1]; | ||
const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2]; | ||
levelDrag(i, j, k) = 0.0; | ||
for (unsigned ii = 0; ii < forestSize; ++ii) { |
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 like this for loop combined with the while loop below. Let's chat and see if we can come up with something better.
Co-authored-by: Marc T. Henry de Frahan <[email protected]>
Co-authored-by: Marc T. Henry de Frahan <[email protected]>
This PR provides a forest canopy model in AMR-Wind. Two kinds of forests are supported: (i) homogeneous forest and (ii) heterogeneous forest using an empirical model for leaf area density.
Forest overlap is allowed and is not checked. It is expected that the users provide accurate inputs and currently no checking is included. The model requires following inputs from the user: (i) tree type (ii) tree center x (iii) tree center y (iv) tree height (v) tree girth preferably at the widest point (vi) tree drag coefficient (vii) tree leaf area index (viii) location of maximum leaf area density for heterogeneous forests.
The model will work with any LES model as the drag forcing due to the turbulence is required only in momentum equation. It is also possible to include a turbulence forcing term in one equation kegs model.
The model will be extended to the one-equation RANS model in a future PR by including the turbulence contribution.
Please check the type of change introduced:
Checklist
The following is included:
This PR was tested by running:
Issue Number: #1322