Exawind / amr-wind

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

Refactor and bugfix AMD turbulence model #1011

Closed moprak-nrel closed 2 months ago

moprak-nrel commented 3 months ago

This PR has a few different things:

  1. The AMD model is now refactored to use fvm::gradient instead of hand computing it, this allows the model calculations to also look just like the tensor expression
  2. There was a bug in the buoyancy correction term in the turbulent viscosity calculation, this is now fixed
  3. Added a member function to expose the full line derivative vector in FieldPlaneAveraging, currently the only access to the derivative is through single point functions.
  4. The unit test has been updated to incorporate the bugfix

TODO:

moprak-nrel commented 2 months ago

Comparing the old/fixed AMD behavior against Smagorisnky: amd_line_plots.pdf. There is still a significant contribution from the buoyancy term in \nu_t near sharp \theta changes, but it's less pathological than the previous behavior.