-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
206 additions
and
71 deletions.
There are no files selected for viewing
71 changes: 0 additions & 71 deletions
71
nalu-wind/2D_airfoil_Transition/DU00-W-212/figures_and_scripts/clcd_cfd_total.py
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
|
||
|
||
# NASA NLF(1)-0416 | ||
|
||
Validation and verification of the transition model were conducted for the NASA NLF(1)-0416 airfoil using Nalu-Wind with the 1-equation gamma transition model. First, a grid sensitivity study was performed using six different mesh resolutions from the AIAA CFD Transition Modeling DG[^1]. The results were compared to those from NASA’s structured flow solver, OVERFLOW[^2], and unstructured flow solver, FUN3D[^3], using the same turbulence and transition models, CFD meshes, and inflow conditions. Based on these results, a full angle-of-attack sweep was performed, with results compared to experimental data. | ||
|
||
## Simulation Conditions | ||
|
||
- Test airfoil: NASA NLF(1)-0416 airfoil with a thickness of 16% | ||
- Flow Condition: M=0.1, Re=4million, Tu=0.15% | ||
- U<sub>∞</sub>=34.1m/s, ρ=1.225kg/m<sup>3</sup>, µ<sub>t</sub>/µ=1 | ||
- k<sub>∞</sub>=0.00392448375, ω<sub>∞</sub>=460.35 | ||
- CFD meshes with six different resoltuions provided by AIAA CFD Transition Modeling DG[^1] | ||
- 2-D structured C-type meshes: Tiny, Coarse, Medium, Fine, Extra, Ultra resolutions[^4] | ||
- Turbulence / Transition model: SST-2003 with the 1-eq Gamma transition model | ||
- Nalu-Wind version: [f3cecafbdc05e61d0550ff41a30307425ef8197b](https://github.com/Exawind/nalu-wind/commit/f3cecafbdc05e61d0550ff41a30307425ef8197b) | ||
|
||
|
||
## Results: Grid Sensitivity Study | ||
|
||
### Lift and drag coefficients at AoA=5° | ||
<img src="aoa_5/figures_and_scripts/nlf0416_cl_cd.png" alt="Cf" width="1000"> | ||
|
||
Two different options for the freestream conditions are tested here: | ||
1) Local turbulence intensity with the sustaining terms (green line): same way as the OVERFLOW and FUN3D simulations | ||
2) Constant turbulence intensity without the sustaining terms (red line) | ||
|
||
The grid sensitivitiy results are presented for the lift and drag coefficient. In the above figure, the x axis, h, is the 1/sqrt(total number of nodes), meaning smaller values correspond to finer grids. With the Option 1, Nalu-Wind results show similar trends to the FUN3D results. It is also seen that to achieve the grid-converged trends, at least the third finest mesh resolution, ("Fine") is required. Overall, both Nalu-Wind and FUN3D show more mesh-dependence than OVERFLOW. This is attributed to the numerical shcemes of the unstructred flow solvers, which have lower order of accuracy in space compared to structured flow solvers. | ||
|
||
There are two ways for the Option 1: specifying k and ω accounting for the decay from the far-field to the leading edge or using the sustaning terms. In the current work, due to a very large size of the outer boundary from the far-field to the wall (1,000 chord lengths), the sustaning terms are applied, which is the same way as the OVERFLOW and FUN3D simulations. In a Nalu-Wind input, the sustaning terms, sdr_amb and tke_amb, can be specified as below | ||
|
||
- turbulence_model_constants: | ||
- fsti: 0 | ||
- sdr_amb: 460.34999999999997 | ||
- tke_amb: 0.00392448375 | ||
|
||
If the freestream k and ω account for the decay, the sustaining terms should be zero. | ||
|
||
Option 2, which applies a constant turbulence intensity, improves grid convergence of the lift and drag, particularly at low mesh resolutions. For more consistent and accurate predictions, Option 2 is recommended, which can be speficied in a Nalu-Wind input as follows: | ||
|
||
- turbulence_model_constants: | ||
- fsti: 0.15 | ||
- sdr_amb: 0.0 | ||
- tke_amb: 0.0 | ||
|
||
Option 2 is activated only if fsti is explicitly specified in the Nalu-Wind input with a positive value. However, it should be noted that Option 2 is valid only for external flows without any downwash (i.e. single airfoil or single turbine). For internal flow or multi-turbine cases, Option 1 should be used. | ||
|
||
## Results: Angle of Attack Sweep | ||
|
||
### Comparison of the lift and drag coefficient | ||
<img src="figures_and_scripts/nlf0416_clcd.png" alt="Cf" width="1000"> | ||
|
||
Based on the grid sensitivity results, a full sweep of angles of attack was performed using the Fine mesh level. The two figures above compare the lift and drag polar with the experimental measurements[^5]. For the lift, the transition simulation slightly over-predicts the lift coefficient in the linear range of the lift curve, a similar behavior also observed in transition predictions using other transition models and other flow solvers. For the drag polar, the transition simulation predicts lower drag across the range of angles of attack than the fully turbulent simulation and better compares with the experimental data. | ||
Specifically, the errors in the predicted drag coefficient at AoA=5° are 2.87% for the transition simulation and 57.56% for the fully turbulent simualtion. | ||
|
||
Each case with the "Fine" mesh took approximately 40 minutes to 10,000 iterations, using 4 Picard iterations per time step, on 26 cores of NREL's Kestrel HPC cluster. The number of cores per case was not determined by Nalu-Wind’s scalability on Kestrel, but simply to accommodate 4 cases on a single node of Kestrel. | ||
|
||
## Run Directory Contents | ||
|
||
The run directory contains the files listed below for two angles of attack, 0° and 5° for the constant turbulence intensity option: | ||
|
||
- Nalu-Wind input yaml file | ||
- Nalu-Wind output log & force file | ||
- post-processing script for the force files | ||
- python postpro.py | ||
|
||
## References | ||
[^1]: https://transitionmodeling.larc.nasa.gov/ | ||
[^2]: Venkatachari, B. S., et al., "Implementation and Assessment of Menter’s Galilean-Invariant 𝛾 | ||
Transition Model in OVERFLOW," AIAA AVIATION 2023 Forum, 2023. https://doi.org/10.2514/6.2023-3533 | ||
[^3]: Hildebrand, N., et al., "Implementation and Verification of the SST-𝛾 and SA-AFT | ||
Transition Models in FUN3D," AIAA AVIATION 2023 Forum, 2023. https://doi.org/10.2514/6.2023-3530. | ||
[^4]: Coder, J., "Standard Test Cases for Transition Model Verification and Validationin Computational Fluid Dynamics," 56th AIAA Aerospace Sciences Meeting, January, 2018. https://doi.org/https://doi.org/10.2514/6.2018-0029. | ||
[^5]: Somers, D. M., "Design and Experimental Results for a Natural-Laminar-Flow Airfoil for General Aviation Applications," NASA Technical Paper 1861, 1981. |
58 changes: 58 additions & 0 deletions
58
nalu-wind/2D_airfoil_Transition/NLF1-0416/aoa_5/figures_and_scripts/grid_conv_5.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import glob, pathlib | ||
import math | ||
|
||
|
||
size=13 | ||
params = {'legend.fontsize': 'large', | ||
'axes.labelsize': size, | ||
'axes.titlesize': size, | ||
'xtick.labelsize': size, | ||
'ytick.labelsize': size} | ||
plt.rcParams.update(params) | ||
|
||
nalu1 = pd.read_csv('tu_const_aoa_5.dat') | ||
nalu3 = pd.read_csv('tu_sust_aoa_5.dat') | ||
|
||
fun3d = pd.read_csv('fun3d_t_aoa_5.dat') | ||
overf = pd.read_csv('overflow_aoa_5.dat') | ||
|
||
exp = pd.read_csv('exp.csv') | ||
exp_cl = exp['cl'][0] | ||
exp_cd = exp['cd'][0] | ||
|
||
plt.figure(figsize=(12,4.5)) | ||
plt.subplot(1, 2, 1) | ||
#fig = plt.figure(1) | ||
plt.plot(fun3d['h'],fun3d['cl'],'-o') | ||
plt.plot(overf['h'],overf['cl'],'-o') | ||
plt.plot(nalu3['h'],nalu3['cl'],'-o') | ||
plt.plot(nalu1['h'],nalu1['cl'],'-o') | ||
#plt.axhline(y = exp_cl, color = 'k', linestyle = '--') | ||
plt.xlim([0, 0.01]) | ||
plt.ylim([0.95, 1.1]) | ||
plt.xlabel('h') | ||
plt.ylabel('Lift coefficient, $C_{l}$') | ||
plt.legend(['SST-$\gamma$: FUN3D','SST-$\gamma$: OVERFLOW','SST-$\gamma$: Nalu-Wind','SST-$\gamma$: Nalu-Wind w/ Const Tu']) | ||
|
||
plt.subplot(1, 2, 2) | ||
#fig = plt.figure(2) | ||
plt.plot(fun3d['h'],fun3d['cd'],'-o') | ||
plt.plot(overf['h'],overf['cd'],'-o') | ||
plt.plot(nalu3['h'],nalu3['cd'],'-o') | ||
plt.plot(nalu1['h'],nalu1['cd'],'-o') | ||
#plt.axhline(y = exp_cd, color = 'k', linestyle = '--') | ||
plt.xlim([0, 0.01]) | ||
plt.ylim([0.005, 0.02]) | ||
plt.xlabel('h') | ||
plt.ylabel('Drag coefficient, $C_{d}$') | ||
plt.legend(['SST-$\gamma$: FUN3D','SST-$\gamma$: OVERFLOW','SST-$\gamma$: Nalu-Wind','SST-$\gamma$: Nalu-Wind w/ Const Tu']) | ||
plt.tight_layout() | ||
|
||
plt.savefig("nlf0416_cl_cd.png",dpi=300) | ||
|
||
plt.show() | ||
|
Binary file added
BIN
+252 KB
...ind/2D_airfoil_Transition/NLF1-0416/aoa_5/figures_and_scripts/nlf0416_cl_cd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions
74
nalu-wind/2D_airfoil_Transition/NLF1-0416/figures_and_scripts/clcd_4M_fine.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import math | ||
import yaml | ||
|
||
size=13 | ||
params = {'legend.fontsize': 'large', | ||
'axes.labelsize': size, | ||
'axes.titlesize': size, | ||
'xtick.labelsize': size, | ||
'ytick.labelsize': size} | ||
plt.rcParams.update(params) | ||
co_list = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'] | ||
|
||
co0=co_list[0] | ||
co1=co_list[1] | ||
|
||
# Experiment | ||
cl = pd.read_csv('exp_Re4M_aoa.csv',names=['aoa','cl'],header=None) | ||
cdcl = pd.read_csv('exp_Re4M_polar.csv',names=['cd','cl'],header=None) | ||
|
||
with open('nlf0416_F_rey04000000_turb.yaml', "r") as data0: | ||
turb=yaml.safe_load(data0) | ||
|
||
with open('nlf0416_F_rey04000000.yaml', "r") as data1: | ||
trans=yaml.safe_load(data1) | ||
|
||
|
||
# plot the results | ||
plt.figure(figsize=(12,4.5)) | ||
plt.subplot(1, 2, 1) | ||
plt.plot(cl['aoa'],cl['cl'],'ko') | ||
plt.plot(turb['nlf0416_F']['aoa'],turb['nlf0416_F']['cl']) | ||
plt.plot(trans['nlf0416_F']['aoa'],trans['nlf0416_F']['cl']) | ||
plt.xlim([-7,20]) | ||
plt.ylim([-0.5,2.0]) | ||
plt.xlabel('Angle of Attack [deg]') | ||
plt.ylabel('Lift coefficient, $C_{l}$') | ||
plt.legend(['Experiment','Turbulent','Transition']) | ||
|
||
plt.subplot(1, 2, 2) | ||
plt.plot(cdcl['cd'],cdcl['cl'],'ko') | ||
plt.plot(turb['nlf0416_F']['cd'],turb['nlf0416_F']['cl']) | ||
plt.plot(trans['nlf0416_F']['cd'],trans['nlf0416_F']['cl']) | ||
plt.xlim([0.0,0.025]) | ||
plt.ylim([-0.5,2.0]) | ||
plt.xlabel('Drag coefficient, $C_{d}$') | ||
plt.ylabel('Lift coefficient, $C_{l}$') | ||
plt.legend(['Experiment','Turbulent','Transition']) | ||
plt.tight_layout() | ||
plt.savefig("nlf0416_clcd.png",dpi=300) | ||
|
||
plt.show() | ||
|
||
|
||
# Compute the Cd error at aoa=5 | ||
exp = pd.read_csv('exp.csv') | ||
exp_cl = exp['cl'][0] | ||
exp_cd = exp['cd'][0] | ||
|
||
naoa = len(turb['nlf0416_F']['aoa']) | ||
|
||
for i in range(naoa): | ||
if(turb['nlf0416_F']['aoa'][i]==5): | ||
cd_turb = turb['nlf0416_F']['cd'][i] | ||
if(trans['nlf0416_F']['aoa'][i]==5): | ||
cd_trans = trans['nlf0416_F']['cd'][i] | ||
|
||
err_turb = (cd_turb - exp_cd)/exp_cd*100 | ||
err_trans = (cd_trans - exp_cd)/exp_cd*100 | ||
|
||
print("cd error - turb : %3.2f"%err_turb) | ||
print("cd error - trans: %3.2f"%err_trans) |
Binary file added
BIN
+224 KB
nalu-wind/2D_airfoil_Transition/NLF1-0416/figures_and_scripts/nlf0416_clcd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.