93
Technische Universit¨ at Berlin Fachgebiet Dynamik Maritimer Systeme MASTERARBEIT Parametric-Adjoint Optimization of the KVLCC Tanker Betreut durch: Prof. Dr.-Ing. Andr´ es Cura Hochbaum Dr. Ing. Stefan Harries Vorgelegt von: B. Sc. Simon Br¨ onstrup Matr.-Nr. 323371 Berlin, den August 2, 2017

MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Technische Universitat BerlinFachgebiet Dynamik Maritimer Systeme

MASTERARBEIT

Parametric-Adjoint Optimization of the KVLCC Tanker

Betreut durch:Prof. Dr.-Ing. Andres Cura HochbaumDr. Ing. Stefan Harries

Vorgelegt von:B. Sc. Simon BronstrupMatr.-Nr. 323371

Berlin, den August 2, 2017

Page 2: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Eidesstattliche Erklarung

Hiermit erklare ich, dass die vorliegende Arbeit selbstandig und eigenhandig sowieohne unerlaubte fremde Hilfe und ausschließlich unter Verwendung der aufgefuhrtenQuellen und Hilfsmittel angefertigt habe

Ort, DatumUnterschrift

Page 3: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Abstract

In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling tool CAESES to the CFD-SoftwareStar CCM+. The aim of the optimization is to reduce the total resistance of theKVLCC tanker. The advantages of the adjoint approach in regard to the numericaleffort, over conventional optimization algorithms is shown. For conventional opti-mization the number of variants needed is the square of the number of parameters,where for the adjoint method the number of variants is independent from the num-ber of parameters.

In this thesis a successful optimization has been executed, leading to an improved de-sign of the KVLCC. Furthermore, the quality of the gradients of the adjoint methodwere evaluated, with a manually computed gradient study. It was also analysedhow the accuracy of the gradients can be improved, depending on the quality of thecomputational grid and the CAD model.

Additionally, an optimization where the wake fraction coefficient of the propellerwas the objective function was set up. This optimization lead to a significant im-provement of the wake fraction coefficient, while also increasing the number of pa-rameters, without needing a manual gradient study. Thereby, it is shown that amore meaningful objective function can improve the quality of the adjoint method.

Page 4: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Zusammenfassung

In dieser Arbeit wird eine Adjungierte-Optimierung auf den KVLCC Tanker angewen-det, mithilfe des parametrischen Modellierers CAESES und dem CFD-Tool StarCCM+. Ziel ist es den Gesamtwiderstand des KVLCC Tankers zu verbessernund dabei die Vorteile des adjungierten Verfahren im Bezug auf den geringerennumerischen Aufwand im Vergleich zu herkommlichen Optimierungen zu zeigen. Inherkommlichen Verfahren ist die notwendige Anzahl zu berechnender Varianten dasQuadrat der Anzahl der freien Parameter, wahrend das adjungierte Verfahren un-abhangig von der Anzahl der freien Parameter zu einer Losung kommt.

Im Rahmen dieser Arbeit wurde Erfolgreich eine Adjungierten-Optimierung durchgefuhrt.Zur Evaluierung der Qualitat der errechneten Gradienten der adjungierten Losung,wurde eine manuelle Gradientenstudie durchgefuhrt. Es wurde untersucht inwieweitdie Qualitat der ajungierten Losung und der Gradienten vom Berechnungsgitter undder CAD-Formulierung abhangen.

Zusatzlich wurde eine weitere Optimierung mit dem Propeller-Zustrom als Ziel-funktion erfolgreich durchgefuhrt. Dadurch wurde gezeigt, dass ein adjungiertesVerfahren mit einer geeigneter Zielfunktion, sehr gute Ergebnisse produziert undEinschrankung bei der Wahl der Parameter und ohne eine aufwendige manuelleGradienten-Studie ermoglicht.

Page 5: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling
Page 6: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Contents

1 Introduction 71.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2 State of the art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 CFD Methods 92.1 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.2 RANS Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.3 Turbulence Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.3.1 Wall Function . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.4 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.4.1 Discretization of the Domain . . . . . . . . . . . . . . . . . . . 142.4.2 Discretization of the Non-Linear Terms . . . . . . . . . . . . . 15

2.5 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.6 Pressure Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.7 Solvers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3 Adjoint Methods 233.1 Discrete Adjoint Solution . . . . . . . . . . . . . . . . . . . . . . . . . 243.2 Surface Sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4 Flow Analysis 284.1 Double Body Model without Appendages . . . . . . . . . . . . . . . . 284.2 Grid Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.3 Simulation Condition and Boundary Settings . . . . . . . . . . . . . . 354.4 Convergence of the Primal Solution . . . . . . . . . . . . . . . . . . . 36

4.4.1 Grid Dependency Study . . . . . . . . . . . . . . . . . . . . . 364.4.2 Convergence and Residuals . . . . . . . . . . . . . . . . . . . . 38

4.5 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.5.1 Wave Resistance Comparison . . . . . . . . . . . . . . . . . . 404.5.2 Velocity and Pressure . . . . . . . . . . . . . . . . . . . . . . . 424.5.3 Validation of Boundary Conditions . . . . . . . . . . . . . . . 45

4.6 Adjoint Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.6.1 Influence of Mesh Quality . . . . . . . . . . . . . . . . . . . . 464.6.2 Influence of Residuals . . . . . . . . . . . . . . . . . . . . . . . 48

5 Coupling of the Adjoint Sensitivities with the Parametric Model 505.1 Parametric Hull Model . . . . . . . . . . . . . . . . . . . . . . . . . . 505.2 Design Velocities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

5.2.1 Parametric Adjoint Sensitivities . . . . . . . . . . . . . . . . . 555.3 Coupling of CAESES and Star CCM+ . . . . . . . . . . . . . . . . . 56

5.3.1 Dakota Search Algorithm . . . . . . . . . . . . . . . . . . . . 585.4 XCB Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585.5 Displacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

6 Adjoint Optimization 606.1 Optimization I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

6.1.1 Influence of the Surface Tessellation . . . . . . . . . . . . . . . 626.2 Optimization II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

6.2.1 Validation of Gradients . . . . . . . . . . . . . . . . . . . . . . 63

1

Page 7: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

6.2.2 Convergence Study of the Gradients . . . . . . . . . . . . . . . 646.2.3 Final results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

6.3 Optimization III . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 666.3.1 Validation of Gradients . . . . . . . . . . . . . . . . . . . . . . 666.3.2 Final Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

6.4 Optimization Wake Fraction Coefficient . . . . . . . . . . . . . . . . . 69

7 Conclusion 737.1 Future Outlook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

8 Appendix 77

2

Page 8: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

List of Figures

2.1 Method for turbulence capturing, steady (left) and unsteady (right) . 102.2 Composite regions of the turbulent boundary layer[16] . . . . . . . . . 142.3 Storing Method for Unstructured Grids . . . . . . . . . . . . . . . . . 152.4 Example of the differentiation schemes . . . . . . . . . . . . . . . . . 162.5 Principal behind the LUDS [4] . . . . . . . . . . . . . . . . . . . . . . 172.6 Boundaries of the Domain . . . . . . . . . . . . . . . . . . . . . . . . 182.7 Principle of the Coupled Solver . . . . . . . . . . . . . . . . . . . . . 203.1 Example of Surface Sensitivities on a Wing . . . . . . . . . . . . . . . 264.1 Wave Resistance Coefficient over Froude Number [11] . . . . . . . . . 284.2 KVLCC Tanker under WL . . . . . . . . . . . . . . . . . . . . . . . . 294.3 Top View of the Mesh with refinement Levels . . . . . . . . . . . . . 314.4 Overall View of the Mesh . . . . . . . . . . . . . . . . . . . . . . . . 334.5 View of the Mesh and Boundary Layer at x/LPP = 0.1 . . . . . . . . 334.6 View of the Mesh and Boundary Layer at x/LPP = 0.5 . . . . . . . . 344.7 View of the Mesh and Boundary Layer at x/LPP = 0.9 . . . . . . . . 344.8 RT for grids with different Cell Number . . . . . . . . . . . . . . . . . 374.9 Plot of the Coefficients over the Number of Cells . . . . . . . . . . . . 384.10 Residuals of the Primal Solution . . . . . . . . . . . . . . . . . . . . . 394.11 Shear RF and Pressure RP Plot and Drag Total RT all in [N] . . . . . 394.12 Y Plus plotted on the Ship Hull . . . . . . . . . . . . . . . . . . . . . 394.13 Y Plus Wall Treatment in Star CCM+ . . . . . . . . . . . . . . . . . 404.14 Induced wave system and Kelvin angle[17] . . . . . . . . . . . . . . . 414.15 Resistance Components of slow and bulbous ships . . . . . . . . . . . 414.16 Pressure Coefficient cP on the Hull . . . . . . . . . . . . . . . . . . . 434.17 Normalized velocity at x/LPP0.1 . . . . . . . . . . . . . . . . . . . . 434.18 Normalized velocity at x/LPP0.5 . . . . . . . . . . . . . . . . . . . . 444.19 Normalized velocity at x/LPP1.05 . . . . . . . . . . . . . . . . . . . . 444.20 Velocity near the Prism Layers . . . . . . . . . . . . . . . . . . . . . . 454.21 Velocity exemplary for one of the Symmetry Planes . . . . . . . . . . 454.22 Residuals of the Adjoint Solution . . . . . . . . . . . . . . . . . . . . 464.23 Surface Sensitivities of a Block Structured Grid . . . . . . . . . . . . 474.24 Surface Sensitivities of a the Unstructured Grid . . . . . . . . . . . . 484.25 Surface Sensitivities of Pressure and Shear in Comparison . . . . . . . 484.26 Fewer Iterations to increase the residuals . . . . . . . . . . . . . . . . 495.1 Lines of the KVLCC . . . . . . . . . . . . . . . . . . . . . . . . . . . 505.2 Completed Parametric Model of the KVLCC . . . . . . . . . . . . . . 515.3 Principal of Section Design in the Parallel-Mid-Ship and the Aft of

the Ship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515.4 Design Principal of Meta Surfaces in CAESES . . . . . . . . . . . . . 525.5 Example of Method to compare Sections . . . . . . . . . . . . . . . . 535.6 Sensitivities of one of the Design Parameters . . . . . . . . . . . . . . 545.7 Sensitivities of one of the Design Parameters . . . . . . . . . . . . . . 555.8 Mapping Process [20] . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.9 Principal of the optimization cycle . . . . . . . . . . . . . . . . . . . 575.10 Software Connector of CAESES with Star CCM+ . . . . . . . . . . . 575.11 Table of Sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . 586.1 Manually Computed Gradients of Shear and Pressure compared to

the Sensitivities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

3

Page 9: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

6.2 Design Velocity of the Beam and Adjoint Parametric Sensitivity . . . 626.3 Manually Computed Gradients in Comparison to Sensitivity . . . . . 636.4 Response Surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646.5 Sensitivities Plotted over the number of Cells . . . . . . . . . . . . . 656.6 Sections of the Baseline in Black and Sections of the Final Result in

Red . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656.7 Manually Computed Gradients in Comparison to Sensitivity of the aft 666.8 Manually Computed Gradients in Comparison to Sensitivity of the

Bow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676.9 Sections of the Baseline in Black and Sections of the Best Design in

Red . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686.10 Surface Sensitivities with the Wake as the Objective Function . . . . 696.11 Wake of the KVLCC Baseline on the left, Result of Optimization on

the right . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706.12 Sections of the Baseline in Black and Sections of the Final Result in

Red . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716.13 Change of the Wake plotted over the Number of Iterations . . . . . . 728.1 Linesplan of the KVLCC . . . . . . . . . . . . . . . . . . . . . . . . . 778.2 Surface Sensitivities of Unstructured Grid, Plotted on the KVLCC

Surface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788.3 Surface Sensitivities of Unstructured Grid with Residuals above ma-

chine precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 798.4 Design Velocities of the Parameters used in Optimization II . . . . . 808.5 Design Velocities of the Parameters used in Optimization III . . . . . 808.6 Design Velocities of the Parameters used in the Wake Optimization . 818.7 Surface Sensitivities with the Wake as the Objective Function . . . . 818.8 Refinement and internal Mesh of the Wake area . . . . . . . . . . . . 828.9 Refinement and internal Mesh of the Wake area . . . . . . . . . . . . 83

4

Page 10: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

List of Tables

2.1 Boundaries of the Domain . . . . . . . . . . . . . . . . . . . . . . . . 194.1 Main Data of the KVLCC and the scaled version . . . . . . . . . . . 304.2 Mesh Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.3 Flow Settings of Initial Solution . . . . . . . . . . . . . . . . . . . . . 364.4 Results of the Grid Study . . . . . . . . . . . . . . . . . . . . . . . . 364.5 Rate of Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.6 Comparison of different CFD Results . . . . . . . . . . . . . . . . . . 426.1 Comparison of Manually Computed Gradients and the Sensitivities . 616.2 Progression of the Beam Optimization . . . . . . . . . . . . . . . . . 626.3 Sensitivities computed with different Surface Tessellation . . . . . . . 636.4 Comparison of Manually Computed Gradients and the Sensitivities . 646.5 Progression of the 2D-Optimization . . . . . . . . . . . . . . . . . . . 656.6 Data of the Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 686.7 Data of the Wake Optimization . . . . . . . . . . . . . . . . . . . . . 718.1 Optimization III, Complete Data . . . . . . . . . . . . . . . . . . . . 848.2 Optimization Wake, Complete Data . . . . . . . . . . . . . . . . . . . 85

5

Page 11: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Acronyms

AMG Algebraic Multi Grid

XCB Longitudinal Center of Buoyancy

CV Control Volumes

2OU second order upwind scheme

LUDS linear upwind differencing scheme

SIMPLE Semi-Implicit Method for Pressure Linked Equations

BC Boundary Condition

PDE Partial Differential Equations

ITTC International Towing Tank Conference

CFD Computed Fluid Dynamics

IMO International Maritime Organisation

XCB X-Position of Center of Buoyancy

6

Page 12: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Nomenclature

α Design Variable

λ Flow Adjoint

ω Converged Solution Vector

ρ Density

A The area of the needle point

a The number of angels per unit area

cB Block Coefficient

cF Shear Resistance Coefficient

cP Pressure Resistance Coefficient

cT Total Resistance Coefficient

Fn Froude Number

J Cost Function

LPP Length between Perpendiculars

N The number of angels per needle point

n Number of Elements

P Pressure

RF Shear Resistance

Rk Rate of Convergence

Rn Reynolds number

RP Pressure Resistance

RT Total Resistance

S Sensitivity

So Wetted Surface

v Velocity

w Wake Fraction Coefficient

Page 13: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling
Page 14: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

1 Introduction

1.1 Motivation

Today, in the face of shrinking fuel reserves and stricter rules for environmentalprotection, like the Environmental Ship Index (ESI) or the new law of the IMOregarding sulphuric emissions, more fuel efficient vessels become even more impor-tant. Designing more fuel efficient products is not only a necessity to obey theselaws, it is also a great chance for all industries, not only in the maritime field, toachieve significant cost savings over the lifetime of a product. This incentive, pairedtogether with the steady increase in computational power and better CAD and CFDtools, leads to an increasing impact of optimization in CFD driven design.

The standard approach in CFD driven optimization starts with creating a para-metric model, either fully or partially parametric, and in two different phases theoptimization is executed. The first phase is the exploration phase in which the de-sign space is analysed using quasi-random mathematical algorithms like the SOBOL,followed by a gradient steepest descent algorithm, where the design variables of theparametric model are changed to obtain the gradient of an object function like thedrag of lift of a flow depending object. The main disadvantage of this approach isthe dependency of the number of designs that needs to be evaluated to the numberof design parameters. Typical parameter models of complex geometry contain over50 parameters, which makes this approach without reducing the number of free de-sign parameter before hand, almost impossible.

The adjoint method for shape optimization uses the sensitivity of a cost functionwith respect to the mesh deformation. This is done by discretising a second set ofalgebraic equations, which follows the linearised residuals of a primal flow solution,based on a differential equation like the Navier-Stokes Equation. These sensitivi-ties, in combination with the sensitivities of design parameters on the shape of aparametric model, can be used to compute the gradient of the objective function foreach parameter. This process effectively disconnects the number of design param-eters from the cost function and only a primal solution and an adjoint solution isneeded. Thereby, leading to an optimization, where each new variant is created de-pending on the gradient of its parameters and their boundaries. Hence, the adjointmethod leads to a decrease in computational time, while not needing a reduction ofthe number of parameters.

In the scope of this thesis a parametric adjoint optimization will be conductedon a well documented test case in the form of the KVLCC tanker. There are twoversions of the KVLCC tanker, the KVLCC1 and the KVLCC2, who have a slightlydifferent shape in the aft of the hull. For this thesis the KVLCC2 is used. The aimis to verify if the adjoint method can create an improved version of the KVLCCwith regard to the total resistance. To achieve this the computer aided engineeringsystem CAESES is used to create a fully parametric model of the KVLCC tankerand compute the sensitivities of each design parameter. The CFD tool Star CCM+will be used to compute the primal and adjoint solution and the sensitivities ofthe adjoint solution of each cell. In a coupling process CAESES and Star CCM+will be connected to run a fully automatic optimization. Furthermore the obtainedgradients will be validated using manually computed gradients of the most relevant

7

Page 15: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

parameters. In addition, different settings regarding the surface tessellation of theCAD model and the flow and mesh settings in Star CCM+ and their effect on theadjoint solution will be tested. Furthermore, an additional optimization of the wakefraction coefficient is executed to evaluate how the quality of the adjoint method isdepending on the chosen objective function.

1.2 State of the art

The non linear, partial differential equations, which describe the movement of fluidaround the ship hull cannot be solved analytically. Therefore, a discretization and anumerical solver are required. There have been drastic improvements in the qualityof numerical solution in the last couple of years, driven by the increase of computa-tional power. In particular the computation of two phase flows has been critical andis connected to a very high numerical and computation effort. Flow computationswithout free surfaces, so called double-body models, are still in use for some casesin ship application mainly when very slow vessels are analysed due to the drasticreduction of the wave resistance. Furthermore, double body models are used inadjoint use cases because not all CFD tools are capable of combing free surface andadjoint methods, which is also the case in this thesis.

The KVLCC tanker was developed as a benchmark, to provide data for flow physicsand CFD validation for differernt maneuvering operations. It was never build, butrepresents the VLCC class (Very Large Crude Carriers) in dimensions. The VLCCcan vary in size between 180,000 to 320,000 DWT, while satisfying the requieremt offiting through the Suez-Canal. This leads to a length between 300 and 330 meters,a beam of up to 60 meters and a draught of up to 20 meters. The KVLCC is a verywell documented case and will be used as a benchmark to validate the initial CFDresults, which is the basis of the adjoint optimization.

CAESES is a CAE tool that offers a broad spectrum of applications. A numberof these will be utilized in the scope of this thesis. CAESES is a powerful para-metric 3D modelling tool, it will be used to create a fully parametric model of theKVLCC tanker. Furthermore the integrated optimization methods will be used tocreate new variants of the initial hull, depending on the results of the CFD computa-tions. The CFD computations will be run in a batch mode, launched and controlledfrom within CAESES.

Star CCM+ is a commercial CFD code, offering a wide spectrum of different appli-cations including free surface and adjoint methods. It also contains an integratedmeshing tool for structured and unstructured grids and it can be run in a batchmode as required for the optimization.

8

Page 16: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

2 CFD Methods

In the following chapter the theoretical bases of the computational fluid dynamicsCFD methods, which are used in this thesis are presented. Including the numericalmodel, the finite approximation, the discretization, the turbulence model and thesolver.

2.1 Mathematical Model

The Navier-Stokes equation is a differential equation describing the viscous flow ofa newton fluid. It follows from the moment conservation equation and its integralform is [1]

∂t

∫V

ρ~vdV +

∫V

ρ~v (~v · ~n) =

∫V

ρ~bdV +

∫S

(−p · ~n) dS +

∫S

2 · ν (D · ~n) dS (2.1)

for transient flows, where v is the velocity, ρ the density, p the pressure and dVand dS the volume and surface area of the control volume. The Navier-Stokes (NS)equation is the industry standard for flow applications naval architecture.

The second important equation used, is the continuity equation. It describes theconservation of mass in a control volume [1]

∂t

∫V

ρdV +

∫V

∇ · (ρ~v) = 0 (2.2)

In case of an incompressible flow this equation is reduced to

∂ui∂xi

= 0 (2.3)

With these two equations the flow is fully described. Due to the fact that the NSequation contains non linear terms, no direct solution can be calculated, so dis-cretization techniques have to be used. They are explained in the following chapter.

In CFD there are different kinds of errors like the model-, numerical- or iterationerror. The model error which stems from describing the flow with this set of equa-tions will not be discussed further since this is done by numerous research efforts.The numerical and iteration error are discussed later.

2.2 RANS Equations

Turbulence is a flow state, where the flow is characterized by chaotic changes inpressure and flow velocity on very small scales. To capture the turbulence occurringin the flow the RANS (Reynolds-Averaged-Navier–Stokes) equations are used. Inthis model the fluctuations of the turbulence are captured with two different methodsdepending weather the flow is steady or unsteady, which is shown in figure 2.1. Incase of a steady flow every variable can be represented by a time average value andthe fluctuation around it[1]

9

Page 17: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

φ(xi, t) = φ(xi) + φ′(xi, t), (2.4)

with,

φ(xi) = limT→∞

1

T

∫ T

0

φ(xi, t)dt. (2.5)

In this case t is the continuous variable of the time and T the time interval ofaveraging. This interval needs to be significantly larger then the time t (T → ∞),which leads to φ being independent of t. In case of a transient flow, a differentapproach to capture the turbulence needs to be used, the Ensemble average method.The principle is shown on the right side of figure 2.1 and can be represented by:

φ(xi, t) = limT→∞

N∑n=1

φn(xi, t) (2.6)

N represents the number of ensemble elements, which has to be large enough, so thatthe effects of the fluctuation are not influential any more. For the RANS methodthis procedure is applied to the Navier-Stokes equation.

Figure 2.1: Method for turbulence capturing, steady (left) and unsteady (right)

In case a linear term is averaged, φ′of equation 2.5 becomes zero. While a non-linear

term creates additional terms, in which correlations of the fluctuations with eachother or the average values appear. In case of quadratic terms, two additional termsappear. They are the product of the average value and the covariance:

uiφ = (ui + u′i)(φ+ φ′

)= uiφ+ u′iφ

′ (2.7)

The last term of this equation is only zero, when the two values are not corre-lated. These values are at the same coordinate, hence there being a dependencybetween the temporal change of the variables. That is why RANS equations includeterms like the Reynolds tension ρu′iu

′j and the turbulent scalar flow ρu′iφ

′, with φ

10

Page 18: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

being any kind of scalar. These extra terms cannot be represented by average values.

The impulse and continuity equations can then be written in the following form:

∂(ρui)

∂xi= 0 (2.8)

∂(ρui)

∂t+

∂xj

(ρuiuj + ρu′iu

′j

)= − ∂p

∂xi+

∂xjµ

(∂ui∂xj

+∂uj∂xi

)(2.9)

While the equation for a scalar value can be written as

∂(ρφ)

∂t+

∂xj

(ρujφ+ ρφ′u′j

)=

∂xj

(Γ∂φ

∂xj

)(2.10)

Due to the reynolds tensions and the turbulent scalar flows occurring in the con-servation equations the algebraic system is not closed. This problem is called theclosure problem and to solve it a combination of empirical parameters and averagevalues are used in place of the reynolds tensions and the turbulent scalar flow. How-ever, it would be possible to find equations for correlations of higher order,but thiswould lead to new unknown correlations which again make the use of approxima-tions necessary.

In conclusion this means, the closure problem is only solvable by introducing tur-bulence models such as k − ε or k − ω. They are further explained in the followingchapter.

2.3 Turbulence Model

The two most commonly used turbulence models are the k − ε and k − ω model.Both are two equation models which means that they include two extra differentialequations to represent the behaviour and properties of the turbulent flow.

The k − ε model, first introduced by Jones and Launder in 1972[3], uses two equa-tions to describe the turbulent kinetic energy k and the turbulent dissipation ε. Theequation for k is

∂tρk +

∂xiρkui = Cµρµt

(∂ui∂xj

+∂uj∂xi

)∂ui∂xj− ρε+

∂xj

[(µ+

µtωk

)∂ε

∂xj

], (2.11)

with the turbulent viscosity being modelled as

µt = ρCµk2

ε. (2.12)

The equation of the dissipation ε

∂tρε+

∂xiρεuj = Cε1Pk

ε

k− ρCε2

ε2

k+

∂xj

(µtωε

∂ε

∂xj

)(2.13)

11

Page 19: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

with Pk, the production of k being defined as

Pk = −ρu′iu′j∂uj∂xi

. (2.14)

This model is relatively simple and therefore used in many cases. The five variablesin the equation are often set to the following standard values:

Cµ = 0.09 Cε1 = 1.44 Cε2 = 1.92 ωk = 1.0 ωε = 1.3

Due to the approximations made by using these values, the model includes a modelerror. In case of the k − ε model there are some more disadvantages, one being thelack of sensitivity regarding flow fields that exhibit adverse pressure gradients. Thiscould lead to an overestimation of the shear stress and thereby delaying or evencompletely preventing separation. Another problem is the numerical stiffness of thismodel when it is integrated through the vicious sublayer. Almost all low reynoldsnumber k− ε models include some kind of damping in the sublayer. These dampingfunctions cannot be easily controlled by conventional linearisation techniques, whichcould lead to interference with the convergence properties of the scheme. Addingto this, ε does not become zero at non-slip surfaces, thereby another non-linearboundary condition needs to implemented. Solving both of these problems lead toadditional non-linear terms. This could have a negative impact on the numericalprocedure.

There is a large number of alternative models tackling the issues of the k− ε model.The most commen one is the k − ω model introduced by Wilcox [5]. It offers im-provements in accuracy as well as robustness. In contrast to the k − ε model thesecond transported variable is the specific dissipation ω. It is the variable that de-termines the scale of the turbulence, whereas the first variable k, determines theenergy of the turbulence. The two equations are:

∂tρk +

∂xjujk = τij

∂ui∂xj− ρβ∗kω +

∂xj

[(µ+ µTσ

∗)∂k

∂xj

](2.15)

∂tρω +

∂xjujω =

γω

kτij∂ui∂xj− ρβkω2 +

∂xj

[(µ+ µTσ)

∂ω

∂xj

](2.16)

In this model the eddy-viscosity is:

µT = ρk

ω(2.17)

The standard values of the model constants are:

σ =5

9β = 0.075 β∗ = 0.09 σ∗ = σ = 2

The k − ω model main advantage is the improved behaviour in case of adversepressure-gradient conditions [3]. Furthermore the simplicity of the formulation ofthe equations in the viscous sublayer. There are no damping functions needed and

12

Page 20: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Dirichlet boundary conditions can be implemented. This is cause for a significantimprovement of the numerical stability. Nevertheless the k−ω model includes somedisadvantages. The converging behaviour is more difficult and quite sensitive to theinitial values. The k−ω model depends on the freestream values ωf and by changingthem, the eddy-viscosity could be changed up to 100 percent. Both of these modelsuse wall functions and offer similar memory requirements.

Although both are used in different CFD cases, due to the problems described,a third model is used for the computations of this thesis. The so called SST k − ωmodel, which was introduced by Menter in 1993. It is a two-equation eddy-viscositymodel that is a combination of the k − ω and the k − ε model.

The SST k − ω model uses the formulation of the k − ω model at the inner re-gions of the boundary layer, up to approximately δ

2[3] and then changes to the k− ε

model in the shear free stream. To execute the transition between the two models,a blending function is implemented, which starts at zero and gradually increases toone. The formulations of both models is equal to the transport equations that al-ready have been described. While the inner constants change slightly, the constantsof the outer formulation stay the same.

The SST k − ω model offers good behaviour in capturing adverse pressure gra-dients and separating flow. The only disadvantage is that convergence is not alwaysachieved in the fastest way possible. However an improvement in the accuracy ofthe result was seen as beneficial, due to the use of the initial solution as the startingpoint of the adjoint solution.

2.3.1 Wall Function

All turbulence models presented are using wall functions to describe the flow and itsvalues (velocity, pressure, temperature) in the areas close to the wall. Wall functionsare needed because of the laminar boundary layer of the flow in the viscous sublayer,in which the turbulence models are not valid any more. This could be solved bydrasticly reducing the cell size, which is not feasible in many cases, due to muchmore time consuming computations.

Wall functions work with the premiss that there exists a logarithmic region in thevelocity profile. It is assumed that the velocity gradient is dominant in normaldirection to the wall and thereby possible to describe in a one dimensional way. Ad-ditionally the assumption regarding the influence of the pressure gradient, as wellas volume forces can be neglected, thereby creating an evenly distribution of theshear stress. Furthermore an equilibrium between the production and dissipation ofkinetic energy is assumed[6].

13

Page 21: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 2.2: Composite regions of the turbulent boundary layer[16]

Figure 2.2 shows the progression of the normalized velocity over the dimensionlesswall distance y+, with:

y+ =duτρµ

(2.18)

u+ =upuτ

=up√τwρ

, (2.19)

d being the wall distance, up the parallel velocity component, τw the shear stressand uτ the shear stress velocity.

2.4 Discretization

2.4.1 Discretization of the Domain

The discretization technique used in this thesis is the finite-volume method (FOV).It is the most versatile and also the most common technique for hydrodynamic ap-plications in CFD. The first step of the FOV is to divide the domain for which theflow should be calculated into a number of control volumes (cells). For each cellthe values are saved and calculated for the centroid of the control volume, hence itbeing the most important point. One of the main advantages of the FOV is that theresulting solution satisfies the conservation of quantities. This condition is satisfiedfor any control volume, the whole computational domain and for any number ofcontrol volumes.

Another important advantage of the FOV, especially in comparison to the finitedifference method (FD) is that irregular grids can be computed as well as unstruc-tured grid. This gives a higher degree of freedom and is very beneficial when tryingto capture complicated geometry. Furthermore it allows to increase the numberof cells drasticly in areas of the domain where a significant change of the gradientof velocity is to be expected. Thereby possible errors due to diffusion can be avoided.

14

Page 22: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

With this kind of discretization there is a dependency of the solution and its accu-racy on the quality of the discretization. This error is called discretization error.If the size of each control volume would aim towards zero, this error would alsoaim towards zero, however such a fine mesh would be infeasible in regards of thecomputational time. As a result the discretization error needs to be tracked andevaluated to validate the result.

As already described the domain is divided in control volumes for the FOV method.In case of a structured mesh each element has an index P and the cartesian co-ordinates i,j and k. The information of the cell are stored in its center p, whiletheir neighbour in i-direction are stored as the east cell. This leads to a very easydata storage for all cells and a wide range of discretization methods that can beused. The computations done for this thesis have been done on a structured meshfirst, while the final results were obtained on an unstructured mesh. Although beingmore complicated it was beneficial for the adjoint solution (see chapter 4.6). Theunstructured grid is more demanding with the way its data is handled and stored.Each cell is given an index and additionally each knot of the grid gets and indexwhich is then stored in the connectivity matrix.

Figure 2.3: Storing Method for Unstructured Grids

An advantage with this topology is that it is very easy to change the coarseness ofthe grid, by just adding more data points. Although this lack of a global structurerequires that the connectivity matrix is constantly accessed, leading to higher com-putation time. Another important difference between structured and unstructuredgrids is the numerical error, which is higher for unstructured grids in comparison toa structured grid where the grid is matched perpendicular to the flow direction.

2.4.2 Discretization of the Non-Linear Terms

The Navier-Stokes equation does not obtain an analytic solution which means adiscretization of the terms is required to create a numerical solution. This leavesthe terms of the diffusion and the convection as the important ones to discretize.Since they are not linear an approximation about them at a certain point has tobe made. There is a very wide range of options how to discretize these terms andthey all have different advantages and disadvantages and the ones being used in thistheses are discussed.

15

Page 23: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 2.4: Example of the differentiation schemes

The general concept behind the different discretization schemes, is to create a Taylor-Approximation around the point that should be calculated. The points which areused determine the order of the scheme and the type. The principal behind it isdisplayed in figure 2.4. To approximate the convection term of the Navier-Stokesequation in integral form

∫S

φ (~v · ~n) dS, (2.20)

which is the flow of volume through the cell sites. Using the midpoint rule, this canbe transformed to the flow through the cell sides. For the side e, it would lead to

Conve = φe · m (2.21)

with m being the mass flow rate and φe the value of φ in the center of the side. Sinceall values are stored in the center of the control volumes an interpolation of the cellsides is needed. This interpolation and the use of the midpoint rule are sources oferror that need to be tracked and kept small enough, to not change the outcomeof the computations. In the case at hand the mesh is not block structured butbuild with polyhedrons. In unstructured grids like this the mass flow rate througheach surface vector has more than one component in each Cartesian direction. Thisassumption leads to

Conve = φe · m = φe(ρSiui

)e, (2.22)

so all velocity components are multiplied with their respective components of thesurface vectors. Furthermore the center of the cell sides might not lie on the linebetween the CV centres. This problem can be addressed in a number of differentways. Either an additional error is included or by using a scheme of at least secondorder. This type of scheme is usually referred to as ”second order upwind scheme”(2OU) or ”linear upwind differencing scheme” (LUDS). While first order upwindschemes tend to diffusive behaviour and central differencing schemes may lead tooscillate behaviour. The LUDS tends to deliver good results with neither of the twoproblems, although there are other alternatives to rule out these negative effects.The most common one is a blending, where a combination of the two schemes is

16

Page 24: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

used by joining the two results with a blending factor. Since the CFD tool StarCCM+ which is used for the computations of this thesis only offers the LUDS, incombination with the adjoint functionality and specially with the coupled solver,it is chosen. The advantages of this implicit approach is explained in the followingchapter. So to ensure no diffusive behaviour, the prism layers of the mesh are chosenwith particular attention.

The LUDS will be explained exemplary for the cell side φe for the convection termand used equal for all other sides.

φe = φp − λ2p (φW − φP ) (2.23)

For the flow between cell P to cell E, would lead to the convection flow:

Conve = φp − λ2p (φW − φP ) · m (2.24)

The idea is displayed in figure 2.5 and is also used for the diffusion term of the NSequation.

Figure 2.5: Principal behind the LUDS [4]

2.5 Boundary Conditions

The boundaries of the domain need special treatment, due to the fact that they donot add new equations, they cannot contain new variables which are unknown. Sothe only solution is to define fixed values or to approximate values through one sidedifferentiation schemes. One extremely common boundary condition is the DirichletBC, where a fixed value is defined, therefore it is often used at the flow inlet posi-tions. The other one being the Neumann BC where the gradient of a value is defined.Following in this chapter the different types which are used for the boundaries of thedomain in this thesis are discussed, the different boundaries can be seen in figure 2.6.

17

Page 25: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

At the inlet, as already described the velocity is directly defined as a DirichletBC. Thereby, the speed of the ship is simulated.

Figure 2.6: Boundaries of the Domain

The outlet is modelled as a flow outlet boundary at which the pressure is specified.The boundary face velocity is extrapolated from the interior using reconstructiongradients.

At the ship wall the velocity should be zero, to achieve this kind of behaviour ano-slip wall is used. This type of boundary conditions allows to set the velocity tozero, while the boundary face pressure is extrapolated from the adjacent cell usingreconstruction gradients.To capture the viscous sub layer correctly y+ should be ataround one, which is hard to achieve, since it would increase the computation timesignificantly. Therefore wall functions are used to approximate the velocity in wallnear areas.

All other boundaries of the domain are symmetry planes. At a symmetry planethe gradient of the velocity in normal direction to the plane itself is set to zero:

∂u

∂y= 0 (2.25)

This formulation can later be tested, after a converged solution of the primal flow isobtained. By using symmetry planes the time for each computation can be reducedwithout any significant disadvantages.

A summary of all boundaries of the domain and their respective boundary settingsare displayed in tabular 2.1.

18

Page 26: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Domain Type velocity pressure

Inlet Velocity Inlet 1.179ms

-Outlet Pressure Outlet - p = patm + ρgzShip no-slip Wall v = 0 -Side Mid

Symmetry Plane

∂u∂y

= 0

-Side OutTop ∂u

∂z= 0

Bottom

Table 2.1: Boundaries of the Domain

2.6 Pressure Model

There are two different options to determine the pressure. Which are both used inpractice, but both offer different advantages and disadvantages. The general ques-tion is whether the pressure is being calculated segregated from the velocity or in acoupled manner. It should be noted that if the flow is incompressible, in both casesonly the pressure gradient has in influence on the flow.

As already stated, the segregated flow model uses the momentum equation to obtainthe velocity field (u,v,w) with fixed values for the pressure, which is calculated byusing a pressure correction equation. It is obtained by a combination of the con-tinuity equation and the momentum equation. The result is the so called Poissionequation, which in case of a constant density and viscosity is

∂xi

(∂p

∂xi

)= − ∂

∂xi

[∂ (uiuj)

∂xj

]. (2.26)

With this equation it would be necessary to calculate the pressure and velocity atthe same time. In the segregated flow model this problem is solved with the socalled SIMPLE algorithm. The principle behind this method is, that the pressureis assumed to be known, to obtain the intermediate velocity field, followed by usingthe pressure correction equation to receive the pressure field. Afterwards update thevelocity and the pressure, in a way that the continuity equation is fulfilled. Thesesteps are done iterative until the correction becomes low enough.

With these kind of flow models, the values for the velocity (u,v,w) and the pressureare done sequential for all cells of the mesh. This is beneficial regarding the memoryuse and computation time.

The coupled approach as it is implemented in Star CCM+ and other CFD tools,works in a different way. The conservation equations for continuity and momentumare forumlated in a coupled manner as a vector of equations [2]:

∂t

∫V

WdV +

∫S

[F −G] dS =

∫V

HdV (2.27)

19

Page 27: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

With H being the vector of body forces and W, F and G:

~W =

[ρρv

]~F =

[ρv

ρv + pI

]~G =

[0T

](2.28)

The coupling is achieved with a fully implicit discretization of the pressure gradientterms in the momentum equations, and an implicit discretization of the face massflux. The problem with this method is that for low Mach numbers and incompress-ible flows in general, the system of equations can become numerically stiff, whichcould then lead to problems with the convergence. This problem is handled byadding a preconditioning to the coupled equations.

A major disadvantage is the high use of memory during the calculations. Eachequation for this type of coupled set is linearized implicitly with respect to all de-pendent variables in the set. The result is a system of linear equations with thenumber N of equations for each cell in the domain [8].

The general work flow of the coupled flow model can be seen in figure 2.7. Asalready described the equations for the velocity and pressure are solved simultane-ously for all cells, followed by equations for scalars such as turbulence.

Figure 2.7: Principle of the Coupled Solver

In case of a steady state problem the equations are discretized in time and the timestepping is performed until a quasi steady state solution is achieved. In this casethe Courant number becomes an indicator for the rate of convergence of the flow.Based on that it can be increased to much higher values. While one is normallyrecommended for unsteady problems, it can lead to good convergence when beingset to 50 or even 100. The time term can be discretized either in an explicit orimplicit manner.

The SIMPLE algorithm and methods similar methods are widely used in CFD cal-culations as the one at hand. The main reason to use the coupled flow model asdescribed in this chapter lies in the way the adjoint solution is obtained. A segre-gated flow would be theoretical possible, but is not supported by Star CCM+. Thedetails regarding the adjoint solution are described in chapter 3.0.

20

Page 28: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

2.7 Solvers

The result from all desrcetized equations is an algebraic system of equation in theform of

APφP +∑

ANBφNB = QP (2.29)

where P stands for the point of which the differential equations are approximated.NB stands for all neighbour cells and Q for all know term and values. This systemcan be written in a matrix notation:

Aφ = Q. (2.30)

A is a sparse matrix, even in case of an unstructured grid, which makes the use ofan iterative approaches to solve it feasible[1]. This iterative method which is appliedin this thesis is the Gaus-Seidel scheme. It is defined by the iteration:

Lxk+1 = b− Uxk (2.31)

where k stands for the iteration count and L and U are the matrix A split into twoparts:

A =L+ U =

a11 0 . . . 0a21 a22 . . . 0...

.... . .

...an1 an2 . . . ann

+

0 a12 . . . a1n0 0 . . . a2n...

.... . .

...0 0 . . . 0

(2.32)

Exploiting the triangular shape of L, a forward substitution can can be used tocalculate the elements of xk+1:

xk+1i =

1

aii

(bi −

i−1∑j=1

aijxk+1j −

n∑j=i+1

aijxkj

), i = 1, 2, . . . , n (2.33)

This iterative process is executed until the error between xk and xk+1 has decreasedto an acceptable value.

The problem with this approach, specially regarding large mesh sizes lies in theslow convergence. To accelerate the convergence an Algebraic Multigrid (AMG)method is applied. While an iterative solution algorithm, such as the used Gaus-Seidel, effectively reduces the components of the numerical error whose wave lengthcorrespond to the cell size (high-frequency errors). The numerical error that cor-responds to long wave length, on the other side are reduced much slower [2]. TheAMG method can reduce this type of error by using an iterative process on a hi-erarchy of successively coarsened linear systems. The general concept is followingthese steps:

1. Agglomerate cells to form coarse grid levels

21

Page 29: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

2. Transfer the residual from a fine level to a a coarser level

3. Transfer the correction from a coarse level back to a finer level

This way the errors are now higher-frequency with respect to the cell size and canbe reduced efficiently. To reduce the error of the fine linear system solution on acoarser linear system, a defect equation is defined.

The combination of the two approaches leads to a satisfying convergence behaviour,so that residuals will decrease as much as needed, as well as an acceptable compu-tation time.

22

Page 30: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

3 Adjoint Methods

In this chapter the concept of the adjoint approach will be discussed. Furthermorethe implementation of the adjoint system of equations into Star CCM+ and howthe resulting sensitivities are computed in CAESES is explained.

Each optimization has at least one objective function which is minimized to re-ceive the best possible variant of the initial geometry. As already described in aclassical optimization the gradient of the objective function leads to the variation ofthe design parameters ∂α. In an adjoint approach the sensitivities of the objectiveswith respect to the design parameters are calculated and used to define the step sizeof the variation.

If we have a geometry model with n design variables α, the mesh X with a numberof m points, ω being the converged solution and an objective L, then the derivativedLdα

is given by the chain of the jacobian of each operation:

dL

dα= [X (D) ;ω (X) ;L (ω,X)] (3.1)

=

[∂J

∂X+∂L

∂ω

∂ω

∂X

]dX

dD(3.2)

In case of a very large number of variables D, which is the case for most complexgeometry, the computation becomes very expensive in regard to the memory. Thisproblem is solved by the adjoint approach.

A difficulty of the adjoint method resides in the derivation of the adjoint systemsintrinsic to the considered constrained optimization problem. This system is com-puted by differenziation of the objective function and the constrained system withrespect to the state variables, as shown above[7]. There are two different methodsto achieve this, the discrete adjoint and the continuous adjoint approach. While intheory both lead to the same result, their mathematical formulation is quit different.Therefore they include different advantages and disadvantages.

The continuous adjoint solver relies heavily on mathematical properties of the partial-differential equations that define the physics of the problem. In this case thoseequations are the Navier-Stokes equations. With this approach an adjoint par-tial differential equation set is formulated explicitly and is accompanied by adjointboundary conditions that are also derived mathematically. Only after this deriva-tion is complete can the adjoint partial differential equations be discretized andsolved, often with extensive re-use of existing solver machinery. Such a solver hasthe benefit that it is decoupled largely from the original flow solver. They shareonly the fact that they are based on the Navier-Stokes equations. The process ofdiscretizing and solving the PDE in each case could in principle be very different.While this flexibility may be appealing it can also be the downfall of the approach.Inconsistencies in modelling, discretization and solution approaches can pollute thesensitivity information significantly, especially for problems with wall functions andcomplex engineering configurations.[8]

23

Page 31: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

A discrete adjoint solver is based not on the form of the partial differential equationsgoverning the flow, but the particular discretized form of the equations used in theflow solver itself. The sensitivity of the discretized equations forms the basis for thesensitivity calculation. In this approach the adjoint solver is much more tightly tiedto the specific implementation of the original flow solver. This has been observedto yield sensitivity data that provides valuable engineering guidance for differentclasses of problems.

3.1 Discrete Adjoint Solution

The discrete adjoint method is based on how to solve the following problem. Identify

J = hTϕ (3.3)

with

Aϕ = b. (3.4)

With A ∈ Rnxm, h ∈ Rm, φ ∈ Rm, b ∈ Rn. Furthermore ψ, which is the so calledadjoint variable, fulfils:

ATψ = h. (3.5)

Combining 3.4 and 3.5 leads to:

J = hTϕ = (ATψ)Tϕ = ψTAϕ = ψT b (3.6)

So now the equivalent dual or adjoint problem can be formulated:Identify

J = ψT b (3.7)

with

ATψ = h. (3.8)

Thereby the adjoint system requires the same numerical effort as the initial equa-tion for n = m � 1. If we would try to find for k different h, the solution ofI, with l different right sides b (with k � l). It would be more efficient to use theadjoint system. Hence the adjoint approach is a way to decrease the numerical effort.

This general approach can be transferred to our set of equations of the primal flow.If we obtained the discrete control equation[9],

R (w, x) = 0 (3.9)

24

Page 32: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

then for each of the design variables xi follows, by applying the chain rule:

dR

dxi=∂R

∂ω

dxi+∂R

∂xi(3.10)

The control equation in 3.9 is the discretized NS equation of the primal solutionand because of the assumption of R = 0, the primary flow solution needs to be con-verged to machine precision to obtain reliable adjoints and cost function sensitivities.

Now we can use the equations 3.10 and 3.2 and apply them onto our adjoint ap-proach:

dR

dxi=∂R

∂ω

dxi+∂R

∂xi(3.11)

= Aϕ− b (3.12)

and

dJ

dxi=∂J

∂xi+∂J

∂ω

∂ω

∂xi(3.13)

= hTϕ+∂J

∂xi(3.14)

Now similar to 3.6 we can transform to:

hTϕ =dJ

dxi− ∂J

∂xi= ψT b = −ψT ∂R

∂xi(3.15)

dJ

dxi=∂J

∂xi− ψT ∂R

∂xi(3.16)

The adjoint variable ψ can be obtained by solving the discrete adjoint equation:

ATψ − h =

(∂R

∂ω

)Tψ −

(∂J

∂ω

)T= 0 (3.17)

The adjoint variable is solved in Star CCM+ by using an iterative defect-correctionequation [2]. Subsequently the mesh sensitivity of the cost function dJ

dxcan be ob-

tained. This system is independent from the number of design variables. Only theprimal flow needs to be computed, followed by one adjoint solution.

The main problem with the adjoint method is that it lacks the ability to include aturbulence model and at least in Star CCM+ to include a multiphase flow. The im-plications of the double body model which is therefore used is described in chapter4.3. The lack of a turbulence modeling on the other hand is more complex. Althoughthis simplification is accepted for most commercial cases where adjoint methods areused [7], it can influence the gradient of the cost function in a negative way. Henceit has to be taken into account when evaluating the optimised hull form. Due tothe set up of the optimization, each variant will be computed with the primal flowmodel, even when an optimized hull shape is found. Thereby all negative effectsregarding turbulence are taken into account.

25

Page 33: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

3.2 Surface Sensitivities

It was shown in the previous chapter how the sensitivities of the cost function inregards to the mesh can be obtained. The last step needed for the optimization isthe gradient of the cost function for each parameter ∂J

∂α, this gradient will be called

the sensitivity Sn of each design variable.

To make a meaningful geometry variation possible Sn needs to be connected tothe change of the objective function in respect to the normal displacement of thegeometry surface

Sn =∂J

∂α=∂J

∂n

∂n

∂α, (3.18)

where n represents the change in the normal displacement. ∂n∂α

is calculated byCAESES as shown later in this thesis and represents the displacement of the surfacein regard to the design variables α. Whereby ∂J

∂ndirectly comes from Star CCM+

and follows the result of the adjoint solution ∂J∂x

. Applying the scalar product to ∂J∂x

leads to the needed ∂J∂n

. The result can be displayed on the relevant boundary ofthe geometry and indicates the direction of the needed surface displacement for apositive or negative effect on the cost function, as shown in figure 3.1. Although itis very important to note that the sign of the sensitivity of each surface element isin respect to the direction of its surface normal. So if a not consistent formulationof the normals could lead to major problems in the optimization.

Figure 3.1: Example of Surface Sensitivities on a Wing

26

Page 34: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

This sensitivity which is calculated for each cell gives the overall sensitivity for eachparameter by normalizing it for each surface tesselation element of the CAD model:

S =∂J

∂αn=∑k

∂J

∂nk

∂nk∂αn

Ak (3.19)

In this equation k stands for the number of elements of the teselationa and Ak theirrespective area.

So now the gradient or respectively the sensitivity of each CAD variable is obtainedand can be used for the variation of the geometry in the optimization circle.

27

Page 35: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

4 Flow Analysis

In the following chapter the primal flow solution is analysed. The initial computa-tion and its settings regarding the mesh, boundary conditions and solver settingsare described. Furthermore their influence on the surface sensitivities is discussed,as it is shown in the validation of the adjoint solution.

Furthermore the result of the primal flow solution is discussed by conducting aconvergence and a grip dependency study. The results are then compared to exper-imental and other CFD data for verification.

4.1 Double Body Model without Appendages

The state of the art in naval architecture cases of hydrodynamic calculations is touse a free surface model, which captures the induced wave system of the ship. Thisis normally done with a VOF (Volume of Fluid) Method or similar methods. For theproject conducted in this thesis, a double body model is used, the main reason be-ing that the adjoint technique is not capable of functioning with a free surface model.

This leads to a number of issues. One being the validation of the calculations andfollowing the meaningfulness of the optimizations. Therefore the ITTC 57’ formulafor calculating the friction resistance is be used, to compared the friction resistanceof the CFD results to the experimental data. To minimize the possible deviationbetween the reality and the calculations, the KVLCC tanker is chosen. As alreadystated, there are two versions of the KVLCC. The KVLCC1 and the KVLCC2, thelatter of the two is used in this thesis. Due to its normal operation conditions ata speed of 14 kn the fraction of the wave resistance of the total resistance of theship plays a smaller role and thereby offer less potential for improvement by theoptimization. On average the wave resistance RW increases with the fourth degree[12, p438].

Figure 4.1: Wave Resistance Coefficient over Froude Number [11]

28

Page 36: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

This simplification of the CFD model is also taken into account in the set-up of theoptimization, as it is shown in chapter 6.3. For example design characteristics of theKVLCC mainly influencing the wave resistance such as the bulbow, could decreaseRT , while increasing RW without being captured. These kind of parameters areexcluded from the optimization.

Furthermore the calculation and the optimization are executed without appendagesof the KVLCC. Adding appendages would increase the number of cells necessaryto capture their effects in a meaningful way, this would not be feasible within theframework of this thesis, but it could be an interesting approach for future works.

Another important point following from the chosen double body model, is con-nected to the induced wave system. The induced wave system influences the wettedsurface of the vessel and thereby the friction resistance, which is responsible for alarge percentage of the complete resistance. Since there is no wave system, changesin the geometry especially close to the free surface, could impact the wetted sur-face without being properly traced. If the optimization process would lead to hullvariants with a minimal improvement of the resistance this could be a problem, soonly if the optimization leads to significant improvement can the described countereffect be ruled out. Adding to that in the scope of this thesis, what is called thetotal resistance is technically only the viscous resistance due to the restrictions ofnumerical model.

The displacement, however, should be kept constant because a reduced displace-ment would either require a lighter ship structure in a theoretically executed designprocess, which may not be possible due to the structural integrity or lead to a re-duced load capacity. So neither option is sensible. Due to these restrictions it seemslikely that the pressure resistance will be the main factor to influence the resistancein the optimization.

Another problem that needs to be taken into account in the optimization is thelongitudinal center of buoyancy and its possible shift to either the front or the backof the KVLCC, which would lead to a different trim. Since the double body modeldoes not include a trimming functionality like methods with free surface, variantswith a very high change in the XCB need to be evaluated with precaution. Smallchanges in the XCB might be evened out by the position of the center of gravityand the ships structure, with larger numbers this might not be possible.

Both issued displacement and the position of XCB will be evaluated in the opti-mization.

Figure 4.2: KVLCC Tanker under WL

29

Page 37: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Main particulars Full Scale Small ScaleScale 1.0 1

45

LPP [m] 320.0 7.00LWL [m] 325.5 7.1204BWL [m] 58.0 1.2688D [m] 30.0 0.6563T [m] 20.8 0.4550Displacement [m3] 312622 3.2724Wetted Surface [m2] 27194 13.0129cB [-] 0.8098cM [-] 0.9980LCB (), fwd+ 3.48

Table 4.1: Main Data of the KVLCC and the scaled version

4.2 Grid Settings

The model size for the calculation in this thesis have been set to seven meters,which is equivalent to scale of 1

45. The main reason for this scale are the results

and expiremtns of the Gothernburg CFD workshop in 2010. For this workshop themajority of experiments and CFD calculations have been done at a model lengthof seven meters. This will make the validation with this data more reliable, sincemodel effects do not influence the results in comparison to each other.

The meshing is executed by the meshing tool provided by Star CCM+. Initially ablock structured grid has been tested. It offers advantages in the required meshingtime and it is well suited for ship applications, which have relatively easy geometryand a rectangular grid. The initial results looked promising, since the residuals de-creased to an acceptable extend and the drag, pressure and shear stress forces wereconverging, albeit the block structured grid produced difficulties later on with thesurface sensitivities of the adjoint solution, as it is shown in chapter 4.6.1. As asolution to this problem an unstructured grid with polyhedron elements is used forthe calculations. Although is leads to a slower meshing and computation time, theend results was beneficial enough to compensate for these negative effects.

The domain has a length in front of the ship of seven meters and a length be-hind the ship of 17 meters. The breadth was set to five meters, so around 0.75 ·LPPand the depth to five meters. The dimensions are slightly larger then the typicalrecommendations. Thereby ensuring that no interference is caused by mirroring ef-fects from the walls. The base size representing the benchmark for all other settingsof the meshing tool was set to 0.0125mm and with respect to that the minimumsurface size of the inlet, outlet and symmetry planes is set to 50.0 percent of thebase. Furthermore the minimum and maximum surface size that the meshing tooltries to apply to the hull while it is not overwritten by refinement levels, is 15.0percent of the base.

30

Page 38: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Base Size 0.01125mHull:Relative Surface Size 25 %Refinement:Relativ Surface Size 50 %Refinement bow 12.5 %Refinement Stern 12.5 %Prism Layers 6Thickness 0.035 mStretching 1.5Cells Total 1231427

Table 4.2: Mesh Settings

Three refinement levels are added to the grid to achieve a high resolution in the bowand stern area of the ship, where the highest fluctuations of pressure and velocityin all three coordinates are to be expected. The settings of the refinement make itpossible to specify the size of the cells with respect to the base size of the completegrid. The bow and stern refinement, displayed in figure 4.3 have a target surface sizeof 12.5 percent of the base. The second level of refinement guarantees a growth rateof cells that seemed acceptable near the hull with a maximum and minimum cell sizeof 35.0 percent of the base. The two refinement levels at the bow and the stern areimplimented to improve the quality of the adjoint solution, due to its dependencyon high quality mesh [2].

Figure 4.3: Top View of the Mesh with refinement Levels

To capture the strong change of gradients near the wall, wall-functions are used.Furthermore, prism layers are added in normal direction to the hull. The main ad-vantage of prism layers is that they allow high aspect-ratio cells without incurring anexcessive stream-wise resolution, which is not the case with other cell types. On theComputation side, prism layers reduce numerical diffusion near the wall by aligningthe sub surface (layer connecting core mesh and prism layers) with the flow. [2]

The prism layer thickness must be set according to requirements of the turbulencemodel and wall function concept. According to the guideline of the ITTC, y+ shouldbe at around 60 to 80 [14]. To use exact wall distance treatment the it would berequired that y+ ≤ 1, thereby increasing the computation time significantly. This

31

Page 39: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

may be possible for a single CFD run, but specially in regards to the whole opti-mization circle and the large number of variants that will be computed it is just notfeasible.

y

LPP=

y+

Re

√cF2

(4.1)

with cF is calculated with the ITTC correlation line:

cF =0.075

(Re − 2)2= 3.105 · 10−3 (4.2)

That leads to:

y =y + LPP

Re

√cF2

= 1.72 · 10−3 (4.3)

The number of prism layers has been set to six, with a layer stretching factor of 1.3.Since Star CCM+ only gives the option to choose the total layer thickness of allprism layers. So to achieve the thickness of the first layer as calculated in respectto y+, the overall thickness is at 0.035 meter.

With respect to the forgone description of the mesh, the settings and statisticsare shown in table 4.2, while an overview of the mesh is shown in the followingfigures.

32

Page 40: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.4: Overall View of the Mesh

Figure 4.5: View of the Mesh and Boundary Layer at x/LPP = 0.1

33

Page 41: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.6: View of the Mesh and Boundary Layer at x/LPP = 0.5

Figure 4.7: View of the Mesh and Boundary Layer at x/LPP = 0.9

34

Page 42: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

4.3 Simulation Condition and Boundary Settings

In this chapter the settings in Star CCM+ regarding the boundaries and generalsimulation conditions are discussed. As already analysed in chapter 3.0, the residu-als of the primal solution must converge to machine precision. To achieve this, somesettings needed to be tested further, especially the grid sequencing and the Courantnumber.

The main operation condition of the KVLCC of 15ms

for the full scale ship (length320.0 meter), which translates to a Froude-Number of 0.142:

FN =v√gL

(4.4)

= 0.142 (4.5)

With the chosen model length of seven meters this leads to a ship speed of 1.179ms

for the small scale. Furthermore the Reynolds number is different in regards to thefull scale version and will be at 8.2 · 106.

The inlet area of the grid is a velocity inlet, where the water flows in with theship speed. The outlet boundary is a pressure outlet with a pressure of zero. Theship hull itself is a slip wall. All other boundaries are symmetry planes, with themathematical formulation as described in chapter 2.5.

The turbulence model is a SST k − ω model, with wall function treatment in thelaminar regions of the flow near the hull. The Coupled Flow Solver, is an implicit,steady state solver, with a pseudo time step, hence the possibility to select a courantnumber. On the basis of the necessity to obtain residuals on the level of machineprecision, it was set to 10. Furthermore a grid sequencing is operating as part of thesolver. The grid sequencing enables faster and more robust convergence of the flowsolution by performing the following steps. First, a series of coarse meshes is gener-ated for each mesh the normal flow solution is initialized. In the next step, startingwith the coarsest mesh, iterations are run either until it converges or the maximumnumber of iterations is reached. Then the solution is interpolated on the next finermesh and the previous step is repeated, until reaching the finest mesh. The gridsequencing uses a full implicit-Newton solution algorithm to compute a first-orderinviscid flow solution, which also allows the use of high CFL numbers. Differentsettings for the grid sequencing were tested and in the end an improved convergencecould be reached in respect to the level of residuals as well as computation time.

In the following tabular the settings as previously described are summarized.

35

Page 43: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Ship speed 1.179ms

Turbulence Model SST k − ω

Coupled FlowCoupled Flow

AMG-Linear SolverSteady State

Courant Number 10Grid SequencingMaximum grid levels 5Maximum iterations per level 100Convergence tolerance per level 0.05CFL number 20

Table 4.3: Flow Settings of Initial Solution

4.4 Convergence of the Primal Solution

4.4.1 Grid Dependency Study

The effects of the mesh parameters as they have been presented earlier are analysedin the following chapter. Therefore the initial flow solution was executed on threedifferent meshes, varying between coarse and fine. The aim is to prove that thechosen mesh provides a solution whose quality would not improve by increasing thenumber of cells. Furthermore the parameters of the refinement levels and also thenumber of the prism layers is discussed.

The analysed meshes only differ in their base size, while all other parameters areproportional to this value. Thereby the different meshes are produced. In figure4.8 the number of cells for each variant is displayed over the total resistance RT .The convergence behaviour looked promising. Despite the results of the finest meshlooking the best, the second finest mesh with a number of cell around 1.2 · 107 ischosen for the further computations, mainly to reduce the computation time pervariant.

To further verify the dependency of the solution on the chosen grid, a grid depen-dency study based on the guidelines of the ITTC is conducted [15]. Therefore thecomputated forces are normalized with:

Ccoeff =1

2· ρsaltv2 (4.6)

This leads to the following set of values:

Number of Cells cP [10−3] cF [10−3] cT [10−3]Grid 1 0.8 · 106 3.948982197 0.830015037 3.118980104Grid 2 1.7 · 106 3.895564512 0.747867008 3.1469985Grid 3 3.2 · 106 3.8832888 0.715184274 3.168212397

Table 4.4: Results of the Grid Study

36

Page 44: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.8: RT for grids with different Cell Number

The uniform parameter refinement ratio, is defined by the number of cells k. Thisvalue should be lager then one to have a significance. The recommendation of theITTC is to have a ratio of at least two, while also stating that this might not bepossible in practical cases with a large cell size. Using the double body model givesan advantage due to the overall reduced cell count. For the computated grids thisleads to

rk ≈∆x2∆x1

≈ ∆x3∆x1

≈ 2.4 (4.7)

The solution of the physical value that are evaluated to verify the convergence areSk1, Sk2 and Sk3 and their difference:

εk21 = Sk2 − Sk1 (4.8)

εk32 = Sk3 − Sk2 (4.9)

Thereby the convergence ratio is defined:

Rk =εk21εk32

(4.10)

If the rate of convergence of one of the parameter is below zero, then it is calleda oscillatory convergence. For values above one it would be a divergence. If eitherof these cases would be at hand a further analysis would be required. Values ofthe convergence ratio between zero and one are desirable and would confirm the in-dependency of the solution from the cell size, which is called monotonic convergence.

Applying this methodology to the results of table 4.5 leads to the following val-ues.

37

Page 45: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

εk21 εk32 Rk

Shear Stress 0.028018396 0.021213897 0.75714175Pressure -0.082148029 -0.032682735 0.397851722Drag Total -0.053417685 -0.012275712 0.229806139

Table 4.5: Rate of Convergence

It is obvious that a monotonic convergence is at hand. Although the third meshwould grant better convergence, the second mesh was chosen. The main reason is toensure shorter computation time, due to the need of low residuals, the computationtime per variant is already increased. This compromise between accuracy and timeconsumption makes it possible to run the optimization process for a high numberof variants and different settings as shown in chapter 6.3. Furthermore a gradientstudy is conducted to verify the gradients of the adjoint solution, which adds morenecessary computations.

Figure 4.9: Plot of the Coefficients over the Number of Cells

4.4.2 Convergence and Residuals

To prove the convergence of the chosen mesh, the residuals, the total drag and theshear and pressure forces are displayed in figures 4.10 and 4.11. A convergenceof RF , RP and RT is reached at around 400 iterations, with residuals at roughly10−6. The computation continues running until 1600 iterations to achieve the levelof residuals at machine precision. It should also be remarked that the computationshave been run with a double precision version of Star CCM+. This version storesfloating point numbers with 64 bits instead of 32 bits. As a result the precisionof the results is increased drastically, which mainly results in lower residuals. Thedownside is the much higher memory and time consumption. It is obvious thatmany factors need to be considered when making decisions for the primal flow, withthe main factors being the time, accuracy and the residuals at machine precision.

38

Page 46: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.10: Residuals of the Primal Solution

Figure 4.11: Shear RF and Pressure RP Plot and Drag Total RT all in [N]

The values of y+ are plotted by Star CCM+ following convergence of the primalsolution. It is displayed in figure 4.12. It is obvious that not all values lie in thecomputated range of ∼ 80.

Figure 4.12: Y Plus plotted on the Ship Hull

39

Page 47: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Star CCM+ offers a functionality that is called all y+ wall treatment. The principalis displayed in figure 4.13. For low values ofy+ at around one the viscous sublayer isresolved and needs little or no modelling to predict the flow across the wall bound-ary. The transport equations are solved all the way to the wall cell. The wall shearstress is computed as in laminar flows. While for higher values of y+ of 30 andhigher the viscous sub layer is not solved. Instead as described in chapter 2.3.1 wallfunctions are used to obtain the boundary conditions for the continuum equation.Wall shear stress, turbulent production, and turbulent dissipation are derived fromequilibrium turbulent boundary layer theory.

The all y+ wall treatment combines the two methods, while also using a blend-ing for areas of buffer layers where 1 < y+ < 30.

Figure 4.13: Y Plus Wall Treatment in Star CCM+

To ensure that no negative effects due to the inconsistency of the y+ values wereneglected two different variants of the primal flow were set up and computated.One with higher values of y+ around 100 and smaller values of 30. In both cases nosignificant difference in the solution could be observed, hence the initial prism layerset up is used going forward.

In conclusion the chosen mesh offers a convergence for residuals and the physicalvalues of interest as necessary. Furthermore, the mesh convergence study showedsatisfactory results as well.

4.5 Validation

4.5.1 Wave Resistance Comparison

To validate the results obtained by the primal solution they will be compared toexperimental data and other CFD results from the Gothenburg workshop in 2010.Since the computations in this thesis are executed as a double body model, thedifference between the results ideally would be of the scale of the wave resistance.Furthermore the influence of the induced wave system on the wetted surface and,thereby, the friction resistance will be evaluated.

The wave resistance of a ship stems from the induced wave system, which is causedby a ship in calm water conditions. cW is the specific energy component that isneeded to continue the free wave field. This energy is constantly evacuated and itsso called Kelvin angle is always 19, 47 deg, constant for all types of ships, as seen infigure 4.14 [17].

40

Page 48: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.14: Induced wave system and Kelvin angle[17]

The main problem of the validation is to determine the wave resistance of the exper-imental data and the CFD data of the Gothernburg workshop. The total resistancecoefficient of the experimental data is cT = 4.110 · 10−3, which in comparison to theobtained cT = 3.917 · 10−3, is an error of −4.9%. So the question is, does the 4.9%reflect the wave resistance of the KVLCC at a Froude number of 1.42 realistically.

A first quantitative evaluation can be done graphicly with help of the followingdiagram provided by Kracht:

Figure 4.15: Resistance Components of slow and bulbous ships

At FN = 0.142 the fraction of the wave breaking resistance cWB, is roughly at fivepercent, while cW does not have an influence. According to Kracht, cWB is theresistance forced induced mainly by slow and bulbous ships by the breaking energyof steep bow waves.

To further validate the influence of the induced wave system, the interference ofthe wave system of the bow, forward shoulder, aft shoulder and stern are analysed[11]. The wave length of the produced wave is calculated with:

41

Page 49: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

λ = 2πF 2NLWL = 0.8869m (4.11)

The position of the aft shoulder is at 3.057 m and the forward shoulder at 5.048 m.That would lead to good superposition of the wave trough and crest. The positivesuperposition also means, the positions of the shoulder should be kept constant, be-cause an otherwise negative effect for the induced wave system cannot be capturedwith the chosen double body model.

As a last step of the validation, the available CFD obtained values of cT , cF and cPare averaged and compared to the results from the CFD results of this thesis. Thecompared values were all executed with a free surface model, so a slight differenceof cT is expected. The results can be seen in the following table.

cT cF cPHSVA (Ad Fresco+, Grid 1) 4.125 3.538 0.678HSVA (Ad Fresco+, Grid 2) 4.198 3.515 0.682HSVA (Ad Fresco+, Grid 3) 4.140 3.447 0.692MOERI (Wavis, Grid 1) 4.180 3.301 0.879MOERI (Wavis, Grid 1) 4.129 0.323 0.906

Average 4.1544 3.4048 0.7674CFD 3.917138698 3.1469985 0.764037077Diff [%] -6.057 -8.19198 +0.4401

Table 4.6: Comparison of different CFD Results

The results of the comparison is satisfying. Averaging the results leads to a goodsimilarity to the results of the primal flow.

In conclusion the primal flow results are very accurate and correlate with the ex-perimental data and other CFD results. Although all methods of validation may beslightly inaccurate, combining all of them leads to a satisfying resemblance.

4.5.2 Velocity and Pressure

Another step of the validation is done by comparing the stream sections, near thebow, at mid ship and at the wake with data of the Gothernburg workshop.

The velocity in the wake and the propeller axis is especially important. If theresults of the optimization would lead to an optical obvious decrease in the qualityof the propeller wake, the resulting improvement in resistance might cancel itselfout. High velocities in the area of the propeller lead to better efficiency thereforethe velocity components in these cells should not decrease to strongly. The resultscan be found in figure 4.16, 4.17, 4.18 and 4.19.

The velocity and distribution of the pressure coefficient on the ship hull lookedas expected, with an area of stagnation pressure at the bulbow, followed by twolarger areas of negative pressure near the keel and the forward shoulder. The veloc-ity for the three cuts gives a consistent impression, with areas of overspeed near the

42

Page 50: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

bulbow. The velocity components in the projection area where the propeller wouldrotate in, also display realistic ranges that can be found in other research efforts.

Figure 4.16: Pressure Coefficient cP on the Hull

Figure 4.17: Normalized velocity at x/LPP0.1

43

Page 51: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.18: Normalized velocity at x/LPP0.5

Figure 4.19: Normalized velocity at x/LPP1.05

44

Page 52: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

4.5.3 Validation of Boundary Conditions

To validate if the chosen boundary conditions deliver the results as predicted earlier,the velocity in flow direction is plotted and analysed.

For the hull of the KVLCC, respectively the part of the mesh with prism layersthe velocity profile can be seen in figure 4.20. Its show a velocity profile with areasonable gradient as it would be expected. For all symmetry planes dui

dxshould be

zero, which was the case as it is shown exemplary in figure 4.21.

Figure 4.20: Velocity near the Prism Layers

Figure 4.21: Velocity exemplary for one of the Symmetry Planes

4.6 Adjoint Flow

After a satisfying result in the primal solution has been obtained, the adjoint flowsolver can set up and run. As already described in chapter 3, the base of the adjointsystem of equations is mostly given by the set of equations of the primal flow.Therefore only the adjoint solver has to be added in Star CCM+ and the number ofiterations has to be increased. Furthermore a force cost function has to be chosen.

45

Page 53: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

For the case at hand the drag total force of the hull is chosen, since it is also theaim of the optimization to minimize this value. The number of iterations has to beincreased to roughly half of the primary flow, but independent from the number ofsteps, the adjoint flow has to run until convergence, while the adjoint flow solver isrunning the turbulence model is frozen, which reflects int the residuals as displayedin figure 4.22.

Figure 4.22: Residuals of the Adjoint Solution

To visualize the result of the adjoint solution the surface sensitivities are calculated.They represent the areas of the hull which are most critical to the cost function dJ

dx,

but at this point no kind of shape change or optimization is done. The sensitivitiescan already be evaluated to assess the quality of the adjoint solution.

4.6.1 Influence of Mesh Quality

Initially the mesh that was used was a block-structured grid which is more typicalfor naval applications. The primal flow results seemed to be promising, but in thefurther analysis it became apparent that the surface sensitivities were unsteady overthe hull surface, as seen in figure 4.23.

46

Page 54: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.23: Surface Sensitivities of a Block Structured Grid

This problem became even more obvious when normalizing the surface sensitivitiesover the area on the hull, which also will be done later in the coupling to CAESES,when calculating the parametric sensitivities of the optimization. While in theorythe use of a block structured should not be critical for the solution of the adjointflow, in particular the areas of the grid, where the difference between the cell size ofneighbouring cells is extremely large, the sensitivities are inconsistent. This incon-sistency would very likely impact the gradients and, thereby, the optimization. Thisproblem is displayed in figure 4.24 and became most apparent in the upper area ofthe forward shoulder. The problem could not be controlled by changing the meshcharacteristics, neither smaller cell size or a change in the general scale of y+ madea significant difference in the steadiness of the surface sensitivities.

The solution was found by changing the mesh from a block structured grid to an un-structured mesh with polyhedron elements, as it is described in the previous chapter.Despite initially better looking surface sensitivities, the results were not completelysatisfying. Therefore an improvement in the mesh quality was made by decreasingthe number of cells overall and the cell size on the hull surface from 15 to 10 percentof the base size. This lead to a much better results, as it is shown in figure 4.24 andalso in figure 8.2 in the appendix. Regardless of the improvements, the area abovethe forward shoulder still seemed to be problematic. Including a smoothing factorfor the gradients showed satisfying improvement. Furthermore clipped cells near theside boundary, also showed problematic behaviour. These issues were addressed inthe process of coupling CAESES and Star CCM+.

47

Page 55: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.24: Surface Sensitivities of a the Unstructured Grid

Furthermore, two additional adjoint solutions were executed to analyse the differencebetween the sensitivities of the friction resistance and the pressure resistance. Theresults confirmed the suspected role of the pressure. The sensitivities are in a higherdomain then the friction resistance sensitivities. A comparison of the two can befound in figure 4.25. The sensitivities of the pressure have the highest values inareas of very high or low pressure, so mainly the bulbow, forward and aft shoulderand the stern near the propeller shaft. In general it could be observed, that in areasof over pressure the sensitivities normals point away from the hull, while in areas ofunder pressure they point in the opposite direction. While this seems reasonable,it it further accessed in the adjoint optimization. The frictions sensitivities on theother side only influence a continuous area at the side of the hull near the bilgeradius and are overall spread even over a larger area, while the pressure sensitivitiesfluctuate locally.

Figure 4.25: Surface Sensitivities of Pressure and Shear in Comparison

4.6.2 Influence of Residuals

The need for low residuals at level of machine precision leads to high computationtime, due to more iterations that are needed. This effect is even more enhancedby the double precision version, that is needed to reach this level of residuals. Tomeasure and to verify the effects of higher residuals, a test run with fewer iterationsis computated. The residuals are displayed in figure 4.26 and the sensitivities infigure 8.3.

48

Page 56: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 4.26: Fewer Iterations to increase the residuals

It is obvious that the residuals have a significant effect on the quality of the sen-sitivities. Even a change of sign could be observed. This kind behaviour was alsoobserved by other research efforts [7]. While changes in the sensitivities could beexpected in case of the discrete adjoint approach, where

dR

dx> 0 (4.12)

it is a very important premiss that the results might be as drastic as presented here.But even if the sign would not have switched, the sensitivities are less distinct. Fur-thermore an area of unsteady sensitivities can be seen at the forward shoulder ofthe ship (as shown in the appendix in figure 8.3).

Especially with respect to future adjoint work, where free surface modelling andthereby unsteady state analysis will lead to much higher time per computation. Itwill be of interest to take every measurement to decrease the time per computationto make the adjoint more feasible. Neglecting the need for residuals at machineprecision should not be one, following the results of this thesis.

49

Page 57: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

5 Coupling of the Adjoint Sensitivitieswith the Parametric Model

After obtaining a satisfying adjoint solution a coupling of Star CCM+ and CAESESwill lead to an automatic optimization circle. There are a number of steps needed toachieve this. First a parametric hull is modelled. These are required to obtain thegradients of each parameter as described in chapter 3.0. The coupling of CAESESand Star CCM+ makes it possible to run the primal and the adjoint solution in abatch mode controlled by CAESES. The sensitivities Sn are used by the optimizationalgorithm Dakota to create new variants. These steps are discussed in detail in thischapter.

5.1 Parametric Hull Model

The KVLCC was recreated as a fully parametric model with a high number ofgeometrical parameters to create a very free and flexible model. The final modelincluded around 45 parameters, with some being very global like length or beam,other are more local, like the tangent of the waterline at the bow. Not all are usedin the final optimization.

Figure 5.1: Lines of the KVLCC

The modelling process of a ship hull in CAESES normally starts with creating themost important lines of the hull. The centerline keel(CPC), the Flat-of-Bottom(FOB), the Flat of Side (FOS).

To have more influence on the hull in areas with a high curvature, mainly at the bowand the skeg below the waterline, six additional lines are added. Two of these linesconnect the FOS curve to the CPC curve at the height equal to the bilge radius.Another two lines are added at the bow at the waterline height and below and twolines at the skeg, with one at the height of the propeller shaft as seen in figure 5.2.The complete linesplan can be found in the appendix.

50

Page 58: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 5.2: Completed Parametric Model of the KVLCC

By creating the lines, most of the ships parameter are already defined because thecontrol points of the curves, their position in x-,y- and z-direction and the tangentsat the curve ends, are all parameterized. These lines are used in the next stepto create meta surfaces from feature definitions, which define information aboutthe way each section is build. The content of each feature definition depends onthe location in x-direction of the section and which lines define the shape of theship in that area. The parallel mid-ship, for example, is defined by four points,whose vectors for each section in x-direction are defined by their location on theirrespective lines. These points are connected by different types of curves dependingon the requirements of the design. For the midsection the deck-point is connectedto the point of the FOS with a Line, while the curve between the FOS and the FOBis a NURBS (Non Uniform Rational B-Spline). It is a B-Spline which is not onlydefined by its degree and knot vectors, but further allows for a weight to be definedfor each knot vector. These kinds of curves are the best choice when trying to modelcircular shapes, because they can be an exact circle, which is not possible with anormal B- or F-Spline. The advantages of F-Splines, on the other hand, lies in theirability to be directly controlled by the area in respect to an axis. The different kindof sections and curves are displayed in figure 5.3, for sections of the ship betweenLPP between 137.6m and 227.2m and for sections between LPP = 100m− 137.6m.The second example has an additional point controlled by the so called ”bilge aft”line.

Figure 5.3: Principal of Section Design in the Parallel-Mid-Ship and the Aft of theShip

51

Page 59: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

This methodology leads to five different feature definitions needed for the wholeship. The feature definitions of the section add another important parameter forthe shape of the hull. A fullness parameter is used to control F-Splines. To im-plement this parameter, a reference spline is created which is equal to the splinethat should be influenced. The area of the actual spline is then controlled with thefullness parameter by referencing the area value of the reference spline and multi-plying it with the fullness parameter, which leads to the area of the new spline. Thevalues of the fullness parameter normally range between 1.1 and 0.9 depending onthe area of the reference curve. These fullness values are added to the feature defi-nition as a curve that is defined in x-direction where the ordinate is the fullness value.

After creating all feature definitions of the KVLCC, the next step needed to createthe model are so called curve engines. The curve engines connect the points if thesections to the actual values of the functions describing them. In the case of a hullthese are the already mentioned CPC, FOS, FOB and Deck curves.

Figure 5.4: Design Principal of Meta Surfaces in CAESES

With the last step the meta surface uses the information of the curve engine to gen-erate the surface. This process can be seen in figure 5.4. A meta surface containsa base position which corresponds to the abscissa value in the coordinate system ofthe curve engine. For many applications this base value runs between zero and one,since this is the parameter range for all curves. In a typical design process of a shiphull it is different. The functions of the curve engine describe the shape along thelength of the ship in x-direction, so the base value needs to be the x-coordinate ofthe beginning and end of the section which is represented by the meta surface. Thismeans for the midsection shown in figure 5.3 the base value would range between137.6m and 227.2m.

After creating all required meta surfaces and a number of smaller filleting surfacesand patches the geometry model is complete. The complete lines plan of the KVLCCcan be found in the appendix.

It is important to verify the quality of the designed model in respect to the originalKVLCC. Therefore, the area of sections spread evenly along the hull are analysedin regard to their deviation to the original. The optimizations and the alterationof the objective function often occur in a low percentage range, so if the differenceof the model would be too large, a meaningful assessment of these results is hardlypossible. To ensure this effect is not appearing in the optimization executed in thisthesis, a feature within CAESES was created which compares each section of theoriginal IGES model of the KVLCC to each section of the reversed engineered hull.

52

Page 60: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

To ensure that negative and positive differences in the area will not cancel eachother out, the absolute value of the area difference are added up. Such a section inshown in figure 5.5.

Figure 5.5: Example of Method to compare Sections

The quality comparison feature follows these steps for each section:

1. Calculate intersection points between the sections

2. Compare the area between intersection points in respect to the z-axis in thex-plane

3. Sum up all the calculated difference as an absolute value

4. Compare the total area of the initial section to the summed up difference value

The average percental difference of all sections is around 0.35 percent, while no dif-ference was larger than 2 percent. The complete set of numbers of this comparisoncan be found in the appendix.

The created model is still in full scale size, so to export it correctly to Star CCM+, itneeds to be scaled down to the chosen model size and a watertight STL needs to becreated. An important requirement for the model in the optimization is the abilityto create valid geometries with a high percentage of over 90 percent. The definitionof valid can change depending on the use case and the projects objectives. In theproject at hand the most important factor for the validity of variants is that wa-tertight STL files are produced and exported to Star CCM+. While invalid designswill not trigger coupled applications, and hence no computation time and efforts arewasted, it still is important to avoid. In a Sobol-Algorithm too many invalid designscan lead to blank spots in the design space, while in a gradient based algorithm itcan lead to the termination of the optimization.

To ensure a satisfying ratio of valid to invalid designs of over 90 percent, a pre-check in form of a Sobol-Search-Algorithm is created. This Sobol produces over 200designs while checking the number of open edges of the produces STL. The pre testshowed that all variants produced watertight, high quality STL’s that could all beused as an input to Star CCM+.

53

Page 61: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

In conclusion the model facilitates high flexibility of the geometry with a largenumber of parameters, while maintaining stability of all variants.

5.2 Design Velocities

The design velocities are a functionality of CAESES, which is designed to be usedin an adjoint optimization, but it can also work as a stand alone approach. Thedesign velocity of a parameter is calculated in respect to a surface and determinateshow much the parameter has to change for the surface to shift with a certain delta.The delta shift of the evaluated surface can be chosen. The result is a map of thecomplete hull for each parameter that shows, where a change of this parameter leadsto the highest change of the geometry. The sensitivities of two parameters are shownexemplarily in figure 5.6 and 5.7, where one parameter has a strong influence on thefore body of the hull and the second parameter strongly influences the shape of theskeg. The different colours on the surfaces represent the severity of the influence ona specific tessellation triangle. The values range between one, meaning the highestpossible influence and zero, meaning no influence at all. These sensitivities will bemapped together with the adjoint sensitivities as described in the following chapter.

Figure 5.6: Sensitivities of one of the Design Parameters

A problem which became apparent during the analysis of the sensitivities is thenormal orientation of the underlying surfaces in CAESES. If the normal vectorsare not all oriented in the same direction, the sensitivities regarding the designparameter dn

dαwill switch their sign. Thereby the computated gradients will be

misleading, since they are summarized over all surface elements. This effect, asdisplayed in figure 5.7, was eliminated by controlling the u- and v- domains of eachsurface and thereby also their normal direction.

54

Page 62: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 5.7: Sensitivities of one of the Design Parameters

5.2.1 Parametric Adjoint Sensitivities

The surface sensitivity feature computes the gradients of the objective function foreach parameter by combining the design velocities with the surface sensitivities ofthe adjoint solution. To do so the product of ∂J

∂nkthe change of the objective function

over the normal displacement of the surface and ∂nk

∂αnthe local normal displacement

of the model surface due to parameter variation and the area is mapped for alltessellation elements k.

S =∂J

∂αn=∑k

∂J

∂nk

∂nk∂αn

Ak (5.1)

This scalar value is stored and displayed in a table for every parameter. Theyshow the user which of the parameters have the biggest influence on the objectivefunction and in which direction they should be changed in order to have a positiveinfluence on the objective. A suitable algorithm can then be used to determine theappropriate step size[19].The mapping algorithm imports a meta data set filled with the triangulated surfacedescription of the CAD-System. Included is the normal of the triangles, the localcoordinates of every knot of the continuous surface description, together with a sur-face assignment.

The algorithm determines a corresponding CAD element for every surface elementof the CFD grid. This process is scaled with the number of surface elements of thegrid and multiplies with the number of CAD surface elements. This process is fullyparallel implemented to ensure an efficient search.

Figure 5.8 displays the idea behind the mapping process. Blue surface elementsrepresent the CFD surface description, while white surface elements represent theCAD surfaces. Blue and white spheres respectively represent the position of thecentroids of the elements. The red arrows are showing the vectors between the cen-troids of CFD and CAD elements (scaled with 100 for better visualisation). Theimage on the left shows the section between a skeg and the propeller shaft and theimage on the right shows the section between rudder and hull[20].

55

Page 63: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 5.8: Mapping Process [20]

A possible problem of the mapping process is that gradients of high resolution fol-lowing the CFD representation might be depicted with reduced accuracy in case oflow parametric formulation of the CAD model. If the triangle elements of the CADdescription are much larger then the surface elements of the CFD surface, indepen-dent of their shape, a loss of gradient values could occur. The mapping algorithmwill use the centroid of the CAD triangle which is closet to the centroid of theCFD element. Doing so could evoke a case where some gradient values will not bemapped because there is no CAD element to which they have the shortest distanceto. This can lead to a smoothing of the gradients which might be beneficial in somecases but the loss of highly local occurring gradients could change the results of theoptimization significantly.

Due to the way the mapping algorithm works it is important that the elementsof the CAD and CFD surface describe the exact same surface otherwise incorrectsensitivities will be mapped at wrong coordinates. Thereby, causing wrong gradi-ents and consequently enabling the possible success of the optimization. This alsoimplicates the boundaries of the surface where incorrect sensitivities seem to appearhave to be taken into account when setting up the optimization. Design parameterswhich only have a local influence in these areas of the parametric model have to beevaluated with precaution.

To verify these implications further, for each optimization in chapter 6.1.1 a studyregarding the influence of the surface tessellation is executed.

5.3 Coupling of CAESES and Star CCM+

To finalize the set up of the optimization Star CCM+ and CAESES have to beconnected, so that every run of the CFD tool is triggered automaticly with the newSTL, which have been determined by the optimization algorithm. The optimizationcycle consists of five parts which are displayed in the following figure.

56

Page 64: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 5.9: Principal of the optimization cycle

The parametric model and the watertight STL created from it, is exported and usedby Star CCM+, which is run in batch mode and controlled by CAESES throughjava scripts. The scripts are implemented into the software connector. The softwareconnector enables CAESES to control most external CFD software and result filescan be imported and utilized to create parameters. These result parameters areneeded as the objective of the optimization algorithms.

Figure 5.10: Software Connector of CAESES with Star CCM+

The primal flow computation is started with the baseline model of the KVLCC. Itruns with the chosen number of iterations until convergence and the residuals havereached the machine precision level. The following step, controlled by CAESES, isto initialize the adjoint solver. Additionally, the maximum step number is increasesand the adjoint computation is started. After reaching the maximum steps witha sufficient decrease of the residuals, the surface sensitivities are exported. NowCAESES maps the sensitivities of the adjoint solution with the design velocities tocompute the gradients for each parameter. Dakota then conducts a multi-objective

57

Page 65: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

optimization to determinate the changes to each parameter for the next variants.Then the new STL is created and the cycle starts again until the convergence in theoverall drag is satisfied or the maximum number of iterations has been reached.

5.3.1 Dakota Search Algorithm

Dakota is an open source algorithm included in CAESES that can be used for multi-objective gradient based optimizations. The gradient of each input value is evaluatedand a step size for a new variant estimated. This is done for each values that is setas an input [21]. With the chosen template two main settings are the maximumnumber of variants which are computed and the rate of convergence at which theoptimization circle will be stopped.

The result of the mapping process is a table where for each chosen design vari-able the variation delta and the gradient in respect to the cost function are saved(figure 5.11). These gradients are used as the objectives for the Dakota algorithm.After each variant the table will be updated with the current values. The step sizefor each parameter depends on the gradient and the boundaries chosen in CAESES.These boundaries can be chosen for various reason. It might be due to the stabilityof the model or geometrical constrains.

Figure 5.11: Table of Sensitivities

The chosen gradient based Dakota template tries to minimize the gradient until itconverged to zero, or until the parameter reached the chosen boundary. Overallthe optimization will stop as already stated if the maximum number of iterations isreached or if the convergence of the objective function is reached.

5.4 XCB Evaluation

The longitudinal center of buoyancy of the initial KVLCC tanker is at +3.48% of themid point of the hull. So without any kind of influence from the center of gravity,

58

Page 66: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

the KVLCC will float with a trim.

The XCB of each variant is tracked to ensure that the change is not in an unreason-able dimension. It can be assumed that the dead weight of the ship is distributedstronger at the stern, because of the location of the heavy parts such as the deckshouse and the engine. So a shift to a negative position in regard to the mid pointof the hull should not result in a valid design. It was chosen that an XCB between+6.00% and +0.5% percent is acceptable. Although the runs of the optimizationshould be evaluated carefully. It might be possible to create variants with a strongshift in the XCB, but also a drastic improvement of the resistance. In this casegreater measures to create an untrimmed swimming state of the KVLCC, such achanging the weight distribution might be acceptable.

5.5 Displacement

As already stated the displacement of each variant should be kept at a constantvalue. The displacement of the KVLCC at seven meter length is 3.2724m3. A socalled Brent algorithm is implemented within the initial adjoint optimization. It isa single objective search algorithm, which will track the displacement of each newvariant and in case it is lower then 3.2724m3, increase the draught, before goingback to the initial adjoint circle. The process follows these steps:

1. New variant created by the Dakota search algorithm

2. Inequality Constrain regarding the displacement is checked. If the inequalityconstrain is not broken, proceed to Step 6

3. If the inequality constrain is broken, the Brent algorithm is triggered

4. Draught will be increased sequentially while checking the displacement un-til the inequality constrain is kept again (with an accepted deviation of onepercent)

5. STL and values transferred to Star CCM+ via the software connector areupdated

6. Star CCM+ is launched with the updated variant.

59

Page 67: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

6 Adjoint Optimization

In this chapter the different optimizations that have been run are presented. Foreach optimization the level of difficulty and the number of design parameter is en-hanced, because the ideal set up of an adjoint optimization would include all designparameters of the parametric model. As a last optimization the objective functionis changed from the resistance of the hull to the wake fraction coefficient of the pro-peller to analyse the effects of a different objective function. For each optimizationgradients were calculated manually to verify the quality of the gradients. Further-more, an analyses of the influence of the CAD surface tessellation is executed and aconvergence study of the gradients depending on the number of cells of the grid.

Due to the many different factors such as the CAD model, grid, primal and adjointsolution, a first, fairly simple example was executed to analyse the behaviour of theoptimization and to verify if an optimization leads to a correct result. For the secondoptimization only two parameter are chosen, whose influence on the surface modelis the strongest in areas of the hull, where the highest adjoint gradients are located.A third optimization is done with a number of different parameters in the bow andaft of the hull. This case is closest to what would be executed in an industry setting.

As a last optimization a different objective function was implemented. The wakefraction coefficient w is used to evaluate if an objective function, where the param-eters have higher gradients, generates more reliable results and is less likely to beinfluenced by numerical errors in the computation of the gradients.

For each parameter used in the different optimizations the sensitivity can be eval-uated by manually calculating the gradients. Therefore, for a parameter α, theobjective function is calculated after executing computations with atleast four dif-ferent ∆α additionally to the baseline. By using central differentiation these resultsare used to calculate the gradients:

gradJ =J (αn + ∆αn)− J (αn −∆αn)

2∆αn(6.1)

Following this method, the sensitivities Sα of the adjoint solution and the centraldifferentiation gradients should be equal, but the adjoint solution is only valid for∆αn → 0, so derivation to a degree has to be expected. The error ξ of the sensitivityis calculated using:

gradJ = ξ · Sα, (6.2)

Following this formulation, if ξ = 1 the sensitivity of the adjoint method wouldbe identical to the manually computed central difference. However, it is importantto adjust the sensitivities to the central difference interval, to ensure a meaningfulcomparison.

An important issue would be sensitivities with an incorrect sign because the Dakotaalgorithm would be effected negatively. The step size ∆αn is calculated by Dakotaaccording to the sign and the design space. The design space is the multi-dimensional

60

Page 68: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

space defined by the number of parameters α and the range in which they can varyin the optimization. Therefore, a gradient with an incorrect sign would lead to anincrease of the objective function, which might be bigger then any decrease fromother parameter. Thus leading to a insignificant result.

6.1 Optimization I

The first optimization includes the parameter for the beam of the KVLCC. The rea-son behind this approach is to ensure that the principle behind the adjoint methodis working. Furthermore, as the objective function of the adjoint solution, one op-timization is executed for the shear and one for the pressure. Furthermore, thissimple set up is used to evaluate the influence of the CAD surface tessellation.

In figure 6.1 the manually calculated gradients from table 6.1 are plotted togetherwith the sensitivities following the adjoint solution.

Figure 6.1: Manually Computed Gradients of Shear and Pressure compared to theSensitivities

Parameter Sensitivity Central Difference ξBeam Pressure -0.22707 0.115005 -0.50672Beam Shear 0.123302 0.1427 1.157321

Table 6.1: Comparison of Manually Computed Gradients and the Sensitivities

An optimization where the beam is the only parameter leads to very different re-sults, depending on whether the shear or the pressure fore is the objective function.The shear force gradient a very close to the manually computed gradient. Hence,Dakota will end its run at the smallest possible boundary for the beam and, thereby,also at the smallest possible resistance.

If the optimization is executed with the the pressure force as the cost functionit results in an unimproved design. Due to the incorrect gradient Dakota calculatesa first step ∆Beam in the wrong direction and this leads to an increase of the drag.As a result the Dakota algorithm changes the direction of the step for ∆Beam ofthe next variant. This leads back to the baseline after six variants, where the opti-mization stops due to the convergence criteria. The complete steps and the newlycomputed sensitivities can be seen in table 6.2. The problem regarding the beamparameter lies in the combination of the locally occurring gradients near the forward

61

Page 69: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

shoulder and the significant and global change in the design caused by the beam pa-rameter. The adjoint sensitivities indicate a positive effect of a local change, whichleads to a very large geometry change due to the parametric formulation. This effectis not captured by the adjoint method since it is only correct for very small changes.The design velocities of the beam and the parametric adjoint sensitivities can befound in figure 6.2. It shows that while the biggest influence the beam parameter hason the hull, occurs on the FOS, this area has a adjoint sensitivity of zero. This leadsto the sensitivities plotted on the hull as shown, which, as shown by the manuallycomputed gradients, is not correct.

Figure 6.2: Design Velocity of the Beam and Adjoint Parametric Sensitivity

Dakota Iteration Beam [m] Drag Total [N] Sensitivity SDakota beam des0001 58 18.052517 -0.22707 vDakota beam des0003 60 18.6302856 -0.2270532Dakota beam des0004 58.104915 18.100537 -0.2271974Dakota beam des0005 58.003439 18.056519 -0.227493Dakota beam des0006 58.00 18.052517 -0.22707

Table 6.2: Progression of the Beam Optimization

The result of this very simple example shows that the complete set up works in prin-ciple, and even in the case of low quality gradients or incorrect, no aggravated finalvariants are produced. This example also shows the importance of the parametricformulation and how a wrongly computed gradient can influence the optimization.

6.1.1 Influence of the Surface Tessellation

As described in chapter 5.8 the size of the CAD surface elements in comparison tothe CFD surface elements could lead to negative effects when mapping the adjoint

62

Page 70: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

sensitivities from Star CCM+ to the design velocities from CAESES. To evaluatethis question the initial gradients of the shear and pressure are calculated for twodifferent surface tessellations. The results are displayed in the following table. Itclearly shows that the initial tessellation with around 1.7 · 105 is sufficient and thequality of the parametric adjoint sensitivities cannot be improved by increasing thisnumber.

Number of CAD Elements Sensitivity Pressure Sensitivity Shear1.7 · 105 -0.22707 0.1233023.5 · 105 -0.227070012 0.123301

Table 6.3: Sensitivities computed with different Surface Tessellation

6.2 Optimization II

The second optimization uses only two parameters influencing the stern of theKVLCC in an area where high adjoint sensitivities could be observed. The designvelocities of these parameters can be found in the appendix. Due to the simplicity ofthis optimization a complete response surface could be calculated and compared tothe steps of the optimization, thereby giving a better understanding of the adjointmethod and also allowing be validated if the minimum resistance is found.

6.2.1 Validation of Gradients

As a first step, the two dimensional sensitivities of the baseline are compared to themanually computed central differences, as described earlier. These results can beseen in figure 6.3 and table 6.5. Furthermore, the response surface is shown in figure6.4. It clearly shows a minimum of the optimization with these two parameters andthe boundaries as shown in the surface plot is located at ffd-aft-01 = 0.1 and ffd-aft-01 = 0.01. Both sensitivities are very close to the manually computed gradients,showing that the adjoint solution and the coupling with the design velocities hasthe potential to deliver meaningful results.

Figure 6.3: Manually Computed Gradients in Comparison to Sensitivity

63

Page 71: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Parameter Sensitivity Central Difference ξffd aft 01 -0.00657098 -0.010564 0.82064ffd aft 02 -0.00531433 -0.0064875 0.622

Table 6.4: Comparison of Manually Computed Gradients and the Sensitivities

Figure 6.4: Response Surface

6.2.2 Convergence Study of the Gradients

To evaluate if the quality of the sensitivities is dependant on the quality of the grid,a mesh dependency study for the two parameters of this optimization is conducted.Therefore, the sensitivities Sα are computed for two additional grids. The resultscan be seen in figure 6.5. A coarse mesh was used with a cell number of 8 · 105, thegrid which is used for all computations, following the initial validation, and a thirdgrid with around 7 ·106 cells. It clearly shows a convergence of the sensitivities. Thesign of the sensitivities is not changing and the proportion between the two staysat a constant level. This behaviour could also be observed for other parameters.This clearly shows that the problems with the accuracy of the parametric adjointsensitivities are not connected to the grid that is used for the computations of thisthesis.

64

Page 72: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 6.5: Sensitivities Plotted over the number of Cells

6.2.3 Final results

The optimization with the two described parameters leads to the results in table6.5. It shows that the result is identical to the minimum computed and displayedin the response surface. This result is not surprising due to the shown accuracy ofthe gradients. The improvement of total resistance is small since the two parameterare only influencing the hull in a small and local area. The changed hull is shownin figure 6.6 in comparison to the baseline of the KVLCC.

Iteration ffd aft 01 ffd aft 02 DragTotal aft-01 aft-021 0 0 18.045335 -0.657098 -5.314332 0.0012366313 0.01 18.036993 -0.643597 -5.29683 0.1 0.01 18.001275 -0.53597 -5.27735

Table 6.5: Progression of the 2D-Optimization

Figure 6.6: Sections of the Baseline in Black and Sections of the Final Result in Red

65

Page 73: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

6.3 Optimization III

A third optimization is conducted with an increased number of parameters. Thisoptimization is close to an ideal set up, where a high number of parameters areincluded, influencing all parts of the geometry. Ideally this leads to an improveddesign, while only needing very few variants. Different parameters are chosen, influ-encing the bow. Furthermore, the two parameters of the previous optimization andthree more parameters influencing the skeg of the KVLCC are used. The figuresshowing all design velocities of these parameter can be found in the appendix.

This advanced optimization should evaluate if a significant improvement with re-spect to the resistance can be achieved with the adjoint method. Additionally thedisplacement adjustment as presented earlier will also be applied to this example.

6.3.1 Validation of Gradients

The gradients of the parameter influencing the skeg, as shown for the previous opti-mization, proved to deliver accurate sensitivities. This is with the exception of theparameter influencing the area above the propeller shaft, as seen in figure 6.7. Itwas excluded from the optimization because of its inaccurate results.

The manually computed gradients of the other parameters show a very steady dis-tribution of the gradients without fluctuations. Therefore, even if the sensitivitieswould be inaccurate, they will not have a negative effect and on the optimizationbecause, independent of the step size, the direction will be correct and will lead toan improvement of the objective function with each new variant.

Figure 6.7: Manually Computed Gradients in Comparison to Sensitivity of the aft

66

Page 74: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 6.8: Manually Computed Gradients in Comparison to Sensitivity of the Bow

The sensitivities of the bow parameters in comparison to the manually computedgradients are more problematic, as shown in the following figure 6.8. They areunsteady and they have local minima, which makes it more important to havehighly accurate sensitivities. Inaccurate sensitivities and the following step sizecould lead to an increase of the objective, as described earlier. The optimizationis only executed with five parameters influencing the skeg due to the presentedproblems with the other parameters.

6.3.2 Final Results

The optimization leads to an improvement of the resistance after six iterations. Thenew shape of the KVLCC in comparison to the baseline can be seen in figure 6.9.The sections show that a clear loss in the displacement is at hand for the resultof the optimization. To evaluate if the improved variant still offers an advantagewith an adjusted displacement, the draft is increased until the initial displacementis met. The best design without the adjusted displacement improved the resistanceby 2.905%. After adjusting the draft the improvement reduced to 1.9%. The resultdata can be seen in table 6.6, while the complete set of data of all iterations canbe found in the appendix. The results also show the influence of the pressure andthe shear force, with the majority of the improvement in resistance coming from theimproved pressure resistance.

67

Page 75: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 6.9: Sections of the Baseline in Black and Sections of the Best Design in Red

KVLCC Best Design Draft CorrectionRT [N ] 18.0534 17.52917 17.710468RF [N ] 14.5015 14.4106 14.5453RP [N ] 3.30914 3.11757 3.16507∇[m3] 312210 306515 312210Correction ∆Draf = 0, 3375mImprovement [%] 2.905 1.9

Table 6.6: Data of the Optimization

Although an improvement is reached with the adjoint method, a number of factorshave to be considered when setting up the optimization. As shown for this opti-mization, conducting a gradient study to verify the sensitivities obtained from thefirst adjoint solution can give an indication of which parameter might be wronglycalculated. This way they can be excluded from the optimization. Therefore an op-timization can be done with a reduced number of parameters. This adjoint workflowcould follow these steps:

• Compute primal and adjoint solution

• Identify the most important parameters from the complete 50 parameters ofthe geometry

• Manually computing the gradients to verify errors of the sensitivities

• Executing the optimization with the reduced number of parameter

This method still gives an advantage compared to traditional gradient based opti-mizations, due to an improved design that is reached after only six iterations of thefinal optimization. A standard SOBOL algorithm would already need α2 variantsto fully capture the design space. Even if the number of computations of the ad-joint approach is increased to verify the quality of the sensitivities, in total it stillis significantly lower.

68

Page 76: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

6.4 Optimization Wake Fraction Coefficient

A major problem in the previous optimizations lies in the accuracy of the computedgradients of the adjoint method. This lead to the necessity of the pre-study of thegradients, which in an ideal adjoint optimization would not be needed. The chosenobjective function of the total resistance, when evaluated with local parameter canonly lead to small gradients, which then are more prone to numerical errors andinaccuracies. Therefore, the objective function is replaced by the wake fractioncoefficient of the propeller. This approach should show that results can be improvedwhen choosing an objective function where higher gradients of the parameters canbe expected. The wake fraction coefficient is calculated with:

w = 1− vxvs

(6.3)

Where vx is the velocity in the propeller axis and vs the ships velocity. The wakefraction coefficient depends on the location of the propeller, on its size and has asignificant influence on its efficiency. For ships with one propeller the wake fractioncoefficient ranges between 0.2 and 0.45, while ships with two propellers have a lowerw meaning a higher efficiency. Furthermore, a higher block coefficient leads to ahigher wake fraction coefficient. Following these assumptions, the w of the KVLCCshould be at the end of the described spectrum.

To capture the velocity in the propeller axis, an additional mesh refinement wasintroduced to the initial grid. Furthermore, the propeller is modelled as an inter-nal cylinder mesh part due to the requirements of the adjoint solution. Objectivefunctions can be formulated very differently. It can be a pressure drop betweenboundaries, pressure, shear forces or a combination of them as shown in this thesis.Nevertheless, they can not be connected to surfaces, which are not boundaries ofa domain. So the inflow boundary of the cylinder surface is used to measure andaverage the velocity. For the updated grid, the number of cells increases to 2.6 · 106.Detailed views of the new grid and the wake refinement can be found in the ap-pendix. Apart from the mesh, all other settings regarding the solver, boundariesand steps size are unchanged.

Figure 6.10: Surface Sensitivities with the Wake as the Objective Function

69

Page 77: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

The initial computation lead to a wake fraction result of 0.5526 and the velocityin the propeller axis shown in figure 6.11. For more detailed analyses of the wakefraction one would also need to the propeller shaft. This area influences the resultsdue to the very low velocity in these cells. Since the wake analysis should only beexecuted exemplary in the scope of this thesis, these improvements are neglected.This also is the most likely cause of the wake fraction coefficient being higher asnormally expected for this type of vessel.

Figure 6.11: Wake of the KVLCC Baseline on the left, Result of Optimization onthe right

The adjoint solution, which is conducted following the converged primal solution,leads to the surface sensitivities as shown in figure 6.10. The results looked satisfy-ing since no fluctuations or incorrect cells occur. Further details of the sensitivitiesof the adjoint solution are shown in the appendix. The following optimization wasrun with eight parameters who all influence the shape of the ship in the aft areabecause they are most likely to influence the quality of w. The design velocities arethe same as of the optimization of the aft ship.

After 13 variants a significant improvement of the wake fraction coefficient of over20 percent could be observed, while the total resistance improved slightly as well.The complete iterations are presented in the appendix.

70

Page 78: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

KVLCC Best Design Draft Correction Length Correctionw 0.5526 0.4582 0.45692 0.45887Rt[N ] 18.0534 17.8707 17.912873 17.9089∇[m3] 312210 310659.31 312210Correction ∆Draf = 0.09m ∆Lpp = 1.302mImprovement [%] 17.182 17.3246 16.97

Table 6.7: Data of the Wake Optimization

The significant improvement occurred with a decrease in the displacement, so toadjust this effect the length of the parallel midship or the draft of the KVLCCare increased. The results are shown in table 6.7. The improvements of the wakefraction coefficient is still strong with around 17 percent, while the total resistancestays within a similar range. The changed design of the KVLCC is displayed in thefollowing figure.

Figure 6.12: Sections of the Baseline in Black and Sections of the Final Result inRed

Analysing the result showed that, although the wake fraction coefficient improved,the homogeneity of the wake is not as good as the baseline. The homogeneity of thepropeller wake is also important for its efficiency, so for future works in this areait would be important to create a new objective function. This, in addition to thewake fraction coefficient, also includes a measurement regarding the homogeneity.Furthermore, there is an area of very low velocity near the propeller shaft, whichhas not been modelled, to simplify the problem. This area of very low velocity getsshifted slightly upwards, which would lead to a decrease of w.

71

Page 79: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 6.13: Change of the Wake plotted over the Number of Iterations

Nevertheless this optimization shows that with different objective function, the ad-joint method leads to very good results while only needing a very small number ofvariants. The improvement of 17 percent is reached with only 13 variants and onefurther computation with the adjusted draft.

72

Page 80: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

7 Conclusion

In the scope of this thesis a parametric adjoint optimization of the KVLCC tankerhas been executed, to investigate the potential of adjoint methods, as an alternativeto common gradient based optimization processes. For the fully automatic optimiza-tion circle the Computer Aided Engineering Platform CAESES has been coupled tothe commercial CFD tool Star CCM+.

At first a primal flow solution of the KVLCC tanker has been set up and a griddependency study has been implemented. Different settings in regards to the solver,discretisation and turbulence model have been tested to achieve residuals at machineprecision, which were needed for the adjoint solution. The results of the primal so-lution have been validated with the CFD and experimental Data of the GothenburgWorkshop of 2010. The validation showed satisfying similarities between the exper-imental data and the obtained CFD results.

An adjoint solution was realized to obtain the shape sensitivities of the KVLCCtanker. In the process, the influence of different types of mesh, a structured and anunstructured mesh were evaluated, and significantly better results for unstructuredmeshes were observed. Furthermore the necessity of residuals at machine precisionwere analysed to verify if time saving measures are possible for future works in thisfield. The results suggested that a not fully converged computation could have adrastic effect on the sensitivities resulting in a change of sign and gradient distribu-tion of lesser quality by showing fluctuation between negative and positive values inneighbouring cells.

A fully parametric model was created in CAESES and the quality of the modelin respect to the original KVLCC hull was evaluated with very satisfying results.This evaluation is important to ensure that the results of the optimization are nota result of substandard CAD geometry, but a result of the adjoint method. StarCCM+ and CAESES were coupled to allow a fully automatic optimization and tomap the sensitivities of the adjoint solution with the design velocities of the CADmodel. Furthermore, the CAD surface tessellation was tested, due to a possiblenegative effect on the solution, based on the mapping algorithm.

A gradient based multi objective algorithm was used in the optimization. Differentoptimizations were tested, with an increasing number of active design parameters.The first goal was to verify that the optimization was functional with a very basicexample. The second goal was to evaluate the gradients obtained by the adjointmethod to verify the quality of the adjoint solution. It became apparent that theaccuracy of the sensitivities could is still be improved, leading to difficulties in theoptimization. Despite these difficulties, the adjoint method lead to an improvedvariant of the KVLCC tanker. The adjoint method can be beneficial in comparisonto gradient based optimization methods. Although manually computed gradientsare required to exclude parameters with faulty gradients, the number of computa-tions needed is still significantly reduced while maintaining a high number of freeparameters.

73

Page 81: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

As a further test the objective function was changed from the total resistance of theKVLCC to the wake fraction coefficient of the propeller. This lead to an improve-ment result. The wake fraction coefficient could be decreased drastically, while noreduction of the number of design parameters was needed. These positive effects arecaused by the higher gradients of each parameter on the chosen objective function,which thereby reduc the susceptibility to numerical errors. As another positive ef-fect a manual gradient study was not required, further reducing the numerical effortfor such an optimization. As a consequence the chosen objective could be improvedwith significantly lower computational effort as in a gradient based optimization withthe high number of parameters. This proves the important role parametric-adjointoptimization can have in the future when conducted under the right circumstances.

7.1 Future Outlook

For future works it would be worthwhile to use the adjoint approach in combinationwith a free surface model. This would lead to a wider spectrum of parameters andpotentially a bigger improvement of the resistance. An adjoint approach with a freesurface could then also be applied to different vessel types, where the wave resis-tance has a higher impact. Another possibility would be an optimization, where adouble body model is used for the adjoint solution, while also computing each newvariant with a separated free surface model. This would lead a wider range of usableparameters and more reliable results.

The wake optimization could be conducted with an improved objective function,which not only includes the wake fraction coefficient, but also a measurement re-garding the homogeneity of the wake.

Furthermore, different adjoint approaches, the discrete and the continuous approachcould be analysed to evaluate how the quality of the adjoint sensitivities could beimproved. If the accuracy of the sensitivities is improved, the cost function can bechosen with less caution and an optimization could be conducted without restrictionsin the number of design parameters.

74

Page 82: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling
Page 83: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

References

[1] J. H. Ferziger, M. Peric: Computational Methods for Fluid Dynamic, 3rd Edi-tion, 2002

[2] Star CCM+ User Guide, Version 12.02, 2017

[3] Florian Menter, Improved Two-Equation k-omega Turbulence Models for Aero-dynamic Flows In: NASA Technical Memorandum 103975, 1992

[4] Applied Computational Fluid Dynamics, Andre Bakker, http://www.bakker.org/dartmouth06/engs150/05-solv.pdf

[5] Turbulence modeling for CFD, David C. Wilcox, La Canada, Calif., DCW In-dustries, 2002

[6] Numerische Simulation technischer Stroemungen mit Fluid–Struktur–Kopplung,Sieber, Nuernberg, 2001

[7] Multiphase Adjoint Optimization for Efficient Calculation of Rigid Body Posi-tions in Navier-Stokes Flow, Julia Susanne Springer, Memmingen, 2014

[8] Fluent User Guide, Fluent Inc. 2001

[9] Das Adjungiertenverfahren in der aerodynamischen Formoptimierung, Gauger,Braunschweig, 2013

[10] Adjoint Navier–Stokes Methods for Hydrodynamic Shape Optimisation, Stuck,Hamburg, 2011

[11] Stroemungsmechanische Grundlagen zum Glattwasserwiderstand von Schiffen,Kruege, Vorlesungsskript, TU Harburg

[12] Hydronmechanik zum Schiffsentwurf, Schneekluth, Herford, 1988

[13] CFD in Ship Hydrodynamics—Results of the Gothenburg 2010 Workshop, Lar-son, Stern, Visonneau, 2011,

[14] ITTC, International Towing Tank C.: Recommended Procedures amd Guide-lines - Practical Guidelines for Ship CFD Applications. (2011)

[15] ITTC, International Towing Tank C.: Recommended Procedures amd Guide-lines - Uncertainty Analysis in CFD. (2002), Nr 7.5-02-03-01.1

[16] Leap Australia CFD Blog, https://www.

computationalfluiddynamics.com.au/turbulence-part-3-selection

-of-wall-functions-and-y-to-best-capture-the-turbulent-boundary-layer/

[17] Schiffshydrodynamik I, Kracht, Berlin, 2007

[18] Feasibility Study on Numerical Towing Tank Application to Predictions of Re-sistance and Self-Propulsion Performances for a Ship, Jin, IL-Ryong, Kwang-Soo,Suak-Ho, Maritime and Ocean Engineering Research Institute, 2010

[19] Parametric-Adjoint Approach For The Efficient Optimization of Flow-ExposedGeometries, Brenner, Harries, Kroeger, Rung, Marine 2012

75

Page 84: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

[20] Form-Pro, Adjungierte Formoptimierung bei aktiver Propulsion, Bundesminis-teriums fur Wirtschaft und Technologie Verbundvorhaben, Hamburg, 2010

[21] Dakota Users Guide, Version 6.4.0, Austin, 2016

76

Page 85: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

8 Appendix

Figure 8.1: Linesplan of the KVLCC

Page 86: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 8.2: Surface Sensitivities of Unstructured Grid, Plotted on the KVLCC Sur-face

78

Page 87: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 8.3: Surface Sensitivities of Unstructured Grid with Residuals above machineprecision

79

Page 88: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 8.4: Design Velocities of the Parameters used in Optimization II

Figure 8.5: Design Velocities of the Parameters used in Optimization III

80

Page 89: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 8.6: Design Velocities of the Parameters used in the Wake Optimization

Figure 8.7: Surface Sensitivities with the Wake as the Objective Function

81

Page 90: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 8.8: Refinement and internal Mesh of the Wake area

82

Page 91: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Figure 8.9: Refinement and internal Mesh of the Wake area

83

Page 92: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

Aft

BilgeFullnessPart1

Aft

Bilgeintery

FullnessCPC

below

shaft

Skeg

mid

curveFullness

Skeg

Upper

CurveFullness

DragTotal

Iter

atio

nV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

y1

0,51

0000

9,68

3245

0,51

0000

8,20

7864

0,28

0000

-0,6

6586

50,

5500

00-3

,200

684

1,01

0000

-28,

1295

1118

,053

312

20,

5100

049,

6832

450,

5101

798,

2078

640,

2800

00-0

,894

417

0,55

0000

0,34

0441

1,01

0001

2,48

6697

18,0

4889

93

0,51

0002

10,5

0644

60,

5100

908,

2592

080,

2800

00-0

,913

713

0,55

0000

-0,5

5286

01,

0100

002,

5647

3818

,058

780

40,

5100

099,

4160

210,

5104

508,

6003

830,

2800

00-0

,899

171

0,55

0000

0,14

1735

1,01

0001

2,53

3841

18,0

5725

25

0,48

4414

-9,4

1041

00,

4885

328,

6003

830,

2823

6423

,612

781

0,54

9100

-0,8

6186

91,

0034

292,

5338

4117

,819

354

60,

4835

287,

3114

430,

4877

837,

3334

130,

2824

46-0

,686

355

0,54

9069

-0,7

1839

71,

0032

002,

5032

8317

,810

636

70,

4500

005,

4494

820,

4541

545,

9789

740,

2855

93-0

,411

777

0,55

2363

0,10

9217

0,99

1721

2,51

4220

17,5

9357

88

0,45

4948

5,87

6116

0,45

9117

6,11

2188

0,28

5129

-0,4

7231

50,

5518

770,

1467

610,

9934

152,

5866

9017

,615

780

90,

4500

004,

5499

400,

4200

004,

3556

230,

2879

46-0

,353

477

0,55

1739

1,06

2841

0,97

7359

2,31

1588

17,5

2817

610

0,45

0000

4,46

7417

0,43

0729

5,31

8150

0,28

7207

-0,3

6373

00,

5519

350,

0300

820,

9818

702,

3690

5517

,529

743

110,

4500

00-4

,920

644

0,42

4398

3,27

2257

0,28

7643

-2,1

4797

90,

5518

20-1

6,00

0192

0,97

9208

2,36

9055

17,5

3786

512

0,45

0000

4,54

9940

0,42

0000

4,35

5623

0,28

7946

-0,3

5347

70,

5517

391,

0628

410,

9773

592,

3115

8817

,528

176

Tab

le8.

1:O

pti

miz

atio

nII

I,C

omple

teD

ata

84

Page 93: MASTERARBEIT Parametric-Adjoint Optimization of …...Abstract In the scope of this thesis an adjoint optimization of the KVLCC tanker is exe-cuted, by coupling the parametric modelling

Parametric-Adjoint Optimization of the KVLCC Tanker

nam

eA

ftB

ilge

Fullnes

sP

art1

Aft

Bilge

inte

ry

CP

Cin

ter2

xfa

ctor

Fullnes

sC

PC

bel

owsh

aft

Iter

atio

nV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

y1

0,51

001,

1069

0,51

000,

7220

0,03

25-0

,601

10,

2800

-0,1

494

20,

5054

1,06

120,

5070

0,70

550,

0350

0,02

740,

2806

-0,1

424

30,

4800

1,13

310,

4904

0,80

640,

0350

0,50

700,

2840

-0,1

324

40,

4800

1,19

360,

4723

0,91

370,

0350

0,51

780,

2878

-0,1

452

50,

4800

1,18

050,

4520

0,76

160,

0350

0,27

120,

2920

-0,1

500

60,

4800

1,13

560,

4500

0,78

340,

0350

0,30

930,

2924

-0,1

474

70,

4800

1,11

830,

4500

0,76

590,

0350

0,29

950,

2962

-0,1

449

80,

4800

1,18

800,

4500

0,75

740,

0350

0,29

460,

2993

-0,1

501

90,

4800

1,17

210,

4500

0,76

830,

0350

0,13

380,

3013

-0,1

547

100,

4800

1,35

460,

4500

0,62

550,

0300

-0,9

423

0,30

71-0

,172

211

0,48

001,

0443

0,45

000,

7052

0,03

440,

2638

0,30

21-0

,150

512

0,48

001,

2140

0,45

000,

7614

0,03

490,

1764

0,30

14-0

,154

013

0,48

001,

3546

0,45

000,

6255

0,03

00-0

,942

30,

3071

-0,1

722

Ske

gm

idcu

rve

Fullnes

sSke

gm

idta

nSke

gm

idT

ange

nt

star

tSkegUpper

CurveFullness

Wak

eV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

yV

alue

Sen

siti

vit

y0,

5500

-0,2

489

30,0

000

-0,0

004

18,0

000

0,00

121,

0100

0,09

380,

5526

0,55

10-0

,268

530

,000

0-0

,000

318

,000

00,

0010

1,00

960,

0970

0,54

260,

5567

-0,3

825

30,0

000

-0,0

006

18,0

000

0,00

061,

0075

0,05

200,

4931

0,56

30-0

,311

330

,000

0-0

,000

717

,999

90,

0006

1,00

510,

0501

0,47

430,

5700

-0,1

594

30,0

000

-0,0

007

17,9

999

0,00

061,

0025

0,05

800,

4573

0,57

00-0

,147

030

,000

0-0

,000

717

,999

90,

0006

1,00

220,

0460

0,45

510,

5700

-0,1

300

30,0

000

-0,0

007

17,9

999

0,00

060,

9999

0,04

170,

4545

0,57

00-0

,148

630

,000

0-0

,000

717

,999

80,

0006

0,99

790,

0482

0,45

430,

5700

-0,1

198

30,0

001

-0,0

007

17,9

998

0,00

060,

9966

0,04

530,

4535

0,57

000,

1774

30,0

001

-0,0

008

17,9

998

0,00

110,

9949

0,05

910,

4582

0,57

00-0

,117

030

,000

1-0

,000

717

,999

80,

0006

0,99

640,

0497

0,45

410,

5700

-0,0

648

30,0

001

-0,0

007

17,9

998

0,00

060,

9966

0,04

210,

4539

0,57

000,

1774

30,0

001

-0,0

008

17,9

998

0,00

110,

9949

0,05

910,

4582

Tab

le8.

2:O

pti

miz

atio

nW

ake,

Com

ple

teD

ata

85