sidShinde / tkeBudget

OpenFOAM post-processing utility to calculate turbulent kinetic energy budget
11 stars 2 forks source link

Shear Production Term #1

Open kmissios opened 2 years ago

kmissios commented 2 years ago

Dear @sidShinde ,

I was looking into your development since I want to make a similar postProcessing function and I have a concern about one of your calculations in the tke budgets. Are you sure that the shear production term is calculated correctly? Don't you think that in the gradient the mean velocity has to be used instead of the gradient of velocity?

To get more specific, in line 125 of the tkeBudgetTemplates.C ( https://github.com/sidShinde/tkeBudget/blob/0564a3b82346ea2b340dcf4b299e317271efb100/tkeBudgetTemplates.C#L125)

Perhaps it should be const volScalarField ipUP2MGradU( UP2M && gradUMean ); instead of const volScalarField ipUP2MGradU( UP2M && gradU ); where the gradient of the mean velocity is given via const volTensorField gradUMean( fvc::grad(UMean) );

Please let me know about your thoughts.

Best regards, Konstantinos Missios

sidShinde commented 2 years ago

Hi @kmissios, glad to see that this utility is useful to your work and thank you for pointing out the error. I agree with you comment. Infact, even the C_k term should use mean velocity instead of the instanteneous velocity. I would recommend using the lookup for UMean instead of computing it again just for efficiency, that is only if your simulation is calculating UMean already.

Happy to merge in the changes if you can raise a pull request.

Kind regards, Siddhesh