Exawind / amr-wind

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

Cannot find field: tke #1023

Closed AsimUdel closed 2 months ago

AsimUdel commented 2 months ago

Hello, I am trying to use "Smagorinsky" turbulence model previously (I was using OneEqKsgsM84 with tke source term from KsgsM84Src) but I am getting an error after running for almost 100s of simulation that " Cannot find field: tke" and then terminates. I have attached my input file and error also. thank you amr_wind_input.txt image

rybchuk commented 2 months ago

Hi Asim, the tke field refers to subgrid scale TKE. The Smagorinsky turbulence model doesn't use a SGS TKE field, but the 1.5 Equation turbulence model does use a SGS TKE field. To use the 1.5 model, set

turbulence.model                         = OneEqKsgsM84
TKE.source_terms                         = KsgsM84Src
TKE.interpolation                        = PiecewiseConstant   

The name OneEqKsgsM84 refers to a Moeng (1984) paper.

If you want to calculate TKE on the resolved scales, you'll need to save out time-varying data or spatially varying data, calculate the mean across that data, and then use the fluctuations to calculate TKE. Alternatively, you can use AMR-Wind's Averaging module to calculate Reynolds stresses for you, and if I recall correctly, you can use Reynolds stresses to calculate TKE as well.

If you want total TKE, that is the sum of resolved TKE and SGS TKE.

AsimUdel commented 2 months ago

Thank you so much @rybchuk