- 需要使用到flux时,就在fluxRequire列表中添加。 参考链接
If the code is solving a transport equation, it also calculates the fluxes at each cell face. If this information is useful to you after the solution of the equation, then you add it to the fluxrequired list in fvSchemes.
The pressure equation has div(grad(p)). So the flux here is a gradient of p that is located at the faces. This is quite different than the gradient of pressure at cell centers, that you would get with the normal fvc::grad(p). The gradient at p from the faces is very useful for updating fluxes.
- 在求解方程时,顺便计算flux,可以节省计算量。参考链接
Think of the calculation of the fluxes in the pressure equation. Once everything is done properly, the pressure part of the flux is equal to the off-diagonal matrix coefficient related to the face, multiplied by the pressure field (difference, or for compressible flow, a slightly more complex).
Now, think of discretisation of a Laplacian: this one also got the non-orthogonal correction, which is explicit. The correction therefore also appears in the flux and must be fully consistent: if not, you get a mass continuity error.
The best way to accumulate all corrections of this kind is to simply collect the stuff during matrix assembly. Because this costs money (storage and operations), you don't want to do this for every matrix assembly. Thus, a fluxRequired flag means "collect the explicit contributions", after which you can ask the matrix for the flux (or flux correction). If you don't need the flux, you don't do fluxRequired and all is well!
-----------------------------------------------------------
本文来自博客园,作者:小厨房,转载请注明原文链接:https://www.cnblogs.com/erichf/p/14798901.html,否则视为侵权
如有疑问,请站内留言 或加 QQ:②⑨⓪②② ⑦③⑦⑨
-----------------------------------------------------------