You are on page 1of 113

PSZ 19:16 (Pind.

1/07)
UNIVERSITI TEKNOLOGI MALAYSIA

DECLARATION OF THESIS / UNDERGRADUATE PROJECT REPORT


Author’s full name : UMMU SAIYIDAH NAJIHAH BINTI ZAINUDIN

Date of Birth : 07 MAY 1995

Title :PREDICTIONS OF WAVE PATTERN AND HULL PERFORMANCE OF MODEL


MTC092 HULL FORM USING OPENFOAM.

Academic Session : 2017/2018

I declare that this thesis is classified as:

CONFIDENTIAL (Contains confidential information under the Official Secret Act


1972)*

RESTRICTED (Contains restricted information as specified by the


organization where research was done)*

OPEN ACCESS I agree that my thesis to be published as online open access


 (full text)

I acknowledged that Universiti Teknologi Malaysia reserves the right as follows:

i) The thesis is the property of Universiti Teknologi Malaysia

ii) The Library of Universiti Teknologi Malaysia has the right to make copies for the
purpose of research only.

iii) The Library has the right to make copies of the thesis for academic exchange.

Certified by:

SIGNATURE SIGNATURE OF SUPERVISOR

950507017178
MR NASRUDIN BIN HAJI ISMAIL
(NEW IC NO/PASSPORT) NAME OF SUPERVISOR

NOTES: * Date:
If the thesis2016
20 JUNE is CONFIDENTAL or RESTRICTED, please
Date: attach with
20 JUNE the letter from
2016
the organization with period and reasons for confidentiality or restriction.
We hereby declare that we have read this thesis and in our opinion this thesis is
sufficient in terms of scope and quality for the the award of Bachelor of Engineering
(Naval Architecture and Offshore Engineering).

Tandatangan : ………………………….........
Nama Penyelia : MR NASRUDIN BIN HAJI ISMAIL
Tarikh : 12 JUNE 2018
PREDICTIONS OF WAVE PATTERN AND HULL PERFORMANCE OF
MODEL MTC 092 HULL FORM USING OPENFOAM

UMMU SAIYIDAH NAJIHAH BINTI ZAINUDIN

A thesis submitted in fulfilment of the

requirements for the award of the degree of

Bachelor of Naval Architecture and Offshore Engineering

Faculty of Mechanical Engineering

Universiti Teknologi Malaysia

JUNE 2018
ii

I declare that this thesis entitled “Predictions of Wave Pattern and Hull
Performance of Model MTC 092 Hull Form Using OpenFOAM” is the result
of my own research except as cited in the references. The thesis has not been
accepted for any degree and it is not concurrently submitted of any other
degree.

Tandatangan : ....................................................
Nama Penulis : UMMU SAIYIDAH NAJIHAH BINTI ZAINUDIN
Tarikh : 12 JUNE 2018
iii

Specially dedicated to

My mother Fadzilah Binti Omar,

father Zainudin Bin Omar,

...

and you who gave me support all these time.


iv

ACKNOWLEDGEMENT

First of all, thanks to Allah S.W.T for the wisdom he bestowed upon me,
the strength, good health and blessing from him that make me able to complete
this thesis.

This thesis becomes a reality with the kind support and help of many
individuals. I would like to extend my sincere thanks to all of them.

First and foremost, I would like to express my sincere gratitude to my


advisor En. Nasrudin Bin Haji Ismail and Prof. Dr. Abu Hassan bin Abdullah for
the continuous support of my undergraduate project related research, for their
patience, motivation, guidance and constant supervision. Their guidance helped
me in all the time of research and the writing of this thesis.

Besides, I would like to gratitude towards my parents, Zainudin bin Omar


and Fadzilah binti Omar and to my daring siblings, for supporting me spiritually
and become my backbone throughout my journey in completing my degree
studies in general.

Lastly, I would like to express my thanks to my friends for their


continous support, advices and always there for me throughout my thick and thin
situation.
v

ABSTRACT

The prediction of hull resistance has become an important part in the ship
design industry. There is also of interest to investigate the wave pattern of the
hull to get desirable resistance properties. To make an accurate prediction of hull
resistance is very essential because it related to choose an appropriate engine
power of the propulsion unit. Thus, this research is to predict the performance of
model MTC 092 hull by simulating wave patterns around this hull form.
Secondly is to analyze the computed flow field which is expected to yield hull
resistance and free-surface wave pattern which will be compared with the model
testing results. Initially, a conceptual framework study of the predictions of wave
pattern and hull performance by using OpenFOAM was done from previous
research. Next, the MTC 092 model is modelled by using AutoCAD based on
the lines plan and particulars data given. Then, the model is exported into the
OpenFOAM by undergoing the resistance simulation such that the wave pattern
and resistance value is determined respectively. The result in terms of hull
performance is focusing on the resistance part which will be analyze using 𝑘 −
𝑤 SST method and it will be compared with the resistance experiment result.
The wave pattern of MTC 092 model in simulation will be compared to the wave
pattern of experimental data specifically on plan view. In conclusion, the
contribution of this study be able to increase the type research by using
OpenFOAM from previous study. The suggestion for ship design industry is that
the using of computational fluid dynamics (CFD) toolbox in predict of the hull
form performance shall be expanded in Malaysia so that they could improve their
vessel design process, reduce the production time and cost.
vi

ABSTRAK

Your text begins here Ramalan kepada rintangan badan kapal telah menjadi
sebahagian perkara yang penting dalam industry reka bentuk kapal. Terdapat juga satu
kajian yang menarik iaitu kajian terhadap pola gelombang ombak yang dapat
mengambarkan sifat rintangan kepada sebuah kapal. Ramalan yang tepat terhadap
rintangan sesebuah kapal adalah sangat penting kerana ia nya berkait dengan
pemilihan kuasa enjin untuk unit propusi. Oleh itu, objektif kajian dalam projek ini
adalah untuk meramal prestasi bentuk badan model MTC 092 dengan mensimulasikan
corak gelombang di sekitar bentuk badan kapal. Keduanya, adalah untuk menganalisis
medan aliran yang dijangka menghasilkan rintangan bentuk badan model dan corak
gelombang pada permukaan bebas yang akan dibandingkan dengan keputusan ujian
model. Pertamanya, konsep kajian mengenai ramalan corak gelombang dan prestasi
bentuk badan kapal dengan menggunakan OpenFOAM telah dilakukan dari
penyelidikan yang terdahulu. Seterusnya, model MTC 092 ini dimodelkan semula
dengan menggunakan AutoCAD berdasrkan pelan garis dan butiran data yang
diberikan. Kemudian, model itu dieksport ke dalam OPenFOAM untuk disimulasi
rintangan supaya corak gelombang dan nilai rintangan dapat ditentukan. Hasilnya dari
segi prestasi sebuah kapal, kajian ini hanya memfokuskan kepada rintangan bentuk
badan yang akan dianalisis mengunakan kaedah k-w SST dan hasinya akan
dibandingkan dengan keputusan dari eksperimen data. Corak gelombang juga akan
dibandingkan dengan corak gelombang dari eksperimen data walau bagaimana pun
ianya hanya dibandingkan dari pandangan atas. Kesimpulanya, penglibatan kajian ini
dapat meningkatkan jumlah jenis penyelidikan dengan menggunakan OpenFOAM
dari kajian terdahulu, Cadangan untuk industry reka bentuk kapal adalah penggunan
kotak alat dinamik cecair (CFD) haruslah diperkembangkan di Malaysia agar mereka
dapat memperbaiki proses reka bentuk kapal mereka, mengurangkan masa dan kos
pengeluaran.
vii

TABLE OF CONTENT

CHAPTER CONTENT PAGES

DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENT iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENT vii
LIST OF TABLE x
LIST OF FIGURE xi
LIST OF APPENDIX xiv

INTRODUCTION 1

1 INTRODUCTION 1
Introduction 1
Overview 1
Problem Statement 2
Objective 2
Scope 3

2 LITERATURE REVIEW 4
Introduction 4
Planing Hulls 4
Ship Resistance 5
Total Hull Resistance (𝑹𝑻) 5
viii

Components of Total Hull Resistance 6


Dimensionless Coefficients 8
Viscous Resistance (𝑹𝑽) 9
Friction Resistance 10
Wave-Making Resistance 11
Aspects on Flow Behaviour 11
Laminar and Turbulent Flow on Ship 12
Reynolds-averaged Navier-Stokes 13
k-ɛ model 15
k – omega SST model 16
Wake 17
Introduction to the OpenFoam 18
Pre-Processing 20
Mesh Generation 21
Salome 22
Solver 22
Post-Processor 23
ParaView 23
Linux Operating System 24
Kelvin Ship Waves 25
Size of domain 27

3 METHODOLOGY 29
Introduction 29
Overall Process of the Project. 30
Experiment Setup. 31
Equipment or Apparatus for Resistance Test.
32
Procedure for Resistance Test. 35
The Process of Simulation 40
3.3.3.1 Pre-processing. 42
3.3.3.2 Solving 48
3.3.3.3 Post Processing 51
ix

4 RESULTS AND DISCUSSION 56


Introduction 56
Resistance Test 56
Resistance Results 57
Wave Pattern Results 58
Discussion of Resistance Test 63
Discussion on Simulation Result 63

5 CONCLUSION AND RECOMMENDATION 67


Conclusion 67
Recommendation 68

REFERENCES 69
APPENDIXES A – C 71 - 97
x

LIST OF TABLE

NO. OF TABLE TITLE PAGE

Table 1 Basic Components of Resistance 6


Table 2 Linux’s program that equivalents to common Windows applications. 24
Table 3 List of Linux commands 25
Table 4 Domain particulars of MTC 092. 28
Table 5 Ship and Model Particulars Data of Hull Form MTC092. 42
Table 6 Resistance data at difference speed. 57
Table 7 Wave pattern analysis 58
Table 8 Ship and model particulars. 73
Table 9 Results of Resistance Test (model values) 73
xi

LIST OF FIGURE

NO. OF FIGURE TITLE PAGE

Figure 1 Example of planning hull. Error! Bookmark not defined.


Figure 2 Typical curve of total hull resistance 6
Figure 3 Basic of Ship Components 7
Figure 4 Ideal flow around a submerged body (Anthony et al., 2017). 10
Figure 5 : Flow around a body submerged in water (Anthony et al., 2017) 10
Figure 6 The turbulent inducers (sand strips) at the bow of MTC 092. 12
Figure 7 Typical water flow pattern around a ship’s hull (Volker., 2012). 12
Figure 8 Example of viscous flow and streamline flow around an airfoil. 18
Figure 9 Overview of OpenFoam structure (Jordi,2014). 19
Figure 10 Case Structure OpenFoam (Sirevaag, 2015). 19
Figure 11 Example of mesh generation in OpenFoam 21
Figure 12 Example of paraView interface. 23
Figure 13 Lengthwise and transverse waves (Ljubljana, 2004). 26
Figure 14 Geometry and size of domain . 28
Figure 15 Flow chart of project methodology. 30
Figure 16 Flowchart of resistance experiment. 31
Figure 17 Ship model MTC092 32
Figure 18 Towing tank and towing carriages. 32
Figure 19 Ballast weight. 33
Figure 20 Swinging frame. 33
Figure 21 Ruler and tape. 34
Figure 22 Data acquisition and analysis (DAAS) 34
Figure 23 Board and ship grid. 35
Figure 24 Model MTC092. 35
xii

Figure 25 Grid 2×2 on ship model body and board. 36


Figure 26 Weighed the model on the weight scale. 36
Figure 27 Balancing of the ship frame structure. 37
Figure 28 Transfer the model to the towing tank. 38
Figure 29 Tape the ballast weight 38
Figure 30 Attached the model to the towing carriage. 39
Figure 31 Wave pattern at the forward ship model. 40
Figure 32 The flowchart of the simulation 41
Figure 33 Lines Plan of MTC092. 43
Figure 34 Shear plan from front view in AutoCAD 43
Figure 35 Half Breadth plan from top view in AutoCAD. 44
Figure 36 Body plan from right view in AutoCAD. 44
Figure 37 Ship model of MTC092 from SW isometric view. 45
Figure 38 The domain around the hull. 46
Figure 39 Step to open the model *.igs file. 47
Figure 40 Complete meshing of MTC 092 in Gmsh. 48
Figure 41 System directory. 49
Figure 42 log. snappyHexMesh file 50
Figure 43 The filters menu. 53
Figure 44 Resistance of MTC 092 ship model at difference speed. 57
Figure 45 Wave pattern from forward view at the speed 14 knot. 58
Figure 46 Wave pattern from midship view at the speed 14 knot. 59
Figure 47 Wave pattern from aft view at the speed 14 knot. 59
Figure 48 Wave pattern from forward view at the speed 16 knot. 60
Figure 49 Wave pattern from midship view at the speed 16 knot. 60
Figure 50 Wave pattern from midship view at the speed 16 knot. 61
Figure 51 Wave pattern from forward view at the speed 18 knot. 62
Figure 52 Wave pattern from midship view at the speed 18 knot 62
Figure 53 Wave pattern from aft view at the speed 18 knot. 62
Figure 54 The ParaView visualization. 64
Figure 55 Result from surfaceCheck MTC 092.stl file model. 65
Figure 56 Model MTC 092 from SW isometric view. 66
Figure 57 The structure of ship hull before lofting 71
Figure 58 The complete ship hull geometry 71
xiii

Figure 59 The complete computational domain 72


Figure 60 Generated mesh around ship hull 72
xiv

LIST OF APPENDIX

APPENDIX TITLE PAGE


A SHIP HULL GEOMETRY 72
B SHIP & MODEL PARTICULAR 74
C DICTIONARY CODING SCRIPT 75
INTRODUCTION

Introduction

This thesis is about predictions of wave pattern and hull performance of model
MTC 092 hull form using OpenFOAM. This chapter will overview of the study,
problem statement, objective and scope of the study.

Overview

Model MTC 092 has been used in this study to predict the wave pattern and
hull performance. Hull form model MTC 092 is planning hull which widely used
around the world for recreational and other purposes. There many types of vessel that
used planning hull such as patrol boats, sportfishing vessels, service craft and for sport
competitions. This model MTC 092 is a high-speed vessel since the craft operating
with Froude number (Fn) larger than 0.4.

After that, this paper will be discussed any rises issues throughout the study of
prediction of wave pattern and hull performance of hull form model MTC 092. This
paper also will be presented the process flow and observation of the study to predict
the hull resistance and wave pattern of model MTC 092.
2

The open source computational fluid dynamic (CFD) which is openFoam


software will be used to analyse the resistance of planning hull model MTC 092.
Lastly, the topics that will be covered in this paper includes modelling MTC 092, the
steps operation in the openFoam software such as pre-processing, post processing and
solver and the limitation of the method used in the openFoam software.

Problem Statement

The problems need to be addressed in this project are:

i) The capability of the open source software in develop a simulation of the


wave pattern and the hull performance of hull form model MTC 092.

ii) The accuracy of the result from open source software when compared to
the towing tank result.

Objective

The objectives of the project as listed below:

i) To predict the performance of Model MTC 092 hull by simulating wave


pattern around this hull form.

ii) To analyse of the computed flow field is expected to yield hull resistance,
free-surface wave pattern which will be compared with the model testing
results.
3

Scope

The studies are focusing on the limitations stated below:

i) Using MTC092 hull: This model hull has been put through scale model
testing at MTC.

ii) Hull performance evaluation will be focusing only on wave pattern and
hull resistance.

iii) Prediction of wave patter will be analysed from plan view.

iv) A resistance experiment will be conducted to observe the wave pattern.

v) CFD computation will be done using OpenFOAM on Linux.


LITERATURE REVIEW

Introduction

This chapter discusses the literature study that has correlation to the wave
pattern and hull performance by using OpenFOAM. Selected previous methods
applied to the study were reviewed in this chapter. The key area of the study includes
ship resistance, wave pattern, OpenFOAM simulation, RANS equation and Linux
operating system.

Planing Hulls

Planing hull are typically fast patrol boats, racing boats, search, rescue boats
and fast small passenger ferries. Planing hull designs should normally be used for high-
speed vessels only that has Froude number more than 0.3. Figure 2.1 showed the
example of planning hull:
5

Figure 2.1 Example of planning hull.

Ship Resistance

Total Hull Resistance (𝑹𝑻 )

As a ship moves through the calm water, the ship will experienced a force
acting opposite to its direction of motion which this force called as total hull resistance
(R_T). This resistance is used to calculate a ship’s effective horsepower. Other than
that, the total hull resistance also functions of many factors such as ship speed, hull
form and ship power (Hudson et al., 2017).

The total of resistance increase as speed of the ship increases as shown in


Figure 2.2. The power required to propel a ship through the water is the product of
total hull resistance and ship speed, and so engine power increases even more rapidly
than resistance.
6

Figure 2.2 Typical curve of total hull resistance

Components of Total Hull Resistance

The Resistance of a ship at the given speed is the force that required to tow the
ship at a certain speed in calm water which assuming there is no interference from the
towing ship (Lewis, 1989). However, the total resistance 𝑅 𝑇 of the ship could be split
into two components that are frictional resistance 𝑅𝐹 and residuary resistance 𝑅𝑅 . It
can be concluded that the total resistance can be separated into four components which
independently of each other. The total resistance components are as shown in table
2.1 below:

Table 1 Basic Components of Resistance


Main Components Due to
Frictional resistance The motion of the hull through a
viscous fluid.
Wave-making resistance The energy that must be supplied
continuously by the ship to the wave
system created on the free surface.
Eddy resistance The energy carried away by eddies shed
from the hull or appendages and it severe
especially at stern part of the ship.
Air resistance The motion of the ship through the air.
7

The components of wave making resistance, eddy resistance and air resistance
are commonly known as residuary resistance. However, one of the main component
of residuary resistance is wave making resistance can be proved by Figure 2.3 below:

Figure 2.3 Basic of Ship Components

Nowadays the subdivision resistance of the ship is made up from different


components which related to each other in complicatedly way and the resistance
component can be obtained from the Equation 1 below:

RT = RF + RW + RViscForm + RAir + RRoughness + Rapp (Eqn. 1)

Where

RF Flat plate Resistance

RW Wave- making resistance

RViscForm Viscous form resistance

RAir Air Resistance

RRoughness Resistance due to hull roughness


8

Dimensionless Coefficients

Naval architects, engineers and scientists used dimensionless coefficients to


describe the performance of a system (Ayyub et al., 2012). Naval architects use many
dimensionless coefficients to describe the design and performance of a ship’s hull.
This dimensionless coefficients allow naval architect to compare model test result to
the full-scale ship data and it also used to compare the performance of several ship
types.

The derivation of the standard dimensionless coefficients is accomplished


through dimensional analysis. Total hull resistance is the sum of viscous, wave
making, and air resistance. The equation for the total resistance in terms of
dimensionless coefficients as shown below:

𝐶𝑇 = 𝐶𝑉 + 𝐶𝑊

Where: 𝐶𝑇 = coefficient of total hull resistance


𝐶𝑉 = coefficient of viscous resistance
𝐶𝑤 = coefficient of wave making resistance

As seen above the air resistance is not represented in dimensionless form, this
is because this dimensionless form of resistance produced of model testing and most
of models do not have superstructures. Hence, the air resistance is assumed as zero or
neglect the air resistance.
9

As said before, total hull resistance is a function of hull form, ship speed and
water properties, the coefficient of total hull resistance is found form the following
equation:

𝑅𝑇
𝐶𝑇 =
1 2
2 𝜌𝑉 𝑆

Where: 𝑅𝑇 = total hull resistance (lb)


𝜌 = water density (ls-𝑠 2 /𝑓𝑡 4 )
V = velocity (ft/s)
S = wetted surface area of the underwater hull (f𝑡 2 )

Besides that, naval architect also use a dimensionless form of velocity called the “
Froude number” (𝐹𝑛 ) which is one of the pioneers in ship model testing.

𝑉
𝐹𝑛 =
√𝑔𝐿

Where: V = velocity (ft/s)


g = acceleration of gravity (ft/𝑠 2 )
L = length of ship or model (ft)

Viscous Resistance (𝑹𝑽 )

A pressure distribution normal to the body of ship as the fluid flows around the
body as shows in Figure 2.4 a body submerged in an ideal (inviscid) fluid. In ideal
fluid these pressure forced are equal to the body experiences with no resistance
(Anthony et al., 2017).
10

Figure 2.4 Ideal flow around a submerged body (Anthony et al., 2017).

However, water is not an ideal fluid and therefore the body will experience
resistance. Figure 2.5 shows a hull submerged in a real fluid with viscosity. The fluid
particles that cling to the body was resulting a formation of a boundary layer where
the flow rapidly changes speed from zero speed at the side of the body to the free
stream speed (Anthony et al. 2017).

Figure 2.5 : Flow around a body submerged in water (Anthony et al., 2017)

There two forms of resistance happen which are friction resistance and viscous
pressure resistance. Friction arises from the shear stresses in the fluid and acts
tangential to the body meanwhile viscous pressure resistance acts normal to the body.

Friction Resistance

The friction of the water is acting over the entire wetted surface of the hull
causes of a net force that opposing the ship’s motion. This frictional resistance is a
11

function of the hull’s wetted surface area, surface roughness and water viscosity. Even
though water has low viscosity, water also produces a significant friction force which
opposing the ship motion.

Wave-Making Resistance

Wave-making resistance is due to the variation of pressure that produced from


irregularity of the ship’s form on the water are demonstrated as changes of the water
level exerted on the ship hull (Lewis., 1989). The wave-making resistance also can be
defined as the variation in pressure will causes waves which alter the distribution of
pressure over the hull and resulted in extra effective power.

Aspects on Flow Behaviour

The two significances type of flow occur when a streamlined body moves in a
straight horizontal line at constant speed in the water that are flow occur depending on
the transverse speed and to the Reynolds number. At the boundary layer of the hull,
the flow will act as a force on the body against the motion. Since the fluid is in direct
contact with the body surface, the motion produced at the fluid in the close vicinity is
in the same direction of the body moving. After that, the result in a layer of water will
gradually thicker from the bow to the stern and the boundary layer flow leaves the
body behind it in the form of frictional wake which moves in the same direction as the
body.

Besides that, it can be stated that the type behaviour of flow depending on local
Reynold number is better than depending on local speed. When the Reynold number
increase, the laminar breaks down, the fluid mixes transversally in eddying motion and
the resistance will increase (Lewis.,1989). This flow is called turbulent. Commonly,
the ship condition flow in the boundary layer is always in turbulent. After that, to make
12

sure the flow produce by the boundary layer of the model is turbulent flow, turbulence
inducers are attached to the model such as sand strips as shown figure 2.6 below.

Figure 2.6 The turbulent inducers (sand strips) at the bow of MTC 092.

Laminar and Turbulent Flow on Ship

The flow of fluid around a body can be divided into two general types of flow
which are laminar flow and turbulent flow. This two type flow of fluid related on the
extent of the viscous resistance that the type of flow it is experiencing (Volker., 2012).
A typical flow pattern around a ship’s hull showing laminar and turbulent flow is
shown in Figure 2.7.

Figure 2.7 Typical water flow pattern around a ship’s hull (Volker., 2012).
13

Laminar flow is characterized by fluid flow along the smooth lines in an order
minimal amount of frictional resistance. For a typical type of ship, laminar flow exists
for only a very small distance along the hull. As water flows along the hull, the laminar
flow begins to break down and become chaotic and well mixed. This chaotic behaviour
is referred to as turbulent flow and the transition from laminar to turbulent flow occurs
at the transition point shown in Figure 2.7.

Meanwhile, turbulence flow is characterized by the development of layer of


water along the hull moving with the ship along its direction of motion. This layer is
called boundary layer. Moving away from the hull, the velocity of water particles in
the boundary layer becomes less, until at the outer edge of the boundary layer velocity
is nearly that of the surrounding ocean (Virendra., 1984). The observation of this band
will reveal the turbulent nature of the boundary layer and perhaps it can see some of
the water actually moving with the ship. As ship speed increases, the thickness of the
boundary layer will increase, and the transition point between laminar and turbulent
flow moves closer to the bow, thereby causing an increase in frictional resistance as
speed increases.

Reynolds-averaged Navier-Stokes

The method of simulating turbulence is the RANS turbulence models. The


Rans turbulence models utilize a set of partial differential equations that can be
described only with help of the mean values. For incompressible fluids, the basic
equations for the averaged turbulent flow will be derived as shown below. These are
known as the RANS equations, (Versteeg et al.,2007):
14

The momentary velocity component is u, the time-averaged value is named u and the
fluctuating velocity has the letter 𝑢̅. After that with help of this definition the
decomposition can mathematically be written as:

𝑢 = 𝑢̅ + 𝑢′ , 𝑤 = ̅̅̅
𝑤 + 𝑤′ , 𝑣 = 𝑣̅ + 𝑣′ , 𝑝 = 𝑝̅ + 𝑝′ Eqn. 2.31

Analogously for the density and the temperature which considered as constant are
shown below:

𝜌 = 𝜌̅ + 𝜌′ , 𝑇 = 𝑇̅ + 𝑇′ Eqn. 2.32

The chosen averaging method takes the mean values at a fix place in space and
averaged over a time span that is large enough for the mean values to be independent
of it.

1 𝑡 +𝑡𝑡
𝑢̅ = ∆𝑡 ∫𝑡 0 𝑢 𝑑𝑡 Eqn. 2.33
0

The time-averaged values of the fluctuating values are defined to be zero:

𝑢̅′ = 0 , 𝑣̅′ = 0 , ̅̅̅


𝑤′ = 0 , 𝑝̅′ = 0 Eqn. 2.34

After that, the time-average of the last equation is written as:

̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝜕𝑢̅ 𝜕𝑢′ 𝜕𝑣̅ 𝜕𝑣 ′ 𝜕𝑤̅ 𝜕𝑤 ′
+ + + + + =0 Eqn. 2.35
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑦 𝜕𝑧 𝜕𝑧

A summary of rules for time-averaging shall be given:


15

̅̅
𝜕𝑢 1 𝑡0 +𝑡1 𝜕𝑢 𝜕 1 𝑡0 +𝑡1 ̅
𝜕𝑢
= ∫ 𝑑𝑡 = ∫ 𝑢 𝑑𝑡 = Eqn. 2.36
𝜕𝑥 ∆𝑡 𝑡0 𝜕𝑥 𝜕𝑥 ∆𝑡 𝑡0 𝜕𝑥

̅̅̅̅
𝜕𝑢′ 1 𝑡0 +𝑡1 𝜕𝑢′ 𝜕 1 𝑡0 +𝑡1 ′
= ∫ 𝑑𝑡 = ∫ 𝑢 𝑑𝑡 = 0 Eqn. 2.37
𝜕𝑥 ∆𝑡 𝑡0 𝜕𝑥 𝜕𝑥 ∆𝑡 𝑡0

The averaged derivatives of the fluctuations are also zero according to these rules, so
that the time-averaged continuity equation is:

̅
𝜕𝑢 𝜕𝑣̅ ̅
𝜕𝑤
+ + =0 Eqn. 2.38
𝜕𝑥 𝜕𝑦 𝜕𝑧

Now the Navier-Stokes equations will be time-averaged. The expressions for the
decomposition of the velocities are now substituted in to transformed Navier-Stokes
equation:

̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅ +𝑢′ )
𝜕(𝑢 ̅ +𝑢′)2
𝜕(𝑢 𝜕(𝑢̅+𝑢′)(𝑣̅+𝑣 ′) 𝜕(𝑢̅ +𝑢′ )(𝑤
̅ +𝑤′ )
𝑝 { 𝜕𝑡 + 𝜕𝑥 + + }=
𝜕𝑦 𝜕𝑧

̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝜕(𝑝̅+𝑝′) 𝜕 2 (𝑢
̅ +𝑢′ ) 𝜕 2 (𝑢
̅ +𝑢′ ) 𝜕 2 (𝑢
̅ +𝑢′ )
𝐹𝑥 − 𝜕𝑥 + 𝜇( 𝜕𝑥2 + 𝜕𝑦 2 + 𝜕𝑧2 ) Eqn. 2.39

k-ɛ model

These RANS equation will be predicted with the k-ɛ turbulence model. The k-
model utilize two extra transport equations deduced from the Navier Stokes equations.
These equations have been sampled from (Hjertager,2009). The first is turbulent
kinetic energy k and is described by the k-equation:
16

𝜕𝜌𝑘 𝜕 𝜕 𝜇𝑡 𝜕𝑘 𝜕𝑈𝑖
+ (𝜌𝑈𝑖𝑘 ) = [ ] − ̅̅̅̅̅̅̅
𝜌𝑢𝑖′ 𝑢𝑗′ − 𝜌. ɛ Eqn. 2.41
𝜕𝑡 𝜕𝑥𝑖 𝜕𝑥𝑖 𝜎𝑘 𝜕𝑥𝑖 𝜕𝑥𝑗

Here, first term is the transient term. Second is the convective term. Third term is the
diffusive transport and must be modelled. Fourth term is turbulent kinetic energy based
on the mean flow velocity. Fifth term is the viscous dissipation of turbulent kinetic
energy, which also must be modelled.

The second transport equation is the dissipation of turbulent kinetic energy and
is named the equation. Only the modelled form will be given:

𝜕𝜌𝜀 𝜕 𝜕 𝜇𝑡 𝜕𝜀 𝜀 ′ ′ 𝜕𝑈𝑖 𝜀
+ (𝜌𝑈𝑖 𝜀) = [ ̅̅̅̅̅̅
] + 𝐶1 [−𝜌𝑢 𝑖 𝑢𝑗 𝜕𝑥 - 𝐶2 𝜌 𝜀 Eqn. 2.42
𝜕𝑡 𝜕𝑥𝑖 𝜕𝑥𝑖 𝜎𝜀 𝜕𝑥𝑖 𝑘 𝑗 𝑘

Again, the first term is the transient. Second is the convective term. The third
term represents diffusive transport. Fourth and fifth term is the production and
destruction of respectively..

k – omega SST model

There are two equation model for the turbulence kinetic energy, k, and
turbulence specific dissipation rate, ω shows in the model equations below. The aims
of k-omega SST model is to overcome the deficiencies of the standard k-omega model
wrt dependency on the freestream values of k and omega ( Source: OpenFOAM
17

Extended Code Guide). This k-omega SST model also able to capture flow separation
on the ship hull.

The turbulence specific dissipation rate equation is given by:

𝐷𝐷𝑡(𝜌𝜔) = 𝛻 ⋅ (𝜌𝐷𝜔𝛻𝜔) + 𝜌𝛾𝐺𝜈 − 23𝜌𝛾𝜔(𝛻 ⋅ 𝑢) − 𝜌𝛽𝜔2 − 𝜌(𝐹1 − 1)𝐶𝐷𝑘𝜔


+ 𝑆𝜔,

and the turbulence kinetic energy by:

𝐷𝐷𝑡(𝜌𝑘) = 𝛻 ⋅ (𝜌𝐷𝑘𝛻𝑘) + 𝜌𝐺 − 23𝜌𝑘(𝛻 ⋅ 𝑢) − 𝜌𝛽 ∗ 𝜔𝑘 + 𝑆𝑘.

The turbulence viscosity is obtained using:

𝜈𝑡 = 𝑎1𝑘𝑚𝑎𝑥(𝑎1𝜔, 𝑏1𝐹23𝑆)

Wake

Wake is a flow around the ship’s model regarding to the body at a certain speed.
There are three components of the wake that are viscous wake, streamline wake and
wave make. The viscous wake is due to the frictional drag on the surrounding water
that found at the aft of the ship’s model. The viscous wake also called as frictional
wake. Besides that, this wake is in the greatest at the surface and in the central
longitudinal plane of the ship’s model. After that, this wake is decreasing downward
and outward on each side (Lewis, 1989).

Streamline wake is a flow that past the hull due an increased pressure
around the stern where the streamlines are closing. The streamline wake will be
greatest at the water surface and centre then decreases at downward and outward
18

(Lewis, 1989). Example for streamline wake and viscous wake flow on the ship model
as shown in Figure 2.8 below.

Figure 2.8 Example of viscous flow and streamline flow around an airfoil.

Lastly, at the ship body also forms a wave pattern on the surface of the water
which is called wave wake. The sum of the three components of wake is called nominal
wake which indicate in the absence of the propeller.

Introduction to the OpenFoam

OpenFoam is a free software which mean the users of the openFoam software
have the freedom to run, copy, distribute, study, change and improve the software. In
addition, OpenFoam is first and foremost a C++ library program of software designed
to fulfil a particular purpose such as simulation of water wave which able to run by a
computer (Jordi, 2014). The structure of the openFoam is built in libraries which
containing pieces of code that will be used by the various solver and utilities. Solver
is designed to solve a specific problem in continuum mechanics meanwhile utilities is
aimed at directly performing the tasks that benefit ordinary users or performing tasks
that involve data manipulation.
19

One of the advantage of the OpenFoam’s application is its can be


created by the users of the OpenFoam with some knowledge on the method, physics
and programming techniques involved. This OpenFoam software is also provided with
pre- and post-processing utilities interface which help in analyse, configure, optimize
or maintain a computer (Jordi, 2014). In short, the overall structure of OpenFoam is
shown in Figure 2.9:

Figure 2.9 Overview of OpenFoam structure (Jordi,2014).

However, for a new folder structure is built containing at least the three mains
folder that are 0, constant and system. The 0 folder contains all the initial field
conditions for variables such as pressure and velocity which depends on the chosen
solver of the case. Meanwhile, inside the constant folder is containing information
about the physical properties and fluid of the case. The system folder is determining
solver and solution settings for each field, the output format, runtime and time setup
for the case. Figure 2.10 showed the case structure of the OpenFoam.

Figure 2.10 Case Structure OpenFoam (Sirevaag, 2015).


20

In addition, if the geometry of the model is too complex there is a folder that
is describing the case geometry which is triSurface folder and the folder holds STL
files if the geometry is imported from a CAD program.

Pre-Processing

Pre-processing is a stage where the user allowed to setup the file cases directory
based on the problem being simulated which involves data for mesh, fields, properties,
control parameters, and etc. For examples the activities that taken at the pre-processing
stage are:

i) The Geometries of the model are generated in 3 dimensions.

ii) A uniform mesh of cells will be used initially. Then the mesh generator

iii) that supplied in OpenFoam such as blockMesh will generate mesh on the
model.

iv) Set up the boundary and initial condition of the model in file cases
directory.

v) The physical properties of the model are stored on dictionaries directory


tree such as kinematics viscosity value.

vi) Input data relating to the control of time and reading of the solution data
into a case file control which located in the system directory

Input data relating to the control of time and reading of the solution data into a
case file control which located in the system directory
21

Mesh Generation

Mesh generation is an important part of OpenFoam. The accuracy and


convergence of the solutions depending to the mesh quality. However, OpenFoam has
its own built mesh generation utility called blockMesh. BlockMesh is text based and
works by defining hexahedral blocks in a local, right-handed coordinate system
(Sirevaag, 2015). This block can build more complex geometries. There is one
challenge with the blockMesh which is keeping track of the multiple coordinate points
within a complex geometry. This problem can be negated by using a CAD software to
produce the complex geometry described with STL surfaces. OpenFoam can read these
STL files and convert them in to mesh. This solution can be used as the technique or
strategy for this project.

Figure 2.11 Example of mesh generation in OpenFoam


22

Salome

Salome software is one of the chosen CAD program in the open source
software that has a geometry feature suitable for exporting STL surfaces to OpenFoam.
This software is essentially for pre and post-processing numerical solutions. Salome
software contains a graphical interface and Salome is a simple CAD software that
allow the user to define vertices based on coordinates. After finish joined all the
surfaces, then converted the geometry to a complete solid figure. After that, the
surfaces are distinguished in groups so that different meshing options and field
properties can be applied to different surfaces later on. These groups of surfaces are
finally exported to OpenFoam as STL files and convert them in to mesh.

Solver

System directory files contained the controlDict text file which there are entries
regarding the simulation settings. The simulation settings that control for what time
step to start and stop the simulation. Besides that, the settings also control time step to
write the temporary results also known as time dumps (Sirevaag, 2015). This control
setting is a steady state solver which refers to number of iterations instead of seconds
of simulation time. Once the solution is converged, the data can be used for analysis.
However, when the simulation starts OpenFoam produces information regarding the
solving of different equations which can deduce whether the solution has converged
or not. The first information is the initial residual which the initial residue should be
approached zero when the solution is convergence. Second is the final residual is
always remained small and will always be less than the initial residual (Sirevaag,
2015). The last one is the number iterations will show how many times the matrix was
solved for the current equation. The number iteration should start to decrease once the
solution approach convergence.
23

Post-Processor

The field values are stored separately in text files once the solver completed.
In the post-processor step taken is analysing all of these values as they are presented
without any positional data. However, OpenFOAM comes with its own post-
processing software called ParaView

ParaView

ParaView is an open-source software capable of performing data analysis and


visualization. Paraview software combines all the filed values and positional data with
the mesh model to create a visual presentation for the OpenFoam simulation. All the
fields included in the simulation can be inspected and coloured according to the
magnitude. In addition, there are several tools to inspect the results such as graphing
tools, hiding parts of the mesh and etc as shown in Figure 2.12 below.

Figure 2.12 Example of paraView interface.


24

Linux Operating System

Linux is an open source operating system which is has similar function as


Microsoft Windows and Apple Macintosh. Linux operating system consists of the
Linux kernel, utilities and a huge number of applications. There a short list of Linux
programs that equivalent to the Microsoft Windows program as shown in table 2.2
below:

Table 2 Linux’s program that equivalents to common Windows applications.


MS Windows Software Title Linux Software Title
File Explorer Caja
Photos Eye of MATE Image Viewer
MS Paint Pinta
Notepad Pluma
WordPad LibreOffice Writer
Calculator Galculator
Windows Media Player VLC Media Player
Adobe PDF Viewer Atril Document Viewer
Adobe Acrobat Professional Master PDF Editor 4

However, the difference between Linux and window is the user has the freedom to
access, run and perform desired function on the system. Other than that, Linux also is
the best operating system that used the command terminal and in the terminal the
commands are executed to perform common functions as shown in Table 2.3 below:
25

Table 3 List of Linux commands


Command Description
cd Change directory
cp Copy file
ls List files and directory
mkdir Make a new directory
exit Exit from program or a window
grep Search a file for particular set of characters
top View system’s status
mv Rename file
pwd Display current working directory path
nano Create empty file

Kelvin Ship Waves

This characteristic of ship waves is due to the fact that water waves in water of
moderate depth are dispersive for example their wave speed is depends on their length
or their frequency (Ljubljana, 2004). The Kelvin waves are actually a wave packet
which is travelling which called group velocity.

The wave pattern that left behind by a ship at sea consists of a system
of waves that envelopes the hull lengthwise and connected with a system of cross of
waves as shown in Figure below.
26

Figure 2.13 Lengthwise and transverse waves (Ljubljana, 2004).

Kelvin’s Ship-Wave Pattern is produce from a moving ship with constant speed
V on deep water that generates a surface gravity wave. In a reference frame where the
ship is at rest we use polar coordinates r and Ø with Ø = 0 in the direction of the
velocity of the water relative to the ship. Then with g denoting the acceleration
due to gravity, the wave height is approximately given by

Where
27

The integral is of the form of the real part of equation 1 with y = Ø, u = 𝜃, g = 1,

k =𝜌, and

When 𝜌 > 1 that is everywhere except close to the ship the intergrand is oscillates
rapidly. There are two stationary points, given by

These coalesce when

This is the angle of the familiar V-shaped wake. The wake is a caustic of the “rays”
defined by the dispersion relation (“Hamiltonian”) giving the frequency ω as a
function of wave vector k:

Here k = |𝑘 | and V is the ship velocity (so that V = |𝑉 |).

Size of domain

The basin has the same principal dimensions as the towing tank where the
experiments were conducted (Stephen, 2017). Only a section of the tank before and
after the hull that enough to capture the relevant flow features and waves was used.
The two relaxation zones that allowed before and after the measurement region for
generating and dissipating waves as show in Figure below.
28

Figure 2.14 Geometry and size of domain .

Table 4 Domain particulars of MTC 092.


DB = 1 m
La = 3 𝐿𝑚
𝐿𝑓 = 𝐿𝑚
METHODOLOGY

Introduction

The objective of this chapter is to elaborate the method that contribute in order
to achieve the objective of the project. This purpose of this project is to observe and
analyse the free-surface wave pattern that produce along the hull of MTC092 and
compare it with the simulation result by using OpenFOAM. Other than that, the
purpose of this project is also to compare the hull resistance simulation result in
OpenFOAM with the hull resistance obtained from the analysis with the model testing
results.

Therefore, the methodology of this project have been divided into two part
which are experiment part and simulation part. Methodology of this project consist of
several steps and a project flowchart has been done to show the flow of the project
study. This flowchart will give a better understanding on how the study will be
conducted.
30

Overall Process of the Project.

Figure 3.1 Flow chart of project methodology.


31

Experiment Setup.

Figure 3.2 Flowchart of resistance experiment.


32

Equipment or Apparatus for Resistance Test.

The apparatus and equipment were used throughout the experiment to capture
wave pattern along the hull surface from plan view are as shown in Figures below:

i. Ship model MTC092:

Figure 3.3 Ship model MTC092

ii. Towing tank and towing carriages:

Figure 3.4 Towing tank and towing carriages.


33

iii. Ballast weight:

Figure 3.5 Ballast weight.

iv. Swinging frame:

Figure 3.6 Swinging frame.


34

v. Ruler and tape:

Figure 3.7 Ruler and tape.

vi. Data acquisition and analysis (DAAS):

Figure 3.8 Data acquisition and analysis (DAAS)


35

vii. Three cameras and line grid 2 × 2:

Figure 3.9 Board and ship grid.

Procedure for Resistance Test.

i) The model MTC-092 was used for the resistance test to observe wave
pattern from plan view as shown in Figure 3.10.

Figure 3.10 Model MTC092.


36

ii) Draw line grid 2×2 on the ship body and board as reference as shown in
Figure 3.11 below:

Figure 3.11 Grid 2×2 on ship model body and board.

iii) Measure line of VCG from base line which is 18.6 cm (based on lab sheet)

iv) Put the model on the weight scale to obtain the displacement of the model
which is 94.4 kg. This is done by placing ballast at the forward and aft
position of model until the displacement of the model reached 94.4 kg as
Figure 3.12.

Figure 3.12 Weighed the model on the weight scale.


37

v) Adjust the ship frame structure until it is stable by ensuring the bubble is
within the centre as shown in Figure 3.13.

Figure 3.13 Balancing of the ship frame structure.

vi) Mark the line on steel pole after the empty swinging table is on stable
condition. After that, mark another line when 200g of weight was put on
the wooden plank of bare swinging frame.

vii) Put the model onto the swinging frame at its location of gravity center.
Then, move the ballast aft or forward until the swinging frame becomes
stable to confirm the longitudinal gravity center (LCG).
38

viii) Transfer the model to the towing tank to check it’s draught in even keel
condition as shown in Figure 3.14.

Figure 3.14 Transfer the model to the towing tank.

ix) Tape the ballast weight onto model to make sure it doesn’t move as Figure
3.15.

Figure 3.15 Tape the ballast weight


39

x) Attach the model to the towing carriage as shown in Figure 3.16.

Figure 3.16 Attached the model to the towing carriage.

xi) Setup camera along the towing tank carriage to capture wave pattern on
the hull form.

xii) Run the experiment at one speed then proceed with other speed right after
the water had been calmed.

xiii) Take measurement of ship speed and the total resistance at the certain
speed.
40

xiv) Capture wave pattern along hull surfaces as shown below in Figure 3.17.

Figure 3.17 Wave pattern at the forward ship model.

The Process of Simulation

The software that are used throughout the simulation process in collecting all
the data related to the hull performance (hull resistance) and wave pattern of MTC092
are CAD for modelling, GMESH for model meshing and OpenFoam software.

AutoCad is a tool that used to create a digital ship model from the lines
plan drawings of MTC092 into 3D model and also to loft the 3D model of MTC092.
Autocad is a simple and interactive tool in designing a ship hull.

Meanwhile, Gmsh is a free three-dimensional finite element mesh


generator with built-in pre- and post- processing facilities. This Gmsh software is used
to provide a fast, light and user-friendly meshing tool with parametric input and
advanced visualization capabilities.
41

Lastly, openFoam is an open source computational fluid dynamics


(CFD) toolbox that is free and open source CFD software that has a large user base
across most areas of engineering either from commercial and academic organization.
OpenFOAM has an extensive range of features to solve anything from complex fluid
flows involving chemical reactions, turbulence and heat transfer, to acoustics, solid
mechanics and electromagnetics.

Figure 3.18 The flowchart of the simulation


42

3.3.3.1 Pre-processing.

i) Ship Particulars

The ship model particulars data obtained from Marine Technology Centre,
UTM is MTC092. Particulars data of this model tabulated in Table 3.1.

Table 5 Ship and Model Particulars Data of Hull Form MTC092.


Ship Model
Scale Ratio 13.5 1.000
LWL (m) 36.979 2.740
BWL (m) 6.924 0.513
Draught (m) 1.65 0.122
Displacement (Tonne) 238.06 0.0944
LCG (from AP) (m) 16.67 1.235
VCG (From BL) (m) 2.51 0.186

ii) Ship Hull CAD Modelling

To start creating a three-dimensional solid hull in AutoCAD, lines plane


drawing of the ship model in AutoCAD format is obtained as shown in Figure below:
43

Figure 3.19 Lines Plan of MTC092.

Step how to draw a three dimensional ship in AutoCAD:

iii) Select shear plan, edit (click copy with base point) and then paste profile
into new drawing in front view at (0,0) by click edit, three dimensional
views and front view as shown in Figure 3.20.

Figure 3.20 Shear plan from front view in AutoCAD

iv) Use command regenall, then select all and define all to layer for
convenience.
44

v) Repeat step 1, select half breadth plan and then paste it in top view at (0,0).

Figure 3.21 Half Breadth plan from top view in AutoCAD.

vi) Select line half breadth, mirror the waterline, join them and define all layer.

vii) Repeat step 1, select body plan in left view at (0,0).

viii) Select line body plan, mirror the waterline, join them and define all layer
as shown Figure 3.22 below.

Figure 3.22 Body plan from right view in AutoCAD.


45

ix) Click edit and SW isometric as shown Figure 3.33 below.

Figure 3.23 Ship model of MTC092 from SW isometric view.

iii) Computational Domain

The domain dimensions in this project for computation are fixed with respect
to a local coordinates system with the origin at the point of mid-plane, central
plane of ship model and free surface.

𝑧
1.9 < < −2.5,
𝐿𝑤
𝑥
−1 < < 1,
𝐿𝑤
𝑦
−0.0338 < < 0.017
𝐿𝑤
The domain around the hull of MTC092 ship model was discretized with three
dimensional hexahedral structures mesh using OpenFoam CFD as shown in
Figure 3.34.
46

Figure 3.24 The domain around the hull.

The procedure that contributed in the software as the following steps:

iv) Creating a block in the domain, which is basically a single mesh covering
the whole domain.

v) Splitting this block in to smaller blocks.

vi) Removing blocks from the no flow region.

vii) Associating the block edges, vertices and faces with the geometry curves,
points and surfaces accordingly.

viii) Mesh density is controlled by assigning number of meshes on each of the


edges.

ix) A grading of mesh density to provide denser meshes near the hull is done
by applying proper mesh law.

x) This is done to capture the boundary layer effects near the hull.
47

iv) Meshing Technique

In meshing stage, the Gmsh has been used to mesh the ship model of MTC092.
While open the Gmsh window, we can simply open the model file for example
MTC092.igs file as shown in Figure and go to Mesh > 3D mesh to setup the
mesh.

Figure 3.25 Step to open the model *.igs file.

After the mesh is completed as shown in Figure xx. Lastly, click file at the left
upper Export > stl file and save the mesh in the triSurface directory as shown
in Figure below.
48

Figure 3.26 Complete meshing of MTC 092 in Gmsh.

3.3.3.2 Solving

i) Case Setup in File Directory

First of all, a case study is created using the openFoam terminal. When case
study is created a system directory that enable user to use and modify the software. In
this project, the system directory is created by referred the system directory in
DTCHull tutorials.

System directory for this project followed system directory in DTCHull and
then modified the case study to ensure its matching to this resistance simulation cases
based on the model and condition.
49

System

blockMeshDict

controlDict

decomposeParDict

fvSchemes

fvSolution

meshQualityDict

refineMeshDict

setFieldsDict

snappyHexMeshDict

surfaceFeatureExtractDict

topoSetDict.1
topoSetDict.2
topoSetDict. 3

topoSetDict. 4

topoSetDict.5

topoSetDict.6

Figure 3.27 System directory.

ii) System directory.

When using the terminal OpenFoam, user must be familiarised himself with
tree view command which is ls -1. The tree view enable user to manage calculation
parameters of the case study. Starting terminal user with define the path to case
directory. However, when the user opened the MTC092 file in the created directory
the path will be automatically defined.
50

iii) Importing Mesh in Study

In the study, the *.stl file has been copied into constant/triSurface directory.
After the mesh is verified, make sure then click on check mesh. Once it is finish,
MTC092 will return a data log about the mesh as shown in Figure 3.28. This log data
contains the detailed information about the mesh which can be obtain similarly using
Gmsh’s mesh evaluation. This step is crucial because it allows MTC092 to identify
the of bad meshes and recognise the boundary condition group that has been defined
in Gmsh.

Figure 3.28 log. snappyHexMesh file

iv) Thermal and Physical Properties

In this step the things that needs to be adjusted is in calculation features which
is since the case is a steady flow, the steady or unsteady flow algorithm have to change
into steady flow. In turbulence model k−ω SST option is selected.

k−ω SST is a combination of both k-epsilon and k- omega which k-epsilon


predicts well far from the boundaries wall and k-omega predicts well at near wall.
51

Hence, this k-w SST model is a combination of these which good mesh at boundary
with wall treated usually works.

Continue to physical properties folder where the thermal and physical


characteristics of the fluid for the resistance simulation will be defined. In the fluid
properties, the alpha.water, velocities, nut, point displacement and density have been
defined.

3.3.3.3 Post Processing

In this post processing part, the results from MTC092 is ready to be visualized on the
standalone ParaView. OpenFoam is come with their own post processing software
which called ParaView. Paraview field will combine the field value and positional data
with the mesh modelling to create a visual presentation of the OpenFoam simulation.

However, OpenFOAM will only give full result when there is no error in the
calculation or geometry. As stated in previous chapter, when there is error it is
recommended to rebuild the mesh and making it finer than before, then repeat the
previous steps. If the geometry surface is error then it is recommend remodelling the
model then mesh again and export into OpenFOAM. The code of the calculation of
OpenFOAM is saved in:

Run/the user 4.1/.

Directory which named in the format of:


MTC092

Inside this directory, there will be a listing file, summary file performance log, setup
log and two directories which are monitoring and post-processing.

OpenFOAM listing file is primary source to check for the convergence of the
result. The value of the solution parameters that are setup during the pre-processing,
52

such as alpha.water, k, nut, omega, pointDisplacement and velocity which are called
in every step of the iterations.

If the simulation failed, you may need to check what has cause the error to
occurred. In order to know where is the error, users need to open the directory file and
check also the constant source to check for the result.

i) Visualization the Result in Paraview

 Check what parts of the mesh should be imported in Mesh Parts.

 Check what volume fields that should be imported in Volume


Fields.

 Click on Patch Names to view them.

 Click Apply to read in the mesh and the volume fields.

 If the contents of your case directory has changed, click on Update


GUI and Apply to import the new information.

 Control visibility.

 Colour the object by a constant colour, or using a variable. For cell


based representation, the variables are assumed to constant in each
cell, and for point based representation, the variables are
interpolated to the points, yielding a smooth field. The colour map
can be edited, and the colour range can be re-scaled.

 In Edit Colour map (and in the view menu), a Colour Legend can
be added. The colour legend can be moved and re-scaled with the
mouse.
53

 The representation of the object can be as outline, wireframe,


surface etc.

 The Cartesian extent of the object is shown by clicking on Show


cube axes. This representation can be edited.

 The object can be translated, which is useful when comparing


results from different simulations of the same case, or when
viewing the same case in different angles.

ii) Filters the Result in Paraview

 The Filters/Alphabetical menu lets you manage your data in


different ways. Some of those can be selected by the icons:

Figure 3.29 The filters menu.

 With the Calculator filter you can create new fields from existing
scalar and vector fields, using simple mathematical functions.

 The new fields can be used just like the original fields.

 The Contour Filter lets you make a contour plot or iso-surface, if


the parent object is 2D or 3D, respectively.

 The Clip Filter lets you clip your results using


plane/box/sphere/scalar.

 The Slice Filter lets you make a plane/box/sphere cuts through your
results.
54

iii) Threshold, Glyph and Cell Centre Filters the Result in Paraview

 The Threshold Filter lets you show cells with solution scalar values
in a specific range.

 The Glyph Filter lets you make vector plots. It can also be used to
visualize lagrangian particles.

iv) Stream Tracer and Warp Filters the Result in Paraview

 The Stream Tracer filter lets you make stream line tracers,
submitted from a point, aspherical cloud, or line sources.

 The Warp (scalar) filter lets you distort your geometry according
to the local value of a scalar. This is mostly useful in solid
mechanics.

v) Plot Over Line Filter the Result in Paraview

 The Plot Over Line filter lets you make detailed plots of the variables
along a line.

 In the Display tab, you can choose which variables to plot, and choose
line colours and line styles.

vi) The image output in Paraview

 File/Save Screen shot saves pixel images in a number of formats: png,


bmp, tiff, ppm, jpg, pdf.

 The format is chosen by the extension of the file name.

 Increase the resolution for high quality images.

 Use ls-l to see the difference in file size for the different formats.
55

 Use gimp to view and edit all the image formats.

 Convert to eps format for inclusion in LATEX documents using:


/usr/bin/converttest.jpgtest.eps (we specify the whole path to make sure
that we use the correct one).

 View the eps file using gv.

vii) The animation output in Paraview

 File/Save Animation saves frame images in a number of formats: jpg,


tiff, png.

 Use /usr/bin/convert to convert the frame images in to a movie:


/usr/bin/convert-quality90%frames*.pngmovie.gif

 View the movie using firefoxfile://$PWD/movie.gif

 Increase the resolution for high quality animations.

viii) Save and load states in Paraview

 The current state, including created objects and current view, can be
saved for later loading. This is useful if the same visualization needs to
be done many times.

 Saved states can be loaded directly from paraview, so there is no need


to run paraFoam.

a) State files are in ASCII, so it is possible to generate or modify them


externally if needed.
56

RESULTS AND DISCUSSION

Introduction

In this chapter, all the results obtained in the work flow either from resistance
test or simulation in OpenFoam are documented. The result from OpenFoam will be
used to verify the experimental.

Resistance Test

There a result obtained from the resistance test of model MTC 092 in towing
tank which wave pattern of MTC 092 hull form from plan view. The resistance test of
MTC 092 will run with three difference speed which are 14 knot, 16 knot and 18 knot.
This is because this MTC 092 ship model is actually a high speed ship and resistance
test in towing tank only able to run until maximum speed 18 knot.
57

Resistance Results

The result of resistance test of MTC 092 ship model was carried out by MTC
in towing tank. The model was attached to the towing carriage and run on the water at
the specified speed. Table 4.1 show the resistance data from MTC while Figure 4.1 is
the graph resistance against speed.

Table 6 Resistance data at difference speed.


Speed, Vs (knot) 𝑅𝑇𝑀, 𝑘𝑁 (𝑅𝑒𝑠𝑖𝑠𝑡𝑎𝑛𝑐𝑒 𝑇𝑒𝑠𝑡)
14 30.77
16 43.73
18 57.44
20 65.31
22 73.30

Figure 4.1 Resistance of MTC 092 ship model at difference speed.


58

Wave Pattern Results

The result of wave pattern obtained from resistance test of MTC 092 that
conducted in towing tank with three difference speed that are 14 knot, 16 knot and 18
knot. The objective of this experiment is to observe and predict the wave pattern along
hull ship model MTC 092. Table 4.2 show the result for wave pattern (degrees) and
Figures below show the captured of wave pattern during the resistance test from
difference view.

Table 7 Wave pattern analysis


Speed, Vs Wave pattern Froude number (Fn) Model resistance
(knot) (degrees) (𝑅𝑇𝑀, 𝑘𝑁)
14 40ᵒ 0.38 30.77
16 37ᵒ 0.43 43.73
18 34ᵒ 0.49 57.44

Figures below show the captured of wave pattern during the resistance test from
difference view.

i. 14 knot

Figure 4.2 Wave pattern from forward view at the speed 14 knot.
59

Figure 4.3 Wave pattern from midship view at the speed 14 knot.

Figure 4.4 Wave pattern from aft view at the speed 14 knot.
60

ii. 16 knot

Figure 4.5 Wave pattern from forward view at the speed 16 knot.

Figure 4.6 Wave pattern from midship view at the speed 16 knot.
61

Figure 4.7 Wave pattern from midship view at the speed 16 knot.
62

i. 18 knot

Figure 4.8 Wave pattern from forward view at the speed 18 knot.

Figure 4.9 Wave pattern from midship view at the speed 18 knot

Figure 4.10 Wave pattern from aft view at the speed 18 knot.
63

Discussion of Resistance Test

The graph plotted in Figure 4.1 of ship model total resistance versus ship speed,
it can be seen that as the running ship model speed increased, the total resistance
increased. In other word, the relationship between ship speed with total resistance is
directly proportional.

Besides that, based on the wave pattern shows above as ship speed
increases, the thickness of the boundary layer will increase and the transition point
between laminar and turbulent flow moves closer to the bow. Therefore, it is causing
an increase in frictional resistance as speed increases.

Other than that, the creation of waves energy can be observe by as ship
speed increases, the height of waves produced by the ship is also increases and
therefore the energy required to produce these waves also increases. The lost energy
is referred to the wave making resistance principle. As shown above, MTC 092 model
is a high speed vessel which is at high speeds, the wavelength between divergence
wave is increase. Thus the gradient of total resistance at high speed becomes more
slope compared to low speed.

Discussion on Simulation Result

The tedious part in this study is mostly in pre-processing part because for the
first attempt to run the model in OpenFOAM, it take more than 12 hours to create the
visualization in ParaView. However, OpenFOAM only give full result when there is
no error in the coding, calculation or geometry. As stated in the previous study, when
there is error it is recommended to rebuild the mesh and making it finer.
64

After re-meshing the model and load it in ParaView, the result still same
as before which is there is only domain boundary and no ship model mesh on the
domain as shown in Figure 4.11 below.

Figure 4.11 The ParaView visualization.

Since using MTC 092 model, the ParaView did not display anything and then
I used the sample cases from OpenFOAM by using the same coding and command
from cases file directory. After run the simulation, I did get the output of the ParaView.
My observation from that problem is i need to check the surface of geometry again to
check either there are error messages during and after the solving phase. The Figure
4.12 below shows the result after surfaceCheck MTC 092.stl file model.
65

Figure 4.12 Result from surfaceCheck MTC 092.stl file model.

The only solution for this error or problem is re-modelling the model MTC 092
in AutoCAD and make sure it become one solid surface model. The process of re-
modelling the model is very tedious since surface of geometry of the ship is very
complex and it is take a lot of time. In re-modelling MTC 092 part, the biggest problem
that I faced is to loft the model. There are many modelling operations in AutoCAD
that will not work correctly at large coordinates because of this limitation.

Based on the problem faced it is recommended to reducing the amount


of objects in the drawing which helps improve the performance and I was decided to
reduce the surface of the model until draft as shown in Figure 4.13 below.
66

Figure 4.13 Model MTC 092 from SW isometric view.

However, the result in ParaView is still the same and at this time i need to
recheck each of cases directory from constant to system directory. This is another
problem of OpenFOAM is not the most user-friendly software. Current simulation
challenges are related to the integration and automation of simulation tools in a very
complex CAE environement including automatic geometry retrieval, surface and
volume meshing, sensitivity and optimization studies. Range and quality of physical
models, solver settings and solution algorithms, lack of robust automatic solution
control bring more complexity to the OpenFOAM user.

In a nutshell, the simulation software becomes more complex due to the


interaction between numerous physical models, solution strategies and solver settings.
This leads to development bottlenecks and difficulties in testing and validation. Last
but not least, the OpenFOAM does not inform user its computation progress nor the
expected time for completion which can be a problem if user have a limited time
resource.
CONCLUSION AND RECOMMENDATION

Conclusion

The main objective of this project was to predict the performance of model
MTC 092 hull by simulating wave pattern around this hull form, whilst the secondary
objective was to analyze of the computed flow field is expected to yield hull resistance,
free-surface wave pattern which will be compared with the model testing results. Both
of the objectives stated are unsuccessfully achieved for few reasons:

i) OpenFOAM is not the most user-friendly software.

ii) Range and quality of physical models, solver settings and solution
algorithms, lack of robust automatic solution control bring more
complexity to the OpenFOAM user.

