场计算问题
-
void kEpsilonNN::correctNonlinearStress(const volTensorField& gradU) { timeScale_=k_/epsilon_; // Linear (nut) nut_ = -g1_*k_*timeScale_; nut_.correctBoundaryConditions(); // nolinear(tau_NL) volSymmTensorField S(timeScale_*symm(gradU)); volTensorField W(timeScale_*skew(gradU)); nonlinearStress_ =2*k_*(g2_ * twoSymm(S&W)+ g3_ * dev(innerSqr(S))+ g4_ * dev(symm(W&W)) + g5_ * twoSymm(W&innerSqr(S))+ g6_ * dev(twoSymm(W&W&S))+ g7_ * twoSymm(W&S&W&W) + g8_ * twoSymm(S&W&innerSqr(S)) + g9_ * dev(twoSymm(innerSqr(S)&W&W)) + g10_ * twoSymm(W&innerSqr(S)&W&W)); }
目前是在雷诺应力中加了各向异性项nonlinearStress,是按照LienCubicKE.C来修改的,其中g1到g10是一个标量场,在0文件夹下面读取。现在是湍流模型编译能通过,但是在调用simple求解器时候计算出现问题。
Time = 2 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0279014, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0209915, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0274975, No Iterations 2 GAMG: Solving for p, Initial residual = 1, Final residual = 0.0920741, No Iterations 4 time step continuity errors : sum local = 7.40969e+91, global = -1.79495e+89, cumulative = -1.79495e+89 smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.0321531, No Iterations 3 bounding epsilon, min: -1.33631e+104 max: 1.64016e+103 average: -1.01414e+99 smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.072621, No Iterations 2 bounding k, min: -1.34214e+100 max: 1.0091e+99 average: -9.64939e+94 [1] #0 Foam::error::printStack(Foam::Ostream&)[6] #0 Foam::error::printStack(Foam::Ostream&)[7] #0 Foam::error::printStack(Foam::Ostream&)[8] #0 Foam::error::printStack(Foam::Ostream&)[9] #0 Foam::error::printStack(Foam::Ostream&)[12] #0 Foam::error::printStack(Foam::Ostream&)[13] #0 Foam::error::printStack(Foam::Ostream&)[15] #0 Foam::error::printStack(Foam::Ostream&)[2] #0 Foam::error::printStack(Foam::Ostream&)[5] #0 Foam::error::printStack(Foam::Ostream&)[3] #0 Foam::error::printStack(Foam::Ostream&)[11] #0 Foam::error::printStack(Foam::Ostream&)[10] [14] #0#0 [4] #0 Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)[0] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [1] at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? [2] #1 Foam::sigFpe::sigHandler(int)[10] #1 Foam::sigFpe::sigHandler(int) at ??:? [15] #1 Foam::sigFpe::sigHandler(int) at ??:? at ??:? at ??:? at ??:? [5] #1 Foam::sigFpe::sigHandler(int)[13] #1 Foam::sigFpe::sigHandler(int)[14] #1 Foam::sigFpe::sigHandler(int) at at [6] #1 at ??:? ??:? Foam::sigFpe::sigHandler(int) at ??:? at ??:? ??:? at ??:? at ??:? at ??:? [7] #1 [8] #1 Foam::sigFpe::sigHandler(int)Foam::sigFpe::sigHandler(int)[12] #1 Foam::sigFpe::sigHandler(int)[0] #1 Foam::sigFpe::sigHandler(int)[4] #1 Foam::sigFpe::sigHandler(int)[9] #1 Foam::sigFpe::sigHandler(int)[3] #1 Foam::sigFpe::sigHandler(int)[11] #1 Foam::sigFpe::sigHandler(int) at ??:? [5] #2 ? at ??:? [10] #2 ? at ??:?
对此,我为了验证是不是我代码写错的问题,我用了一个简单的二维方管来验证,发现可以计算,效果还可以。我也把我修改的地方一一注释找问题,也没找到问题所在。有人知道是什么问题吗?