Replies: 1 comment 1 reply
-
@dshen1993, we suggest that you use https://github.com/tomchor/Oceanostics.jl for this computation. Also, you likely want to interpolate to cell centers after computing Also note that the average of Oceanostics will do this for you. It will look something like U = Field(Average(u, dims=(1, 2)))
V = Field(Average(v, dims=(1, 2)))
u_prime = u - U
v_prime = v - V
e = @at (Center, Center, Center) sqrt(u_prime^2 + v_prime^2 + w^2) / 2
E = Field(Average(e, dims=(1, 2)))
compute!(E) As for why your TKE is too small, I am not sure. We need all of your code to be able to reproduce the issue. PS use triple backticks "```" to enclose your code so that it formatted correctly (you can also opt for syntax highlighting this way). |
Beta Was this translation helpful? Give feedback.
-
I want to calculate the total turbulent kinetic energy from resolved and sgs components.
Here is code i used to calculate the TKE.
u_center=@at (Center, Center, Center) model.velocities.u
v_center=@at (Center, Center, Center) model.velocities.v
w_center=@at (Center, Center, Center) model.velocities.w
U = Field(Average(u_center, dims=(1, 2)))
V = Field(Average(v_center, dims=(1, 2)))
W = Field(Average(w_center, dims=(1, 2)))
u_prime=@at (Center, Center, Center) Field(u_center-U)
v_prime=@at (Center, Center, Center) Field(v_center-V)
w_prime=@at (Center, Center, Center) Field(w_center-W)
TKE_pointwise=Field(0.5*(u_prime^2 + v_prime^2 + w_prime^2))
TKE=Average(TKE_pointwise, dims=(1, 2))
####################################################
The TKE from this calculation is too small, less than 10^-32.
So, if i want to get the internal tke that is used to calculated the eddy viscosity in les turbulence closure. How to get this internal tke.
By the way, how do i calculate the tke from resolved component?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions