# sr #109151: CFD: boundary layer mesh refinements

 Submitter: Klaus Burkart Submitted: Mon 26 Sep 2016 11:55:07 AM UTC Category: Open discussion Priority: 5 - Normal Severity: 3 - Normal Privacy: Public Assigned to: None Open/Closed: Open Operating System: None
* Mandatory Fields

Add a New Comment Rich Markup

## Discussion

Mon 26 Sep 2016 07:36:56 PM UTC, comment #2:

An alternate method to get a smoother description of the airfoil, is to use the mathematical description (if available).
It will also provide better accuracy (up to the Mesh discretization level).

As an example I have uploaded a script that models the NACA 00xx airfoil from its mathematical expression. Because of the symmetry, it only computes the upper y-values, and uses -y for the lower half.

(file #38602)

Benedict Verhegghe <bverheg>
Mon 26 Sep 2016 06:40:22 PM UTC, comment #1:

1. To achieve a smoother curve, use a BezierSpline instead of a PolyLine. See detail of the tip in example_bezier.png. Red is PolyLine, blue is BezierSpline. The approx() method of a BezierSpline can then be used to create a polygonal approximation with a chordal method, resulting in more points in highly curved regions. (Actually, this is also used when drawing the BezierSpline.)

2. In order to get a nicer final mesh, we often use the Mesh.smooth() method. It has options to exclude specified nodes from the smoothing process. Thus, by excluding the border of the Mesh, one can assure to not change the border node positions, only the internal ones. Results will depend on parameters, and it is not guaranteed that you will reach your objective Mesh.

If you want to have perfect control over the line directions of the resulting Mesh, you could create a loop over the pairs of points from the profile and the outer boundary. Create a degree-3 BezierSpline between the two points, with specified directions at the points. The normal direction of the curve can be found from the frenet() method, or from rotating the avgDirections() over 90 degrees. The trailing edge would have to be dealt separately.
Finally create a Mesh by connecting each pair of subsequent curves.

Benedict Verhegghe <bverheg>
Mon 26 Sep 2016 11:55:07 AM UTC, original submission:

1. Is it possible to refine a polyline in the sense of making a new interpolation e.g. to get a smoother curve? (E.g. the outer boundary layer mesh curve in the tip area; maybe interpolate the entire curve so the segments are of the same length)

Note: n is already the number of cells required along the airfoil surface, further optimization for a simulation is based on their distribution (length)

2. The lines connecting the airfoil surface with the boundary layer curve are currently straight lines.

Is it possible to create curved lines starting perpendicular to the airfoil surface connecting with the evenly distributed points (see 1.) of the boundary layer curve?

The latter would be of particular importance for the trailing edge boundary layer mesh - see example "objective".

Klaus Burkart <klausb>

## Attached Files

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Comment:

Attached Files
file #38602:  naca.py added by bverheg (1KiB - text/x-python)
file #38600:  example_bezier.png added by bverheg (3KiB - image/png)
file #38595:  cfd_2d_work_2.py added by klausb (2KiB - text/x-python)
file #38596:  objective.png added by klausb (111KiB - image/png)
file #38597:  example.dat added by klausb (4KiB - application/x-ns-proxy-autoconfig)

## Dependencies

Depends on the following items: None found

Items that depend on this one: None found

## Mail Notification Carbon-Copy List

Carbon-Copy List
• -email is unavailable- added by bverheg (Updated the item)
• -email is unavailable- added by klausb (Submitted the item)
•

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

## History

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2016-09-26 bverheg Attached File- Added naca.py, #38602
2016-09-26 bverheg Attached File- Added example_bezier.png, #38600
2016-09-26 klausb Attached File- Added cfd_2d_work_2.py, #38595
Attached File- Added objective.png, #38596
Attached File- Added example.dat, #38597