谢谢李老师的回复!因为雷诺应力不仅出现在动量方程里面,也出现在turbulent kinetic energy equation 与 turbulent frequency equation中,我的想法是如果我分别修改湍流模型的文件(kOmegaSSTBase)与动量方程的文件(linearEddyViscosity)就会要定义两次非线性项,所以我选择就在kOmegaSSTBase中更新turbulence->divDevRhoReff(U),在其中加入非线性项,参考的资料是OpenFoam里面的nonlineareEddyViscosity。由于这样修改需要在kOmegaSSTBase.C文件的constructors中加入eddyViscosity 也就是上图中蓝色后面的部分,我直接在原来的代码Turbulence后面加这一项会报错,想请问这怎么解决?非常感谢李老师耐心看我的问题,不知道我表述清楚没有?
@浪迹天大 是这样的,我最近也在读OpenFOAM中LES模型,发现Lund提到
The nearly universal approach is to simply write down the filtered Navier-Stokes equations together with an assumed model for the subgrid-scale stresses and then apply the desired spatial discretization to this “filtered” system. Although it is rarely mentioned, what one is doing by adopting this procedure is to imagine that the finite support of the computational mesh together with the low-pass characteristics of the discrete differentiating operators act as an effective filter. One then directly associates the computed velocity field with the filtered velocity. This procedure will be referred to as implicit filtering since an explicit filtering operation never appears in the solution procedure.
也就是说OpenFOAM程序除了动态模型外都没有对N-S方程进行显式的滤波操作,那么我们在方程植入中只要修改$\nu_{sgs}$就OK了,我在后面会做几个滤波函数的选择的对比,看看最后结果一样不一样