How Can I Improve the Smoothing of Pressure Coefficients in CFD Data?

  • Thread starter Thread starter enigma
  • Start date Start date
  • Tags Tags
    Data
Click For Summary
SUMMARY

The discussion focuses on improving the smoothing of pressure coefficients derived from CFD data of a standard wing shape. The user is facing issues with a dent in the surface affecting the Navier-Stokes equations, resulting in erratic pressure coefficient values. They have implemented a Gaussian filter and a 5th order Butterworth filter with a cutoff frequency of 0.15 but are not achieving satisfactory results. The user seeks more effective smoothing techniques to enhance data quality without excessive computational load.

PREREQUISITES
  • Understanding of CFD (Computational Fluid Dynamics) principles
  • Familiarity with MATLAB programming and .m script files
  • Knowledge of filtering techniques, specifically Gaussian and Butterworth filters
  • Basic grasp of numerical methods for curve smoothing
NEXT STEPS
  • Research advanced smoothing techniques such as Savitzky-Golay filters
  • Explore the implementation of spline interpolation for data fitting
  • Investigate the use of higher-order filtering methods in MATLAB
  • Learn about adaptive filtering techniques to dynamically adjust smoothing parameters
USEFUL FOR

Researchers and engineers working with CFD data, MATLAB users looking to enhance data processing techniques, and anyone involved in aerodynamic analysis and optimization of wing profiles.

enigma
Staff Emeritus
Science Advisor
Gold Member
Messages
1,739
Reaction score
20
Hi all,

I'm having a little difficulty processing my data, and I hope someone here will be able to help me out. (files are a MATLAB .m script and a .mat data file zipped up)

The data I have is the shape of a standard wing and the pressure coefficients along the top and bottom surfaces output from CFD code. Unfortunately, there is a minor dent in the surface where the two equations which generated the shape meet (this remains even after filtering). This inconsistancy will not show up in my experimental setup because it will be under the noise level after I sand the wing.

The problem I'm having is with the pressure coefficients returned from the CFD code. The divot causes the Navier Stokes equations to go whacky on that point and it looks like a 1/x term in the region about 0 is superimposed over the curves (running the code shows what I'm talking about... around c=0.15). I would like to smooth this curve out.

I have coded a method which a colleage called a Gaussian filter (looking online for more information has turned up very little... only things with image processing, so the name might not even be correct), which basically takes the secant between the points ahaid and behind the point to be modified, interpolates the value of the point in question which lies on the secant, and averages it with the original value (hope that makes sense). You then run that through for all points to be filtered, and then run the loop until you get clean enough data.

Unfortunately, this is not giving me a smooth enough slope either, even after 10 runs or more, and the improvement is quickly reaching diminishing returns. The code also illustrates this.

I'm considering coding something which will go out from the "asymptote" and find the first two points where the tangent to the curve intersects both of them, but I have a feeling that this will be computationally intensive as well.

I am wondering if there is a more elegant solution which I'm unaware of to solve this problem.

Thanks in advance for your time.
 

Attachments

Physics news on Phys.org
I used a 5th order Butterworth filter with cutoff frequency equal to 0.15 of your sampling frequency.
The .txt file is your .m file edited to implement the modification. I also changed the colors of the plot. In blue is your wing profile, in green the raw data and in red the filtered data.
There is a displacement in the filtered data, because the cutoff frequency is too low, in order to achive enough smoothing. If this displacement is undesirable, you can have less displacement with less smoothing by augmenting the cutoff frequency.
 

Attachments

Similar threads

  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
7
Views
3K
  • · Replies 21 ·
Replies
21
Views
3K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 45 ·
2
Replies
45
Views
8K
  • · Replies 1 ·
Replies
1
Views
3K