erf-model / ERF

Energy Research and Forecasting Model
https://erf.readthedocs.io/en/latest/
Other
22 stars 38 forks source link

DNS strain #61

Closed ewquon closed 2 years ago

ewquon commented 3 years ago

In DNS mode, we appear to be neglecting the div(U) term in the strain (that's not necessarily zero for compressible flow). My understanding is the strain-rate tensor should be: image \epsilon_{ij} = \frac{1}{2}\left( \frac{\partial U_i}{\partial x_j} + \frac{\partial U_j}{\partial x_i} + \frac{2}{3}\nabla \cdot U \delta_{ij} \right)

Priority: low

asalmgren commented 2 years ago

It would be good to resolve this -- what's our current thinking?

brankokosovic commented 2 years ago

For compressible DNS the term involving 2/3 of velocity divergence must be added, however, the constitutive relationship for the divergence term is multiplied by a viscosity that is different from the kinematic viscosity multiplying the strain rate term.

[image: Screen Shot 2021-10-26 at 5.08.56 PM.png]

*My work hours may not be your work hours. *Please do not feel obliged to reply to this email outside of your normal working hours.

Branko Kosovic (he/him/his) Director Weather Systems and Assessment Program Program Manager for Renewable Energy Research Applications Laboratory National Center for Atmospheric Research P.O. Box 3000 Boulder, CO 80307-3000 phone: (303) 497-2717 e-mail: @.***

On Tue, Oct 26, 2021 at 4:35 PM asalmgren @.***> wrote:

It would be good to resolve this -- what's our current thinking?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/erf-model/ERF/issues/61#issuecomment-952379947, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGAMEQP2KW7TMPKP42274LUI4UJXANCNFSM5C7JL46A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

asalmgren commented 2 years ago

The png doesn't show up -- can you try attaching it again?

asalmgren commented 2 years ago

I'm assuming you mean we subtract 2/3 mu divu as well as adding the bulk viscosity term?

@pkjha-aero -- can you do this?

pkjha-aero commented 2 years ago

@asalmgren I'll take care of it.

brankokosovic commented 2 years ago

There are different ways to write the constitutive relationship. One way is the way I wrote it with the addition of the divergence term. Another way is, as you say by subtracting 2/3 \mu and defining "second viscosity" as: \lambda + 2/3 \mu then the constitutive relationship is (\lambda + 2/3 \mu) div(u) I + \mu { grad(u) + [grad(u)]^T - 2/3 div(u) I } Here, I is the identity tensor. In the above expression, \mu and \lambda viscosities are dynamic viscosities.

Since viscosities are a function of temperature, to implement full viscous stress for the compressible N-S the stress terms should be discretized allowing for spatial variability of viscosity (similar to turbulent viscosity, denoted with K in documentation) and not assuming that viscosity is constant and uniform.

*My work hours may not be your work hours. *Please do not feel obliged to reply to this email outside of your normal working hours.

Branko Kosovic (he/him/his) Director Weather Systems and Assessment Program Program Manager for Renewable Energy Research Applications Laboratory National Center for Atmospheric Research P.O. Box 3000 Boulder, CO 80307-3000 phone: (303) 497-2717 e-mail: @.***

On Tue, Oct 26, 2021 at 5:18 PM asalmgren @.***> wrote:

I'm assuming you mean we subtract 2/3 mu divu as well as adding the bulk viscosity term?

@pkjha-aero https://github.com/pkjha-aero -- can you do this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/erf-model/ERF/issues/61#issuecomment-952402059, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGAMETFKAGGZJN6IOGCWX3UI4ZM3ANCNFSM5C7JL46A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ewquon commented 2 years ago

@brankokosovic Is viscosity as a function of temperature something that's implemented in WRF? I can't find anything in the ARW theory manual on it.

pkjha-aero commented 2 years ago

scosity as a function of temperature something that's implemented in WRF? I can't find anything in the ARW theory manual on it.

I have made a note in the code that right now \mu is assumed to be constant, but in future we may implement it as a function of T (Sutherland's law or something appropriate) https://github.com/erf-model/ERF/blob/development/Source/RK3/Diffusion.cpp#L34-L36

pkjha-aero commented 2 years ago

In DNS mode, we appear to be neglecting the div(U) term in the strain (that's not necessarily zero for compressible flow). My understanding is the strain-rate tensor should be: image \epsilon_{ij} = \frac{1}{2}\left( \frac{\partial U_i}{\partial x_j} + \frac{\partial U_j}{\partial x_i} + \frac{2}{3}\nabla \cdot U \delta_{ij} \right)

Priority: low

https://github.com/erf-model/ERF/blob/development/Source/RK3/StrainRate.cpp#L20

brankokosovic commented 2 years ago

No, but if the goal is a general compressible DNS capability it would be important to allow for temperature dependent viscosity. This would not be necessary if focus is only on atmospheric flows, low Mach number flows with relatively small temperature range.

*My work hours may not be your work hours. *Please do not feel obliged to reply to this email outside of your normal working hours.

Branko Kosovic (he/him/his) Director Weather Systems and Assessment Program Program Manager for Renewable Energy Research Applications Laboratory National Center for Atmospheric Research P.O. Box 3000 Boulder, CO 80307-3000 phone: (303) 497-2717 e-mail: @.***

On Thu, Oct 28, 2021 at 1:21 PM ewquon @.***> wrote:

@brankokosovic https://github.com/brankokosovic Is viscosity as a function of temperature something that's implemented in WRF? I can't find anything in the ARW theory manual on it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erf-model/ERF/issues/61#issuecomment-954132181, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGAMEUOVRKCB5YTGRB4ERLUJGPFBANCNFSM5C7JL46A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

asalmgren commented 2 years ago

My thinking is let's postpone temperature dependence for now. @pankaj -- make a note in the docs that we are currently assuming constant mu and we can put it on the "wish list" for the project but let's not make it a priority now.

On Thu, Oct 28, 2021 at 1:21 PM Branko Kosovic @.***> wrote:

No, but if the goal is a general compressible DNS capability it would be important to allow for temperature dependent viscosity. This would not be necessary if focus is only on atmospheric flows, low Mach number flows with relatively small temperature range.

*My work hours may not be your work hours. *Please do not feel obliged to reply to this email outside of your normal working hours.

Branko Kosovic (he/him/his) Director Weather Systems and Assessment Program Program Manager for Renewable Energy Research Applications Laboratory National Center for Atmospheric Research P.O. Box 3000 Boulder, CO 80307-3000 phone: (303) 497-2717 e-mail: @.***

On Thu, Oct 28, 2021 at 1:21 PM ewquon @.***> wrote:

@brankokosovic https://github.com/brankokosovic Is viscosity as a function of temperature something that's implemented in WRF? I can't find anything in the ARW theory manual on it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erf-model/ERF/issues/61#issuecomment-954132181, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ADGAMEUOVRKCB5YTGRB4ERLUJGPFBANCNFSM5C7JL46A

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/erf-model/ERF/issues/61#issuecomment-954173683, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRE6YVSZ454EOQ2KKIZLODUJGWFBANCNFSM5C7JL46A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Ann Almgren Senior Scientist; CCSE Group Lead Pronouns: she/her/hers