Davide Tesi

download Davide Tesi

of 25

Transcript of Davide Tesi

  • 8/11/2019 Davide Tesi

    1/25

    POLITECNICO DI MILANO

    Faculty of industrial engineering

    Master inSpace Engineering

    NUMERICAL GASDYNAMIC MODEL OF A

    HYBRID ROCKET SOLID-FUEL COMBUSTION

    CHAMBER

    Supervisor: Prof. Luigi DE LUCA

    Masters Thesis by:

    Davide DI BENEDETTO, Matr. 751305

    Academic year 2013/2014

  • 8/11/2019 Davide Tesi

    2/25

    CONTENTS

    Contents

    1 Method and algorithm of solution 1

    1.1 Godunov method . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.1.1 The Riemann problem . . . . . . . . . . . . . . . . . . . . 41.2 The boundary condition . . . . . . . . . . . . . . . . . . . . . . . 16

    I

  • 8/11/2019 Davide Tesi

    3/25

    CONTENTS

    II

  • 8/11/2019 Davide Tesi

    4/25

    LIST OF FIGURES

    List of Figures

    1.1 Elementary finite volume scheme . . . . . . . . . . . . . . . . . . 21.2 Scheme for the Riemann problem of the decay of a discontinuity 4

    1.3 Illustration of the initial data for the Riemann problem. At theinitial time the data consists of two constant states separated bya discontinuity at x = 0. . . . . . . . . . . . . . . . . . . . . . . . 5

    1.4 Characteristic velocity for the Riemann problem . . . . . . . . . 91.5 Characteristics configurations for two shock waves . . . . . . . . 111.6 Characteristics configurations for left shock wave and right rar-

    efaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.7 Characteristics configurations for the case of left and right rar-

    efaction fan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151.8 Boundary condition governed by a zero-dimensional volume (e.g.

    HV, NV) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    1.9 Boundary condition in the case of imposed gas properties . . . . 171.10 calculated scheme of one-dimensional flow . . . . . . . . . . . . . 171.11 subsonic influx solution by UP- diagram.. . . . . . . . . . . . . . 19

    III

  • 8/11/2019 Davide Tesi

    5/25

    LIST OF FIGURES

    IV

  • 8/11/2019 Davide Tesi

    6/25

    LIST OF TABLES

    List of Tables

    1.1 Riemanns problem relations in case of shock wave . . . . . . . . 61.2 Riemanns problem relations in case of rarefaction wave . . . . . 7

    1.3 cases classification of the Riemann problem . . . . . . . . . . . . 101.4 boundary conditions types, generated by a a zero-dimensional

    volume. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    V

  • 8/11/2019 Davide Tesi

    7/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    Chapter 1

    Method and algorithm of

    solution

    1.1 Godunov method

    Referring to the set of gas-dynamic equations, in this chapter is shown how

    the problem has been discretized to set a numerical scheme. The unknownparameters of the gas-dynamic problem, that characterize the state of gas, whendiscretized, are replaced by a set of piecewise constant values of all parameters,

    averaged over a finite control volume Vi. This assumption is what characterize

    the Godunov method.Godunovs scheme is a conservative numerical scheme, suggested by S. K.Godunov in 1959, for solving partial differential or integral gasdynamic equations.One can think of this method as a conservative Finite-volume method whichsolves exact, or approximate Riemann problems at each inter-cell boundary. Inits basic form, Godunovs method is first order accurate in both space, andtime, yet can be used as a base scheme for developing higher-order methods. Toincrease the spatial accuracy a reconstruction procedure has been developed.

    Considering a time dependent system described by a set of conservation laws,as the set of eqs ??, is possible to discretize the axial domain into Ncomputingcells.

    The conservation lows are referred to the control volume Vi that comes from thediscretization. The integral over this control volume Vi, of a generic quantity ,Vi

    dVi is approximated as iVi.

    In the set of gas-dynamic Eqs ??those quantities are: the mass of the gas iVi,the mass of oxidizer icVi ,the momentum along the coordinate axes uiiVi, thetotal energy EiiVi.The same applies to variable introduced by additional equation as for Eqs ??and ??, as for all other conservation laws possibly needed.As concerning the surface integral in the set of conservation laws, the quantities

    1

  • 8/11/2019 Davide Tesi

    8/25

    1.1. GODUNOV METHOD

    previews listed flow through the surface delimiting the control volume Vi. Those

    quantities are considered averaged over these delimiting surfaces.Thus, following a time discretization, being known at tn the piecewise constantdistribution of quantities in the conservation laws, is possible to calculate, foreach computational cell, the parameters at a new time step tn+1 =tn+ tnwhere tn is the step of integration over the time.

    The integral form of the generic conservation law ??, without considering thesource or sink term for the sake of simplicity, may be rewritten referring to thecontrol volume Vi in a discretized form as [?]

    n+1i = ni +

    t

    x(F+ F). (1.1)

    Where F+ and F are the flow rates of the quantity through the boundarysurfaces that delimit the control volume along the axial dimension, and xisthe axial length of the control volume. A remark about the scheme 1.1 is thatthe time step t must satisfy a Courant-Friedrich-Lewy type condition

    t x

    |vnmax|,

    wherevnmax denotes the maximum wave velocity1 present through the computa-

    tional domain at time tn.The specific gasdynamic parameters at the new time step tn+1, that will befurther marked with a tilde, for the one-dimensional flow are determined by the

    following formulas.For notational convenience the index i will be omitted, referring to relations onan elementary volume Vi. The scheme notations and indexes, are shown in thefollowing Fig. 1.1.

    Figure 1.1: Elementary finite volume scheme

    The surfaces S+, S are those through which the gas and the quantities inthe conservation laws flow. Sb is the surface that burns. Those surfaces, as the

    1in a Riemann problem both shock waves and rarefaction waves are produced, so one has

    to look for the fastest wave at each time step.

    2

  • 8/11/2019 Davide Tesi

    9/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    finite volume Vi are determined from elementary geometric considerations.

    In this first step of code developing are omitted the terms of stress (friction),injection of the momentum and influence mass forces.

    = 1

    V

    V + tn

    RU S+

    RU S

    + msSb

    ,

    u= 1

    V

    V u + tn

    (P+ RU2)S|+ (P+ RU2)S| + p(S S+)

    ,

    E= 1

    V

    EV + tn

    (E+pU S)+ (E+pU S) + hsmsSb qsSb

    .

    (1.2)Where:

    p=

    E

    u2

    2

    ( 1), p=

    P+ + P

    2 .

    This set of algebraic equations need to be equipped with a right number ofboundary conditions. Generically speaking those may be a surface constructionelement (wall) or contact with a zero-dimensional sub-domain in which meanaverage parameter are known. The numerical scheme that describe the timevariation of the property in a zero-dimensional sub-domain will be presented ina following paragraph.

    Recapping, in the Godunov method constant values of all parameters areaveraged over a finite control volume Vi. The scheme start from an initialunperturbed situation and the boundary condition are given.Each finite volume has to satisfy the conservation of mass, momentum andenergy in each numerical time step.The pressure, density and normal velocity on the surface between two controlvolumes are defined by solving the decay discontinuity known as Riemann prob-lem. The inputs for the Riemann problem are the averaged parameters in theadjacent control volume as shown in the following figure 1.2.

    Stability of the calculation process is ensured by the Courant ratio for eachof the i-th cells:

    i

    Dxihxi

    1

    wherei is the allowable integration step in time for the i-th cell,hxi are steps in

    space,Dxi is the fastest velocity of propagation along the coordinate directions.The value =h/D can be physically interpreted as the interval of time duringwhich the wave with a maximum propagation velocity along the coordinatedirection is at a distance equal to the coordinate integration step.

    3

  • 8/11/2019 Davide Tesi

    10/25

    1.1. GODUNOV METHOD

    Figure 1.2: Scheme for the Riemann problem of the decay of a discontinuity

    Commonly, for the whole computational region (all elementary volumes), theintegration time step, for the next time step n+1is determined by the minimum

    value of it, in all the calculated cells at the current time step

    tn+1= Kn min(in)

    .

    A Safety factor Kn, due to the nonlinearity, is defined by specifying theconstantsc1, c2

    Kn =

    c2 if tn c1tn1,

    c1tn

    tn1if tn< c1tn1.

    1.1.1 The Riemann problem

    In this section will be shown the numerical tools used to solve the Riemann

    problem as needed for each step of the Godunov scheme. Once a Riemannsolver is available one can deploy Godunov-type numerical methods to solve theequations with general initial data. So the first step of the code writing is todefine the Riemann solver.The Riemann problem refers to the propagation of a perturbation that originatesfrom a discontinuity decay.The Riemann problem is a special IVP expressed by the following PDE with itsparticular IC.

    PDE:

    IC:

    t+ ax= 0.

    (x, 0) =0(x) =

    R

    Lifx >0,ifx

  • 8/11/2019 Davide Tesi

    11/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    L

    R

    0(x)

    x=0

    x

    Figure 1.3: Illustration of the initial data for the Riemann problem. At theinitial time the data consists of two constant states separated by a discontinuityat x = 0.

    Inputs of the Riemann problem are left and right property and the ratio ofspecific heats. Those are:

    pI, IuI; pII, IIuII and .In case of shock waves the problem is solved relying on conservation laws amongthe discontinuity, that in a compact form may be written as follows:

    []D [u] = 0,

    [u]D [p + u2] = 0,

    E= 1

    V

    EV + tn

    (E+pU S)+ (E+pU S) + hsmsSb qsSb

    .

    (1.3)Where D is the velocity of the shock wave.In the following table are reported basic relations and parameters for the solution

    of the Riemann problem in the case of shock wave. Those result here collectedwill be explained afterwards.

    5

  • 8/11/2019 Davide Tesi

    12/25

    1.1. GODUNOV METHOD

    Table 1.1: Riemanns problem relations in case of shock wave

    In case of the rarefaction wave, instead of the above relations, the problem issolved relying on the continuity of the Riemanns invariants

    [u] 2

    1[c] = 0, [S] = 0,

    where here c is the speed of sound and Sis the entropy.The plus sign is taken for the left rarefaction wave, negative sign for the rightrarefaction wave.In the following table are collected basic relations and parameters for the solutionof the Riemann problem in the case of rarefaction wave. Those result will beexplained afterwards.

    6

  • 8/11/2019 Davide Tesi

    13/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    Table 1.2: Riemanns problem relations in case of rarefaction wave

    In both the table1.1 and 1.2 P and Uare pressure and velocity of the contactdiscontinuity; R is the density that is discontinuous at the contact; DI/II is thevelocity of the shock wave in the first table and of the rarefaction wave in thesecond table; a is the mass flow rate. Hereafter are presented the main casesthat constitute the solution of the Riemann problem and form the core of thenumerical Godunov scheme. In all the following described cases is supposed

    pI < pII. The opposite case work in the same way, just the flow is supposedto be inverted. Also in the code writing, the property are just inverted if thissituation occur. The following are the strings of the code that represent the

    inversion:Dp := p1-p2; Mark := 1; P:=P1;U:=u1;R:=rho1;

    if Dp>0 then begin

    Form1.Memo1.Lines.Add(Inversion of the flow);

    A:=u1; B:=rho1; C:=p1; D:=u2; E:=rho2; F:=p2;

    u1:=-D; rho1:=E; p1:=F; u2:=-A; rho2:=B; p2:=C; Mark := -1;

    end;

    Since is not always possible to rely on an analytical solution, a function F(P)

    is introduced in order to implement an iterative solution with a method such

    7

  • 8/11/2019 Davide Tesi

    14/25

    1.1. GODUNOV METHOD

    as Newtons. F(P) is a difference of velocity, thus a velocity itself, defined as

    follow:

    F(P) =f(P, pI, I) + f(P, pII, II) =uI uII,

    The function f(P, pk, k) where k = I , I I ; is composed by the join of twoequations, one defined in the domain in which the shock develops (P pk) anthe other one in which develops the rarefaction (P < pk)

    f(P, pk, k) =

    Ppk

    kck

    + 1

    2 k+

    1

    2

    ifP pk,

    2ck 1

    1

    2

    k 1

    ifP < pk,

    (1.4)

    where k =P /pk, ck =

    pk/k. Since this function is used to implement a

    newton iterative scheme, are also reported the derivative offwith respect to

    the pressureP

    f(P, pk, k) =

    (+ 1)k+ (3 1)

    4kck

    + 1

    2 k+

    1

    2

    3/2 ifP pkck

    P

    12

    k ifP < pk

    (1.5)

    and

    f(P, pk, k) =

    (+ 1)[(+ 1)k+ (7 1)]

    162kc3k

    + 1

    2 k+

    1

    2

    5/2 ifP pk

    (+ 1)ck

    22P2

    1

    2

    k ifP < pk

    (1.6)

    8

  • 8/11/2019 Davide Tesi

    15/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    The analysis shows that for all P >

    0, we have f(P, pk, k) > 0 andf(P, pk, k)< 0.Thus, the function (F(P)) has theform of Figure1.4 and relying on itcharacteristic points (that are veloc-ities) can be determined the config-uration of the waves that are gener-

    ated by the discontinuity decay.

    Figure 1.4: Characteristic velocity forthe Riemann problem

    Those characteristic velocity, needed to configure the Riemann problem are:

    Ushock = pII pI

    I

    + 12

    pII+ 12

    pI =F(pII) ; (1.7)

    Urare = 2cII 1

    pIpII

    12

    =F(pI) ; (1.8)

    Uvac =2(cI+ cII)

    1 =F(0) . (1.9)

    Defined those basic element, is possible to classify the situations that may occurin four main cases as shown in the following table.

    In the program writing each case in tab. 1.3is modelled, after defining all thebasic components that come from the input data, and the functions needed forthe iterative method. 2

    2see the first script in the appendix ??

    9

  • 8/11/2019 Davide Tesi

    16/25

    1.1. GODUNOV METHOD

    Case condition description

    SS uI uII> Ushock Left and right propagation shock waves

    SR Urare < uI uII< Ushock Left shock wave, right rarefaction wave

    RR Uvac < uI uII< Urare Left and right rarefaction waves propagation

    uI uII< Uvac Unrealisable case. Not implemented.

    Table 1.3: cases classification of the Riemann problem

    1. Case SS

    In the case of left and right shock waves, is needed the Newton method oftangent relying on the following iterative relation:

    P(i) =P(i1) f(P(i1), pI, I) + f(P

    (i1), pII, II) (uI uII))

    f(P(i1), pI, I) + f(P(i1), pII, II) , (1.10)

    where P(i) is the approximative value of the root, and the first guess value is

    P(0) = pIIIcII+ pIIIcI+ (uI uII)IcIIIcIIIcI+ IIcII

    .

    The velocity Uof contact discontinuity is defined as

    U=aIuI+ aIIuII+ pI pII

    aI+ aII. (1.11)

    Those value of pressure P, and velocity U, are first calculated, and will bechanged in the specific sub-cases where those assume different value.In this case, the situation represented in the following set of figures 1.5, mayoccur.

    10

  • 8/11/2019 Davide Tesi

    17/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    (a) configuration A of the case SS (b) configuration B of the case SS

    (c) configuration C of the case SS (d) configuration D of the case SS

    Figure 1.5: Characteristics configurations for two shock waves

    In the set of figures 1.5, the vertical line, normal to the horizontal spacedirection, represent the edge of the volume element resulting from the geometricdiscretization of the domain.In the sub-case 1A. DI=uI

    aII

    >0. So ifDI>0 we are in this situation.

    As shown by the fig. 1.5a,the vertical line is located before the left shock wave(LSW). It follows that the corresponding properties are P =pI, U=uI, R= I.

    In the sub-case 1B. DI=uIaII

    0.

    As shown by the fig. 1.5b,the vertical line is located between the LSW and thecontact discontinuity (dashed line). The pressure Pis the one that come outfrom the Newtons iterative process1.10,consequently the velocityU is the onereported in the eq. 1.11.The density is defined as

    R= I(+ 1)P+ ( 1)pI( 1)P+ (+ 1)pI

    .

    11

  • 8/11/2019 Davide Tesi

    18/25

    1.1. GODUNOV METHOD

    In the sub-case 1C. DI=uIaII

    0, U

  • 8/11/2019 Davide Tesi

    19/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    2. Case SR

    As for the the case SS, also in this case, is needed to rely on the sameiterative solution1.10,in case the vertical line, that represent the limit of the

    discrete elements, is located between the two delimiting left and right wavegenerated by the decay. Also the eq. 1.11is valid in this situation.The values of pressureP (Eq.1.10), and velocityU (Eq.1.11), are first calculated,and will be changed in the specific sub-cases where those assume different value.The possible configurations are graphically represented by set of figures 1.6.In this case occur a right rarefaction. So the two characteristic velocityDII

    (a) configuration A of thecase SR

    (b) configuration B of thecase SR

    (c) configuration C of thecase SR

    (d) configuration D of thecase SR

    (e) configuration E of thecase SR

    Figure 1.6: Characteristics configurations for left shock wave and right rarefac-tion.

    and DIIare respectively the left and right limit velocity of the expansion fan.

    Generally speaking the indicates the leftmost expansion wave and the absenceof apex refers to the rightmost expansion wave.

    In the sub-case 2A.DII=uII+ cII0; D

    II=U+ c

    II

  • 8/11/2019 Davide Tesi

    20/25

    1.1. GODUNOV METHOD

    U = 1+ 1 uII 2+ 1 , P =p

    II

    UcII

    21, R= PU2 .

    In the sub-case 2C. (see fig. 1.6c) DII =U+c

    II >0; U 0. The density isdefined as

    R= I(+ 1)P+ ( 1)pI( 1)P+ (+ 1)pI

    .

    In the sub-case 2E.(see fig. 1.6e) DI=uI aII

    >0. In this case P =pI, U=uI, R= I.

    3. Case RR

    In the case of two rarefaction wave the interpolation is not needed. Are firstcalculated the following value that will be changed in the specific sub-case where

    those assume different value:

    P =pI

    uI uII Uvac

    Urare Uvac

    21

    ; (1.12)

    U= aIuI+ aIIuII+ pI pII

    aI+ aII. . (1.13)

    The possible configurations are graphically represented by the set of figures1.7

    14

  • 8/11/2019 Davide Tesi

    21/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    (a) configuration A of thecase RR

    (b) configuration B of thecase RR

    (c) configuration C of thecase RR

    (d) configuration D of thecase RR

    (e) configuration E of thecase RR

    (f) configuration F of thecase RR

    Figure 1.7: Characteristics configurations for the case of left and right rarefactionfan.

    Has shown in the set of Figs 1.7is introduced another characteristic velocityDIthat represent the rightmost expansion wave of the left rarefaction fan.

    The sub-case 3A.occurs ifDI=uI CI>0. In this case P andUare updatedso, as may be noticed from fig. 1.7a, P =pI, U=uI, R= I.

    The sub-case 3B.(fig. 1.7b) occurs ifDI=uI CI0.The vertical line lies within the left rarefaction fan, for which the parameters are:

    U = 1

    + 1uI+

    2

    + 1cI, P =pI

    U

    cI

    21

    , R= P

    U2.

    The sub-case 3C.(fig. 1.7c) occurs ifD

    I=U c

    I0. The density isdefined as

    R= P

    (cI)2

    .

    The sub-case 3D. (fig. 1.7d) occurs ifU < 0, and DII = uII+cII > 0. Thedensity is defined as

    R= P

    (cII)2

    .

    15

  • 8/11/2019 Davide Tesi

    22/25

    1.2. THE BOUNDARY CONDITION

    The sub-case 3E.(fig. 1.7e) occurs ifDII=uII+cII>0, andD

    II=U+c

    II

  • 8/11/2019 Davide Tesi

    23/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    In the general case, another type of boundary condition may occur (Fig. ??.

    In this case are not assigned the stagnant conditions in a volume, but a mass in-or outflow given for example by a pump. Also this case has been implementedfor completeness, but is never used by the program since is not pertinent.A particular sub-case of this last one is the condition of gas impermeability, thusthe presence of a wall that forces the velocity of the gas to zero at the boundary.

    In the first case A, (Fig.1.9). The boundary conditions is determined by the

    Figure 1.9: Boundary condition in the case of imposed gas properties

    number of characteristics, included in the solution region. In the below table1.4are represented the different boundary conditions of the type A that occurdepending on the flow regime and the characteristics configuration.

    Considering a x-left boundary asin fig:1.10, the cases that may resultare shown in table1.4.

    Figure 1.10: calculated scheme of one-dimensional flow

    17

  • 8/11/2019 Davide Tesi

    24/25

    1.2. THE BOUNDARY CONDITION

    Table 1.4: boundary conditions types, generated by a a zero-dimensional volume.

    Will be now determined the pressure P, the density R and the velocity U atthe boundary condition A.Are distinguished two main cases:

    1. inflow of gas from the reservoir (e.g. HV) to the solution region;

    2. outflow of the gas from the solution region to the reservoir (e.g. NV).

    In case of subsonic inflow of gas, to determine the conditions at the boundary

    are used the conservation laws of momentum and enthalpy:

    R U2 + P=p0; (1.14)

    1

    P

    R+

    U2

    2 =

    1

    p00

    . (1.15)

    Where p0, 0 are the pressure and the density of the reservoir; P, R, Uare thepressure, density and velocity of the gas at the boundary surface.

    18

  • 8/11/2019 Davide Tesi

    25/25

    CHAPTER 1. METHOD AND ALGORITHM OF SOLUTION

    Combining the Eqs1.14and 1.15results a trend U(P) that links the boundary

    conditions to the stagnant conditions:

    Ubc =c0

    2

    p0 P

    ( 1)P+ ( 1)p0,

    p0+ 1

    P p0. (1.16)

    The solution of this type of boundary conditions rely on the U-P diagrams methodwhere the desired value of the parameter is determined by the intersection pointof the lines, as shown in Fig......... . A U(P) type relation can be setted alsolinks the boundary conditions with the solution domain, solving the Riemannproblem for the boundary condition. Thus:

    U(P)Riem =

    u + (P p)

    + 1

    2 P+

    1

    2 p

    ifP p,

    u 2c

    1

    1

    P

    p

    12

    ifP< p.

    (1.17)

    The Eq. 1.17obtained from the correlations between the gas parameters in thecase of right shock wave or rarefaction wave.Once determined the values of P and U from the intersection, is possible tocalculate the density of gas on the boundary surface:

    R=

    p0 P

    U2 or

    P

    p00

    12 U2

    Figure 1.11: subsonic influx solution byUP- diagram.

    In the figure1.11 p0, 0 are the pa-rameters at stagnant condition;while

    p, , u are the gas-dynamic parame-

    ters of the first computational cell,the index 1 is omitted.

    19