Skip to content
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

Change dynamic viscosity in FD hybrid central / upwind blending to kinematic viscosity #575

Merged
merged 2 commits into from
Sep 6, 2018

Conversation

clarkpede
Copy link
Contributor

@clarkpede clarkpede commented Sep 5, 2018

Proposed Changes

In both the original paper on DDES and the paper by @EduardoMolina on hybrid RANS/LES in SU2, the calculation for r_d uses kinematic viscosity. In SU2, the dynamic viscosity is currently used. This leads to poor behavior if density is not close to 1. This PR exchanges the dynamic viscosity for the kinematic viscosity.

Related Work

This is part of the changes originally proposed in PR #552

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags).
  • My contribution is commented and consistent with SU2 style.
  • I have added a test case that demonstrates my contribution, if necessary.

The original definition of `r_d` in DES used kinematic viscosity (not
dynamic viscosity).  Using dynamic viscosity is not dimensionally
consistent, and will lead to problems if density is not 1.  Since
`GetLaminarViscosity()` and `GetEddyViscosity()` return the dynamic
viscosity, it is necessary to divide by the density to get kinematic
viscosity.
@clarkpede
Copy link
Contributor Author

The behavior can be seen in the backward facing step case, as shown in a snapshot below. As currently set up, Roe_Dissipation is equal to f_d from the original DDES paper. So Roe_Dissipation should:

  • Go to 0 in attached boundary layers
  • Go to 1 in regions with resolved turbulent fluctuations

Here's a comparison of the Roe_Dissipation before and after this PR:

viscosity_comparison

Here's the same case, but zoomed in at the step:

viscosity_comparison_zoom

With this PR, the model does indeed go to 0 near the walls and go to 1 in the highly unsteady ("LES") region after the step.

@vdweide
Copy link
Contributor

vdweide commented Sep 5, 2018

I don't know too much about this topic, but the first thing that comes to my mind when I read this is dimensional consistency. So did somebody do a proper dimensional analysis on the implementation?

Edwin

@clarkpede
Copy link
Contributor Author

@vdweide It's easy to do, so I'll show the dimensional analysis here.

I'll use L for length, T for time, and M for mass.

The original paper defined r_d, which is supposed to be a nondimensional parameter. (r_d gets raised to the 3rd power and put into a hyperbolic tangent, so it would be messy if it were dimensional).

In the code you'll see:

 r_d = (nu + nu_t)/(uijuij*k2*pow(val_wall_dist, 2.0));

where nu is the kinematic viscosity, nu_t is the kinematic eddy viscosity, uijuij is the magnitude of the velocity gradient tensor, k2 is the square of the von-Karman constant, and val_wall_dist is the wall distance.

  • nu has units of L^2/T
  • nu_t has units of L^2/T
  • uijuij has units of 1/T
  • val_wall_dist has units of L

So if you do the math, r_d has units of L^/T in the numerator and L^2/T in the denominator. r_d is nondimensional.

If you switch nu and nu_t from kinematic viscosities to dynamic viscosities, you get that r_d has units matching density, or M/L^3. That's obviously not correct.

Copy link
Contributor

@EduardoMolina EduardoMolina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and ready to merge.

@vdweide
Copy link
Contributor

vdweide commented Sep 6, 2018

Merging things in. I kept the branch, but delete it if you don't need it anymore.

@vdweide vdweide merged commit d00c3b3 into su2code:develop Sep 6, 2018
@clarkpede clarkpede deleted the bugfix_viscosity_in_FD branch September 18, 2018 16:05
CatarinaGarbacz pushed a commit that referenced this pull request Aug 26, 2019
Change dynamic viscosity in FD hybrid central / upwind blending to kinematic viscosity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants