Thesis Defence (pdf) - Department of Aerospace Engineering ...
Thesis Defence (pdf) - Department of Aerospace Engineering ...
Thesis Defence (pdf) - Department of Aerospace Engineering ...
Transform your PDFs into Flipbooks and boost your revenue!
Leverage SEO-optimized Flipbooks, powerful backlinks, and multimedia content to professionally showcase your products and significantly increase your reach.
Middle East Technical University<br />
<strong>Aerospace</strong> <strong>Engineering</strong> <strong>Department</strong><br />
Effects <strong>of</strong> the Jacobian Evaluation on<br />
Direct Solutions <strong>of</strong> the Euler Equations<br />
by Ömer Onur<br />
Supervisor: Assoc. Pr<strong>of</strong>. Dr. Sinan Eyi
Outline<br />
Introduction<br />
Objectives<br />
Flow Analysis<br />
Accuracy Analysis & Results<br />
Performance Analysis & Results<br />
Conclusion<br />
Recommendations<br />
Ömer Onur - AE500 Presentation<br />
2
Introduction<br />
Ömer Onur - AE500 Presentation<br />
Steady flow computations can be realized either by<br />
iterative means, means,<br />
or using direct methods. methods<br />
Although iterative solvers make an unsteady flow<br />
analysis with an advance in time, time,<br />
with direct methods<br />
a steady flow analysis is possible.<br />
Low memory requirements made the iterative<br />
methods popular untill the development <strong>of</strong> recent<br />
advanced computers.<br />
Solving the whole domain at once makes direct<br />
solvers stable, and faster convergence is possible<br />
due to small number <strong>of</strong> iterations. iterations<br />
In CFD applications like design optimization, optimization,<br />
and<br />
flutter analysis, analysis,<br />
direct methods are preferable.<br />
3
Introduction (Cont.)<br />
Ömer Onur - AE500 Presentation<br />
Direct solvers require the calculation <strong>of</strong> Jacobian<br />
matrix.<br />
Derivation <strong>of</strong> analytical nalytical Jacobians becomes more<br />
difficult as the discretization <strong>of</strong> governing equations<br />
become more complex.<br />
The best alternative is to compute the Jacobians<br />
numerically as accurate as possible.<br />
4
Objectives<br />
Ömer Onur - AE500 Presentation<br />
To develop a direct flow solver code<br />
To compare the accuracy <strong>of</strong> numerical and analytical<br />
Jacobians used in direct flow solvers<br />
To investigate their effects on the performance<br />
(convergence convergence and CPU time) <strong>of</strong> direct flow solvers<br />
To improve the efficiency <strong>of</strong> Jacobian matrix solution<br />
5
Flow Analysis<br />
Ömer Onur - AE500 Presentation<br />
Flow code is a 2-D planar/axisymmetric Euler solver:<br />
– 1st/2nd order finite-volume discretizations<br />
– Steger-Warming, Van Leer, Roe upwind flux splitting<br />
schemes<br />
– Newton's method<br />
– both numerical and analytical Jacobian matrices<br />
– UMFPACK sparse matrix solver package<br />
Different geometries, geometries,<br />
grid sizes and BCs are<br />
considered.<br />
6
Flow Analysis (Cont.)<br />
Ömer Onur - AE500 Presentation<br />
Steady, 2-D planar/axisymmetric Euler equations in<br />
generalized coordinates:<br />
∂F(W ˆ ˆ ) ∂G(W<br />
ˆ ˆ )<br />
+ + σ H(W ˆ ˆ ) = 0<br />
∂ξ ∂η<br />
ˆF = J<br />
⎡ ρU ⎤<br />
⎢<br />
ρuU + ξ p<br />
⎥<br />
⎢ ρvU + ξ p ⎥<br />
−1<br />
⎢ x ⎥<br />
y<br />
⎢ ⎥<br />
⎣( ρet<br />
+ p)U ⎦<br />
ˆG = J<br />
⎡ ρV ⎤<br />
⎢<br />
ρuV + η p<br />
⎥<br />
−1<br />
⎢ x ⎥<br />
⎢ ρvV + η p ⎥<br />
y<br />
⎢ ⎥<br />
⎣( ρet<br />
+ p)V ⎦<br />
where<br />
ˆH = J<br />
−1<br />
ˆW = J<br />
−1<br />
⎡ρ⎤ ⎢<br />
ρu<br />
⎥<br />
⎢ ⎥<br />
⎢ρv⎥ ⎢ ⎥<br />
ρe<br />
⎣ t ⎦<br />
⎡ρv⎤ ⎢<br />
1 ρuv<br />
⎥<br />
⎢ ⎥<br />
2<br />
y ⎢ρv⎥ ⎢ ⎥<br />
⎢( ρe<br />
+ p)v⎥<br />
⎣ t ⎦<br />
7
Flow Analysis (Cont.)<br />
Newton’s method:<br />
R(W ˆ ˆ ) = 0<br />
n<br />
ˆR ˆ n ˆ n<br />
⎛ ∂ ⎞<br />
⎜ ˆW<br />
⎟<br />
⎝∂⎠ (Discretized Residual)<br />
⋅ ∆W<br />
= −R(W<br />
)<br />
[Jacobian Matrix]<br />
Ömer Onur - AE500 Presentation<br />
ˆ +<br />
W = Wˆ + ∆Wˆ<br />
n 1 n n<br />
8
Flow Analysis (Cont.)<br />
Analytical<br />
Ömer Onur - AE500 Presentation<br />
Analytical Jacobians:<br />
Jacobians<br />
– Derivation by hand / symbolic manipulators for simple<br />
flow models<br />
– Difficult derivation for complex flow models<br />
Numerical Jacobians:<br />
Jacobians<br />
∂Rˆ<br />
i<br />
∂ ˆW<br />
R(Wˆ ˆ<br />
i + ε ⋅e j ) − R(W) i<br />
=<br />
ε<br />
j<br />
– Good choice <strong>of</strong> finite-difference perturbation magnitude ε<br />
– Usage <strong>of</strong> higher computer precision<br />
9
Accuracy Analysis<br />
Ömer Onur - AE500 Presentation<br />
Error analysis:<br />
– Condition error [loss <strong>of</strong> numerical precision]<br />
– Truncation error [neglected terms in the Taylor series]<br />
– Total error<br />
2<br />
2⋅ER ∂ f ( ξ ) ε<br />
E TOTAL( ε ) = E C( ε ) + E T ( ε ) = + ⋅ 2<br />
ε ∂x<br />
2<br />
ε> & ε >> E T>><br />
ε opt<br />
E TOTALmin<br />
10
Accuracy Analysis (Cont ( Cont.) .)<br />
Optimum perturbation magnitude analysis:<br />
∂E ( ε ) 2⋅E 1<br />
2<br />
TOTAL R ∂ f( ξ )<br />
=− + ⋅ = 0<br />
∂ε ε<br />
2 2 ∂x<br />
2<br />
Ömer Onur - AE500 Presentation<br />
= 2 ⋅<br />
∂<br />
ER<br />
f( ξ )<br />
2<br />
∂x<br />
OPT 2<br />
– E R can be taken as ε M or simply found by subtraction <strong>of</strong><br />
double and single precision calculations <strong>of</strong> flux values.<br />
– Second derivative <strong>of</strong> flux can be calculated using a<br />
forward/backward finite difference method with double<br />
precision or taken as equal to 1.<br />
– Optimum perturbation magnitude is also found by trialerror<br />
ε<br />
11
Accuracy Results<br />
Ömer Onur - AE500 Presentation<br />
Error in numerical flux Jacobians are analyzed for<br />
– 15º ramp geometry with 33x25 grid<br />
– M=2.0 free-stream flow<br />
– inlet-outlet, symmetry and wall BCs<br />
Jacobians are calculated using<br />
– already converged solution<br />
– 1st order S-W flux splitting<br />
Different perturbation magnitude values are<br />
investigated for both single and double precision.<br />
Optimum perturbation magnitude analysis is<br />
performed for single precision.<br />
12
TotalError between ResidualJacobians (∂ R/∂ W)<br />
10 4<br />
10 3<br />
10 2<br />
10 1<br />
10 0<br />
10 -1<br />
10 -2<br />
10 -3<br />
10 -4<br />
10 1 10 -5<br />
Accuracy Results (Cont.)<br />
Effect <strong>of</strong> Control on Total Errors for Residual Jacobians<br />
[Single Precision, Forward Differencing]<br />
10 -1<br />
ε =7×10 -4<br />
10 -3<br />
10 -5<br />
Perturbation Magnitude (ε)<br />
w/o Cont. (Max. E)<br />
wCont.(Max.E)<br />
w/o Cont. (Avg. E)<br />
w Cont. (Avg. E)<br />
10 -7<br />
10 -9<br />
TotalError between ResidualJacobians (∂ R/∂ W)<br />
10 4<br />
10 3<br />
10 2<br />
10 1<br />
10 0<br />
10 -1<br />
10 -2<br />
10 -3<br />
10 -4<br />
10 1 10 -5<br />
10 -1<br />
Ömer Onur - AE500 Presentation<br />
Effect <strong>of</strong> Control on Total Errors for Residual Jacobians<br />
[Single Precision,Backward Differencing]<br />
ε =7×10 -4<br />
10 -3<br />
10 -5<br />
Perturbation Magnitude (ε)<br />
w/o Cont. (Max. E)<br />
wCont.(Max.E)<br />
w/o Cont. (Avg. E)<br />
w Cont. (Avg. E)<br />
10 -7<br />
13<br />
10 -9
TotalMax. Error between Jacobians<br />
10 4<br />
10 3<br />
10 2<br />
10 1<br />
10 0<br />
10 -1<br />
10 -2<br />
10 1 10 -3<br />
Accuracy Results (Cont.)<br />
Change <strong>of</strong> Total Maximum Error with Perturbation Magnitude<br />
[Single Precision, Forward Differencing]<br />
10 -1<br />
ε =7×10 -4<br />
10 -3<br />
10 -5<br />
Perturbation Magnitude (ε)<br />
10 -7<br />
∂ F + / ∂ W<br />
∂ F - / ∂ W<br />
∂ G + / ∂ W<br />
∂ G - / ∂ W<br />
∂ R pl / ∂ W<br />
10 -9<br />
Total Avg. Error between Jacobians<br />
10 3<br />
10 2<br />
10 1<br />
10 0<br />
10 -1<br />
10 -2<br />
10 -3<br />
10 -4<br />
10 1 10 -5<br />
10 -1<br />
Ömer Onur - AE500 Presentation<br />
Change <strong>of</strong> Total Average Error with Perturbation Magnitude<br />
[Single Precision, Forward Differencing]<br />
ε =7×10 -4<br />
10 -3<br />
10 -5<br />
Perturbation Magnitude (ε)<br />
10 -7<br />
∂ F + / ∂ W<br />
∂ F - / ∂ W<br />
∂ G + / ∂ W<br />
∂ G - / ∂ W<br />
∂ R pl / ∂ W<br />
14<br />
10 -9
TotalError between ResidualJacobians (∂ R/∂ W)<br />
10 4<br />
10 3<br />
10 2<br />
10 1<br />
10 0<br />
10 -1<br />
10 -2<br />
10 -3<br />
10 -4<br />
10 1 10 -5<br />
Accuracy Results (Cont.)<br />
Effect <strong>of</strong> Axisymmetry on Total Errors for Residual Jacobians<br />
[Single Precision, Forward Differencing]<br />
10 -1<br />
ε =7×10 -4<br />
10 -3<br />
10 -5<br />
Perturbation Magnitude (ε)<br />
Planar (Avg. E)<br />
Axis ym. (Avg. E)<br />
Planar (Max. E)<br />
Axisym. (Max. E)<br />
10 -7<br />
10 -9<br />
Ömer Onur - AE500 Presentation<br />
Optimum Perturbation Magnitude (εopt) Analysis<br />
for Single precision<br />
Trial-Error Procedure Optimization Method<br />
Flux εopt (max. error) εopt (avg. error) εopt (avg.) εopt ( εM)<br />
F +<br />
9.8 . 10 -4<br />
6.4 . 10 -4<br />
7.7 . 10 -4<br />
F -<br />
G<br />
- - -<br />
+<br />
1.5 . 10 -5<br />
6.4 . 10 -4<br />
7.9 . 10 -4<br />
G -<br />
1.5 . 10 -5<br />
6.4 . 10 -4<br />
7.8 . 10 -4<br />
3.5.10 -4<br />
For single precision;<br />
ε opt ≈ 7x10 -4<br />
15
TotalError between ResidualJacobians (∂ R/∂ W)<br />
10 3<br />
10 1<br />
10 -1<br />
10 -3<br />
10 -5<br />
10 -7<br />
10 -2 10 -9<br />
Accuracy Results (Cont.)<br />
Effect <strong>of</strong> Control on Total Errors for Residual Jacobians<br />
[Double Precision, Forward Differencing]<br />
10 -4<br />
10 -6<br />
ε =4×10 -8<br />
10 -8<br />
Perturbation Magnitude (ε)<br />
w/o Cont. (Max. E)<br />
wCont.(Max.E)<br />
w/o Cont. (Avg. E)<br />
w Cont. (Avg. E)<br />
10 -10<br />
10 -12<br />
TotalError between ResidualJacobians (∂ R/∂ W)<br />
10 3<br />
10 1<br />
10 -1<br />
10 -3<br />
10 -5<br />
10 -7<br />
10 -2 10 -9<br />
10 -4<br />
Ömer Onur - AE500 Presentation<br />
Effect <strong>of</strong> Control on Total Errors for Residual Jacobians<br />
[Double Precision, Backward Differencing]<br />
10 -6<br />
ε =4×10 -8<br />
10 -8<br />
Perturbation Magnitude (ε)<br />
w/o Cont. (Max. E)<br />
wCont.(Max.E)<br />
w/o Cont. (Avg. E)<br />
w Cont. (Avg. E)<br />
10 -10<br />
16<br />
10 -12
TotalMax. Error between Jacobians<br />
10 0<br />
10 -1<br />
10 -2<br />
10 -3<br />
10 -4<br />
10 -5<br />
10 -6<br />
10 -7<br />
10 -8<br />
10 -2 10 -9<br />
Accuracy Results (Cont.)<br />
Change <strong>of</strong> Total Maximum Error with Perturbation Magnitude<br />
[Double Precision, Forward Differencing]<br />
10 -4<br />
10 -6<br />
ε =4×10 -8<br />
10 -8<br />
Perturbation Magnitude (ε)<br />
10 -10<br />
∂ F + / ∂ W<br />
∂ F - / ∂ W<br />
∂ G + / ∂ W<br />
∂ G - / ∂ W<br />
∂ R pl / ∂ W<br />
10 -12<br />
TotalAvg. Error between Jacobians<br />
10 -2<br />
10 -3<br />
10 -4<br />
10 -5<br />
10 -6<br />
10 -7<br />
10 -8<br />
10 -9<br />
10 -2 10 -10<br />
10 -4<br />
Ömer Onur - AE500 Presentation<br />
Change <strong>of</strong> Total Average Error with Perturbation Magnitude<br />
[Double Precision, Forward Differencing]<br />
10 -6<br />
ε =4×10 -8<br />
10 -8<br />
Perturbation Magnitude (ε)<br />
10 -10<br />
∂ F + / ∂ W<br />
∂ F - / ∂ W<br />
∂ G + / ∂ W<br />
∂ G - / ∂ W<br />
∂ R pl / ∂ W<br />
17<br />
10 -12
TotalError between ResidualJacobians (∂ R/∂ W)<br />
10 0<br />
10 -1<br />
10 -2<br />
10 -3<br />
10 -4<br />
10 -5<br />
10 -6<br />
10 -7<br />
10 -8<br />
10 -2 10 -9<br />
Accuracy Results (Cont.)<br />
Effect <strong>of</strong> Axisymmetry on Total Errors for Residual Jacobians<br />
[Double Precision, Forward Differencing]<br />
10 -4<br />
10 -6<br />
ε =4×10 -8<br />
10 -8<br />
Perturbation Magnitude (ε)<br />
Planar (Avg. E)<br />
Axis ym. (Avg. E)<br />
Planar (Max. E)<br />
Axisym. (Max. E)<br />
10 -10<br />
10 -12<br />
Ömer Onur - AE500 Presentation<br />
Optimum Perturbation Magnitude (εopt) Analysis<br />
for Double precision<br />
Trial-Error Procedure Optimization Method<br />
Flux εopt (max. error) εopt (avg. error) εopt<br />
F +<br />
4 . 10 -8<br />
4 . 10 -8<br />
F -<br />
- -<br />
G +<br />
4 . 10 -8<br />
4 . 10 -8<br />
G -<br />
4 . 10 -8<br />
4 . 10 -8<br />
For double precision;<br />
ε opt ≈ 4x10 -8<br />
1.5 . 10 -8<br />
18
Performance Analysis<br />
Ömer Onur - AE500 Presentation<br />
Jacobian Matrix structure:<br />
– a huge square matrix even for a simple geometry<br />
– composed <strong>of</strong> either analytical or numerical Jacobians<br />
– most <strong>of</strong> the elements are zero<br />
Matrix solver:<br />
– Direct full matrix solvers have very high storage and<br />
memory costs.<br />
– Storage <strong>of</strong> only non-zero elements improve the<br />
efficiency greatly.<br />
Sparse Matrix Solvers<br />
19
Ömer Onur - AE500 Presentation<br />
Performance Analysis (Cont.)<br />
Matrix Solution Strategies:<br />
– Frozen Jacobian [using same Jacobian matrix in<br />
subsequent iterations]<br />
– Good initial guess [a time-like term addition to the Jacobian<br />
matrix diagonal]<br />
0<br />
n<br />
ˆ<br />
R(W ˆ )<br />
⎛ 1 ∂ R ⎞<br />
n 0<br />
n n<br />
2<br />
⎜ [] I + ∆Wˆ<br />
= −R(W<br />
ˆ ) ∆t = ∆t<br />
∆t ∂Wˆ<br />
⎟<br />
ˆ n<br />
R(W )<br />
⎝ ⎠<br />
2<br />
Δt>><br />
Original Newton’s method<br />
20
Performance Results<br />
Ömer Onur - AE500 Presentation<br />
Test Case Results:<br />
Test Case Results:<br />
– Convergence and CPU time performance <strong>of</strong> the direct<br />
solver is analyzed for<br />
15º ramp geometry with 33x25 grid<br />
M=2.0 free-stream flow<br />
inlet-outlet, symmetry and wall BCs<br />
– Jacobians are calculated using<br />
1st order S-W flux splitting<br />
– Calculations are realized with forward and backward<br />
differencing in single and double precision.<br />
– Effect <strong>of</strong> perturbation magnitude ε is investigated<br />
– Effect <strong>of</strong> Jacobian freezing and time-like diagonal term<br />
addition are analyzed.<br />
21
Performance Results (Cont Cont.) .)<br />
33x25 Grid for Ramp geometry<br />
Ömer Onur - AE500 Presentation<br />
– 34x26 cells<br />
– 4 flow variables<br />
– total 3536<br />
variables<br />
– Jacobian matrix<br />
has 35362 ≈ 12.5<br />
million elements<br />
Solver Storage CPU time<br />
Full Matrix<br />
LU<br />
240 MB 26 h<br />
Sparse<br />
Matrix<br />
1.2 MB 20 s<br />
22
Performance Results (Cont Cont.) .)<br />
Mach Contour for Ramp geometry<br />
[2-D planar, Double Precision, 1st order S-W]<br />
1.25731<br />
1.95049<br />
1.35633<br />
1.45536<br />
1.50487<br />
1.75244<br />
1.55439<br />
1.65341<br />
1.75244<br />
1.55439<br />
1.6039<br />
1.45536<br />
1.70292<br />
1.35633<br />
1.80195<br />
Ömer Onur - AE500 Presentation<br />
Mach Contour for Ramp geometry<br />
[2-D axisymmetric, Double Precision, 1st order S-W]<br />
1.65341<br />
1.80195<br />
1.90097<br />
1.85146<br />
1.98426<br />
1.93113<br />
1.95049<br />
1.96313<br />
1.98426<br />
1.95049<br />
23<br />
1.97467
Max. Density Residual (R 1 )<br />
10 0<br />
10 -5<br />
10 -10<br />
10 -15<br />
Performance Results (Cont Cont.) .)<br />
Effect <strong>of</strong> ∆t onConvergenceHistory<br />
[2-D planar, Double Precision]<br />
No ∆t<br />
∆t rm =1.5<br />
∆t rm =5.<br />
Full ∆t<br />
AnalyticalJac.<br />
No frz.<br />
10<br />
0 10 20<br />
#<strong>of</strong>iterations<br />
30 40<br />
-20<br />
∆t<br />
CPU Time<br />
(s)<br />
No ∆t NaN<br />
∆trm= 1.5 13.32<br />
∆trm= 5. 22.65<br />
Full ∆t 257.27<br />
Max. Density Res idual (R 1 )<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
10 -16<br />
No ∆t<br />
∆t rm =1.5<br />
∆t rm =5.<br />
Full ∆t<br />
Ömer Onur - AE500 Presentation<br />
Effect <strong>of</strong> ∆t onConvergenceHistory<br />
[2-D axisymmetric, Double Precision]<br />
AnalyticalJac.<br />
No frz.<br />
10<br />
0 5 10<br />
#<strong>of</strong>iterations<br />
15 20<br />
-18<br />
∆t<br />
CPU Time<br />
(s)<br />
No ∆t 9.79<br />
∆trm= 1.5 9.84<br />
∆trm= 5. 12.28<br />
Full ∆t 22.59<br />
24
Max. Density Res idual (R 1 )<br />
10 1<br />
10 -1<br />
10 -3<br />
10 -5<br />
10 -7<br />
10 -9<br />
10 -11<br />
10 -13<br />
10 -15<br />
Performance Results (Cont Cont.) .)<br />
EffectOfFreezingonConvergenceHistory<br />
[2-D planar, Double Precision]<br />
No frz.<br />
R frz =1×10 -1<br />
R frz =1×10 -2<br />
R frz =1×10 -4<br />
Analytica l J ac.<br />
∆t rm =1.5<br />
10<br />
0 5 10<br />
#<strong>of</strong>iterations<br />
15 20<br />
-17<br />
Tolerance<br />
CPU Time<br />
(s)<br />
No freeze 13.32<br />
Rfrz= 1x10 -1<br />
12.85<br />
Rfrz= 1x10 -2<br />
12.20<br />
Rfrz= 1x10 -4<br />
12.51<br />
Max. Density Residual (R 1 )<br />
10 1<br />
10 -1<br />
10 -3<br />
10 -5<br />
10 -7<br />
10 -9<br />
10 -11<br />
10 -13<br />
10 -15<br />
No frz.<br />
R frz =1×10 -1<br />
R frz =1×10 -2<br />
R frz =1×10 -4<br />
Ömer Onur - AE500 Presentation<br />
Effect Of Freezing on Convergence History<br />
[2-D axisymmetric, Double Precision]<br />
Analytica l J a c.<br />
No ∆t<br />
10<br />
0 5 10<br />
#<strong>of</strong>iterations<br />
15 20<br />
-17<br />
Tolerance<br />
CPU Time<br />
(s)<br />
No freeze 9.79<br />
Rfrz= 1x10 -1<br />
10.32<br />
Rfrz= 1x10 -2<br />
8.15<br />
Rfrz= 1x10 -4<br />
8.23<br />
25
Max. Density Residual (R 1 )<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
Performance Results (Cont Cont.) .)<br />
Convergence History<br />
[2-D planar, Double Precision, Forward Differencing]<br />
An. J a c.<br />
ε =4×10 -4<br />
ε =4×10 -8<br />
ε =4×10 -12<br />
10<br />
0 5 10<br />
#<strong>of</strong>iterations<br />
15<br />
-16<br />
Jacobian<br />
CPU Time<br />
(s)<br />
Analytic 12.69<br />
ε = 4x10 -4<br />
22.05<br />
ε = 4x10 -8<br />
16.27<br />
ε = 4x10 -12<br />
19.11<br />
∆t rm =1.5<br />
R frz =10 -4<br />
Max. Density Residual (R 1 )<br />
10 1<br />
10 -1<br />
10 -3<br />
10 -5<br />
10 -7<br />
10 -9<br />
10 -11<br />
10 -13<br />
10 -15<br />
An. J ac.<br />
ε =4×10 -4<br />
ε =4×10 -8<br />
ε =4×10 -12<br />
Ömer Onur - AE500 Presentation<br />
Convergence History<br />
[2-D a xis ymmetric, Double P re cis ion, Forward Diffe rencing]<br />
∆t rm =0.<br />
R frz =10 -2<br />
10<br />
0 2 4 6 8 10<br />
#<strong>of</strong>iterations<br />
-17<br />
Jacobian<br />
CPU Time<br />
(s)<br />
Analytic 8.25<br />
ε = 4x10 -4<br />
10.06<br />
ε = 4x10 -8<br />
9.72<br />
ε = 4x10 -12<br />
10.08<br />
26
Performance Results (Cont Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
Different Flux Splitting Schemes:<br />
Different Flux Splitting Schemes:<br />
– Convergence and CPU time performance <strong>of</strong> the direct<br />
solver is analyzed for the test case using<br />
1st order Van Leer/Roe flux splitting<br />
– Jacobians are calculated using<br />
1st order Van Leer/Roe flux splitting numerically<br />
1st order S-W flux splitting analytically<br />
– Optimum perturbation magnitude ε opt is used in the<br />
calculations.<br />
– Calculations are realized with forward and backward<br />
differencing in single and double precision.<br />
– Benefits <strong>of</strong> using the same flux calculation scheme for<br />
both Jacobian and residual calculation are analyzed.<br />
27
Performance Results (Cont Cont.) .)<br />
Mach Contour for Ramp geometry<br />
[2-D planar, Double Precision, 1st order VL]<br />
1.25731<br />
1.95049<br />
1.40585<br />
1.75244<br />
1.55439<br />
1.65341<br />
1.6039<br />
1.50487<br />
1.70292<br />
1.80195<br />
1.35633<br />
Ömer Onur - AE500 Presentation<br />
Mach Contour for Ramp geometry<br />
[2-D axisymmetric, Double Precision, 1st order VL]<br />
1.65341<br />
1.90097<br />
1.85146<br />
1.98426<br />
1.93113<br />
1.95049<br />
1.96313<br />
1.97467<br />
1.93113<br />
28<br />
1.95049
Performance Results (Cont Cont.) .)<br />
Mach Contour for Ramp geometry<br />
[2-D planar, Double Precision, 1st order Roe]<br />
1.25731<br />
1.30682<br />
1.95049<br />
1.45536<br />
1.75244<br />
1.55439<br />
1.65341<br />
1.6039<br />
1.80195<br />
1.45536<br />
1.70292<br />
1.35633<br />
Ömer Onur - AE500 Presentation<br />
Mach Contour for Ramp geometry<br />
[2-D axisymmetric, Double Precision, 1st order Roe]<br />
1.65341<br />
1.93113<br />
1.85146<br />
1.98426<br />
1.90097<br />
1.93113<br />
1.96313<br />
1.96313<br />
1.97467<br />
1.96313<br />
29
Max. Density Residual (R 1 )<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
Performance Results (Cont Cont.) .)<br />
Convergence History<br />
[2-D planar, Double Precision, S-W An. Jac.]<br />
Steger-Warming<br />
Va n Le e r<br />
Roe<br />
∆t rm =1.5<br />
R frz =10 -4<br />
10<br />
0 50 100 150<br />
#<strong>of</strong>iterations<br />
-16<br />
FS<br />
CPU Time<br />
(s)<br />
SW 12.69<br />
VL 26.51<br />
Roe 99.62<br />
Max. Density Residual (R 1 )<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
Ömer Onur - AE500 Presentation<br />
Convergence History<br />
[2-D planar, Double Precision, Num. Jac.]<br />
Steger-Warming<br />
Van Leer<br />
Roe<br />
∆t rm =1.5(SW)<br />
∆t rm =2.(VL)<br />
∆t rm =3.(Roe)<br />
R frz =10 -4<br />
ε =4×10 -8<br />
10<br />
0 5 10<br />
#<strong>of</strong>iterations<br />
15 20<br />
-16<br />
FS<br />
CPU Time<br />
(s)<br />
SW 16.27<br />
VL 28.44<br />
Roe 29.40<br />
30
Max. Density Residual (R 1 )<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
Performance Results (Cont Cont.) .)<br />
Convergence History<br />
[2-D axisymmetric, Double Precision, S-W An. Jac.]<br />
Steger-Warming<br />
Van Leer<br />
Roe<br />
10<br />
0 50<br />
#<strong>of</strong>iterations<br />
100<br />
-16<br />
FS<br />
CPU Time<br />
(s)<br />
SW 8.25<br />
VL 18.33<br />
Roe 128.81<br />
∆t rm =0.<br />
R frz =10 -2<br />
Max. Density Residual (R 1 )<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
Ömer Onur - AE500 Presentation<br />
Convergence History<br />
[2-D axisymmetric, Double Precision, Num. Jac.]<br />
Steger-Warming<br />
Van Leer<br />
Roe<br />
10<br />
0 5 10<br />
#<strong>of</strong>iterations<br />
-16<br />
FS<br />
CPU Time<br />
(s)<br />
SW 9.72<br />
VL 11.53<br />
Roe 14.99<br />
∆t rm =0.(SW,VL)<br />
∆t rm =1.5(Roe)<br />
R frz =10 -2<br />
ε =4×10 -8<br />
31
Performance Results (Cont Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
Higher-Order Discretizations:<br />
Higher-Order Discretizations:<br />
– Convergence and CPU time performance <strong>of</strong> the direct<br />
solver is analyzed for the test case using<br />
2nd order S-W/Van Leer/Roe flux splitting<br />
Van Albada limiter<br />
– Jacobians are calculated using<br />
2nd order S-W/Van Leer/Roe flux splitting numerically<br />
– Optimum perturbation magnitude ε opt is used in the<br />
calculations.<br />
– Calculations are realized with forward differencing in<br />
double precision.<br />
32
Performance Results (Cont Cont.) .)<br />
Mach Contour for Ramp geometry<br />
[2-D planar, Double Precision, 2nd order S-W]<br />
1.25731<br />
1.95049<br />
1.30682<br />
1.80195<br />
1.40585<br />
1.80195<br />
1.50487<br />
1.70292<br />
1.85146<br />
1.25731<br />
1.90097<br />
1.40585<br />
Ömer Onur - AE500 Presentation<br />
Mach Contour for Ramp geometry<br />
[2-D axisymmetric, Double Precision, 2nd order S-W]<br />
1.6039<br />
1.75244<br />
1.75244<br />
1.85146<br />
1.96313<br />
1.98426<br />
1.90097<br />
1.93113<br />
1.95049<br />
33
Performance Results (Cont Cont.) .)<br />
Mach Contour for Ramp geometry<br />
[2-D planar, Double Precision, 2nd order VL]<br />
1.95049<br />
1.25731<br />
1.35633<br />
1.50487<br />
1.75244<br />
1.80195<br />
1.45536<br />
1.65341<br />
1.85146<br />
1.25731<br />
1.45536<br />
1.90097<br />
Ömer Onur - AE500 Presentation<br />
Mach Contour for Ramp geometry<br />
[2-D axisymmetric, Double Precision, 2nd order VL]<br />
1.65341<br />
1.75244<br />
1.95049<br />
1.90097<br />
1.85146<br />
1.93113<br />
1.98426<br />
1.93113<br />
34<br />
1.95049<br />
1.93113
Performance Results (Cont Cont.) .)<br />
Mach Contour for Ramp geometry<br />
[2-D planar, Double Precision, 2nd order Roe]<br />
1.25731<br />
1.95049<br />
1.30682<br />
1.75244<br />
1.40585<br />
1.65341<br />
1.55439<br />
1.85146<br />
1.80195<br />
1.25731<br />
1.40585<br />
Ömer Onur - AE500 Presentation<br />
Mach Contour for Ramp geometry<br />
[2-D axisymmetric, Double Precision, 2nd order Roe]<br />
1.65341<br />
1.75244<br />
1.96313<br />
1.85146<br />
1.90097<br />
1.98426<br />
1.93113<br />
1.90097<br />
35<br />
1.95049
Max. Density Residual (R 1 )<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
Performance Results (Cont Cont.) .)<br />
Convergence History<br />
[2-D planar, Double Precision, Num. Jac., Van Albada]<br />
Steger-Warming<br />
Van Leer<br />
Roe<br />
Full ∆t<br />
No Freezing<br />
ε =4×10 -8<br />
10<br />
0 25 50<br />
#<strong>of</strong>iterations<br />
75 100<br />
-16<br />
FS<br />
CPU Time<br />
(s)<br />
SW 194.9<br />
VL 334.67<br />
Roe 335.28<br />
Max. Density Residual (R 1 )<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
10 -14<br />
Ömer Onur - AE500 Presentation<br />
Convergence History<br />
[2-D axisymmetric, Double Precision, Num. Jac., Van Albada]<br />
Steger-Warming<br />
Van Leer<br />
Roe<br />
Full ∆t<br />
No Freezing<br />
ε =4×10 -8<br />
10<br />
0 25 50<br />
#<strong>of</strong>iterations<br />
75 100<br />
-16<br />
FS<br />
CPU Time<br />
(s)<br />
SW Limit cycle<br />
VL Limit cycle<br />
Roe Limit cycle<br />
36
Performance Results (Cont Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
Different Geometry and Flow Conditions:<br />
Different Geometry and Flow Conditions:<br />
– Convergence and CPU time performance <strong>of</strong> the direct<br />
solver is analyzed for<br />
bump geometry with 65x17 grid<br />
M=2.0 and M=0.5 free-stream flows<br />
inlet-outlet, symmetry and wall BCs<br />
2nd order Roe flux splitting with Van Albada limiter<br />
– Jacobians are calculated using<br />
2nd order Roe flux splitting numerically<br />
– Optimum perturbation magnitude ε opt is used in the<br />
calculations.<br />
– Calculations are realized with forward differencing in<br />
double precision.<br />
37
Performance Results (Cont Cont.) .)<br />
65x17GridforBumpgeometry<br />
Ömer Onur - AE500 Presentation<br />
38
Performance Results (Cont Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
39
Max. Density Res idual (R 1 )<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
Performance Results (Cont Cont.) .)<br />
Convergence History<br />
[2-D planar, Double Precision, Num. Jac., Van Albada]<br />
Roe<br />
Full ∆t<br />
No Freezing<br />
ε =4×10 -8<br />
10<br />
0 100 200 300<br />
#<strong>of</strong>iterations<br />
-14<br />
Max. Density Res idual (R 1 )<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
Ömer Onur - AE500 Presentation<br />
Convergence History<br />
[2-D axisymmetric, Double Precision, Num. Jac., Van Albada]<br />
Roe<br />
Full ∆t<br />
No Freezing<br />
ε =4×10 -8<br />
10<br />
0 50 100 150<br />
#<strong>of</strong>iterations<br />
200 250 300<br />
-14<br />
40
Performance Results (Cont Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
41
Max. Density Res idual (R 1 )<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
Performance Results (Cont Cont.) .)<br />
Convergence History<br />
[Subsonic 2-D planar, Double Precision, Num. Jac., Van Albada]<br />
Roe<br />
Full ∆t<br />
No Freezing<br />
ε =4×10 -8<br />
10<br />
0 100 200 300 400 500<br />
#<strong>of</strong>iterations<br />
-14<br />
Max. Density Res idual (R 1 )<br />
Ömer Onur - AE500 Presentation<br />
Convergence History<br />
[Subsonic 2-D axisymmetric, Double Precision, Num. Jac., Van Albada]<br />
10 2<br />
10 0<br />
10 -2<br />
10 -4<br />
10 -6<br />
10 -8<br />
10 -10<br />
10 -12<br />
Roe<br />
Full ∆t<br />
No Freezing<br />
ε =4×10 -8<br />
10<br />
0 100 200 300 400 500<br />
#<strong>of</strong>iterations<br />
-14<br />
42
Conclusion<br />
Ömer Onur - AE500 Presentation<br />
A direct flow solver code is developed.<br />
Accuracy <strong>of</strong> numerical Jacobians used in the solver is<br />
analyzed.<br />
– A control mechanism is required in 1st order SW<br />
Jacobian calculation.<br />
– Forward/backward differencing does not differ so much.<br />
– Double precision improves accuracy significantly.<br />
– Optimum perturbation magnitude is found by an<br />
optimization method.<br />
43
Conclusion (Cont ( Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
The effects <strong>of</strong> the accuracy <strong>of</strong> numerical Jacobians on<br />
the performance (convergence convergence and CPU time) <strong>of</strong><br />
direct flow solvers is investigated.<br />
– Double precision improves convergence limits<br />
significantly.<br />
– Optimum perturbation magnitude gives the same<br />
convergence with the analytical method.<br />
– Calculation <strong>of</strong> fluxes with perturbation only for related<br />
cells reduced the execution time greatly.<br />
44
Conclusion (Cont ( Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
The efficiency <strong>of</strong> Jacobian matrix solution is improved<br />
by some strategies.<br />
– A sparse matrix solver having low storage and memory<br />
requiremets is used.<br />
– A time-like term addition to matrix diagonal stabilizes<br />
the solver in case <strong>of</strong> poor initial conditions. Removing<br />
this modification at the right time makes the<br />
convergence very fast.<br />
– Jacobian matrix freezing at the right time decreases the<br />
execution time.<br />
45
Conclusion (Cont ( Cont.) .)<br />
Ömer Onur - AE500 Presentation<br />
Using the same flux calculation scheme for both<br />
Jacobian and residual calculation maintains faster<br />
convergence.<br />
According to the choice <strong>of</strong> the flux limiter, higherorder<br />
schemes may have convergence problems.<br />
Unsteady results like limit-cycle is observed in higherorder<br />
schemes.<br />
46
Recommendations<br />
Ömer Onur - AE500 Presentation<br />
The control mechanism used in 1st order SW<br />
Jacobian calculation can be improved to give the best<br />
accuracy for all perturbation magnitude values.<br />
More advanced strategies can be considered to<br />
improve the Jacobian matrix solution.<br />
Higher-order schemes, and especially the choice and<br />
application <strong>of</strong> limiter can be analyzed deeply to obtain<br />
fully converged solution.<br />
47