turbulence->validate有何意义
-
各位老师我找到了,在openfoam API Guide里,是这么写的
◆ validate() void validate ( ) virtual Validate the turbulence fields after construction. Update derived fields as required Definition at line 89 of file turbulenceModel.C. ◆ correct() void correct ( ) pure virtual Solve the turbulence equations and correct the turbulence viscosity. Definition at line 93 of file turbulenceModel.C.
网址在这里https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1turbulenceModel.html#details
-
其实也不难,你用grep大概能猜出个所以然来。
grep -rn "validate"
其他都是空函数只有一个函数有点意思template<class BasicTurbulenceModel> void Foam::ReynoldsStress<BasicTurbulencemModel>::validate() { correctNut(); }
然后我又grep 了
correctNut()
常用的是kOmega 我看了下template<class BasicTurbulenceModel> void kOmega<BasicTurbulenceModel>::correctNut() { this->nut_ = k_/omega_; correctBC; BasicTurbulenceModel::correctNut(): }
我虽然没有一行行debug, 大概猜出来就是湍流初始化。最开始给定k omega 初始值计算出第一步的nut 初始值给k omega方程,即previous time step,欢迎指正。