iii) The simulation software becomes more complex due to the interaction
between numerous physical models, solution strategies and solver settings.

iv) OpenFOAM does not inform user its computation progress nor the
expected time for completion which can be a problem if user have a limited
time resource.
68

v) This project is too much work to do such as modelling, resistance


experiment and simulation in OpenFOAM which all the steps take a lot of
time and the student time is very limited.

Recommendation

It is recommended that future works for similar to this study should address the
following issues:

i) Using simple type of hull form model to reduce computing time.

ii) Familiarize with Linux operating system to better understand the Linux
command and operation.

iii) Practicing OpenFoam tutorial that similar to the case study earlier to
acquire the better knowledge and understanding regarding the project
cases.

iv) Instead of using CAD software such as AutoCAD and Solidwork, try to
explore more on the ability of Maxsurf Fitting to build the geometry of
ship hull because Maxsurf will generate a better geometry of ship hull,
69

REFERENCES

Anthony F. Molland., Stephen R. Turnock & Dominic A. Hudson (2017). Ship


Resistance and Propulsion. (Practical Estimation of Ship Propulsion, University
of Cambridge,
B.F. Magnussen & B.H. Hjertager (1977). On mathematical modelling of turbulent
combustion with special emphasis on soot formation and combustion. Volume
16, Issue 1, 719-729,
Bilal M. Ayyub & Richard H. McCuen (2012). Probability, Statistics, and Reliability
for Engineers and Scientists. Third Edition, University of Maryland, College Park,
USA,
Bjorn Winden., Stephen R. Turnock and Dominic Hudson (2017). Validating Force
Calculations using OpenFOAM on a Fixed Wigley Hull in Waves. Fluid-Structure
Interactions Research Group University of Southampton, Southampton,
Edward V. Lewis (1989). Principles of Naval Architecture. Second Revision. Society
of Naval Architects and Marine Engineers,
Eric Paterson, David Boger, Kevin Smith, Scott Miller, and Gina Casadei (2009).
6DOF RANS Simulations of Floating and Submerged Bodies using OpenFOAM.
Applied Research Laboratory, Penn State Univ, State College, PA, USA,
Frederick Stern., Jianming Yang., Zhaoyuan Wang., Hamid Sadat-Hosseini., Maysam
Mousaviraad., Shanti Bhushan and Tao Xing. Computational ship
hydrodynamics: Nowadays and way forward. IIHR-Hydroscience and
Engineering, University of Iowa, Iowa City, IA, USA,
H K Versteeg & W Malalasekera (2007). An Introduction to Computational Fluid
Dynamics. Second Edition. The Finite Volume Method,
ITTC. (1999). ITTC – Recommended Procedures 7.5 – 02 03 – 01.4. Paper presented
at the 22th International Towing Tank Conference,
ITTC. (2002). Recommended Procedures and Guidelines: 7.5-02-02-01. Paper
presented at the 23rd International Towing Tank Conference,
ITTC. (2008). Recommended Procedures and Guidelines: 7.5-02 07-03.2. Paper
presented at the International Towing Tank Conference,
ITTC. (2011). ITTC – RecommendedProcedures and Guidelines 7.5-02-03-01.1.
Paper presented at the 26th International Towing Tank Conference,
70

ITTC. (2014). ITTC – Recommended Procedures and Guidelines 7.5 – 02 03 – 01.4.


Paper presented at the 27th International Towing Tank Conference,
Kenneth Chaw Vui Ken (2017). Numerical Study of Solar Chimney Configurations for
Residential Ventilation of Shipping Container Houses in Tropical Environment.
Faculty of Mechanical Engineering Universiti Teknologi Malaysia.
Ksenija Maver (2004). Kelvin Ship Waves. Faculty for Mathematics and Physics
Department for Physics, University of Ljubjana,
M. Haase1., F. Iliopulos., G. Davidson., S. Friezer., G. Thomas., J. Binns., N. Bose.,
J. Lavroff and M. R. Davis (2012). Application of RANSE-based Simulations for
Resistance Prediction of Medium-Speed Catamarans at Different Scales. School
of Engineering, University of Tasmania Australia,
Muhamad Ibrahim Bin Yaacob (2015). Verification of Ship Hull Model Resistance
Using Code Saturne. Faculty of Mechanical Engineering Universiti Teknologi
Malaysia,
Nurshazleen Amarleena Binti Roslan (2017). Experimental Study of Solar Chimney
for Residential Shipping Container House in Tropical Environment. Faculty of
Mechanical Engineering Universiti Teknologi Malaysia,
OpenFOAM v1712: The open source CFD toolbox manual. Extended Code Guided.
Patrik Asén (2014). Analysis of the Flow Around a Cruise Ferry Hull by the Means of
Computational Fluid Dynamics. The degree of Master of Science in Technology,
School of Engineering, Aalto University,
Rickard E Bensow (2009). Simulating a Cavitating Propeller in Wake Flow. Dept. of
Shipping and Marine Technology Chalmers University of Technology, Sweden,
Virendra C. Patel., Wolfgang Rodi., & Georg Scheuere (1984). Turbulence Models for
Near-Wall and Low Reynolds Number Flows: A Review. University of Karlsruhe,
Karlsruhe, Federal Republic of Germany,
Volker Bertram (2012). Practical Ship Hydrodynamics. Second Edition. Elsevier’s
Science & Technology Rights Department in Oxford, UK.
71

APPENDIX A

SHIP HULL GEOMETRY

Figure 5.1 The structure of ship hull before lofting

Figure 5.2 The complete ship hull geometry


72

Figure 5.3 The complete computational domain

Figure 5.4 Generated mesh around ship hull


73

APPENDIX B

SHIP & MODEL PARTICULARS

Table 8 Ship and model particulars.


Designation Symbol Unit Ship Model
Scale Ratio 13.5 1.000
Length of Waterline LWL m 36.979 2.740
Breadth of Waterline BWL m 6.924 0.513
Draught D m 1.65 0.122
Displacement W Tonne 238.06 0.0944
Wetted Surface Area SW 𝑚2 274.2 1.505
Length of Centre Gravity (From AP) LCG m 16.67 1.235
Vertical of Centre Gravity (From BL) VCG m 2.51 0.186

Draught: 1.65 m
Ship Model no. MTC 092

Table 9 Results of Resistance Test (model values)


74

APPENDIX C

DICTIONARY CODING SCRIPT


1. blockMeshDict

/*--------------------------------*- C++ -*---------------------------


-------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

convertToMeters 1;

vertices
(
(-4.11 -1 -1.25)
(9.59 -1 -1.25)
(9.59 0 -1.25)
(-4.11 0 -1.25)

(-4.11 -1 -1)
(9.59 -1 -1)
(9.59 0 -1)
(-4.11 0 -1)

(-4.11 -1 -0.2565)
(9.59 -1 -0.2565)
(9.59 0 -0.2565)
(-4.11 0 -0.2565)

(-4.11 -1 0)
(9.59 -1 0)
(9.59 0 0)
(-4.11 0 0)

(-4.11 -1 0.2565)
(9.59 -1 0.2565)
(9.59 0 0.2565)
(-4.11 0 0.2565)
75

(-4.11 -1 1)
(9.59 -1 1)
(9.59 0 1)
(-4.11 0 1)

(-4.11 -1 1.25)
(9.59 -1 1.25)
(9.59 0 1.25)
(-4.11 0 1.25)
);

blocks
(
hex (0 1 2 3 4 5 6 7) (42 19 50) simpleGrading (1 1 0.05)
hex (4 5 6 7 8 9 10 11) (42 19 50) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) (42 19 4) simpleGrading (1 1 1)
hex (12 13 14 15 16 17 18 19) (42 19 4) simpleGrading (1 1 1)
hex (16 17 18 19 20 21 22 23) (42 19 40) simpleGrading (1 1 1)
hex (20 21 22 23 24 25 26 27) (42 19 20) simpleGrading (1 1 5)
);

edges
(
);

boundary
(
atmosphere
{
type patch;
faces
(
(24 25 26 27)
);
}
inlet
{
type patch;
faces
(
(1 2 6 5)
(5 6 10 9)
(9 10 14 13)
(13 14 18 17)
(17 18 22 21)
(21 22 26 25)
);
}
outlet
{
type patch;
faces
(
(0 4 7 3)
(4 8 11 7)
(8 12 15 11)
(12 16 19 15)
(16 20 23 19)
(20 24 27 23)
);
}
bottom
{
type symmetryPlane;
76

faces
(
(0 3 2 1)
);
}
side
{
type symmetryPlane;
faces
(
(0 1 5 4)
(4 5 9 8)
(8 9 13 12)
(12 13 17 16)
(16 17 21 20)
(20 21 25 24)
);
}
midPlane
{
type symmetryPlane;
faces
(
(3 7 6 2)
(7 11 10 6)
(11 15 14 10)
(15 19 18 14)
(19 23 22 18)
(23 27 26 22)
);
}
);

mergePatchPairs
(
);

//
**********************************************************************
*** //
77

2. controlDict

/*--------------------------------*- C++ -*---------------------------


-------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

application interFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 400;

deltaT 1;

writeControl timeStep;

writeInterval 100;

purgeWrite 0;

writeFormat binary;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

functions
{
forces
{
type forces;
libs ( "libforces.so" );
78

patches (hull);
rhoInf 998.8;
log on;
writeControl timeStep;
writeInterval 1;
CofR (2.929541 0 0.2);
}
}

//
**********************************************************************
*** //
79

3. decomposePArDict

-*----------------------------------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object decomposeParDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

numberOfSubdomains 8;

method scotch;

simpleCoeffs
{
n (2 1 1);
delta 0.001;
}

hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}

metisCoeffs
{
}

manualCoeffs
{
dataFile "";
}

distributed no;

roots
80

(
);

//
**********************************************************************
*** //
81

4. fvSchemes

/*--------------------------------*- C++ -*---------------------------


-------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

ddtSchemes
{
default localEuler;
}

gradSchemes
{
default Gauss linear;
limitedGrad cellLimited Gauss linear 1;
}

divSchemes
{
div(rhoPhi,U) Gauss linearUpwind grad(U);
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div(phi,k) Gauss linearUpwind limitedGrad;
div(phi,omega) Gauss linearUpwind limitedGrad;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
82

wallDist
{
method meshWave;
}

//
**********************************************************************
*** //
83

5. fvSolution

/*--------------------------------*- C++ -*---------------------------


-------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

solvers
{
"alpha.water.*"
{
nAlphaCorr 2;
nAlphaSubCycles 1;
cAlpha 1;
icAlpha 0;

MULESCorr yes;
nLimiterIter 10;
alphaApplyPrevCorr yes;

solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0;
minIter 1;
}

pcorr
{
solver PCG;

preconditioner
{
preconditioner GAMG;

smoother GaussSeidel;

tolerance 1e-5;
relTol 0;
};

tolerance 1e-5;
relTol 0;
84

};

p_rgh
{
solver GAMG;

smoother DIC;

tolerance 1e-7;
relTol 0.01;
};

p_rghFinal
{
$p_rgh;
relTol 0;
}

"(U|k|omega).*"
{
solver smoothSolver;

smoother symGaussSeidel;
nSweeps 1;

tolerance 1e-7;
relTol 0.1;
minIter 1;
};
}

PIMPLE
{
momentumPredictor no;

nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;

maxCo 10;
maxAlphaCo 5;

rDeltaTSmoothingCoeff 0.05;
rDeltaTDampingCoeff 0.5;
nAlphaSpreadIter 0;
nAlphaSweepIter 0;
maxDeltaT 1;
}

relaxationFactors
{
equations
{
".*" 1;
}
}

cache
{
grad(U);
}
85

//
**********************************************************************
*** //
86

6. meshQualityDict

/*--------------------------------*- C++ -*---------------------------


-------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object meshQualityDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

//- Maximum non-orthogonality allowed. Set to 180 to disable.


maxNonOrtho 70;

//- Max skewness allowed. Set to <0 to disable.


maxBoundarySkewness 20;
maxInternalSkewness 4;

//- Max concaveness allowed. Is angle (in degrees) below which


concavity
// is allowed. 0 is straight face, <0 would be convex face.
// Set to 180 to disable.
maxConcave 80;

//- Minimum pyramid volume. Is absolute volume of cell pyramid.


// Set to a sensible fraction of the smallest cell volume expected.
// Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;

//- Minimum quality of the tet formed by the face-centre


// and variable base point minimum decomposition triangles and
// the cell centre. Set to very negative number (e.g. -1E30) to
// disable.
// <0 = inside out tet,
// 0 = flat tet
// 1 = regular tet
minTetQuality 1e-30;

//- Minimum face area. Set to <0 to disable.


minArea -1;

//- Minimum face twist. Set to <-1 to disable. dot product of face
normal
// and face centre triangles normal
minTwist 0.05;

//- Minimum normalised cell determinant


87

// 1 = hex, <= 0 = folded or flattened illegal cell


minDeterminant 0.001;

//- minFaceWeight (0 -> 0.5)


minFaceWeight 0.05;

//- minVolRatio (0 -> 1)


minVolRatio 0.01;

//must be >0 for Fluent compatibility


minTriangleTwist -1;

//- If >0 : preserve single cells with all points on the surface if
the
// resulting volume after snapping (by approximation) is larger than
// minVolCollapseRatio times old volume (i.e. not collapsed to flat
cell).
// If <0 : delete always.
//minVolCollapseRatio 0.5;

// Advanced

//- Number of error distribution iterations


nSmoothScale 4;
//- Amount to scale back displacement at error points
errorReduction 0.75;

// Optional : some meshing phases allow usage of relaxed rules.


// See e.g. addLayersControls::nRelaxedIter.
relaxed
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 75;
}
88

7. refineMeshDict

/*--------------------------------*- C++ -*---------------------------


-------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object refineMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

set c0;

coordinateSystem global;

globalCoeffs
{
tan1 (1 0 0);
tan2 (0 1 0);
}

patchLocalCoeffs
{
patch outside;
tan1 (1 0 0);
}

directions ( tan1 tan2 );

useHexTopology no;

geometricCut yes;

writeMesh no;

//
**********************************************************************
*** //

8. setFieldsDict

/*--------------------------------*- C++ -*---------------------------


-------*\
89

| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

defaultFieldValues
(
volScalarFieldValue alpha.water 0
);

regions
(
// Set cell values
// (does zerogradient on boundaries)
boxToCell
{
box (-999 -999 -999) (999 999 0.244);

fieldValues
(
volScalarFieldValue alpha.water 1
);
}

// Set patch values (using ==)


boxToFace
{
box (-999 -999 -999) (999 999 0.244);

fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);

//
**********************************************************************
*** //
90

9. snappyHexMeshDict

/*--------------------------------*- C++ -*---------------------------


-------*\
| ========= |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
| \\ / O peration | Version: 4.1
|
| \\ / A nd | Web: www.OpenFOAM.org
|
| \\/ M anipulation |
|
\*--------------------------------------------------------------------
-------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

// Which of the steps to run


castellatedMesh true;
snap true;
addLayers true;

// Geometry. Definition of all surfaces. All surfaces are of class


// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
MTC092.stl
{
type triSurfaceMesh;
name hull;

patchInfo
{
type wall;
}
}
};

// Settings for the castellatedMesh generation.


castellatedMeshControls
{

// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~

// If local number of cells is >= maxLocalCells on any processor


91

// switches from from refinement followed by balancing


// (current method) to (weighted) balancing before refinement.
maxLocalCells 100000;

// Overall cell limit (approximately). Refinement will stop


immediately
// upon reaching this number so a refinement level might not
complete.
// Note that this is the number of cells before removing the part
which
// is not 'visible' from the keepPoint. The final number of cells
might
// actually be a lot less.
maxGlobalCells 2000000;

// The surface refinement loop might spend lots of iterations


refining just a
// few cells. This setting will cause refinement to stop if <=
minimumRefine
// are selected for refinement. Note: it will at least do one
iteration
// (unless the number of cells to refine is 0)
minRefinementCells 0;

// Number of buffer layers between different levels.


// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 3;

// Explicit feature edge refinement


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

// Specifies a level for any cell intersected by its edges.


// This is a featureEdgeMesh, read from constant/triSurface for
now.
features
(
{
file "MTC092.eMesh";
level 0;
}
);

// Surface based refinement


// ~~~~~~~~~~~~~~~~~~~~~~~~

// Specifies two levels for every surface. The first is the


minimum level,
// every cell intersecting a surface gets refined up to the
minimum level.
// The second level is the maximum level. Cells that 'see'
multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum
level.

refinementSurfaces
{
hull
{
92

// Surface-wise min and max refinement level


level (0 0);
}
}

resolveFeatureAngle 45;

// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~

// Specifies refinement level for cells in relation to a surface.


One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified
in
// descending order.
// - inside. 'levels' is only one entry and only the level is
used. All
// cells inside the surface get refined up to the level. The
surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.

refinementRegions
{
}

// Mesh selection
// ~~~~~~~~~~~~~~

// After refinement patches get added for all refinementSurfaces


and
// all cells intersecting the surfaces get put into these patches.
The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a
cell, even
// after refinement.
locationInMesh (-0.7 0 0);

// Whether any faceZones (as specified in the refinementSurfaces)


// are only on the boundary of corresponding cellZones or also
allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
}

// Settings for the snapping.


snapControls
{
//- Number of patch smoothing iterations before finding
correspondence
// to surface
nSmoothPatch 3;

//- Relative distance for points to be attracted by surface


feature point
// or edge. True distance is this factor times local
93

// maximum edge length.


// tolerance 4.0;
tolerance 1.0;

//- Number of mesh displacement relaxation iterations.


nSolveIter 100;

//- Maximum number of snapping relaxation iterations. Should stop


// before upon reaching a correct mesh.
nRelaxIter 5;

nFeatureSnapIter 10;
}

// Settings for the layer addition.


addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes
(false).
relativeSizes true;

// Per final patch (so not geometry!) the layer information


layers
{
hull
{
nSurfaceLayers 3;

}
}

// Expansion factor for layer mesh


expansionRatio 1.5;

// Wanted thickness of final added cell layer. If multiple layers


// is the thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// See relativeSizes parameter.
finalLayerThickness 0.7;

// Minimum thickness of cell layer. If for any reason layer


// cannot be above minThickness do not add layer.
// See relativeSizes parameter.
minThickness 0.25;

// If points get not extruded do nGrow layers of connected faces


that are
// also not grown. This helps convergence of the layer addition
process
// close to features.
// Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
nGrow 0;

// Advanced settings

// When not to extrude surface. 0 is flat surface, 90 is when two


faces
// are perpendicular
featureAngle 60;
94

// Maximum number of snapping relaxation iterations. Should stop


// before upon reaching a correct mesh.
nRelaxIter 5;

// Number of smoothing iterations of surface normals


nSmoothSurfaceNormals 1;

// Number of smoothing iterations of interior mesh movement


direction
nSmoothNormals 3;

// Smooth layer thickness over surface patches


nSmoothThickness 10;

// Stop layer growth on highly warped cells


maxFaceThicknessRatio 0.5;

// Reduce layer growth where ratio thickness to medial


// distance is large
maxThicknessToMedialRatio 0.3;

// Angle used to pick up medial axis points


// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to
130 in 17x.
minMedianAxisAngle 90;

// Create buffer region for new layer terminations


nBufferCellsNoExtrude 0;

// Overall max number of layer addition iterations. The mesher


will exit
// if it reaches this number of iterations; possibly with an
illegal
// mesh.
nLayerIter 50;

// Max number of iterations after which relaxed meshQuality


controls
// get used. Up to nRelaxIter it uses the settings in
meshQualityControls,
// after nRelaxIter it uses the values in
meshQualityControls::relaxed.
nRelaxedIter 20;
}

// Generic mesh quality settings. At any undoable phase these


determine
// where to undo.
meshQualityControls
{
#include "meshQualityDict"
}

// Advanced

// Flags for optional output


// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
95

// 4 : write current intersections as .obj files


debug 0;

// Merge tolerance. Is fraction of overall bounding box of initial


mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1E-6;

//
**********************************************************************
*** //
96

10. surfaceFeatureExtractDict
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

MTC092.stl
{
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;

extractFromSurfaceCoeffs
{
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 180;
}

subsetFeatures
{
// Keep nonManifold edges (edges with >2 connected faces)
nonManifoldEdges yes;
97

// Keep open edges (edges with 1 connected face)


openEdges yes;
}

// Write options

// Write features to obj format for postprocessing


writeObj yes;
}

//
*************************************************************************
//

You might also like