nesh thesis

Upload: ravi-shankar

Post on 04-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Nesh Thesis

    1/72

    NUMERICAL COMPUTATION OF INTERNAL

    FLOW IN A HYBRID PROPELLANT MOTOR

    A Project Report

    submitted by

    NITESH SHAH

    in partial fulfilment of the requirements

    for the award of the degree of

    MASTER OF TECHNOLOGY

    DEPARTMENT OF AEROSPACE ENGINEERING

    INDIAN INSTITUTE OF TECHNOLOGY, MADRAS.

    May 2010

  • 7/29/2019 Nesh Thesis

    2/72

    THESIS CERTIFICATE

    This is to certify that the thesis titled NUMERICAL COMPUTATION OF INTER-

    NAL FLOW IN A HYBRID PROPELLANT MOTOR, submitted by Nitesh Shah,

    to the Indian Institute of Technology, Madras, for the award of the degree of Master of

    Technology, is a bona fide record of the research work done by him under our supervi-sion. The contents of this thesis, in full or in parts, have not been submitted to any other

    Institute or University for the award of any degree or diploma.

    Prof. M. Ramakrishna

    Project Guide

    Professor

    Dept. of Aerospace Engineering

    IIT-Madras, 600 036

    Prof. P. Sriram

    Professor

    Head Of Department

    Dept. of Aerospace Engineering

    IIT-Madras, 600 036

    Place: Chennai

    Date: 3rd May 2010

  • 7/29/2019 Nesh Thesis

    3/72

    ACKNOWLEDGEMENTS

    It is my privilege to acknowledge the people who have helped in successfully finishing

    this project report. I owe my greatest gratitude to my project guide Prof. M. Ramakr-

    ishna for his guidance and his unique way to boost my confidence throughout the course

    of the project.

    I thank Dr. P. A. Ramakrishna and Rajiv Kumar, who provided the details of the geom-

    etry used for the computation from their experiment setup. I am thankful to Prof. S.

    C. Rajan who always inspired me to learn new things and to be a good human being.

    I thank Ramesh, Rajesh, Manimaran, Shivaprasad and Ashok for their valuable inputs

    during the project. I also thank Kartik to provide some useful references to develop the

    solver.

    I am grateful to Dr. Prabhu Ramachandran for developing scientific data visualizer,

    MayaVi2 and providingLATEXtemplate for thesis submission. I thank Nitin Chaturvedi

    and Mrs. Ritu Chaturvedi who always considered me as a part of their family and al-

    ways motivated me to do things with passion. I extend my thank to Sandip Roy and all

    MTech batch mates for their help on different academic and non academic issues.

    I am grateful to my friend Gouripriya, who was always there to boost my confidence

    with her constant support and understanding. She played a major role to make this

    project successful. I am grateful to my parents, brother and sister for their love and

    affection which always enlighten me with full of energy. Lastly I would like to thank

    the nature and the beautiful campus of IIT Madras which refreshed me every time afterhours of work.

    i

  • 7/29/2019 Nesh Thesis

    4/72

    ABSTRACT

    KEYWORDS: Hybrid Propellant Motor, Internal Flow; Euler Equation; HLL; Ru-

    sanov; Riemann Solver; Runge Kutta; FVM; Multi-Block; Local

    Time Stepping; Roe Average.

    HLL and Rusanov Riemann flow solvers using Finite Volume Method have been de-

    veloped to analyze the flow in a hybrid propellant motor with a bluff body near the

    inlet. The validation of the solver is done using benchmark internal flow problems. A

    Multi Block, structured grid is used to discretized the computational domain using al-

    gebric and elliptic grid generation. First order forward time stepping and Runge Kutta

    time stepping with second and fourth order, are used as time marching schemes and

    their comparative study is performed on the basis of processing time to reach the steady

    state. The convergence rate to reach the steady state is increased using the local time

    stepping. The steady state numerical solution for the three dimensional Euler equation

    is obtained for the rocket motor with a body at inlet. The results obtained are analyzed

    and a comparison of the Rusanov and HLL Riemann solvers is performed.

    ii

  • 7/29/2019 Nesh Thesis

    5/72

    TABLE OF CONTENTS

    ACKNOWLEDGEMENTS i

    ABSTRACT ii

    LIST OF TABLES vi

    LIST OF FIGURES viii

    ABBREVIATIONS ix

    NOTATION x

    1 INTRODUCTION 1

    2 Grid Generation 4

    2.1 Geometrical Details of Computational Domain . . . . . . . . . . . 4

    2.2 Two Dimensional Grid Generation . . . . . . . . . . . . . . . . . . 6

    2.2.1 Grid Generation of Different Blocks . . . . . . . . . . . . . 6

    2.2.2 Issues Related to Quality of Grid . . . . . . . . . . . . . . . 8

    2.3 3 D Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    3 Euler Solver 11

    3.1 Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . 113.2 Finite Volume Method . . . . . . . . . . . . . . . . . . . . . . . . 12

    3.3 Time Marching Schemes . . . . . . . . . . . . . . . . . . . . . . . 13

    3.3.1 First Order Forward Time Stepping . . . . . . . . . . . . . 13

    3.3.2 Second Order Runge Kutta time stepping . . . . . . . . . . 13

    3.3.3 Fourth Order Runge Kutta Time Stepping . . . . . . . . . . 14

    3.4 Numerical Methods . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    3.4.1 Artificial Dissipation . . . . . . . . . . . . . . . . . . . . . 15

    iii

  • 7/29/2019 Nesh Thesis

    6/72

    3.4.2 Computation of2Q and 4Q . . . . . . . . . . . . . . . 163.5 Riemann Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    3.5.1 Godunovs Method . . . . . . . . . . . . . . . . . . . . . . 17

    3.5.2 HLL Approximate Riemann Solver . . . . . . . . . . . . . 18

    3.5.3 Rusanov Approximate Riemann Solver . . . . . . . . . . . 20

    3.6 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 21

    3.6.1 Inlet Boundary Condition . . . . . . . . . . . . . . . . . . 21

    3.6.2 Exit Boundary Condition . . . . . . . . . . . . . . . . . . . 22

    3.6.3 Inviscid Wall Boundary Condition . . . . . . . . . . . . . . 23

    3.6.4 Transfer Boundary Condition . . . . . . . . . . . . . . . . 23

    3.7 Initial Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    3.8 Convergence Criteria . . . . . . . . . . . . . . . . . . . . . . . . . 25

    3.9 Class Diagram of Solver . . . . . . . . . . . . . . . . . . . . . . . 25

    4 Performance Analysis of Different Schemes on Euler Solver using Pipe

    Flow Problem 27

    4.1 Numerical Schemes to Approximate the flux at Faces . . . . . . . . 27

    4.1.1 Second Order Artificial Dissipation . . . . . . . . . . . . . 27

    4.1.2 Fourth Order Artificial Dissipation . . . . . . . . . . . . . . 28

    4.1.3 Riemann Solvers . . . . . . . . . . . . . . . . . . . . . . . 28

    4.1.4 Performance Analysis of Schemes . . . . . . . . . . . . . . 29

    4.1.5 Residue Plots . . . . . . . . . . . . . . . . . . . . . . . . . 29

    4.2 Time Marching Schemes . . . . . . . . . . . . . . . . . . . . . . . 30

    4.2.1 Performance Analysis of Schemes . . . . . . . . . . . . . . 30

    4.2.2 Residue Plots . . . . . . . . . . . . . . . . . . . . . . . . . 30

    5 Code Validation 32

    5.1 Test Case A : Supersonic Wedge Flow . . . . . . . . . . . . . . . . 32

    5.1.1 Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    5.1.2 Initial condition . . . . . . . . . . . . . . . . . . . . . . . . 32

    5.1.3 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . 34

    5.1.4 Residue Plots . . . . . . . . . . . . . . . . . . . . . . . . . 34

    iv

  • 7/29/2019 Nesh Thesis

    7/72

    5.1.5 Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . 35

    5.2 Test Case B : Flow in a Channel with a Forward Facing Step . . . . 38

    5.2.1 Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    5.2.2 Initial condition . . . . . . . . . . . . . . . . . . . . . . . . 39

    5.2.3 Boundary Condition . . . . . . . . . . . . . . . . . . . . . 39

    5.2.4 Computational Strategy . . . . . . . . . . . . . . . . . . . 39

    5.2.5 Test Result . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    5.3 Test Case C : Flow in a Channel with a Bump . . . . . . . . . . . . 41

    5.3.1 Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    5.3.2 Initial Condition . . . . . . . . . . . . . . . . . . . . . . . 41

    5.3.3 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . 41

    5.3.4 Residue Plots . . . . . . . . . . . . . . . . . . . . . . . . . 43

    5.3.5 Test Result . . . . . . . . . . . . . . . . . . . . . . . . . . 43

    6 Results 46

    6.1 Two dimensional Case . . . . . . . . . . . . . . . . . . . . . . . . 46

    6.1.1 2D Results . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    6.1.2 Residue plots . . . . . . . . . . . . . . . . . . . . . . . . . 49

    6.2 Three Dimensional case . . . . . . . . . . . . . . . . . . . . . . . . 51

    6.2.1 Grid Detail and Processing time . . . . . . . . . . . . . . . 51

    6.2.2 3D Results . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    6.2.3 Residue plots . . . . . . . . . . . . . . . . . . . . . . . . . 52

    7 Conclusion and Future Scope 57

    7.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    7.2 Future Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

    A Class Descriptions 58

  • 7/29/2019 Nesh Thesis

    8/72

    LIST OF TABLES

    3.1 Inlet conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

    3.2 Initial condition for the 2D and 3D supersonic flow in channel with step 25

    4.1 Performance of different schemes for pipe flow with 25x10x16 cells 29

    4.2 CPU time per Iteration per grid point . . . . . . . . . . . . . . . . . 29

    4.3 Performance of different time marching schemes for pipe flow with

    25x10x16 cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    4.4 CPU time per iteration per grid point for time marching schemes . . 31

    5.1 Initial condition for the 2D and 3D supersonic wedge flow . . . . . 34

    5.2 Boundary condition for the 2D and 3D supersonic wedge flow, AW :

    Adiabatic Wall, TBC: Transfer boundary condition . . . . . . . . . 34

    5.3 Inlet boundary condition for supersonic wedge flow . . . . . . . . . 34

    5.4 Initial condition for the 2D and 3D supersonic flow in channel with step 39

    5.5 Inlet boundary condition for supersonic channel flow with a step . . 395.6 Initial condition for the 2D and 3D subsonic flow over a bump . . . 41

    6.1 Grid detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

    6.2 Processing time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

    vi

  • 7/29/2019 Nesh Thesis

    9/72

    LIST OF FIGURES

    1.1 Schematic diagram of Hybrid Rocket Motor . . . . . . . . . . . . . 1

    2.1 Dimensions of the computational domain . . . . . . . . . . . . . . 5

    2.2 Different blocks in 2D grid . . . . . . . . . . . . . . . . . . . . . . 6

    2.3 Different regions in BlockB1 . . . . . . . . . . . . . . . . . . . . . 7

    2.4 Issues in grid quality and their remedies . . . . . . . . . . . . . . . 9

    2.5 Three dimensional grid of Rocket Motor . . . . . . . . . . . . . . 10

    3.1 Ghost cell layers in 2D . . . . . . . . . . . . . . . . . . . . . . . . 21

    3.2 Inter block transfer boundary condition in 2D case . . . . . . . . . . 24

    3.3 Class diagram of the solver . . . . . . . . . . . . . . . . . . . . . . 26

    4.1 Residue plots for different schemes to obtain the flux at the faces . . 30

    4.2 Residue plots for different time stepping schemes . . . . . . . . . . 31

    5.1 Test case A : grids . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

    5.2 Residue plots for supersonic flow over 2D, 3D ramp and 3D cone . 35

    5.3 Pressure contours for 2D ramp using HLL and Rusanov . . . . . . . 36

    5.4 Pressure contours for cone using HLL and Rusanov . . . . . . . . . 37

    5.5 2D grid for the test case of foraward facing step in a channel flow . . 38

    5.6 Test case : density contours for 2 D case of supersonic flow in a channel

    with a forward facing step using HLL and Rusanov solver . . . . . . 40

    5.7 Test case: density contours for supersonic flow in a channel with a for-

    ward facing step using HLL and Rusanov solver . . . . . . . . . . . 40

    5.8 Grids for the test case of subsonic flow in a channel with a bump . . 42

    5.9 Residue plots for subsonic flow in a channel with a bump . . . . . . 43

    5.10 Test Case: Pressure contours for subsonic flow in a 2D channel with a

    bump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    5.11 Test Case: Pressure contours for subsonic flow in a 3D channel with a

    bump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    vii

  • 7/29/2019 Nesh Thesis

    10/72

    6.1 Pressure contours for 2D geometry using HLL solver . . . . . . . . 46

    6.2 Pressure contours for 2D geometry using Rusanov solver . . . . . . 47

    6.3 Mach number contours for 2D geometry using HLL solver . . . . . 47

    6.4 Mach number contours for 2D geometry using Rusanov solver . . . 48

    6.5 Various regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    6.6 Velocity profile for 2D geometry using HLL and Rusanov solver . . 50

    6.7 Residue plots for 2D geometry using HLL and Rusanov solver . . . 51

    6.8 Pressure contours along the axis using HLL and Rusanov solver . . 53

    6.9 Mach number contours along the axis using HLL and Rusanov solver 54

    6.10 Mach number cut plane near inlet and near the starting of the body using

    HLL and Rusanov solver . . . . . . . . . . . . . . . . . . . . . . . 55

    6.11 Residue plots for 3D geometry using HLL and Rusanov solver . . . 56

    A.1 Point, Vector, Mesh, Solver Object . . . . . . . . . . . . . . . . . . 58

    A.2 Cell, Face, GhostCell, PhysicalCell Object . . . . . . . . . . . . . . 59

    viii

  • 7/29/2019 Nesh Thesis

    11/72

    ABBREVIATIONS

    PDE Partial Differential Equation

    FVM Finite Volume Method

    BC Boundary Condition

    IC Initial Condition

    TBC Transfer Boundary Condition

    AW Adiabatic Wall

    HLL Harten, Lax and van Leer

    CFD Computational Fluid Dynamics

    OOD Object Oriented Design

    B1 Block Number 1

    B2 Block Number 2

    B3 Block Number 3

    B4 Block Number 4

    STP Standard Temperature and Pressure

    GC Ghost Cell

    P C Physical Cell

    Avg Average

    ix

  • 7/29/2019 Nesh Thesis

    12/72

    NOTATION

    P PressureP0 Total Pressure Density0 Total DensityT TemperatureT0 Total TemperatureR Real Gas Constant of Air

    Et Specific Energyu x-component of velocityv y-component of velocityw z-component of velocityc speed of soundV Velocity VectorCFL Courant Friedrich Lewy number

    n unit normal vectorCp specific heat coefficient at constant pressureCv specific heat coefficient at constant volume

    ratio of specific heat coefficients at constant pressure and volume

    Control Volume Control Surfacet timet time stepK Number of FacesSk Area of face K{I} Set of all Cells Computational domainResi Residue ofi

    th Cell

    H Total Enthalpy2 Second order artificial dissipation factor

    4 Fourth order artificial dissipation factorA Flux Jacobian Matrix Azimuth angle in cylindrical coordinates systemr radial distance in cylindrical coordinate system

    x

  • 7/29/2019 Nesh Thesis

    13/72

    CHAPTER 1

    INTRODUCTION

    Hybrid rockets have low regression rate, which makes it impractical even though it

    combines the technical advantages of both liquid and solid rockets, such as simplicity,

    safety, restart ability and low cost of development and operation. The configuration of

    hybrid motor (Lin, 2009) is shown in fig 1.1. If the flame can be stabilized near the head

    end of the motor then the regression rate may improve further. It is observed by Dr. P.

    A. Ramakrishna and Rajiv Kumar that the burning inside rocket motor is improved if

    a bluff body is placed at head end of the motor. The research work on the effect of

    bluff body on the combustion is being pursued in Aerospace Engineering Department,

    IIT Madras by Prof. P. A. Ramakrishna and Rajiv Kumar. The details of the geometry

    used in experiment are given by Rajiv Kumar through personal communication. The

    objective of this project is to develop a solver to visualize the internal flow in rocket

    motor without combustion using Finite Volume Method (FVM). A hemispherical bluff

    body is placed at the inlet of the motor and its effect on the flow is considered. The

    presence of body has been shown to improve the regression rate, hence the performance

    of rocket motor can be improved. To design the solver, 3D Euler equation is considered

    as the flow is assumed to be inviscid and compressible. The solid propellant is treated

    as solid adiabatic wall.

    Liquid Oxidizer

    Injector Solid Fuel

    Valve

    Gas Generator

    Figure 1.1: Schematic diagram of Hybrid Rocket Motor

    This project is split into five stages to obtain the results for the problem considered.

    In the first stage, grid generation part is considered. In FVM, the governing integral

    equations are solved within a control volume by discretization of the equations in each

    cell. This process of creating cells is known as grid generation. To solve the Euler equa-tion, FVM requires geometrical data like volume of each cell and the areas of all the

  • 7/29/2019 Nesh Thesis

    14/72

    faces, that define a cell. Different grid generation methods can be considered as given

    in Chung (2002). Here the basic algebric and elliptic grid methods are used to create a

    structured grid. As the computational domain is complex, a multi block, structured grid

    is generated to solve the Euler equation in problem domain. Physical domain is divided

    into four blocks and each block is divided into cells.

    The second stage corresponds to the method/schemes used to design a solver. An

    FVM solver was introduced by Jameson (Jameson et al., 1981). The addition of second

    order artificial dissipation makes the solution to converge for a range of CFL values.

    The addition of the fourth order dissipation factor reduces the spurious oscillation near

    the steady state and it increases the convergence rate as well. As multi block grid is

    used, the solver needs to be robust, where the solution can converge for different di-

    mensions and shapes of individual blocks. In explicit artificial dissipation methods, the

    second and fourth order dissipation factors are added by trial and error, hence some

    methods are required where the dissipation factor can be incorporated implicitly in the

    scheme. Riemann solvers are being used in CFD for a long time. Toro (1999) has con-

    sidered the details of the Riemann solvers while Kitamura and Nishikawa (Nishikawa

    and Kitamura, 2008) developed simple approximate Riemann solvers. HLL and Ru-

    sanov are the simplest Riemann solvers, which are used in present work. First order

    forward time, second and fourth order Runge-Kutta time stepping schemes are imple-

    mented in the solver in order to march in time. The Initial and boundary conditions are

    incorporated in the solver according to the flow problem considered.

    The third stage deals with design and implementation of the method considered, on

    computers. The solver is inclined towards an Object Oriented Design (OOD) and is

    implemented in C++.

    Code validation is the fourth stage of this project. In this stage some well known test

    problems e.g., supersonic flow over a ramp, supersonic flow in a channel with a for-

    ward facing step and subsonic flow in a channel with bump, are considered. The results

    obtained for these problems are compared with the results given in literature (Schwane,

    2003; Galanin et al., 2009; Sun et al., 2009).

    In the fifth and final stage, the results for the internal flow in a propellant motor is

    obtained using the solver developed.

    2

  • 7/29/2019 Nesh Thesis

    15/72

    The outline of this report is as follows, the grid generation part is discussed in chapter

    2. Chapter 3 deals with the methods and schemes to solve the Euler equations. The de-

    sign and implementation of Euler solver is considered in chapter 4, the results obtained

    for various methods/schemes are discussed in chapter 5 on pipe flow problem. Code

    validation in performed in chapter 6. The result for the internal flow of solid propellant

    motor is considered in chapter 7. The thesis is concluded with the scope for future work

    in chapter 8.

    3

  • 7/29/2019 Nesh Thesis

    16/72

    CHAPTER 2

    Grid Generation

    To solve the governing PDE in computational domain using FVM, domain needs to be

    discretized into finite size volumes called as cells. A structured grid is generated using

    algebric and elliptic methods to construct cells.

    2.1 Geometrical Details of Computational Domain

    Geometry Details:

    Inlet Diameter Din 7.5 mm

    Diameter of Inner domain of motor Dmotor 15 mm

    Diameter of sphere(body) Dbody 6 mm

    Diameter of the Hole in body Dhole 2 mm

    Exit Diameter Dexit 14 mm

    Distance of the body from inlet L1 2mm

    Distance between inlet and Nozzle L3 124 mm

    Length of the Nozzle section L4 12 mm

    Length of constant area section L5 10 mm

    Angle of Nozzle surface with axis 35o

  • 7/29/2019 Nesh Thesis

    17/72

    Solid Body

    154

    132

    All dimensions are in mm

    Inlet

    12

    7

    2

    15

    Figure 2.1: Dimensions of the computational domain

    5

  • 7/29/2019 Nesh Thesis

    18/72

    The computational domain is shown in Fig. 2.1. As the computational domain is

    complex, multi-block approach is used to create the structured grid. The whole domain

    is divided into four blocks so that the grid can be generated for each block easily. To

    create a three dimensional grid for the computational domain, a two dimensional grid

    is generated and it is rotated by 360o about the axis of symmetry.

    2.2 Two Dimensional Grid Generation

    The 2D grid is generated by using linear interpolation. The quality of grid is improved

    by using the elliptic grid near the body. For detail explanation of the grid generation

    methods Chung (2002) cab be reffered. The process of creating grid for each block and

    issues related to the grid quality are mentioned below.

    2.2.1 Grid Generation of Different Blocks

    Different blocks used in generation of 2D are shown in fig. 2.2.

    Body

    BlockB2

    L3L4

    BlockB3 BlockB4

    BlockB1

    Dmotor2

    L5L1 L2

    Figure 2.2: Different blocks in 2D grid

    Block B1

    To create the grid for blockB1, the block is divided in three regions as shown in fig. 2.3.

    The region where blockB1 interfaces with blockB2 is named as Region-1. In Region-2,

    blockB1 interfaces with the body while Region-3 is considered where the B1 interfaces

    with B3 behind the body. The radius of sphere (body) is 6 mm and it is placed 2 mm

    ahead from inlet with a cylindrical hole of 2 mm diameter. In two dimension case the

    6

  • 7/29/2019 Nesh Thesis

    19/72

    Figure 2.3: Different regions in BlockB1

    sphere will be circle. To create the grid in Region-2, the equation of the circle needs

    to be identified. To find the equation of circle, the center of the circle is considered

    as (xc, yc ). The computational domain is symmetrical about the x-axis hence yc = 0.

    Now to obtain the value ofxc we write the equation of the circle as

    (x xc)2 + (y yc)2 = 62, (2.1)

    where yc = 0. As the distance of the body from the inlet is 2 mm with a hole of 2 mmdiameter, it passes through the point (2,1) where origin is assumed at the inlet point of

    the axis. Hence,

    (2 xc)2 + (1 0)2 = 62 (2.2) xc = 2 +

    35 (2.3)

    So the variation of y with x can be given as,

    y =

    36 (x 2 35). (2.4)

    Here L1 =2 mm, L2 =

    35 mm and L3 = 124 mm, where L2 is the length of the

    body along the x-axis. So Region-1, Region-2 and Region-3 are defined from inlet to

    L1, L1 to L2 and L2 to L3 respectively. For simplicity during the grid generation, the

    value ofL2 is approximated to 6 mm. While creating the grid points, for the Region-1,

    equal spacing was implemented in x-direction and same spacing is used for Region-2 as

    well. For Region-3 the spacing in y-direction was find by distributing the whole length

    along y-direction equally. As the length of the Region-3 is much higher compared tothe length of Region-2 in x-direction, hence the spacing between grid points is more

    7

  • 7/29/2019 Nesh Thesis

    20/72

    than the spacing in Region-2. In y-direction for Region-1, uniform grid spacing is used.

    While for region-2, the total length in computational domain is (Dmotor/2 y) and herey varies with x, hence y changes with x till Region 2. By using linear interpolationthe grid points for Region-2 are obtained. For Region-3 the length in y-direction is same

    as 0.5 (Dmotor Dbody) = 1.5 mm, hence a uniform grid is generated for Region-3.

    Block B2

    BlockB2 is also divided in three regions similar to block B1, Region 1 where it is

    interfacing with B1, Region 2 where it is interfacing with body and the last region

    where B2 interfaces with B3. y, the distance between two grid points in y-direction,to create the grid points, is kept same.

    x is kept same as of blockB1 for the grid

    points corresponding with same value ofx along the axis.

    Block B3

    A uniform grid is created for blockB3 such that at interface the grid is overlapping with

    blockB1 and B2 properly at the interfaces.

    Block B4

    For B4 the nozzle and constant area duct parts are kept withequal spacing in x-direction.

    The grid points in y- direction are obtained by linear interpolation from the points ob-

    tained at the interface of this block with other blocks.

    2.2.2 Issues Related to Quality of Grid

    Skewness of the Grid Near the Body in Block B1

    During the Grid Generation for B1, high skewness of the grid is observed near body. To

    solve this issue in Region 1 and Region 2, elliptic grid is generated as shown in fig. 2.4.

    Abrupt Change in Point Spacing

    While creating the grids of different blocks, it is observed that the grid size from one

    grid point to another, increases abruptly at the interface of two blocks. As a result afterrunning the solver on such a grid, abrupt jump in the properties between two near cells is

    8

  • 7/29/2019 Nesh Thesis

    21/72

    Figure 2.4: Issues in grid quality and their remedies

    9

  • 7/29/2019 Nesh Thesis

    22/72

    observed. To resolve this issue, the point spacing is implemented such that grid spacing

    should not change abruptly. To create such a grid, a factor of 1.217759 is used for Block

    B3 and for Region-3 of blockB1 and B2 while using 33 grid points along x-direction

    from the length L2 to L3 to create a nonuniform grid. First the factor is multiplied with

    the x of the region 2 of blockB1 till first 20 grid points are obtained in the areasmentioned and then the factor is inverted to decrease the size to make the spacing of

    the order ofx compatible with B4. This factor is obtained by using trial and error.Similarly the spacing in y direction is also changed non-uniformly by using suitable

    factors using trial and error. Fig. 2.4 shows the issues mentioned. The optimized grid

    options are used to create the finalized 2D grid.

    2.3 3 D Grid

    After getting the grid on 2-D, the grid is rotated by 360o about x-axis to get the 3-D

    grid. The final grid is shown in fig. 2.5.

    Figure 2.5: Three dimensional grid of Rocket Motor

    10

  • 7/29/2019 Nesh Thesis

    23/72

    CHAPTER 3

    Euler Solver

    3.1 Governing Equations

    The three dimensional Euler equation in integral form can be written as,

    d

    dt

    Qd +

    F.n dS = 0 (3.1)

    Where is the control volume and is the control surface.

    F and n are defined as,

    F = Ei + Fj + Gk (3.2)

    n = nxi + nyj + nzk (3.3)

    Where Q, E, F and G are defined as,

    Q =

    u

    v

    w

    Et

    =

    q1

    q2

    q3

    q4

    q5

    (3.4)

    E =

    u

    u2 + P

    uv

    uw

    (Et + P)u

    =

    q2

    q22/q1 + P

    q2q3/q1

    q2q4/q1

    (q5 + P)q2/q1

    (3.5)

    F =

    v

    uv

    v2 + P

    vw

    (Et + P)v

    =

    q3

    q2q3/q1

    q32/q1 + P

    q3q4/q1

    (q5 + P)q3/q1

    (3.6)

  • 7/29/2019 Nesh Thesis

    24/72

    G =

    w

    uw

    vw

    w2 + P(Et + P)w

    =

    q4

    q2q4/q1

    q3q4/q1

    q42/q1 + P(q5 + P)q4/q1

    (3.7)

    From state equation and enthalpy relation,

    P = R T (3.8)

    Et = CvT +(u2 + v2 + w2)

    2(3.9)

    P = ( 1)(Et 2

    (u2 + v2 + w2)) (3.10)

    or P = ( 1)(q5 q22 + q32 + q42

    2 q1) (3.11)

    3.2 Finite Volume Method

    A cell-centered FVM has been used to solve the governing system of equations. The

    computational domain is divided into finite number of sub volumes called as cells. The

    discretized equation is solved for each cell separately. Consider ith cell with control

    volume ofi with Knumber of faces. The discretized equation can be represented as,

    iQ

    t=

    k=Kk=1

    (F.n)kSk (3.12)

    (F.n) = Enx + F ny + Gnz (3.13)

    Qn = Qin+1 Qin (3.14)

    where Sk is the area of the cell corresponding to kth face ofith cell. nx, ny, nz are the

    components of the unit normal at corresponding face. For each cell i {I}, having aset of faces {Ki} the cell-residual Resi is defined as a numerical approximation of theintegral over the cell of the spatial operator, {Ki} divided by the cell volume i. Hencethe Resi can be written as

    Resi = k=K

    k=1 (F.n)kSk

    i(3.15)

    The cell-averaged value, Qi, is evolved by the non-zero residual in the form

    dQidt

    = Resi (3.16)

    12

  • 7/29/2019 Nesh Thesis

    25/72

    3.3 Time Marching Schemes

    Three types of time stepping schemes were incorporated into the solver. The first order

    time accurate is the easiest to implement. In this scheme the t will be minimum com-

    pared to higher order time accurate schemes because of the limitation on CFL number.

    By using second and fourth order Runge Kutta schemes, the time step can be increased

    as higher values of CFL number can be used for convergence. In the one-dimensional

    case, the CFL condition for grid spacing x, wave speed u and speed of sound c isgiven by equation. 3.17 and similarly the equivalent three dimensional constraint on

    time spacing can be given as,

    t1D CFL(x)

    |u|

    + cmax(3.17)

    t3D CFL iK

    k=1 |k|maxSk(3.18)

    Here |k|max is the maximum characteristic wave speed normal to the cell face k andSk is the area of the face k.

    3.3.1 First Order Forward Time Stepping

    In first order forward time stepping scheme, the value of the Qi at any time tn+1 can be

    given as

    Qn+1i = Qni + t Resi(Qni ) (3.19)

    3.3.2 Second Order Runge Kutta time stepping

    The two stage second order Runge Kutta method can be implemented as given below.

    Q(0)i = Q

    ni

    Q(1)i = Q(0)i + t Resi(Q(0)i )

    Q(2)i =

    1

    2Q(0)i +

    1

    2(Q

    (1)i + t Resi(Q(1)i ))

    Qn+1i = Q(2)i

    13

  • 7/29/2019 Nesh Thesis

    26/72

    3.3.3 Fourth Order Runge Kutta Time Stepping

    The four stage fourth order Runge Kutta method is given below.

    Q(0)i = Q

    ni

    Q(1)i = Q

    (0)i +

    t2

    Resi(Q(0)i )

    Q(2)i = Q

    (0)i +

    t2

    Resi(Q(1)i )

    Q(3)i = Q(0)i + tResi(Q(2)i )

    Q(4)i = Q

    (0)i +

    t6

    (Resi(Q(0)i ) + 2Resi(Q

    (1)i ) + 2Resi(Q

    (2)i ) + Resi(Q

    (3)i ))

    Qn+1i = Q(4)i

    3.4 Numerical Methods

    To solve the discretized equation 3.12, the flux term (F.n)k at kth face has to be eval-

    uated. The term (F.n)k can be implemented in two ways. Lets consider, cell i and j

    share a common face k with area vector as Sk. Then

    (F.n)k = Avg(Fi , Fj) . Sk (3.20)

    or (F.n)k = F(Avg(Qi , Qj)) . Sk (3.21)

    The Avg function is defined on the basis of different schemes to be applied. For the

    schemes related to the equation (3.21), the Avg function can be defined in two ways,

    simple and Roes averaging. Simple averaging is defined as

    Avg(Qi , Qj) =(Qi + Qj)

    2(3.22)

    14

  • 7/29/2019 Nesh Thesis

    27/72

    In Roe averages, different variables at the face are approximated in terms ofith and jth

    cell properties taken from Toro (1999) are given below,

    =

    ii (3.23)

    u = uii + ujji +

    j

    (3.24)

    v =vi

    i + vj

    j

    i +

    j(3.25)

    w =wi

    i + wj

    j

    i +

    j(3.26)

    H =Hi

    i + Hj

    j

    i +

    j(3.27)

    c =

    ( 1)(Hu2 + v2 + w2

    2 ) (3.28)

    V = V .n = unx + vny + wnz (3.29)

    Here q correspond to the property q at face, hence Q can be evaluated using primitive

    variables at face k and the flux at face k can be calculated as a function of Q. Detailed

    explanation on Roes averaging is given in Toro (1999).

    3.4.1 Artificial Dissipation

    As suggested by Jameson (Jameson et al., 1981), to suppress the tendency for even-odd

    point decoupling, and to prevent the appearance of oscillations in regions containing

    severe pressure gradients in the neighborhood of shock waves or stagnation points, it is

    necessary to augment the finite volume scheme by the addition of artificial dissipative

    terms. Hence equation (3.12) is replaced by adding dissipative term in it and can be

    given as,

    Qt

    =k=K

    k=1 (F

    .n)kSki

    + D(Q) (3.30)

    D(Q) = 22Q + 44Q (3.31)

    with 2 > 0 and 4 < 0, where 2 and 4 are the second and fourth order artificial

    dissipation factors respectively.

    15

  • 7/29/2019 Nesh Thesis

    28/72

    3.4.2 Computation of2Q and 4Q

    The theorem of Gauss is used to compute 2Q and 4Q. The Gausss theorem statesthat,

    . A d =

    A.n dS

    where A is any arbitrary vector.

    Let the axes, xi form a right-handed Cartesian coordinate system and suppose A = ei,

    where ei is a unit vector in xi direction. Then the theorem of Gauss for such a vector

    field yields,

    xid =

    ni dS

    The above equation takes the below form when it is discretized for a cell of volume ,

    xi=

    1

    ni dS

    The term

    ni dS is approximated for a cell with K faces as,

    ni dS =k=K

    k=1

    (i + k)

    2niSk

    Where k denotes the corresponding neighboring cell for face k and i represents the

    value at the cell center. Ski is the ith component of the area at face k. Similarly for any

    scalar function , the divergence theorem can be written as,

    d =

    n dS (3.32)

    Hence the higher derivatives (m + 1) can also be computed using the values ofmth

    derivative as given below,

    m+1

    xim+1=

    1

    m

    ximni dS

    16

  • 7/29/2019 Nesh Thesis

    29/72

    3.5 Riemann Solver

    To implement the solver using the artificial dissipation, the right amount of artificial

    dissipation (2 and 4) is required, with a limiting range of CFL number. If the right

    amount of viscosity is not added the solution diverges. Sometimes code diverges after

    running a number of iterations, hence some suitable scheme has to be used where the

    right amount of artificial viscosity can be added without any trial and error. To solve

    this issue Riemann solvers are incorporated in the Euler solver requiring no explicit

    artificial dissipation.

    The flux at faces are equated to Godunovs flux. To get the Godunovs flux at the

    face, the approximate Riemanns solvers, HLL and Rusanov, are used. For the formu-

    lation of Riemann solvers, Toro (1999) is referred. Some basic formulations are given

    below,

    3.5.1 Godunovs Method

    Lets consider the one dimensional spatial domain [0, L] along x-axis. We divide this

    domain into N cells with Ii = [xi 12, xi+ 12

    ] of regular size x = xi+ 12 xi 12 = L/N,with i = 1, 2,..,N. For a given cell Ii the location of the cell center xi and the cell

    boundaries xi 12 ; xi+ 12 are given by,

    xi 12= (i 1) x , xi = (i 1

    2) x , xi+ 12 = i x (3.33)

    The temporal domain is given by [0, T], where T is some output time. The discretization

    of the time interval [0, T] is generally done in time steps t of variable size as the wavespeeds vary in space and time, the ch hence the choice oft is carried out as marchingin time proceeds. Now the Euler equation can be written as

    Qt + F(Q)x = 0 (3.34)

    In Godunov method, a piece wise constant distribution ofQ is assumed for all cells.

    Lets assume Q(x, tn) is the value of the data at time t = tn. The cell averages can be

    defined as

    Qni =1

    xx

    i+12

    xi 12

    Q(x, tn)dx (3.35)

    Hence the piecewise constant distribution Q(x, tn) can be given as,

    Q(x, tn) = Qni , for x in each cell Ii = [xi 12

    , xi+ 12

    ] (3.36)

    17

  • 7/29/2019 Nesh Thesis

    30/72

    In Godunovs method the new average value Qn+1i at time tn+1 = tn + t is given

    by,

    Qn+1i = Qni +

    tx [Fi+ 12 Fi 12 ] (3.37)

    Where the inter-cell numerical flux is given by,

    Fi+ 12= F(Qi+ 12

    (0)) (3.38)

    if the time step is given by,

    t xSnmax

    (3.39)

    Where Snmax denotes the maximum wave velocity present throughout the domain at time

    tn.

    3.5.2 HLL Approximate Riemann Solver

    From Godunov method, the inter-cell numerical flux is given as equation (3.50). Here

    Qi+ 12(0) is the exact similarity solution Qi+ 12

    (x/t) of the Riemann problem given as,

    t Q + x F(Q) = 0

    Q(x, 0) ={

    Qni , x < xi+1/2

    Qni+1, x > xi+1/2

    Qi+1/2(x/t)

    Fi+1/2 =1t

    t0

    F(Qi+1/2(0)) dt = F(Qi+1/2(0))

    Consider the case where the whole wave structure arising from the exact solution of

    the Riemann problem is contained in the control volume [xi, xi+1] x [0, T], that is

    xi T Si , xi+1 T Si+1 (3.40)

    where Si and Si+1 are the slowest and fastest signal velocities perturbing the initial datastates Qi and Qi+1 respectively, and T is a chosen time. The integral average of the

    exact solution of the Riemann problem between the slowest and fastest signals at time

    T is a known constant, provided that the signal speeds Si and Si+1 are known; as given

    such constant is given by

    Qhll =(Si+1Qi+1 SiQi + Fi Fi+1)

    (Si+1 Si) (3.41)

    WhereFi = F(Qi)

    andFi+1 = F(Qi+1)

    . Harten, Lax and van Leer put forward the

    18

  • 7/29/2019 Nesh Thesis

    31/72

    following approximate Riemann solver

    Q(x, t) =

    Qi ifxt

    SiQhll if Si xt Si+1

    Qi+1 ifxt Si+1

    (3.42)

    where Qhll is the constant state vector and the speeds Si and Si+1 are assumed to be

    known. The flux corresponding to the state Qhll along the t-axis is given by,

    Fhll =Si+1Fi SiFi+1 + SiSi+1(Ui+1 Ui)

    Si+1 Si (3.43)

    The corresponding inter-cell flux at the face can be given by,

    Fhlli+ 12

    =

    Fi if 0 SiFhll if Si 0 Si+1

    Fi+1 if 0 Si+1(3.44)

    or Fhlli+ 12

    =S+i+1Fi Si Fi+1 + SiS+i+1(Ui+1 Ui)

    S+i+1 Si(3.45)

    Where S+i+1 = max(0, Si+1), Si = min(0, Si).

    Given an algorithm to compute the speeds Si and Si+1 we have an approximate value

    of flux at the face. In case of three dimensional Euler equation a numerical flux across

    each interface k, k, is determined by solving Riemann problem approximately, based

    on the one dimensional Euler equation in the direction of the face normal n. Hence the

    3D Euler equation equation can be written as,

    Q

    t+

    F(Q)

    n= 0, (3.46)

    where F(Q) = (F

    .n), is the flux at the face k (equation 3.13) and here the initial data,Qi and Qj are separated by the cell interface. These initial data simply taken as the cell

    averaged states in the adjacent cells. Here F(Q) is the flux corresponding to the kth

    face is given as,

    F(Q) =

    V

    uV + P nx

    vV + P ny

    wV + P nz

    (Et + P)V

    (3.47)

    where V = V .n = unx + vny + wnz and the normal vector on the surface is n = nxi +

    19

  • 7/29/2019 Nesh Thesis

    32/72

    nyj + nzk. The left and right speeds, SL and SR ( Si and Si+1 in one dimension), are set

    to be minimum and maximum eigenvalues of the Flux Jacobian Matrix A (i.e.F(Q)Q

    ),

    SL = min(VL cL, V c), SR = min(VR + cR, V + c), (3.48)

    where (V)L,R are propagation speed normal to the surface corresponding to the left and

    right cell.

    3.5.3 Rusanov Approximate Riemann Solver

    As in HLL Riemann solver, two wave speeds SL and SR are considered, it is a two

    wave approximate Riemann solver. Rusanov suggested a one wave approximate Rie-

    mann solver, by reducing the number of waves. Now Assume a single wave speed

    estimate:S+ > 0. We define a second wave speed:SL = S+; SR = +S+. Substitu-tion ofSL and SR values into HLL flux gives the Rusanov flux as,

    FRusanov =1

    2(FL + FR) S+

    2(QR QL) (3.49)

    Choice of the wave speed S+ considered by Davis(Davis, 1988) is,

    S+ = max

    {|VL

    cL

    |,

    |VR

    cR

    |,

    |VL + cL

    |,

    |VR + cR

    |}(3.50)

    The above speed is bounded by,

    S+ = max{|VL| + cL, |VR| + cR} (3.51)

    The wave speed S+ can be considered as maximum eigenvalue of Jacobian flux

    matrix as well given by Kitamura and Nishikawa (Nishikawa and Kitamura, 2008).

    S+ = |V| + c (3.52)

    20

  • 7/29/2019 Nesh Thesis

    33/72

    3.6 Boundary Conditions

    To apply boundary conditions ghost cells are used. A layer of ghost cells is added at

    individual boundary, corresponding to i = 0, i = Imax, j = 0, j = Jmax, k = 0 and k = Kmax,

    where i, j and k are used as indices in structured grid with i along the axis, j radial and

    k corresponding to azimuth angle for rotational grid and along x,y,z respectively for

    regular Cartesian grid. In a ghost cell, we need to update the value ofQ on the basis of

    boundary conditions. Fig. 3.1 shows to create the ghost cell layers in 2D case. Different

    kind of boundary conditions are incorporated in following subsections.

    Physical CellGhost Cell

    I0Layer

    Imax

    Layer

    Jmax Layer

    J0 Layer

    Figure 3.1: Ghost cell layers in 2D

    3.6.1 Inlet Boundary Condition

    At inlet, the total stagnation temperature and pressure are prescribed. Subsonic flow

    is considered at the inlet hence in case of 3D Euler equation, one numerical and four

    physical boundary conditions are required at inlet. The inlet condition at the ghost cell

    layer J0 is given in table 3.1

    21

  • 7/29/2019 Nesh Thesis

    34/72

    Table 3.1: Inlet conditions

    Property Value

    P0 (P a) 121590.0T0(K) 300.0

    v 0

    w 0

    0 can be find out using equation of state hence 0 =P0RT0

    , where R is the gas

    constant for air. The ghost cell values are updated as follows

    uGC = uPC (3.53)

    vGC = 0wGC = 0

    TGC = T0 (u2GC + v

    2GC + w

    2GC)

    2Cp

    GC = 0(T

    T0)

    1(1) ,

    where GC subscript corresponds to Ghost Cell and PC corresponds to Physical Cell.

    After getting primitive variables (, u, v, w and T) in ghost cells the value ofQ is up-

    dated.

    3.6.2 Exit Boundary Condition

    At exit plane, the static pressure is specified. Being subsonic flow, one physical and

    four numerical boundary conditions are required. The values transferred to ghost cell

    layer, Imax, at exit plane are given as,

    22

  • 7/29/2019 Nesh Thesis

    35/72

    PGC = Pexit (3.54)

    (u)GC = (u)PC

    (v)GC = (v)PC

    (w)GC = (w)PC

    TGC = TPC

    GC =PGC

    RTGC

    uGC = (u)GCGC

    vGC =(v)GC

    GC

    wGC =(w)GC

    GC

    3.6.3 Inviscid Wall Boundary Condition

    The flow is assumed to be inviscid and solid adiabatic walls are considered. Being solid

    walls no penetration condition (V .n = 0 and Pn

    = 0 ) is applied . Adiabatic wall gives

    constraint on Temperature as Tn

    = 0 at wall. Using first order boundary condition the

    values of P, T and are extrapolated to the ghost cells. Hence the inviscid wall boundary

    conditions can be applied as

    PGC = PPC (3.55)

    TGC = TPC

    GC = PC

    VGC = VPC 2(VPC.n)n

    where VGC is the velocity vector in ghost cell and n is the normal to the boundary orface where boundary condition is applied.

    3.6.4 Transfer Boundary Condition

    At the block level, the ghost cell layers are created for all boundaries for each block.

    At interface of two blocks, the data from the one cell is copied to the ghost cells of the

    near block and similarly the near block data is transferred to its ghost cell layer. The

    basic idea of inter block transfer is taken from Blazek (2001). The inter-block transfer

    23

  • 7/29/2019 Nesh Thesis

    36/72

    is shown in fig. 3.2 between two blocks A and B. The data from the boundary cells of

    physical domain are transferred to the corresponding ghost cell layer of other block. In

    case of rotated grid the ghost cell layers are created for k=0 and k=Kmax as well and

    the data are exchanged between these two layers from their corresponding neighboring

    physical cells. Hence the data for k=0 and k=Kmax ghost cell layers are obtained by

    copying the data from physical cells of k=Kmax and k=K0 layers respectively.

    BA

    Exchange of data from

    Exchange of data from

    physical cell of A to ghost cell of B

    physical cell of B to ghost cell of A

    Figure 3.2: Inter block transfer boundary condition in 2D case

    3.7 Initial Condition

    Generally fluid is considered stationary for the initial condition but as the geometry con-

    sidered in problem is axisymmetric, the solution of 2D flow is a better approximation to

    get the steady state solution for 3D case. For 2D case the initial condition of stationary

    fluid is taken. Hence, the initial condition for 2D case is given in table 3.2. To obtain

    the initial values for 3D case from the solution of 2D, all vector quantities like velocity

    have to be transformed accordingly. Scalar quantities like pressure or density, which

    are invariant with respect to coordinate rotation, remain unchanged. As the 3D grid is

    24

  • 7/29/2019 Nesh Thesis

    37/72

    created by rotating the 2D grid about x-axis, the rotation matrixR becomes,

    R =

    1 0 0

    0 cos sin

    0 sin cos

    (3.56)

    where is the angle of rotation and R is the rotation matrix.

    Table 3.2: Initial condition for the 2D and 3D supersonic flow in channel with step

    Property Value

    (Kg/m3) 1.225T(K) 287.70

    u 0

    v 0

    3.8 Convergence Criteria

    The convergence of the scheme is defined on the basis of the residue. The residue is

    obtained for set of

    {I

    }cells is given by following formulation,

    Relative Residue =

    i{I}

    5m=1

    Qn+1i (m) Qni (m)

    Qni (m)

    2i

    (ti)2 if Qni (m) > 10

    6

    Absolute Residue =

    i{I}

    5m=1

    Qn+1i (m) Qni (m)

    2 i(ti)2 if Q

    ni (m) 106

    The Residue value was dependent on the scheme and the case considered. The steady

    state was considered to be obtained whenever the Residue value was dropped from

    higher values (order of106) to significant value (order of107).

    3.9 Class Diagram of Solver

    To develop the solver, programming language C++ is used. The class diagram is shown

    in fig. 3.3. Here the Mesh object is passed to Solver and different functions of Solver

    class can be used through the instance of the solver. Different objects used are:

    25

  • 7/29/2019 Nesh Thesis

    38/72

    1. Point

    2. Vector

    3. Face

    4. Cell

    5. Mesh

    6. Solver

    Class diagram with their attributes and operations are given in appendix A.

    Figure 3.3: Class diagram of the solver

    26

  • 7/29/2019 Nesh Thesis

    39/72

  • 7/29/2019 Nesh Thesis

    40/72

    The value oft is not calculated as mentioned in equation 3.20 as in this scheme, theeigen values are not calculated to obtain the flux at faces. Hence by keeping conserva-

    tive approach the maximum eigen value is considered as (|u| + |v| + |w| + c) hence

    t can be given as,

    t = CFLlmin|u| + |v| + |w| + c (4.2)

    The value oflmin is obtained as,

    l = iKk=1 Sk

    (4.3)

    The solution diverges in case of local time stepping with CFL number and 2 value used

    for global time stepping; hence only global time stepping is considered in this scheme.

    In Roe averaging schemes, the Q value is taken as Roes averages given in equations

    3.35 to 3.41. The solution obtained in this scheme is similar to the solution obtained in

    simple averaging with same CFL and 2 values.

    4.1.2 Fourth Order Artificial Dissipation

    To improve the quality of solution, second and fourth order artificial dissipation factors

    are added. In this scheme, the convergence rate is also improved compared to the case

    where only second order dissipation is considered. The dissipation factor 4 is taken as

    -0.0001, which is obtained by trial and error.

    4.1.3 Riemann Solvers

    The problem considered has multi block grid, hence some scheme is required where the

    value of artificial dissipation factor is independent on the computational domain. Using

    Riemann solver, the flux value at the face is approximated such that the amount of dis-

    sipation is incorporated in the scheme implicitly. The HLL and Rusanov approximate

    Riemann solvers are employed on pipe flow problem. In these cases, CFL is 0.5 and

    local time stepping is incorporated. Riemann solvers require less number of iterations

    to reach the steady state than the scheme with 2nd and 4th order artificial dissipation

    considered.

    28

  • 7/29/2019 Nesh Thesis

    41/72

    4.1.4 Performance Analysis of Schemes

    Total time taken by individual scheme to reach a certain value of residue is given in

    table 4.1. The performance of the schemes on the basis of the time taken per iteration

    per grid point is considered in table 4.2. It is observed that the Riemann solvers give

    high performance compared to the schemes with artificial dissipation.

    Table 4.1: Performance of different schemes for pipe flow with 25x10x16 cells

    Scheme CFL Residue Number Of Iteration Processing time(sec)

    2nd Order Simple Avg 0.3 1.18x1005 1045082 21946.72

    2nd Order Roe Avg 0.3 1.18x1005 1046413 21974.67

    4th Order Simple Avg 0.3 1.18x1005 562438 23059.95

    HLL Solver 0.5 9.15x1006 259084 2072.672Rusanov Solver 0.5 1.18x1005 249980 1749.86

    Table 4.2: CPU time per Iteration per grid point

    Scheme CPU Time/Iteration/Grid Point(sec)2nd Order Simple Avg 5.25

    2nd Order Roe Avg 5.50

    4th

    Order Simple Avg 10.25HLL Solver 2.00

    Rusanov Solver 1.75

    4.1.5 Residue Plots

    Residue plots for different schemes are given in fig. 4.1.

    29

  • 7/29/2019 Nesh Thesis

    42/72

    1e-10

    1e-08

    1e-06

    0.0001

    0.01

    1

    100

    10000

    1e+06

    0 100000 200000 300000 400000 500000 600000 700000

    Residue

    Number Of Time Steps

    Residues of different FVM schemes

    2nd Order2nd Order Roe

    4th orderHLLRusanov

    Figure 4.1: Residue plots for different schemes to obtain the flux at the faces

    4.2 Time Marching Schemes

    First order forward time, second order Runge-Kutta and fourth order Runge Kutta

    schemes are implemented to the solver. HLL Riemann solver is used to obtain the

    flux at faces on pipe flow problem with grid size of 26x11x17.

    4.2.1 Performance Analysis of Schemes

    The results are compared on the basis of number of iterations, residue and processing

    time as given in table 4.3. The performance of the schemes on the basis of the time

    taken per iteration per grid point is given in table 4.4.

    4.2.2 Residue Plots

    Residue plots corresponds to different time marching schemes are shown in fig. 4.2.

    30

  • 7/29/2019 Nesh Thesis

    43/72

    Table 4.3: Performance of different time marching schemes for pipe flow with

    25x10x16 cells

    Time Stepping Scheme CFL Residue Number Of time steps CPU time(sec)

    First Order Forward Time 0.5 1.00005x105 177230 1772.302nd Order Runge Kutta 1.0 1.00005x 105 88619 1329.284th Order Runge Kutta 2.5 1.00022x 105 35447 1063.41

    Table 4.4: CPU time per iteration per grid point for time marching schemes

    Scheme CPU Time/Iteration/Grid Point(sec)First Order Forward Time 2.0

    2nd Order Runge Kutta 3.754th Order Runge Kutta 7.5

    1e-06

    1e-05

    0.0001

    0.001

    0.01

    0.1

    1

    10

    100

    1000

    10000

    0 20000 40000 60000 800001000001200001400001600001800

    Residue

    Number Of Iterations

    Residue Plot for Different Time Marching schemes

    First Order Forward TimeRunge Kutta 2nd OrderRunge Kutta 4nd Order

    Figure 4.2: Residue plots for different time stepping schemes

    31

  • 7/29/2019 Nesh Thesis

    44/72

    CHAPTER 5

    Code Validation

    The code validation of the solver is done by comparing the results on test problems

    considered with the results available in literature. To achieve the steady state, marching

    in time is performed using local time-stepping until the L2 residual has leveled off.

    CFL is used as 0.5 for both Rusanov and HLL solver. First order forward time stepping

    method is used to march in time.

    5.1 Test Case A : Supersonic Wedge Flow

    In this test, supersonic flow past a wedge, with an inclination of 15 degrees, is consid-

    ered with upstream Mach number of 3.

    5.1.1 Grid

    For two dimensional case, the computational domain with 2m length in x-direction and

    1m in y-direction is considered. The wedge is placed from x = 1m to x = 2m with an

    inclination of 15 degrees with the x-axis. A single-block, two-dimensional, structured

    grid is generated for the flow domain using algebric grid generation. The grid size of

    81x81 is considered. For three dimensional test two different cases are considered. In

    case1 the 3D grid is generated by stacking the xy grid along z-direction and a grid of

    51x51x26 is created. In case2, flow over a cone is considered and grid is generated by

    rotating the 2D grid about x-axis. For 3D cone test double blocks are used, one blockfrom inlet to the starting of the cone and other the conical shape obtained after rotating

    the wedge about x-axis. Hence, both the blocks have structured grid with the grid size

    of 21x41x37 corresponding to (x,r,) direction. The grids used are shown in fig. 5.1.

    5.1.2 Initial condition

    Initial conditions for 2D and 3D cases are considered as shown in table 5.1 for whole

    computational domain.

  • 7/29/2019 Nesh Thesis

    45/72

    Figure 5.1: Test case A : grids

    33

  • 7/29/2019 Nesh Thesis

    46/72

  • 7/29/2019 Nesh Thesis

    47/72

    1e-06

    0.0001

    0.01

    1

    100

    10000

    1e+06

    1e+08

    1e+10

    0 2000 4000 6000 8000 10000 12000 14000 1600

    Residue

    Number Of Time Steps

    Test Case A: Supersonic Wedge flow

    2D HLL2D Rusanov

    3D Ramp HLL3D Ramp Rusanov3D Cone HLL

    3D Cone Rusanov

    Figure 5.2: Residue plots for supersonic flow over 2D, 3D ramp and 3D cone

    5.1.5 Test Results

    The pressure contours are plotted and it is observed that the Rusanov solver is more

    dissipative than HLL. The results obtained in 2D case are very near to the theoretical

    results for the flow over a ramp. In the case of 3D case1 the results obtained are same

    as obtained in 2D case while in 3D case2 the change is pressure after shock is less

    compared to the value obtained in the case of 2D. Here rather than a ramp it is a cone in

    3D hence the 3D effects are there. The pressure variation can be seen in fig. 5.4 for all

    cases considered. The results are comparable with the results mentioned in reference

    (Schwane, 2003).

    35

  • 7/29/2019 Nesh Thesis

    48/72

    Figure 5.3: Pressure contours for 2D ramp using HLL and Rusanov

    36

  • 7/29/2019 Nesh Thesis

    49/72

    Figure 5.4: Pressure contours for cone using HLL and Rusanov

    37

  • 7/29/2019 Nesh Thesis

    50/72

    5.2 Test Case B : Flow in a Channel with a Forward

    Facing Step

    In this test the supersonic flow is considered and the shock reflection is observed be-cause of a forward facing step in the channel. The result is compared with the available

    numerical results in references (Galanin et al., 2009).

    5.2.1 Grid

    For the two dimensional case, the computational domain is considered of 3m in x-

    direction and 1m in y-direction. The step of 0.2m height is placed at x=0.6m. A single-

    block, two-dimensional, structured grid was generated for the flow domain and the

    solver is applied on the domain where the flow exists.The cells which resides between

    step and the boundary y=0 are not considered in computational domain. The grid size

    of 101x101 was considered for 2D case and the solver is run for two regions of 21x101

    and 81x81. For three dimensional case the code was tested on the grid size of 51x51x21,

    which is obtained by stacking the x-y grid of size 51x51 along z-direction. The grids

    corresponding to 2D is shown in fig. 5.5.

    Figure 5.5: 2D grid for the test case of foraward facing step in a channel flow

    38

  • 7/29/2019 Nesh Thesis

    51/72

    5.2.2 Initial condition

    Initial conditions for 2D and 3D cases were considered as shown in table 5.4.

    Table 5.4: Initial condition for the 2D and 3D supersonic flow in channel with step

    Test Case (Kg/m3) Et N/m2 u v w

    2D Case 0.5 0.125 0.0 0.0 -

    3D Case 0.5 0.125 0.0 0.0 0.0

    5.2.3 Boundary Condition

    The inlet boundary condition is applied as mentioned in table 5.5. The adiabatic wall

    boundary condition is applied in the domain corresponding to J0, Jmax, K0 and Kmax

    boundaries. The cells near the step, which are not used in computations are used as

    ghost cells to apply the boundary condition. Being a supersonic flow the value of Q

    is specified at inlet without extrapolating any variable from computational domain. At

    exit, supersonic exit boundary condition is applied i.e. all variables are extrapolated

    from the computational domain to ghost cells.

    Table 5.5: Inlet boundary condition for supersonic channel flow with a step

    (Kg/m3) Et N/m2 u v w

    1.0 6.286 3.0 0.0 0.0

    5.2.4 Computational Strategy

    In this test case, the results mentioned in literature (Galanin et al., 2009) are given

    at time t=4 sec, hence to obtain the result for HLL and Rusanov solver, global time

    stepping is used.

    39

  • 7/29/2019 Nesh Thesis

    52/72

    5.2.5 Test Result

    The pressure contours are shown in fig. 5.6 for 2D cases and in fig. 5.7 for 3D cases. It

    is observed that the Rusanov scheme is very dissipative comparative to HLL and as a

    result the region near shock is wider in case of Rusanov than HLL.

    Figure 5.6: Test case : density contours for 2 D case of supersonic flow in a channel

    with a forward facing step using HLL and Rusanov solver

    Figure 5.7: Test case: density contours for supersonic flow in a channel with a forward

    facing step using HLL and Rusanov solver

    40

  • 7/29/2019 Nesh Thesis

    53/72

    5.3 Test Case C : Flow in a Channel with a Bump

    In this test, the subsonic flow is considered through a channel with a bump and the

    pressure contours near the bump are compared with the available results (Sun et al.,

    2009).

    5.3.1 Grid

    For the two dimensional case the computational domain is considered of 2m length in

    x-direction and 0.5m in y-direction. The bump curvature is considered of 1m which

    intersect the channel at x=0.5m and x=1.5m. The maximum height of the bump is

    considered as 0.1m at x=1.0 m. A single-block, two-dimensional, structured grid was

    generated for the flow domain using elliptic grid generation of the size 51x51. To test

    in 3D, two cases are considered, case1 where the grid is obtained after stacking in z-

    direction and case2 where the grid is created after rotation of the 2D grid.In case2, 3

    blocks are considered and the boundary conditions are applied accordingly. The case2

    has three blocks, structured grid with grid size of 51x51x17 along (x,r,) direction

    while case1 is single block, structured grid size of 101x26x11. The grids used are

    shown in fig. 5.8

    5.3.2 Initial Condition

    Initial conditions used for 2D and 3D cases are given in table 5.6, where all cells are

    initialized with same values in computational domain.

    Table 5.6: Initial condition for the 2D and 3D subsonic flow over a bump

    Test Case Density(Kg/m3) Pressure(Pa) u v w

    2D Case 1.225 101325.0 0.0 0.0 -3D Case 1.225 101325.0 0.0 0.0 0.0

    5.3.3 Boundary Conditions

    At inlet of the channel, the inlet boundary condition is applied with stagnation pres-

    sure and temperature of 107853.3984 Pa and 300K respectively and exit pressure of

    101325.0 Pa, which corresponds to the flow of M=0.3 in a channel without bump. The

    41

  • 7/29/2019 Nesh Thesis

    54/72

    Figure 5.8: Grids for the test case of subsonic flow in a channel with a bump

    42

  • 7/29/2019 Nesh Thesis

    55/72

    adiabatic inviscid wall boundary condition is applied in the domain corresponding to

    J0, Jmax boundaries in case of 2D and in case of 3D, adiabatic wall is considered for

    Jmax, K0, Kmax boundaries for all three block and for block 2, J0 is also considered.

    5.3.4 Residue Plots

    The residue plots obtained for all cases for HLL and Rusanov are given in fig. 5.9.

    1e-08

    1e-06

    0.0001

    0.01

    1

    100

    10000

    1e+06

    1e+08

    0 20000 40000 60000 80000 1000

    Residue

    Number Of Time Steps

    Test Case C: Subsonic Flow in a Channel with Bump

    2D HLL2D Rusanov

    3D Bump Case1 HLL3D Bump Case1 Rusanov

    3D Bump Case2 HLL3D Bump Case2 Rusanov

    Figure 5.9: Residue plots for subsonic flow in a channel with a bump

    5.3.5 Test Result

    The pressure contours obtained are compared with results available in literature (Sun

    et al., 2009). The HLL solver gives very similar results mentioned in literature while in

    case of Rusanov, being more dissipative scheme, slight change in the results is observed

    as a effect of dissipation. The results are given in fig. 5.11. 3D case2 is not considered

    in references mentioned. In this case, it is observed that the results obtained from the

    HLL and Rusanov solvers are are very similar. As in this case, 3D effect is there, the

    contours lines are not exactly similar to the result obtained in 3D case1.

    43

  • 7/29/2019 Nesh Thesis

    56/72

    Figure 5.10: Test Case: Pressure contours for subsonic flow in a 2D channel with a

    bump

    44

  • 7/29/2019 Nesh Thesis

    57/72

    Figure 5.11: Test Case: Pressure contours for subsonic flow in a 3D channel with a

    bump

    45

  • 7/29/2019 Nesh Thesis

    58/72

    CHAPTER 6

    Results

    Before obtaining the results for three dimensional flow in computational domain, results

    for two dimension are obtained and analyzed. The solution for three dimension is found

    to be axisymmetric.

    6.1 Two dimensional Case

    In two dimensional case, different grids were considered before finalizing the grid to be

    used to create three dimensional grid. The results for finalized grid are discussed below.

    6.1.1 2D Results

    The result for the two dimensional case is obtained using HLL as well as Rusanov

    solver. The pressure contours near the body, nozzle and whole computational domainare shown in fig. 6.1 using HLL and in fig. 6.2 using Rusanov solver. The contours for

    Mach number are shown in fig. 6.3 using HLL and in fig. 6.4 using Rusanov solver.

    Figure 6.1: Pressure contours for 2D geometry using HLL solver

  • 7/29/2019 Nesh Thesis

    59/72

    Figure 6.2: Pressure contours for 2D geometry using Rusanov solver

    Figure 6.3: Mach number contours for 2D geometry using HLL solver

    47

  • 7/29/2019 Nesh Thesis

    60/72

    Figure 6.4: Mach number contours for 2D geometry using Rusanov solver

    Figure 6.5: Various regions

    48

  • 7/29/2019 Nesh Thesis

    61/72

    Here some regions are shown in fig. 6.5 as given below

    Region A : Sharp corner at Inlet

    Region B : Near the starting of the bluff body in block B1

    Region C : Near the starting of the bluff body in block B2

    Region D : Behind body at the upper left corner in block B3

    Region E : Behind body at the lower left corner in block B3

    Region F : Sharp Corner at the start of nozzle in block B1

    Region G : Sharp Corner in Nozzle at the start of duct in block B4

    In region A, C, D, E, F and G, locally low pressure region creates as the flow does

    not bend sharply at all these corners. Region B corresponds to the stagnation point,

    as the flow hit the bluff body directly, it comes to rest. In region D and E, the results

    corresponds to HLL and Rusanov solvers are different. In case of HLL, recirculation

    region is created while in case of the Rusanov solver this phenomena is not observed as

    the maximum Mach number in the case of Rusanov solver is of the order of 0.25 while

    in case of HLL it is 0.42, hence in Rusanov solver it behaves like potential flow while in

    HLL the recirculation region is created. The Mach number range for both the schemes

    shows the dissipative nature of Rusanov scheme compared to HLL.The velocity profile

    at different portions of the domain are shown in fig. 6.6.

    6.1.2 Residue plots

    The residue plots are shown in fig. 6.7.

    49

  • 7/29/2019 Nesh Thesis

    62/72

    Figure 6.6: Velocity profile for 2D geometry using HLL and Rusanov solver

    50

  • 7/29/2019 Nesh Thesis

    63/72

    1e-06

    0.0001

    0.01

    1

    100

    10000

    1e+06

    1e+08

    0 50000 1000001500002000002500003000003500004000

    Residue

    Number Of Time Steps

    2D Main Problem

    HLLRusanov

    Figure 6.7: Residue plots for 2D geometry using HLL and Rusanov solver

    Table 6.1: Grid detail

    Block Name Grid Size Number Of Cells

    BlockB1 65x51x37 115200BlockB2 65x11x37 23040

    BlockB3 33x41x37 46080BlockB4 23x121x37 95040

    Total - 279360

    6.2 Three Dimensional case

    The results for 3D case shows that the flow is axisymmetric. The dissipative nature of

    Rusanov scheme compared to HLL scheme can be observed in different contour plots.

    Different regions observed in 2D case are present in 3D solution as well.

    6.2.1 Grid Detail and Processing time

    The detail of individual block with number of cells used per block is given in table 6.1.

    Runge-Kutta fourth order scheme is used to march in time. The detail of processing

    speed is given in table 6.2.

    51

  • 7/29/2019 Nesh Thesis

    64/72

    Table 6.2: Processing time

    Scheme Number Of Cells CFL CPU Time/Iteration/Cell

    HLL(Runge Kutta 4th order) 279360 2.5 14.31844 secRusanov(Runge Kutta 4th order) 279360 2.5 14.31844 sec

    HLL(First Order in time) 279360 0.5 3.5796 secRusanov(First Order in time) 279360 0.5 3.5796 sec

    6.2.2 3D Results

    The pressure contours for HLL andRiemann solvers along the axis are shown in fig. 6.8.

    The contours of Mach number are given in fig. 6.9. It is observed that the flow is

    axisymmetric. In case of 3D, the Mach number range of Rusanov scheme is increased

    compared to the value obtained in 2D case. Still the dissipative nature of Rusanov

    scheme compared to HLL scheme can be observed in different contour plots. Different

    regions observed in 2D case are present in 3D solution as well, denoting the same

    phenomena mentioned earlier. It can be observed from the contours of Mach number

    that the presence of the body accelerate the flow near the wall and its direction is radial.

    Higher velocity near the wall increases the burning and hence the regression rate can be

    increased.

    The variation of Mach number and pressure at different locations along the axis is

    shown by taking the scalar cut planes. The cut planes of Mach number at the starting of

    the inlet and at the starting of the body are shown in fig. 6.10.

    It is observed that in case of 3D, Rusanov and HLL solvers are giving similar re-

    sults. The maximum Mach number achieved in HLL and Rusanov are 0.345 and 0.338

    respectively. It is observed that in 2D case the maximum Mach number in physical

    domain is 0.42 in case of HLL solver while it is 0.25 for Rusanov. In fig. 6.10, thedissipative nature of Rusanov compared to HLL can be observed.

    6.2.3 Residue plots

    The residue plots are shown in fig. 6.11.

    52

  • 7/29/2019 Nesh Thesis

    65/72

    Figure 6.8: Pressure contours along the axis using HLL and Rusanov solver

    53

  • 7/29/2019 Nesh Thesis

    66/72

    Figure 6.9: Mach number contours along the axis using HLL and Rusanov solver

    54

  • 7/29/2019 Nesh Thesis

    67/72

    Figure 6.10: Mach number cut plane near inlet and near the starting of the body usingHLL and Rusanov solver

    55

  • 7/29/2019 Nesh Thesis

    68/72

    1e-06

    0.0001

    0.01

    1

    100

    10000

    1e+06

    0 20000 40000 60000 80000 100000 120000 140000

    Residue

    Number Of Time Steps

    3D Main Problem

    HLLRusanov

    Figure 6.11: Residue plots for 3D geometry using HLL and Rusanov solver

    56

  • 7/29/2019 Nesh Thesis

    69/72

    CHAPTER 7

    Conclusion and Future Scope

    7.1 Conclusion

    Euler solver is implemented successfully using structured grid for HLL and Rusanov

    Riemann solvers. The solver has been tested for benchmark problems of internal flow.

    The performance analysis of different schemes to approximate the flux value at the

    faces is done. Different time marching schemes are incorporated into the solver and it is

    found that the Runge Kutta fourth order time stepping scheme gives better performance

    compared to other time marching schemes employed in the solver. It is observed that

    the Rusanov solver is more dissipative compared to HLL solver. The numerical solution

    of 2D and 3D Euler equations are obtained for the rocket motor witha bluff body at inlet

    and it is find out that the radial component of velocity are higher near the body which

    increases the regression rate and hence the performance of the Hybrid Rocket Motors.

    7.2 Future Scope

    In the solver implemented, the convergence rate to reach the steady state can beincreased by using some acceleration scheme e.g Multigrid Methods.

    The solver can be extended to Navier Stokes equations and the combustion phe-nomena can also be considered into account.

    The solver can be modified to work with unstructured grid files.

    Other than Riemann solvers and artificial schemes, other schemes can be incor-porated in the solver.

  • 7/29/2019 Nesh Thesis

    70/72

    APPENDIX A

    Class Descriptions

    The description of the classes used in the solver are shown below.

    Figure A.1: Point, Vector, Mesh, Solver Object

  • 7/29/2019 Nesh Thesis

    71/72

    Figure A.2: Cell, Face, GhostCell, PhysicalCell Object

    59

  • 7/29/2019 Nesh Thesis

    72/72

    REFERENCES

    1. Blazek, J., Computational Fluid Dynamics: Principles and Applications. Elsevier,

    2001.

    2. Chung, T. J., Computational Fluid Dynamics. Cambridge University Press, 2002.

    3. Davis, S. F. (1988). Simplified second-order godunov-type methods. SIAM Journal on

    Scientific and Statistical Computing, 9(3), 445473.

    4. Galanin, M. P., E. B. Savenkov, and S. A. Tokareva (2009). Solving gas dynam-

    ics problems with shock waves using the rungekutta discontinuous galerkin method.

    Mathematical Models and Computer Simulations, 1(5), 635645.

    5. Jameson, A., W. Schmidt, and E. Turkel (1981). Numerical solution of the euler

    equations by finite volume methods using runge-kutta time-stepping schemes. AIAA,

    (1259).

    6. Lin, J. L. (2009). Two-phase flow effect on hybrid rocket combustion. Acta Astronau-

    tica, 65, 1042 1057.

    7. Nishikawa, H. and K. Kitamura (2008). Very simple, carbuncle-free, boundary-layer-

    resolving, rotated-hybrid riemann solvers. Journel of Computational Physics, 227,

    25602581.

    8. Schwane, R. (2003). A multi-dimensional solver for the steady euler equations. Com-

    puters & Fluids, 32, 109119.

    9. Sun, Y., Z. L. Wang, and Y. Liu (2009). Efficient implicit non-linear lu-sgs approach

    for compressible flow computation using high-order spectral difference method. Com-

    munications in Computational Physics, 5(2-4), 760778.

    10. Toro, E. F., Riemann Solvers and Numerical Methods for Fluid Dynanics. Springer,

    1999.