# NACA0012：Oscillation on the wall

**URL:** <https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570>\
**Category:** General\
**Created:** [13 March 2022 14:46 UTC](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570 "2022-03-13T14:46:18Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![jian](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jian](https://pyfr.discourse.group/u/jian)\
**Post date:** [15 March 2022 15:46 UTC](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570/22 "2022-03-15T15:46:05Z")

</div>

I take a look in Gmsh as Nunn said.

I want to use your code to check grid，but it comes error，under the condition that h5py is installed. I use “python read.py” to launch the code.

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [15 March 2022 15:49 UTC](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570/23 "2022-03-15T15:49:16Z")

</div>

Ok, I’m just a bit confused as the screenshot from @nnunn seems to show that although gmsh is using high order elements, the surface is faceted i.e. not high order.

---

<div class="post-metadata">

**Author:** ![nnunn](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@nnunn](https://pyfr.discourse.group/u/nnunn)\
**Post date:** [15 March 2022 23:48 UTC](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570/24 "2022-03-15T23:48:33Z")

</div>

Hi @jian - in PyFR, a **high-order** mesh implies that the mesh has **curved** elements. In your case, the triangles are all **linear** , i.e. all the edges are **straight**.

Your mesh is using 10-node triangles (high-order) to define triangles with straight edges. Usually, gmsh uses those 10-node triangles to define triangles with curved faces. So, to simulate a curved (high-order) aerofoil, we need to generate the gmsh .msh file using curved geometry (e.g. splines).

How did you generate your mesh? If you used gmsh, can you send the .geo “geometry” file?

---

<div class="post-metadata">

**Author:** ![jian](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jian](https://pyfr.discourse.group/u/jian)\
**Post date:** [16 March 2022 00:15 UTC](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570/25 "2022-03-16T00:15:11Z")

</div>

Thanks a lot. This is my .geo file.

> **[NACAc.geo](https://drive.google.com/file/d/1sfQ0x7nSFjOgmBmqPuI2I1xc7kw0UyYc/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![nnunn](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@nnunn](https://pyfr.discourse.group/u/nnunn)\
**Post date:** [16 March 2022 09:31 UTC](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570/26 "2022-03-16T09:31:29Z")

</div>

Hi @jian - using splines instead of lines through your points we get excellent curved geometry for gmsh to mesh. In [this google folder](https://drive.google.com/drive/folders/1kIQDMxPSS6AX756qFSaHwhopF5EiA5mT?usp=sharing) you’ll find “ **NACA\_p3\_5751.msh** ”, a mesh with 5751 3rd order triangles, plus “ **NACA\_curved.geo** ”, the geometry file used to generate the mesh.

If you want to reproduce and improve this mesh, I used these settings (with gmsh v4.9):

From the [Options] panel on the [Mesh/General] tab, I set:

- 2D algorithm to [MeshAdapt]
- Element order to [3]
- Max element size [2]

Note that gmsh has lots of way to constrain the size of mesh elements. As a first step, I fiddled with “characteristic sizes” for the points to produce a mesh of size similar to yours. Better alternatives are to use background fields, boundary layers, nested transfinite regions, etc. See the gmsh documentation for inspiration.

Also in [that folder](https://drive.google.com/drive/folders/1kIQDMxPSS6AX756qFSaHwhopF5EiA5mT?usp=sharing) are some pictures of the mesh, plus snapshots from various runs, each at time = 20:

```auto
[slip_wall_N4_t20.jpg]: Navier-Stokes / order 4 / mu 1e-6 / slip wall BC
[no_slip_wall_N4_t20.jpg]: Navier-Stokes / order 4 / mu 1e-6 / no-slip wall BC
[no_slip_wall_N4_t20_mu0.jpg]: Navier-Stokes / order 4 / mu 0 / no-slip wall BC

```

Good luck!

---

<div class="post-metadata">

**Author:** ![jian](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jian](https://pyfr.discourse.group/u/jian)\
**Post date:** [17 March 2022 00:27 UTC](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570/27 "2022-03-17T00:27:35Z")

</div>

Okey, thanks a lot.

Again, thanks for your kindness replay and best regards.

[Previous page](https://pyfr.discourse.group/t/naca0012-oscillation-on-the-wall/570.md?page=1)
