CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Implementating the Wilcox 2006 turbulence model (https://www.cfd-online.com/Forums/openfoam-programming-development/124300-implementating-wilcox-2006-turbulence-model.html)

bgraves October 1, 2013 14:53

Implementating the Wilcox 2006 turbulence model
 
1 Attachment(s)
Hi everyone,

I am trying to implement the Wilcox 2006 turbulence model into openFOAM, and have gotten a little stuck. I have been able to code up everything except the closure coefficient chi_omega. The equation determines the coefficient Beta. The equation for chi_omega can be seen in the attached image. I know that the Omega_ij term is the skew symmetric matrix, what I am not sure of is how to code in Omega_jk and S_ki. I would really appreciate any insight that can be provided.

Thanks for your help in advance
-Ben Graves

mlaurita October 2, 2013 12:13

If you take a look at the Tensor class (actually TensorI.H) there are global functions for calculating symmetric and skew-symmetric parts of a matrix. In this case, if you start with the gradient of the velocity, grad(U), then symm(grad(U)) gives you S and skew(grad(U)) gives you Omega. You'll probably also have to make use of the inner product and mag() functions here as well to get to Chi_omega.

MJL

bgraves October 2, 2013 14:58

Hi Matt,

Thanks for the reply! I know how to get Omega_ij and S_ij, what I wanted to know was how to get Omega_jk and S_ki. Basically my question is how do I specify the different index.

Thanks,
Ben

lixx October 3, 2013 04:59

Hi Ben,

S_ij is the same as S_ki, both are a component of the tensor S. When calculating chi_omega, you should use i,j,k = 1, 2, 3 to construct each term and then add them up (in total there will be 27 terms, due to Einstein convention of repeated indices). You should have some basic knowledge of tensor.


Quote:

Originally Posted by bgraves (Post 454738)
Hi Matt,

Thanks for the reply! I know how to get Omega_ij and S_ij, what I wanted to know was how to get Omega_jk and S_ki. Basically my question is how do I specify the different index.

Thanks,
Ben



All times are GMT -4. The time now is 04:44.