# 为什么网格线要与流动方向对齐

**URL:** <https://www.cax.do/t/topic/329>\
**Category:** Fluid\
**Tags:** mesh\
**Created:** [2025 年4 月 1 日 12:25 UTC](https://www.cax.do/t/topic/329 "2025-04-01T12:25:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![Sbadakesi](https://www.cax.do/user_avatar/www.cax.do/sbadakesi/32/5_2.png) [@Sbadakesi](https://www.cax.do/u/Sbadakesi)\
发布日期： [2025 年4 月 1 日 12:25 UTC](https://www.cax.do/t/topic/329/1 "2025-04-01T12:25:35Z")

</div>

**在计算流体力学中（CFD）中，高精度的仿真结果始于高质量的网格。网格的三个方面决定了求解器的计算精度：网格质量、网格分辨率和网格对齐。网格质量是指单元的形状是否合理，例如是否存在过度扭曲、拉伸，这些因素会影响数值计算的稳定性和收敛性。高质量的网格对于仿真来说非常重要。**

 ![This diagram illustrates the factors contributing to mesh quality, including area, volume, aspect ratio, skewness, orthogonality, warpage, proximity, free edges, self-intersection, and non-manifold vertices. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/7/74fe51ce99602942af9fab4c12dab8b3066e1ec8.jpeg)  
**网格的评价指标**

**网格分辨率也就是网格大小，决定了计算域内流场特征的捕捉能力，较高的分辨率有助于更准确地解析边界层、涡结构和湍流特性。**

 ![Two wireframe donuts are interlocked, creating a figure eight shape. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/0/097b815464276b8933c577b1c223daf5bee0dd50.jpeg)  
**不同的网格分辨率**

 ![Four bar graphs compare indicated power and volume flow rate at 6000 and 8000 rpm using CFX simulations with coarse and fine grids against measured data. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/6/65991f67a37a1e9aa0889673ba7b41db14a58a36.jpeg)  
**高分辨率的网格更接近实测结果**

**大多数情况下，我们对网格质量和网格分辨率非常关心，但是却忽略了网格线和流动方向对齐对于流动结果的影响。网格对齐即在CFD网格生成过程中，遵循流动方向布置网格，即使在非结构化网格中，也尽可能使单元的主方向与流动方向对齐。网格对齐对于降低数值误差、提高模拟精度同样至关重要。合理的网格对齐可以减少数值扩散，使得流动特征（如剪切层、涡旋结构、冲击波等）能够更加清晰准确地被捕捉。如下图，左边的网格与流动方向对齐的很好，右边的网格偏离了流动方向。**

 ![The illustration shows the difference between good and poor flow alignment, depicting a box with internal flow lines aligned parallel to the external flow (good) versus misaligned (poor). (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/3/3ee0c0601e471bdb68ba101682d7fd9c9b874e33.jpeg)  
接下通过一个案例说明，网格线与流动方向对齐对于结果的重要性。假定一个简单的稳态不可压缩、无粘空气流动对流问题，其基本能量方程为：  
 ![image](https://www.cax.do/uploads/default/original/2X/e/ee68d91c9a6ff3f9c863d14fc7c61b2dc39985a6.png)  
这个方程表示**温度 T(x,y)** 随着速度场 (u,v) 进行对流传输，在无扩散的情况下，温度场会沿着流动方向传输，而不会发生任何混合。若初始温度场存在不连续性，理论上该不连续性会一直沿流动方向保持， **不会产生混合层。**

**设定两种流向情况，在case1中流向与网格线方向一致，即夹角为0°，流向与网格线方向一致。在case2中，流向与网格线夹角为45°，流向与网格线方向不一致。观察结果中是否有扩散的情况发生。**

 ![Figure 1 shows a problem setup (Case 1) with a uniform velocity field flowing over a dividing streamline at y = 0.5, where T = 0 below and T = 1 above the streamline. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/5/50019b9094dbc362bc5c95e21cfa02064bca1135.jpeg)  
 ![Figure 2 shows a problem setup where a vector with components u = cos(45°) and v = sin(45°) is depicted on a unit square grid, with boundary conditions labeled as "No BC". (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/b/b811deba62ccefacfe5f013a6d1d7197d8047df2.jpeg)

从结果中可以看到，当流向与网格线对齐的情况下，没有观察到混合层，温度场沿流线方向保持清晰的分界。这表明此时数值扩散的影响最小。在流向与网格线成 45° 角的情况下，出现了显著的数值扩散现象。模拟结果显示温度分界线附近出现混合层。

 ![Figure 3 shows a computational fluid dynamics simulation with a dividing streamline separating a red, high-temperature region from a blue, low-temperature region on a grid. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/c/c2fbd2df0f0a7c08286e70fb4e7d7af9e27a6a9d.jpeg)  
 ![Figure 4 shows a color-coded grid displaying temperature distribution, with a dividing streamline at a 45-degree angle to the mesh lines. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/4/4c9b634bb69f2e3859ec7ab0fc83b84821c8f567.jpeg)  
从这个案例中我们可以看到流动方向和网格线一致的重要性。除此之外，使用高阶的数值方法能够减少这种数值扩散。

 ![The image shows a comparison of unstructured and structured grids in a finite element analysis, demonstrating the resulting first and second order solutions for each grid type. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/c/c911cf19c90cd00d9157da255e09bba3b0ffed93.jpeg)  
在 CFD 模拟中，网格的选择和数值方法的精度对计算结果的准确性有着至关重要的影响。特别是在复杂流场中，合理的网格生成策略和先进的数值方法相结合，将极大提升流体模拟的可靠性和计算效率。

使用NACA-0012 翼型的标准测试案例，测试不同网格的仿真结果与实验结果的误差。首先需要说明的一点是，虽然外部网格是不同类型的网格，但是机翼边缘的网格使用了结构化网格进行细化。

 ![Six different grid types are shown surrounding a 3D model of an airfoil. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/e/e66b13eb40e8159687eff28547b039fb937f8842.jpeg)  
机翼整体网格

 ![Six different meshing techniques (Uns 1, Uns 2, Cartesian, GridPro Struct C, GridPro Struct O, Polyhedral) are used to create a grid around an oval shape. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/7/7ad0e4d8eb955cb03b5b2673ebef5f4be14ee85e.jpeg)  
机翼前部网格

 ![Six different grid types (Uns 1, Uns 2, Cartesian, GridPro Struct C, GridPro Struct O, and Polyhedral) are shown, each depicting a mesh around a V-shaped object. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/a/a74f6d5a073d3b3bf126744bc62c5835864d87ac.jpeg)  
机翼后部网格

每一个测试案例的网格数量和节点数量几乎都相同，使用Fluent求解器进行求解，计算攻角（Alpha）从 **0° 到 19°** 变化，以研究不同攻角下的空气动力特性。

 ![Here's a caption for the image: Six computational fluid dynamics simulations of airflow around an airfoil are shown, using different mesh types: Uns 1, Uns 2, Cartesian, GridPro Struct C, GridPro Struct O, and Polyhedral. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/8/807cdb59bb541cc6b3fec6fb47cb3d120efd8e85.jpeg)  
 ![Two graphs compare experimental data with simulation results for lift coefficient (Cl) versus angle of attack (alpha) for a NACA 0012 airfoil, with the right graph zooming in on the stall region. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/d/d15c58e2f14ff84395f17ce702c151c9cb6f6a97.jpeg)  
从CL-α 曲线和CD-α 曲线曲线中可以得出一些简单的结论，相比于结构化网格和非结构化网格，笛卡尔网格的精度低；而在结构化网格和非结构化网格的对比中，结构化网格的精度更高。这也与我们的经验和常识相符，通常的流体网格以结构化网格为主,网格线的方向会与流向方向对齐以减少数值扩散。

 ![A grayscale image shows a complex, grid-like, three-dimensional structure resembling a warped, curved surface with a prominent white, teardrop-shaped void in its center. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/3/3a1d24892a7e30c4400e2d32ec8b50e01bffad37.jpeg)  
 ![A grid-based 3D model depicts a complex, curved, aerodynamic surface. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/0/09d24e672723d6515d26cfb49e528acabffab9a8.jpeg)  
 ![A multicolored gridded surface depicts a three-dimensional, curved shape resembling an airfoil. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/4/422cdfe2f9e71f9de4b15107bebcadd61e9a5bff.jpeg)  
 ![The image shows a detailed view of a computational fluid dynamics (CFD) mesh, focusing on different perspectives of a curved pipe with inlet and outlet sections. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/8/8aabd31e0e438c4d3c8f10a7f2816a84fe65cfa8.jpeg)  
在一些几何模型特别复杂，流动情况特别复杂的情况下，划分结构化网格非常困难，为了仿真时间和精度的权衡，通常会使用非结构化网格来对流体域进行网格划分。  
 ![Three 3D models of a human heart show different levels of detail and anatomical features, including coronary arteries, chambers, and vessels. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/2/249e9054516744f3186e9fe5c49766ee01b8f8ed.jpeg)  
 ![A close-up, wireframe model of a Citroën C3's front bumper and grille is shown with color-coded mesh data overlaid. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/a/a77115f0a43192c1a67c88fa443d7d4cc9d4b6d3.jpeg)  
 ![A blue Volkswagen Passat is shown in a computational fluid dynamics (CFD) simulation, surrounded by a complex mesh representing airflow. (由 AI 生成标题)](https://www.cax.do/uploads/default/original/2X/9/95305287f6bea7448398d342acbc334eafa21c94.jpeg)
