+ All Categories
Home > Documents > Development of a CFD model to simulate the compressible ...€¦ · compressible flow within a...

Development of a CFD model to simulate the compressible ...€¦ · compressible flow within a...

Date post: 19-Oct-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
186
SCUOLA DI INGEGNERIA INDISTRIALE E DELL’INFORMAZIONE Laurea Magistrale in Ingegneria Meccanica Development of a CFD model to simulate the compressible flow within a pressure-relief safety valve Relatore: Prof. Giacomo PERSICO Correlatore: Dott. Ing. Andrea CONSONNI Riccardo Attilio BANFI 878390 Anno Accademico 2018/2019
Transcript
  • SCUOLA DI INGEGNERIA INDISTRIALE E

    DELL’INFORMAZIONE

    Laurea Magistrale in Ingegneria Meccanica

    Development of a CFD model to simulate the

    compressible flow within a pressure-relief safety valve

    Relatore: Prof. Giacomo PERSICO

    Correlatore: Dott. Ing. Andrea CONSONNI

    Riccardo Attilio BANFI

    878390

    Anno Accademico 2018/2019

  • Ringraziamenti

    Intendo ringraziare sentitamente:

    Professor Giacomo Persico per avermi seguito ed aiutato con pazienza e disponibilità

    durante tutto lo svolgimento del lavoro

    Dott. Ing. Andrea Consonni e l’azienda AST S.p.A. per l’opportunità che mi hanno concesso

    Ing. Alessia Incanti e Ing. Christian Garavaglia per le conoscenze che mi hanno trasmesso

    durante l’attività di stage

    I membri dell’ufficio tecnico e il personale di AST che ho avuto il piacere di conoscere

    La mia famiglia, che comprende i miei genitori, mio fratello Davide, i miei zii Mauro e

    Nuccia e mia cugina Paola, per il supporto agli studi e per essermi stati vicino nei momenti

    difficili

    Gli amici, i compagni di corso, le persone che hanno fatto o fanno tuttora parte della mia

    vita, e in generale coloro con cui ho avuto la fortuna di condividere una parte del cammino

    che mi ha reso la persona che sono

  • Contents

    1 Introduction 1

    1.1 AST S.p.A. Company ..................................................................................... 2

    1.2 OpenFOAM ................................................................................................... 3

    2 Pressure-relief Devices 5

    2.1 Terms and Definitions .................................................................................. 6

    2.1.1 Dimensional characteristics .............................................................. 6

    2.1.2 Device characteristics ........................................................................ 6

    2.2 Spring-loaded Pressure-relief Valves ............................................................ 8

    2.2.1 Conventional pressure-relief valves .................................................. 8

    2.2.2 Working principle ............................................................................. 11

    2.2.3 Effect of the backpressure ................................................................. 13

    2.2.4 Balanced pressure-relief valves ......................................................... 14

    2.3 Sizing of pressure-relief Valves ..................................................................... 17

    2.3.1 Converging-diverging nozzle ............................................................. 17

    2.3.2 Sizing for vapor or gas ....................................................................... 20

    2.3.3 Sizing for liquid ................................................................................. 21

    3 Fluid Dynamics 23

    3.1 Conservation Laws ........................................................................................ 23

    3.1.1 Continuity equation ........................................................................... 25

    3.1.2 Momentum equation ......................................................................... 25

    3.1.3 Energy equation ................................................................................ 26

    3.2 Turbulence .................................................................................................... 27

    3.2.1 Reynolds Averaged Navier-Stokes Equations ................................... 27

    3.2.2 Boussinesq’s hypothesis .................................................................... 29

    3.3 Boundary Layer Theory ................................................................................ 29

    3.4 Turbulence Models ....................................................................................... 32

    3.4.1 Spalart-Allmaras model .................................................................... 32

    3.4.2 − model .......................................................................................... 32

    3.4.3 − model ......................................................................................... 33

    3.4.4 − SST model .................................................................................. 33

    4 CFD Introduction 35

    4.1 Finite Volume Method .................................................................................. 37

    4.1.1 Discretization of the convection term ............................................... 38

    4.1.2 Discretization of the gradient term ................................................... 41

    4.1.3 Discretization of the diffusion term .................................................. 42

    4.1.4 Discretization of the transient term .................................................. 43

    4.2 Solution of the Linear Equation System ....................................................... 44

    4.3 Pressure-velocity Coupling Algorithms ........................................................ 45

    4.3.1 SIMPLE algorithm ............................................................................ 46

    4.3.2 PISO algorithm .................................................................................. 46

    4.3.3 PIMPLE algorithm ............................................................................ 48

  • 5 Physical Model 49

    5.1 Description of the Valve ................................................................................ 49

    5.2 3D Model ....................................................................................................... 53

    5.2.1 Assembly modeling ........................................................................... 53

    5.2.2 STL manipulation .............................................................................. 57

    5.3 Mesh ............................................................................................................ 60

    5.3.1 Background grid ................................................................................ 60

    5.3.2 Geometry of the valve ........................................................................ 63

    5.3.3 Mesh quality control ......................................................................... 72

    5.3.4 Parallel meshing ................................................................................ 79

    5.3.5 Patch definition ................................................................................. 80

    6 Preprocessing 85

    6.1 Thermophysical Properties ........................................................................... 85

    6.2 Turbulence Model ......................................................................................... 88

    6.3 Boundary Conditions .................................................................................... 89

    6.3.1 Pressure ............................................................................................. 91

    6.3.2 Velocity .............................................................................................. 94

    6.3.3 Temperature ...................................................................................... 96

    6.3.4 Turbulent quantities .......................................................................... 98

    6.4 Solver Selection and Algorithm Control ....................................................... 105

    6.5 Discretization Schemes ................................................................................. 109

    6.6 Time Step and Data I/O Control ................................................................... 111

    6.7 Solution Monitoring ...................................................................................... 114

    7 Results 116

    7.1 Reference Case .............................................................................................. 117

    7.1.1 Flow development ............................................................................. 117

    7.1.2 Description of the flow field .............................................................. 119

    7.1.3 Converging-diverging nozzle ............................................................. 122

    7.1.4 Total pressure, total temperature and entropy fields ....................... 124

    7.1.5 Mesh clustering ................................................................................. 127

    7.1.6 Convergence history .......................................................................... 127

    7.1.7 Force acting on the disc ..................................................................... 130

    7.1.8 Actual coefficient of discharge .......................................................... 131

    7.2 Experimental Results .................................................................................... 133

    7.2.1 Actual coefficient of discharge .......................................................... 133

    7.2.2 Force acting on the disc ..................................................................... 134

    7.3 Influence of the Turbulence Model ............................................................... 136

    7.4 Influence of the Numerical Schemes ............................................................ 139

    8 Conclusions 145

    A Post-processing Script 148

    B Residual Plotting Script 157

    C Allrun Script 160

  • D Function Objects 163

    Bibliography 169

  • List of Figures

    1.1 AST facility in Cornaredo .............................................................................. 2

    1.2 Overall structure of OpenFOAM ................................................................... 3

    1.3 Case directory structure ................................................................................ 4

    2.1 Non-reclosing pressure-relief devices: rupture discs and pin actuated

    devices ........................................................................................................... 5

    2.2 Reclosing pressure-relief devices: spring-loaded, pilot operated, power

    actuated ......................................................................................................... 6

    2.3 Coventional and balanced pressure-relief valves .......................................... 8

    2.4 Conventional pressure-relief valve ............................................................... 10

    2.5 Sectional cut of a PRV with adjusting ring ................................................... 11

    2.6 Pressure on the disc at valve closed (A), initial opening (B) and fully

    opening (C) .................................................................................................... 12

    2.7 Lift of disc and inlet pressure relationship ................................................... 13

    2.8 Effect of superimposed backpressure in a conventional PRV ...................... 14

    2.9 Effect of superimposed backpressure in a balanced PRV ............................. 15

    2.10 Balanced pressure-relief valve ...................................................................... 16

    2.11 Trend of mass flow rate, pressure and temperature as a function of Mach

    number .......................................................................................................... 18

    2.12 Converging-diverging duct ............................................................................ 19

    2.13 Mass flow rate trend as a function of expansion ratio .................................. 19

    3.1 Control volume .............................................................................................. 24

    3.2 Velocity profiles of a laminar (dashed line) and a turbulent (solid line) BL

    in a channel ................................................................................................... 30

    3.3 Universal velocity profile .............................................................................. 31

    4.1 Structured grid .............................................................................................. 36

    4.2 Generic control volume ................................................................................. 37

    4.3 Upwind interpolation .................................................................................... 39

    4.4 Linear interpolation ...................................................................................... 40

    4.5 Linear upwind interpolation ......................................................................... 40

    4.6 Sweby diagram .............................................................................................. 41

    4.7 Skew cells ...................................................................................................... 42

    4.8 Non-orthogonal correction ........................................................................... 43

    4.9 SIMPLE algorithm ........................................................................................ 46

    4.10 PISO algorithm ............................................................................................. 47

    4.11 PIMPLE algorithm ........................................................................................ 48

    5.1 Blowdown ring .............................................................................................. 49

    5.2 Inlet nozzle .................................................................................................... 50

    5.3 Disc and disc holder ...................................................................................... 50

    5.4 Main body ..................................................................................................... 51

    5.5 Top lid ........................................................................................................... 51

  • 5.6 Ring and disc position: closed valve and full-up ring (A) vs actual

    positioning (B) .............................................................................................. 52

    5.7 Valve assembly .............................................................................................. 52

    5.8 Mach number field in a 2D simulation ......................................................... 54

    5.9 Original profile without (red-marked) adjustments ..................................... 55

    5.10 Modeled valve with adjustments .................................................................. 55

    5.11 Detail of small gap filling and edge rounding off .......................................... 56

    5.12 Effect of the deviation tolerance and angle tolerance on the output data .... 57

    5.13 Disc and ring, with different colors for different surfaces they have been

    split into ........................................................................................................ 58

    5.14 Final assembly of the rotated valve: each color denotes a different

    component .................................................................................................... 59

    5.15 Bounding box and orientation of the axes .................................................... 60

    5.16 Mesh bounding box (white) compared to valve model ................................. 62

    5.17 Example of STL surface, castellated, snapped and layered mesh ................ 63

    5.18 Feature edges of the adjusting ring ............................................................... 67

    5.19 Explanatory depiction of the set of cylinders ................................................ 68

    5.20 Detail of the refined area with the set of cylinders (castellated mesh) ......... 68

    5.21 Castellated mesh of the valve and the relief box ........................................... 69

    5.22 Detail of the refined area with the set of cylinders (snapped mesh) ............ 70

    5.23 Detail of the edges of ring and inlet nozzle after snapping ........................... 71

    5.24 Detail of the edges of the disc after snapping ............................................... 71

    5.25 Face area vector and cell centroid vector ...................................................... 72

    5.26 Cell pyramid volume ..................................................................................... 73

    5.27 Face concavity ............................................................................................... 73

    5.28 Cell-to-tetrahedron decomposition .............................................................. 73

    5.29 Face triangular decomposition ..................................................................... 74

    5.30 Face weight calculation ................................................................................. 75

    5.31 Edges of the ring incorrectly reproduced with activated mesh quality

    controls .......................................................................................................... 76

    5.32 Set of highly skew faces (colored red) with disabled MQC and detail of

    a skew cell ...................................................................................................... 76

    5.33 Edges of the ring reproduced with deactivated mesh quality controls ......... 77

    5.34 Close-up of the nozzle region for the first-trial and improved mesh ............ 78

    5.35 Domain decomposition for parallel meshing ............................................... 79

    5.36 External faces of the disc after splitting with autoPatch .............................. 80

    5.37 Front, back and lateral surface of the disc .................................................... 81

    5.38 Body of the valve (blue, wall-type), boundaries of the relief box

    (red, patch-type) ........................................................................................... 82

    5.39 Detail of the outlet section ............................................................................ 84

    6.1 Recap of the patches to be assigned boundary conditions ........................... 90

    6.2 Relieving pressure field assigned in the nozzle region up to the throat ....... 93

    6.3 zeroGradient condition at outlet .................................................................. 95

    6.4 inletOutlet condition at outlet ....................................................................... 100

    6.5 Number of iterations for Ux calculation ....................................................... 107

    6.6 PIMPLE algorithm flowchart ........................................................................ 108

  • 7.1 Flow development in consecutive instants ................................................... 118

    7.2 Mach number field ........................................................................................ 119

    7.3 Supersonic flow regions (colored red) .......................................................... 119

    7.4 Detail of the flow recirculation at the right side of the disc .......................... 120

    7.5 3D velocity vector plot .................................................................................. 120

    7.6 Streamlines of the flow field ......................................................................... 121

    7.7 Pressure field ................................................................................................. 121

    7.8 Detail of Mach number field in the converging-diverging nozzle ................. 122

    7.9 Supersonic flow in the converging-diverging nozzle .................................... 122

    7.10 Velocity vector plot in the converging-diverging nozzle ............................... 123

    7.11 Pressure distribution on the upper surface of the disc holder ...................... 124

    7.12 Total pressure field ....................................................................................... 124

    7.13 Total temperature field ................................................................................. 125

    7.14 Entropy field ................................................................................................. 125

    7.15 Excessive total pressure and negative entropy cells ..................................... 126

    7.16 y+ on walls ..................................................................................................... 127

    7.17 Trend of residuals for flow and turbulent quantities .................................... 128

    7.18 Inlet (red) and outlet (blue) mass flow rate and mass imbalance

    (colored green) .............................................................................................. 128

    7.19 Minimum (blue) and maximum (red) pressure and velocity in the domain 129

    7.20 Area-averaged pressure and temperature at inlet (red) and outlet (blue) ... 129

    7.21 Forces acting on the patches of the disc ....................................................... 130

    7.22 Measured Force acting on the disc vs Time and Relieving pressure ............ 134

    7.23 Representation of pressures and forces acting on the real component ........ 134

    7.24 Mach number field for − (left figure) and − SST (right figure) models 136

    7.25 Turbulent kinetic energy field for − (left) and − SST (right) models .... 136

    7.26 Area averaged p and T for − (dotted line) and − SST (solid line)

    models ........................................................................................................... 137

    7.27 Forces on the disc for − (dotted line) and − SST (solid line) models .... 137

    7.28 Mass flow rates for − (dotted line) and − SST (solid line) models ........ 138

    7.29 Residuals for turbulent quantities of − and − SST models ................... 138

    7.30 Mach number fields for upwind (left side) and limited linear (right side)

    schemes ......................................................................................................... 139

    7.31 Supersonic Mach number for upwind (left) and limited linear (right)

    schemes ......................................................................................................... 139

    7.32 Close-up of the nozzle region for upwind and limited linear schemes ......... 140

    7.33 Turbulent kinetic energy field for upwind and limited linear schemes ........ 140

    7.34 Static pressure field for upwind and limited linear schemes ........................ 141

    7.35 Entropy field for upwind and limited linear schemes .................................. 141

    7.36 Averaged p and T for upwind (dotted line) and limited linear (solid line)

    schemes ......................................................................................................... 142

    7.37 Trend of residuals for upwind (left side) and limited linear (right side)

    schemes ......................................................................................................... 142

    7.38 Maximum p and U for upwind (dotted line) and limited linear (solid line)

    schemes ......................................................................................................... 143

  • 7.39 Forces on the disc for upwind (dotted line) and limited linear (solid line)

    schemes ......................................................................................................... 143

    7.40 Mass flow rates for upwind (dotted line) and limited linear (solid line)

    schemes ......................................................................................................... 144

  • List of Tables

    4.1 Flow speed classification ............................................................................... 44

    6.1 Properties of dry air ...................................................................................... 86

    6.2 Boundary conditions ..................................................................................... 89

    6.3 Mode of operation of totalPressure condition .............................................. 92

    7.1 Statistics of the calculation ........................................................................... 116

    7.2 Forces acting on the disc ............................................................................... 130

    7.3 Mass flow rate ............................................................................................... 131

    7.4 Experimental mass flow rates ....................................................................... 133

    7.5 Main averaged test data ................................................................................ 133

    7.6 Force calculation for − and − SST models ............................................. 137

    7.7 Actual coefficient of discharge for − and − SST models ........................ 138

    7.8 Force calculation for upwind and limited linear schemes ............................ 143

    7.9 Actual coefficient of discharge for upwind and limited linear schemes ....... 144

    7.10 Summary table of the outcomes of the analyses ........................................... 144

  • Abstract

    Pressure-relief valves are safety devices widely used in industrial applications to

    prevent that the working-fluid operating pressure exceeds the safety levels. Due to their

    significance they have been addressed by several studies and publications aimed at

    analyzing the flow field during relieving conditions. In those studies, based on CFD

    simulations, the difficulty in rendering the complex internal shape of the valves has been

    bypassed by means of two-dimensional axisymmetric meshes, or three-dimensional

    unstructured grids generated using commercial codes. The current thesis work, based on an

    internship at AST S.p.A. Company, pursues the goal of realizing for the first time in scientific

    literature a three-dimensional model of a spring-loaded pressure-relief safety valve on a

    structured grid for CFD analyses run with an open source code.

    The work is carried out using OpenFOAM, an open-source toolbox comprising utilities

    for mesh generation, calculation setup and solution. Following the creation of the three-

    dimensional model of the valve to be analyzed, attention is being focused on the complexity

    of generating a three-dimensional structured mesh and how some obstacles have been taken

    on exploiting the Company’s experience and the tools offered by OpenFOAM. After

    generating a satisfactory grid, a calculation for the transient simulation of a compressible

    flow of air is set up. Not only do the outcomes of the analysis highlight the supersonic nature

    of the flow within the valve, but also allow to study the behavior of an open source code for

    industrial applications, proving its suitability. Further simulations examine in depth the

    effect of the turbulence model and the numerical schemes on the solution, pointing out that

    the best accuracy is reached with second-order schemes and - turbulence model.

    Eventually, the numerical results of the simulation have been validated by experiments that

    prove their reliability.

    Keywords: CFD; safety valve; 3D; transient; supersonic; OpenFOAM

  • Sommario

    Le valvole di scarico sono dispositivi di sicurezza ampiamente utilizzati in ambito

    industriale per evitare che la pressione di esercizio superi i livelli di sicurezza. Data la loro

    importanza sono state oggetto di svariati studi e pubblicazioni mirati ad analizzare il campo

    di moto durante le condizioni di funzionamento. In questi studi, basati su simulazioni CFD,

    la difficoltà di riprodurre la complessa geometria interna delle valvole è stata aggirata

    tramite mesh bidimensionali con geometrie assialsimmetriche, o griglie tridimensionali

    non strutturate generate tramite codici commerciali. Il presente lavoro di tesi, basato su

    un’esperienza di tirocinio per conto dell’azienda AST S.p.A., si pone come obiettivo quello

    di realizzare per la prima volta nella letteratura scientifica un modello tridimensionale di

    una valvola di sicurezza a molla su griglia strutturata per analisi CFD eseguite tramite un

    codice open source.

    Il lavoro è svolto utilizzando OpenFOAM, un pacchetto software open-source che offre

    strumenti per generare mesh, impostare calcoli CFD e risolverli. Dopo aver riprodotto il

    modello tridimensionale contenente la geometria della valvola da analizzare, l’attenzione è

    focalizzata sulla complessità di realizzare una mesh strutturata tridimensionale e su come

    talune criticità siano state affrontate sfruttando l’esperienza dell’azienda e gli strumenti

    messi a disposizione da OpenFOAM. A seguito della generazione di una griglia

    soddisfacente, viene messo a punto un modello di calcolo per la simulazione transiente di

    un flusso comprimibile di aria. I risultati dell’analisi non solo evidenziano la natura

    supersonica del flusso all’interno della valvola, ma permettono anche di studiare il

    comportamento di un codice open source per un’applicazione industriale confermandone

    l’adeguatezza. Ulteriori simulazioni approfondiscono l’effetto del modello di turbolenza e

    degli schemi numerici sulla soluzione del calcolo, sottolineando come la migliore

    accuratezza si ottenga con schemi del secondo ordine e modello di turbolenza -. Infine, i

    risultati numerici dell’analisi sono stati validati tramite prove sperimentali che ne

    confermano l’affidabilità.

    Parole chiave: CFD; valvola di sicurezza; 3D, transiente; supersonico; OpenFOAM

  • 1

    Chapter 1

    Introduction

    The focus of this work is the development of a Computational Fluid Dynamic (CFD)

    model capable of simulating the working conditions of a spring-loaded pressure-relief valve

    (PRV) operating with air. The currently available alternatives regarding computational fluid

    dynamics analyses rely on commercial codes and open source codes, where the main

    difference between the two consists in the possibility of customizing the source code so as

    to adapt it to the user needs. If popular commercial codes such as Ansys-CFX provide user-

    friendly interfaces and trustworthy features that facilitate the simulation setup and generate

    reliable outcomes due to the grounded experience of countless test cases, they lack the

    opportunity to inspect and modify the source code of the software. Thus, they are mainly

    used in companies whose main concern is getting dependable results in the shortest

    possible time. On the other hand, open source software packages allow the user to access

    their codes and adapt them to his/her own requirements, guaranteeing a higher level of

    flexibility in exchange for enhanced complexity during the setup phase. For this reason, they

    are exploited in the academic context and in research and development departments of

    companies. A remarkable advantage of open source codes is that they are free.

    This Thesis comes from a work experience in AST S.p.A. technical office. The Company

    needed to develop for the first time a CFD model to simulate the behavior of its products in

    order not to rely on experimental tests only for their commercialization. Not only would the

    development of a CFD model expand the knowledge of the technical office regarding the

    topic of CFD, but also it would entail significant savings since experimental tests would be

    cut down. The Company was oriented towards the usage of an open source software both to

    exploit the advantage of tweaking the code based on its needs and to save costs associated

    with paying a yearly license. For this purpose, OpenFOAM was chosen as eligible tool to

    carry on the study.

    While the initial work dealt with the understanding of the working principles of safety

    valves and the fluid dynamic aspects involved, the following task consisted in combining the

    assimilated knowledge with the features offered by OpenFOAM to render the operating

    conditions of the object of the study, a spring-loaded pressure-relief valve. The core of this

    work consisted in generating the mesh for the CFD analysis and setting up the case: the

    preprocessing phase was the most crucial for the success of the analysis, therefore particular

    attention was payed to the choice of the appropriate solver as well as boundary conditions

    and solution parameters. Once guaranteed that the analysis did successfully run, the

    reliability of its outcomes was questioned and eventually proved relying on experimental

    tests and further researches.

  • 1.1 AST S.p.A. Company 2

    1.1 AST S.p.A. Company

    Founded in 1951, AST S.p.A. is one of the first Italian manufacturer of spring-loaded

    safety relief valves and change-over valves. Since the very early days, it has distinguished

    for technology and the degree of customization of its products, which has led the Company

    to enter the control valve market in the following years to fulfill the most demanding

    requirements of its customers. AST line of production includes a complete range of safety

    relief valves and pilot operated safety valves conceived for gas, steam, liquid and cryogenic

    applications, as well as the control valve series which comprises valves manufactured from

    solid nickel alloy forgings for demanding applications such as melamine and urea services.

    In 2006 AST S.p.A. starts the manufacturing of on/off valves, ball valves, gate valves and

    rotary control valves. A major business reorganization plan in 2012 results into the

    establishment of HIT Valve S.p.A. which takes charge of all the activities related to the

    production of on/off, ball, gate and rotary control valves.

    Currently AST group consists of more than 250 people. The dedicated facility for safety

    and control valves in Cornaredo consists of both an office block and a manufacturing site.

    The technical department closely cooperates with two of the most advanced Universities

    and Research Centers in the northern Italy, while the workshop is equipped with flexible

    machining centers which allow the production capacity to be rapidly increased with the

    market requirements and guarantee that quality standards and agreed delivery times are

    respected. In addition to the usual equipment needed for production testing, AST can

    perform steam testing, high and low temperature fugitive emissions test (ISO 15848),

    cryogenic test and high-pressure gas test up to 20.000 psi ([3]).

    With regard to quality standards, AST has, for many years, been working with a Quality

    Assurance System that received UNI EN ISO 9001 certification as far back as 1993. Since

    then AST gained several management systems and product related certifications, among

    which: OHSAS 18001 Occupational Health and Safety Assessment, ISO 14001

    Environmental Management, Pressure Equipment Directive 2014/68/EU, ATEX

    2014/34/EU, ASME and National Board certifications, AQSIQ/SELO for Chinese market

    and the approval for installation and exportation to Russia (CU TR).

    Figure 1.1: AST facility in Cornaredo

  • 1.2 OpenFOAM 3

    1.2 OpenFOAM

    OpenFOAM (acronym for Open Source Field Operation and Manipulation) is a free,

    open source software for computational fluid dynamics, owned by the OpenFOAM

    Foundation and distributed under the General Public Licence, which gives to the users the

    freedom to modify and redistribute the software allowing for multiple variants being

    released. Its structure comprises a set of proper and third-party libraries arranged in a

    hierarchical organization of directories: a collection of over 100 C++ libraries makes up an

    assortment of about 250 applications, each of which performs a specific task within a CFD

    workflow. A variety of applications is available for meshing generation, conversion and

    manipulation, case simulation, result processing and more. In particular, solver

    applications have a syntax that closely resembles the partial differential equations being

    solved, thanks to the object-oriented features of the C++ programming language such as

    inheritance, polymorphism, virtual functions, template classes and operator overloading.

    Object orientation is a property that allows to recognize main objects from a numerical

    modeling viewpoint, such as data and functions that operate on these data. This gives rise

    to a layered programming structure, where the general bottom layers are progressively

    specialized to build up the code functionalities (e.g. basic objects such as scalars and vectors

    are used to define the finite volume method or the finite elements method).

    OpenFOAM simulations are made up of several plain text input files located across the

    following directories:

    • a constant directory, that contains a full description of the case mesh and files

    specifying physical properties

    • a system directory, where parameters associated with the solution procedures are set

    up

    • time directories, each of which named after the simulated time at which the data are

    written, containing individual files of data for particular fields

    Each text file can be inspected and modified by the user if necessary, even while the

    simulation is running.

    Figure 1.2: Overall structure of OpenFOAM

  • 1.2 OpenFOAM 4

    Figure 1.3: Case directory structure

  • 5

    Chapter 2

    Pressure-relief Devices

    Pressure-relief devices are used in the daily operation of equipment and plants to avoid

    that the maximum allowable working pressure increases beyond the safe levels. Despite the

    inherently safe design, plenty of causes in everyday operations could lead the working

    pressure to rise above its maximum allowable value: operator errors, blocked discharge,

    thermal expansion, component failures, fire exposure and so on. A potential line of defense

    against these hazards consists in the passive design, but this road is usually exceedingly

    expensive, thus pressure-relief devices come into play. They are actuated by the inlet static

    pressure and are designed to activate during emergency or abnormal conditions to prevent

    a rise of internal fluid in excess of a specified design value.

    There are two main categories of pressure-relief devices:

    • Reclosing, designed to reclose after normal conditions have been restored

    • Non-reclosing, that remain open and need manual operation to be closed

    Non-reclosing pressure-relief devices are used when losing the content is not an issue. This

    category comprises rupture discs and pin actuated devices. A rupture disc is a device that

    contains a disc which breaks open when the static differential pressure between the

    upstream and the downstream side of the disc reaches a predetermined value. A pin

    actuated device is activated by the static pressure acting on a piston held in place by a pin:

    when the pressure exceeds a design value, the pin buckles or breaks and the piston moves

    to the fully open position.

    On the contrary, if the content is toxic or hazardous or when it is needed to return to normal

    operations quickly, the usage of reclosing pressure-relief devices is mandatory. Reclosing

    pressure-relief devices are known as pressure-relief valves (PRVs), and the most common

    types are spring-loaded PRVs, pilot operated PRVs and power actuated PRVs. Each type has

    a disc that shuts the passage to the content, and they differ in the way the disc is held in

    position: in spring-loaded valves the disc is held closed by a spring, in pilot operated valves

    the disc is kept in position by a holding pressure controlled by a pilot valve actuated by the

    Figure 2.1: Non-reclosing pressure-relief devices: rupture discs and pin actuated devices

  • 2.1 Terms and Definitions 6

    system pressure, power actuated valves instead are actuated by an externally powered

    control device.

    2.1 Terms and Definitions

    For an adequate description of the working principles of pressure-relief devices, the

    following definitions (included in API Standard 520 [2]) will be used.

    2.1.1 Dimensional characteristics

    • actual discharge area: the minimum net area that determines the flow through a

    valve

    • effective discharge area: a nominal area, provided for a range of sizes in terms of

    letter designations from D to T, used with an effective coefficient of discharge to

    calculate the relieving capacity of a pressure-relief valve for preliminary sizing

    equations

    • huddling chamber: an annular chamber located downstream of the seat of a PRV for

    the purpose of assisting the valve to achieve lift

    • secondary orifice: the annular opening at the outlet of the huddling chamber

    2.1.2 Device characteristics

    • actual coefficient of discharge: the ratio of the measured mass flow rate in a valve to

    that of an ideal nozzle

    • backpressure: the pressure at the outlet of a pressure-relief device as a result of the

    pressure in the discharge system; it is the sum of the superimposed and built-up

    backpressures

    Figure 2.2: Reclosing pressure-relief devices: spring-loaded, pilot operated, power actuated

  • 2.1 Terms and Definitions 7

    • balanced pressure-relief valve: a spring-loaded PRV that incorporates a bellows or

    other means for minimizing the effects of backpressure on the operational

    characteristics of the valve

    • blowdown: the difference between the set pressure and the closing pressure of a PRV,

    expressed as percentage of the set pressure

    • built-up backpressure: the increase in pressure at the outlet of a PRV as a result of

    flow after the pressure-relief device opens

    • chatter: the opening and closing of a PRV at a very high frequency

    • closing pressure: the value of decreasing inlet static pressure at which the valve disc

    reestablishes contact with the seat

    • coefficient of discharge: the ratio of the mass flow rate in a valve to that of an ideal

    nozzle

    • conventional pressure-relief valve: a spring-loaded PRV whose operational

    characteristics are directly affected by changes in the backpressure

    • effective coefficient of discharge: a nominal value used with an effective discharge

    area to calculate the relieving capacity of a pressure-relief valve for preliminary sizing

    equations

    • flutter: the abnormal and rapid reciprocating motion of the disc, that anyway does not

    contact the seat

    • lift: the actual travel of the disc from the closed position when a valve is relieving

    • maximum allowable working pressure (MAWP): the maximum gauge pressure

    permissible at the top of a completed vessel in its normal operating position at the

    designated temperature specified for that pressure

    • maximum operating pressure: the maximum pressure expected during normal

    system operation

    • opening pressure: the value of increasing inlet static pressure at which there is a

    measurable lift of the disc

    • overpressure: the pressure increase over the set pressure of the relieving device,

    expressed in percentage of set pressure

    • relieving pressure: the inlet pressure of a pressure-relief device during an

    overpressure condition; it is the sum of the set pressure and the overpressure

    • set pressure: the inlet gauge pressure at which the pressure-relief device is set to open

    under service conditions

    • simmer: the audible or visible escape of compressible fluid between the seat and disc

    of a PRV that may occur at an inlet static pressure below the set pressure prior to

    opening

    • superimposed backpressure: the static pressure that exists at the outlet of a pressure-

    relief device at the time the device is required to operate as a result of the constant or

    variable pressure in the discharge system coming from other sources

    • throat area: the minimum cross-sectional flow area of a nozzle in a pressure-relief

    valve

  • 2.2 Spring-loaded Pressure-relief Valves 8

    2.2 Spring-loaded Pressure-relief Valves

    Spring-loaded pressure-relief valves are self-actuated devices whose distinguishing

    feature is the presence of a spring that controls the position of the disc. They can be referred

    to by three different terms:

    • Relief valve: a spring-loaded PRV characterized by gradual opening that is usually

    proportional to the increase in pressure; normally used for incompressible fluids

    • Safety valve a spring-loaded PRV characterized by rapid opening; normally used to

    relieve compressible fluids

    • Safety relief valve: a spring-loaded PRV that may be used as either a relief or a safety

    valve depending on the application

    Another distinction can be made between conventional and balanced PRVs: they differ in

    the presence of a bellows, that minimizes the effect of backpressure on the performance

    characteristics of the valve.

    2.2.1 Conventional pressure-relief valves

    A spring-loaded PRV always consists of a 90° angled body with lower inlet and side exit,

    which is usually casted. It is flange-connected to the system and the inlet flange is typically

    smaller than the outlet one because, if the PRV is designed to work with compressible fluids,

    the discharged content always undergoes an expansion with a consequent volume increase.

    For the same reason design pressures at the inlet of the valve are always higher than at the

    outlet. The bonnet is flange-connected to the body and comprises the disc guide, which

    controls the lateral movement of the disc holder, the spring and the cap. The cap is the upper

    part and protects the adjusting screw.

    The fluid enters the valve through the inlet nozzle, a component thread-connected to

    the body which collects the fluid at high pressure and directs it towards the disc. As a matter

    of fact, the fluid at high pressure is entirely contained in this component and does not get

    in contact with the body. The upper part of the nozzle consists of the seat, an annular surface

    that the disc comes into contact with to prevent the flow passage when the valve is fully

    closed.

    Figure 2.3: Coventional and balanced pressure-relief valves

  • 2.2 Spring-loaded Pressure-relief Valves 9

    The disc has a fundamental role in shutting the passage to the fluid. It is generally made

    up of two parts: the disc holder and the disc itself. The disc holder contains the disc and can

    move axially in the disc guide during the relieving phase. Another solution consists in

    entrusting the disc travel guide to a spindle.

    The spring is the key element of a spring-loaded PRV: it provides the force to keep the

    disc on the nozzle, closing the valve. The choice of the spring must ensure the opening and

    closing of the valve in the range of parameters set by regulations, and the property that

    influences its performance is the stiffness. Moreover, it is possible to vary the force exerted

    by the spring, and consequently alter the set pressure, acting on the adjusting screw

    contained in the cap.

    Finally, the adjusting ring is a component thread-connected to the nozzle that controls

    the opening characteristics of the valve and the blowdown: its position with respect to the

    disc can be manually regulated and changes the dimensions of the huddling chamber. A

    hole in the body of the valve allows a screwdriver to rotate the toothed ring increasing or

    reducing its lift by a fraction of its pitch, thus causing a different pressurization of the

    surfaces below the disc, and consequently a different behavior of the valve during both

    opening and closing. After the position of the ring has been set, it is held in position by a

    screw thread-connected to the body, whose end is positioned between the teeth of the ring.

    The set of the following internal parts will be addressed TRIM:

    • nozzle

    • disc

    • disc holder

    • adjusting ring

  • 2.2 Spring-loaded Pressure-relief Valves 10

    Figure 2.4: Conventional pressure-relief valve

  • 2.2 Spring-loaded Pressure-relief Valves 11

    2.2.2 Working principle

    The operation of a spring-loaded PRV is based on a force balance. The spring exerts on

    the disc holder its elastic force, that is opposed to the force exerted by the fluid. When the

    valve is closed during normal operation the system pressure acting against the disc surface

    is resisted by the elastic force of the spring. Thus, the disc remains fixed and hinders the

    passage of the fluid. As the system pressure approaches the set pressure of the valve, the

    seating force between the disc and the nozzle, resulting from the thrust of the fluid and the

    elastic force of the spring, approaches zero. Then the fluid can move past the seating surface

    into the huddling chamber, where pressure builds up. In this condition pressure acts over a

    larger area, then an additional force is available to overcome the spring force, and the valve

    opens. As soon as it happens, the sudden flow increase and the restriction to flow through

    another annular orifice formed between the inner edge of the disc holder and the outside

    diameter of the adjusting ring produces an additional pressure increase, thus again an

    additional force. The freshly newborn forces cause the disc to lift substantially at pop.

    Figure 2.5: Sectional cut of a PRV with adjusting ring

  • 2.2 Spring-loaded Pressure-relief Valves 12

    The operational characteristic of a spring-loaded PRV is expressed in terms of lift of the

    disc as a function of pressure acting on it. As soon as the pressure in the inlet nozzle reaches

    the set pressure value, the valve pop-opens: the lift exhibits a linear trend at constant

    pressure, but that is not sufficient for the valve to reach the full lift condition, thus an

    additional pressure contribution, called overpressure, has to be provided. For a

    conventional PRV the allowable overpressure is limited at 10% of the set pressure. At full

    lift, a further pressure increase until the maximum relieving pressure does not cause any

    other change of position of the disc. Then, as long as pressure decreases, the valve begins to

    close: for the valve to fully close the closing pressure must be lower than the set pressure

    because the disc is now hit by a fluid flow that must be disposed before closing happens.

    The difference between the set pressure and the closing pressure is called blowdown. The

    adjusting ring is aimed at regulating the blowdown by changing the dimensions of the

    huddling chamber, but it necessarily affects the opening phase too. When the ring is down

    the force on the disc is lower and thus the lift, consequently a higher pressure is required to

    reach the full lift condition with respect to the ring being positioned up. On the contrary, in

    this case the higher force exerted on the disc penalizes the closing.

    Figure 2.6: Pressure on the disc at valve closed (A), initial opening (B) and fully opening (C)

  • 2.2 Spring-loaded Pressure-relief Valves 13

    2.2.3 Effect of the backpressure

    The backpressure is a key parameter that affects the operation of pressure-relief valves.

    It is defined as the pressure at the outlet of a pressure-relief device as a result of the pressure

    in the discharge system, and its magnitude can be split into two components: superimposed

    and built-up backpressure. Built-up backpressure generates as a consequence of the fluid

    flowing past the disc when the valve is open and filling the body of the valve in its way to the

    outlet. Superimposed backpressure on the contrary does not depend on the valve itself and

    is present even when the valve is closed: its existence causes a pressure force to be applied

    to the valve disc that is additive to the spring force, which increases the pressure at which

    the valve will open.

    Assuming that the backpressure has the same value in the whole body of the valve and

    neglecting the weight of the disc, from a simple equilibrium of forces:

    𝐹𝑠 + 𝑝𝐵 𝐴 = 𝑝𝑠𝑒𝑡 𝐴 (2.1)

    where in (2.1) FS is the force exerted by the spring, pB is the superimposed backpressure, pset

    is the set pressure and A is the area of the inlet nozzle in contact with the disc, i.e. the surface

    of the disc where the set pressure is acting before the valve opens, called seat area. It is clear

    from the previous considerations that the set pressure must increase to cope with the

    backpressure pushing the disc downward.

    Figure 2.7: Lift of disc and inlet pressure relationship

  • 2.2 Spring-loaded Pressure-relief Valves 14

    2.2.4 Balanced pressure-relief valves

    The above-mentioned effects of the backpressure can give rise to several problems.

    First, it is evident how the value of the superimposed backpressure affects the set pressure

    of the valve: this can be a serious problem when the backpressure is variable. Secondly, an

    excessive value of the backpressure can induce fluttering or chattering phenomena,

    detrimental for the correct operation of the valve and potentially damaging for the valve

    itself. Finally, the main concern during design phase is the compromise between a precise

    opening, for safety reasons, and a precise closing, to not waste precious working fluid. For

    all these reasons it is advantageous to limit the effect of the backpressure on the

    performance characteristics of the valve. Balanced pressure-relief valves achieve this goal

    through a specific vented component called bellows. In a balanced pressure-relief valve, the

    bellows is attached to the disc holder covering a pressure area approximately equal to the

    seating area of the disc. This isolates an area on the disc, approximately equal to the disc

    seat area, from the back pressure, exposing it to atmospheric pressure. With the addition of

    a bellows, therefore, the set pressure of the pressure-relief valve remains constant in spite

    of variations in back pressure.

    Assuming again that the backpressure has the same value in the whole body of the valve

    and neglecting the weight of the disc, from a simple equilibrium of forces:

    𝐹𝑠 = 𝑝𝑠𝑒𝑡 𝐴 (2.2)

    where in (2.2) FS is the force exerted by the spring, pB is the superimposed backpressure,

    pset is the set pressure and A is the seat area.

    Figure 2.8: Effect of superimposed backpressure in a conventional PRV

  • 2.2 Spring-loaded Pressure-relief Valves 15

    Another advantage of balanced PRVs is that the bellows prevent the working fluid to

    get in touch with the bonnet: this precaution is requested whenever the valve operates with

    corrosive fluids that can damage the spring or the other components inside the bonnet. A

    balanced pressure-relief valve should be used where the built-up backpressure is too high

    for conventional pressure-relief valves or where the superimposed backpressure varies

    widely compared to the set pressure. Typically, conventional PRVs are used when the total

    backpressure (superimposed plus built-up) does not exceed 10% of the set pressure. Over

    this value balanced valves can be applied, up to a total backpressure not exceeding

    approximately 50% of the set pressure. When this happens, pilot operated valves are

    exploited.

    Figure 2.9: Effect of superimposed backpressure in a balanced PRV

  • 2.2 Spring-loaded Pressure-relief Valves 16

    Figure 2.10: Balanced pressure-relief valve

  • 2.3 Sizing of Pressure-relief Valves 17

    2.3 Sizing of Pressure-relief Valves

    Several factors come into play when dealing with pressure-relief valves: the nature of

    the working fluid (that can be a gas, a liquid or a two phase liquid/vapor flow), the effect of

    the backpressure (as previously discussed) and the type of outflow (critical or subcritical).

    The first distinction takes care of the nature of the fluid. In case of a liquid the outflow is

    governed by the pressure difference between the upstream plenum and the discharge

    system. In this case the fluid dynamic losses, proportional to the square of the flow speed,

    assume a key role as they limit the performances of the device. For a gas instead the main

    concern is the choke phenomenon, that occurs when the Mach number in the throat section

    reaches unitary value and limits the discharged mass flow.

    2.3.1 Converging-diverging nozzle

    This condition is well-explained by the converging-diverging nozzle theory. The stream

    of a perfect gas in a duct obeys the following law, obtained by working out the equation of

    state for gases, the continuity equation, the momentum equation and the energy equation:

    (𝑀2 − 1)

    𝑑𝑈

    𝑈=

    𝑑𝑆

    𝑆−

    𝜏𝑐

    𝑝𝑆−

    𝑑𝑞

    𝑐𝑝𝑇 (2.3)

    where M is the Mach number, U is the flow velocity, S is the cross section of the duct, τ is

    the integral of the viscous stresses acting on the duct perimeter, c is the duct perimeter, p is

    the pressure, q is the heat delivered to the system, T is the temperature of the gas and cp its

    specific heat at constant pressure. If the flow is adiabatic (dq=0) and isentropic (τ=0), the

    equation (2.4) reduces to:

    (𝑀2 − 1)

    𝑑𝑈

    𝑈=

    𝑑𝑆

    𝑆 (2.4)

    which highlights how a convergent duct is required to accelerate a subsonic stream and a

    divergent one to decelerate it, while the opposite happens for a supersonic stream. Again,

    for an adiabatic and isentropic stream of a perfect gas the following statements apply:

    𝜌 =𝑝

    𝑅𝑇 (2.5)

    𝑀 =

    𝑈

    √𝑘𝑅𝑇 (2.6)

    𝑝𝑇𝑝

    = (1 +𝑘 − 1

    2𝑀2)

    𝑘𝑘−1

    (2.7)

    𝑇𝑇𝑇

    = 1 +𝑘 − 1

    2𝑀2 (2.8)

    where ρ represents the density, R is the ideal gas constant, k is the specific heat ratio and pT

    and TT stand for, respectively, the total pressure and temperature, i.e. the pressure and

  • 2.3 Sizing of Pressure-relief Valves 18

    temperature measured when the kinetic head is recovered by an isentropic process. The

    mass flow rate flowing through a generic section is defined as:

    �̇� = 𝜌𝑈𝑆 (2.9)

    Finally, working out equations (2.5), (2.6), (2.7) and (2.8) in (2.9) it is possible to derive the

    relationship between the mass flow rate and the thermodynamic quantities of the gas:

    �̇� =

    𝑝𝑇𝑆

    √𝑅𝑇𝑇 𝑓𝑀,𝑘 (2.10)

    where in (2.10) fM,k is a parameter depending only on the gas and the Mach number

    𝑓𝑀,𝑘 = 𝑀√𝑘 (1 +𝑘 − 1

    2𝑀2)

    1+𝑘2(1−𝑘)

    (2.11)

    The (2.10) shows that the mass flow rate depends on the Mach number. In particular, the

    mass flow rate has a maximum for M=1. Moreover, given the flow rate, two possible Mach

    numbers can be reached in the cross section of the duct, whichever its shape is.

    The previous considerations can be extended to the case of a duct with a particular

    converging-diverging shape. A converging-diverging duct is required to accelerate a stream

    of compressible fluid above M=1. Starting from a volume (A), a converging duct is always

    essential to accelerate the fluid. From equation (2.4) the minimum section (throat) may

    have sonic conditions, i.e. M=1, depending on the expansion ratio pT/p: if this happens,

    pressure perturbations generated in the outlet section (B) cannot travel upstream to A,

    Figure 2.11: Trend of mass flow rate, pressure and temperature as a function of Mach number

  • 2.3 Sizing of Pressure-relief Valves 19

    while all pressure perturbations can travel from A to B. The diverging duct then accelerates

    the supersonic flow to Mach numbers above 1.

    Depending on the conditions upstream and downstream of the duct, two cases are possible.

    For constant upstream conditions and variable downstream conditions, the flow rate

    increases together with the expansion ratio and thus the Mach number until M=1 sets in the

    throat: under these circumstances the pressure variation in section B cannot travel

    upstream and the mass flow rate becomes constant. For variable upstream conditions and

    constant downstream conditions instead, the pressure increase generated in A can always

    travel to B, even when sonic conditions have set in the throat, therefore the mass flow rate

    keeps increasing with the expansion ratio.

    The first case is typical of pressure-relief valves working with compressible fluids. When

    the valve opens, the gas flows from the surface of the disc, where it stopped thus having total

    pressure condition, towards the throat section between the different components expanding

    and increasing its velocity during this process. Then in the throat sonic conditions may

    establish, limiting the discharged flow rate.

    Figure 2.12: Converging-diverging duct

    Figure 2.13: Mass flow rate trend as a function of expansion ratio

  • 2.3 Sizing of Pressure-relief Valves 20

    2.3.2 Sizing for vapor or gas

    The sizing equations for vapor or gaseous working fluids are based on the ideal gas laws

    and the assumption that the flow is isentropic and one-dimensional, so that it can be

    described by the pressure-specific volume relationship:

    𝑝𝑉𝑘 = 𝑐𝑜𝑠𝑡 (2.12)

    The ideal gas assumption shows good agreement with the real behavior of the fluid when

    the compressibility factor Z, defined as:

    𝑍 =𝑝𝑉

    𝑅𝑇 (2.13)

    is in the range between 0.8 and 1.1. In other cases the deviations of the real gas from the

    ideal gas laws must be taken into account by empirical corrections on Z. Also, the hypothesis

    of one-dimensional flow is slightly forced since the gas, limited by the geometries of the

    nozzle, the seat, the disc and the ring, encounters in its motion throughout the valve cross

    sections that do not really fit the characteristics of a straight pipe. Moreover, friction and

    flow detachment phenomena kick in as well. The following dissertation aims at giving a hint

    of what lies behind the equations used to preliminarily size PRVs.

    Under the above-mentioned assumptions the pressure ratio β between the absolute

    static pressure at the outlet and the absolute total pressure at the inlet of the valve can be

    related to the Mach number and the specific heat ratio as in (2.7):

    𝛽 = 𝑝𝑠𝑝𝑇

    = (1 +𝑘 − 1

    2𝑀2)

    𝑘1−𝑘

    (2.14)

    In case of choked flow, i.e. M=1, the equation (2.14) becomes:

    𝛽𝐶𝑅 = 𝑝𝐶𝐹𝑝𝑇

    = (2

    𝑘 + 1)

    𝑘𝑘−1

    (2.15)

    In this condition the velocity of the fluid in the throat section reaches the speed of sound

    and the choking phenomenon occurs, limiting the mass flow discharged by the valve. The

    pressure ratio in correspondence of sonic velocity is called critical pressure ratio βCR and the

    pressure at the valve exit pCF is known as the critical flow pressure. The critical pressure

    ratio is a discriminating factor between sonic and subsonic flow through the nozzle of a PRV:

    when the pressure ratio is higher than βCR the flow is subsonic, on the contrary if it is lower

    than βCR the flow is sonic. The onset of a sonic flow limits the discharged mass flow rate

    since downstream variations do not affect upstream quantities, then the flow is no more

    controlled by the upstream/downstream pressure ratio, but by the upstream/throat

    pressure ratio. Considering air as working fluid (k=1.4), the critical pressure ratio is:

    𝛽𝐶𝑅,𝑎𝑖𝑟 = 𝑝𝑠𝑝𝑇

    = 0.5283 (2.16)

  • 2.3 Sizing of Pressure-relief Valves 21

    The sizing of pressure-relief valves is always performed in accordance to the relevant

    standards for safety valves, whose most commonly used are API 520 [2] and EN ISO 4126

    part 1 and 4. The sizing equations for PRVs in vapor or gas service fall into two general

    categories depending on whether the flow is critical or subcritical. If the pressure

    downstream of the nozzle is less than, or equal to, the critical flow pressure pCF, then critical

    flow will occur, and the following procedure should be applied.

    𝑝𝐶𝐹 = 𝑝1 (2

    𝑘 + 1)

    𝑘𝑘−1

    (2.17)

    𝐴 =𝑊

    𝐶𝐾𝑑𝑝1𝐾𝑏𝐾𝐶√

    𝑇𝑍

    𝑀 (2.18)

    𝐶 = 0.03948√𝑘 (2

    𝑘 + 1)

    𝑘+1𝑘−1

    (2.19)

    where p1 is the absolute upstream relieving pressure in kPa, A is the required effective

    discharge area of the device in mm2, W is the required flow through the device in kg/h, C is

    a function of the specific heat ratio of the gas at inlet relieving temperature, Kb is a correction

    factor that takes into account the effect of backpressure in balanced PRVs only, KC is the

    combination corrector factor for installations with a rupture disc upstream of the PRV, Kd

    is the effective coefficient of discharge (for preliminary sizing, equal to 0.975), M is the

    molecular weight of the gas or vapor at inlet relieving conditions. All the physical quantities

    are expressed in SI units.

    If the downstream pressure exceeds the critical flow pressure pCF, then subcritical flow

    will occur, and the following procedure should be applied.

    𝐴 =17.9 𝑊

    𝐹2𝐾𝑑𝐾𝐶√

    𝑇𝑍

    𝑀𝑝1(𝑝1 − 𝑝2) (2.20)

    𝐹2 = √(𝑘

    𝑘 − 1) 𝑟

    2𝑘 [

    1 − 𝑟𝑘−1𝑘

    1 − 𝑟] (2.21)

    where F2 is the coefficient of subcritical flow, r is the ratio of backpressure to upstream

    relieving pressure and p2 is the backpressure in kPa. It is noticeable that for subcritical flow

    the pressure at the outlet of the valve (the backpressure) affects the discharged mass flow

    rate in accordance with the theory.

    2.3.3 Sizing for liquid

    The sizing equations for liquid service pressure-relief valves are easier to be derived due

    to the working fluid assumed incompressible. From the energy conservation equation

    between upstream and downstream of a nozzle:

  • 2.3 Sizing of Pressure-relief Valves 22

    𝑝1𝜌1

    +𝑈1

    2

    2+ 𝑔𝑧1 =

    𝑝2𝜌2

    +𝑈2

    2

    2+ 𝑔𝑧2 (2.22)

    Considering the geodetical term gz negligible, null upstream flow velocity and constant

    density ρ everywhere, the downstream velocity can be deduced from (2.22):

    𝑈2 = √2(𝑝1 − 𝑝2)

    𝜌 (2.23)

    which, included in the equation (2.9) for the mass flow, gives:

    �̇� = 𝑆2√2(𝑝1 − 𝑝2)𝜌 (2.24)

    clearly depicting the dependency of the mass flow from the pressure difference between

    upstream and downstream.

    The sizing of PRVs operating with liquids in accordance with API520 states:

    𝐴 =11.78 𝑄

    𝐾𝑑𝐾𝑤𝐾𝑣𝐾𝐶√

    𝐺

    𝑝1 − 𝑝2 (2.25)

    where A is the required effective discharge area of the device in mm2, Q is the required flow

    rate in L/min, Kd is the rated coefficient of discharge (for preliminary sizing, equal to 0.65),

    Kw is the correction factor due to backpressure (equal to 1 if the backpressure is

    atmospheric), KC is the combination corrector factor for installations with a rupture disc

    upstream of the PRV, Kv is a correction factor due to viscosity dependent on the Reynolds

    number, G is the specific gravity of the liquid at the flowing temperature referred to water

    at standard conditions, p1 and p2 are respectively the relative upstream relieving pressure

    and the relative total backpressure, both in kPa. All physical quantities are expressed in SI

    units.

  • 23

    Chapter 3

    Fluid Dynamics

    Fluid dynamics describes the behavior of a moving fluid, either compressible or

    incompressible, involving the calculation of several physical quantities that characterize the

    state of the fluid. These quantities can be scalars (such as pressure, temperature, density),

    vectors (such as velocity and volume forces) and tensors (such as viscous stresses) and need

    to be related to the motion of the fluid. Considering a generical scalar quantity , to

    accomplish this task two point of views can be adopted:

    • Lagrangian point of view, that gives attention to the fluid particle on its motion thus

    adopting a control mass approach; in this way, time becomes the only independent

    variable and all the other quantities, as well as the position of the particle, become

    time-dependent variables

    𝑑𝜙𝐿

    𝑑𝑡=

    𝜕𝜙𝐿

    𝜕𝑡 (3.1)

    • Eulerian point of view, that considers a control volume fixed in space without paying

    attention to the particles passing through it; in this way, the generic scalar quantity

    depends on time and position inside the control volume, the latter dependent on time

    as well, thus being its time derivative composed of an unsteady term and an advective

    term, which expresses the transport of a fluid property by means of the mean flow

    𝑑𝜙𝐸

    𝑑𝑡=

    𝜕𝜙𝐸

    𝜕𝑡+ �⃗⃗� ⋅ 𝛻𝜙𝐸 (3.2)

    Both point of views can then be exploited to perform the formulation of conservation laws,

    through which derive the fundamental equations of fluid dynamics.

    3.1 Conservation Laws

    Conservation laws come from the physics and apply to some physical quantities related

    to a fluid: they state that the variation of the total amount of certain quantities inside a given

    domain is equal to the balance between the amount of that quantity entering and leaving

    the considered domain, plus the contribution from eventual sources generating that

    quantity. Not all flow quantities obey a conservation law, but some do: mass, momentum

    and energy. The set of these three equations is enough to completely solve incompressible

    flows due to the density being constant, while for compressible flows dissipations due to the

    viscous stresses affect the density, therefore the set of equations need to be solved including

    an equation of state and a formulation for the viscosity. A conservation equation can be

    written in conservative or non-conservative form, depending on how the terms of the

    equation are expressed.

  • 3.1 Conservation Laws 24

    To express the variation in time of a generic quantity adopting the Eulerian point of

    view, a control volume is required. From the previous considerations a generic quantity

    included in this control volume can vary whether due to a flux (𝐹 ) of the above-mentioned

    quantity across the domain boundaries or due to surface (𝑄𝑆⃗⃗ ⃗⃗ ) or volume (𝑄𝑉) sources and

    sinks. Then, the general form of the conservation equation of a generic quantity inside an

    arbitrary control volume contoured by a surface S is:

    𝜕

    𝜕𝑡∫ 𝜙𝑑Ω Ω

    = −∮ 𝐹 𝑆

    ⋅ 𝑑𝑆 + ∫ 𝑄𝑉𝑑ΩΩ

    + ∮ �⃗� 𝑆𝑆

    ⋅ 𝑑𝑆 (3.3)

    where the minus sign of the first surface integral accounts for the flux being positive when

    entering the domain. This is the integral formulation of the conservation equation. Then,

    applying the Gauss theorem to (3.3) to transform the surface integrals into integrals over

    the volume it is possible to derive the differential formulation of the conservation equation,

    valid in any point of the flow:

    𝜕𝜙

    𝜕𝑡+ ∇⃗⃗ ⋅ 𝐹 = 𝑄𝑉 + ∇⃗⃗ ⋅ �⃗� 𝑆 (3.4)

    If the equation can be written grouping the fluxes under the divergence operator, then it is

    in conservative form. It is worth saying that might represent either a scalar quantity or a

    vector without the conservation equation changing its form, but only the physical meaning

    of its terms. Indeed, if is a vector, then the fluxes and the surface source terms become

    tensors, whereas the volume source terms become vectors. In (3.3) and (3.4) fluxes grouped

    by the 𝐹 term can be generated by two contributions:

    Figure 3.1: Control volume

  • 3.1 Conservation Laws 25

    • Convective contribution, that represents the amount of that is carried away or

    transported by the fluid flow

    𝐹 𝐶 = 𝜙�⃗⃗� (3.5)

    • Diffusive contribution, that represents the amount of that is carried away or

    transported by its gradient

    𝐹 𝐷 = −𝑘𝜌∇⃗⃗ 𝜙 (3.6)

    The convective flux describes the passive transport of the conserved variable by the flow, it

    is proportional to the flow velocity and appears as a first order partial derivative term inside

    the conservation equations, while the diffusion flux describes an isotropic diffusion

    phenomenon and appears as a second order partial derivative term under the Laplace

    operator.

    3.1.1 Continuity equation

    The continuity equation expresses the conservation of mass within a control volume,

    stating that the rate of change of mass per unit volume ρ is null. The integral formulation

    is:

    𝜕

    𝜕𝑡∫ 𝜌𝑑Ω Ω

    + ∮ 𝜌�⃗⃗� 𝑆

    ⋅ 𝑑𝑆 = 0 (3.7)

    while the differential form is:

    𝜕𝜌

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌�⃗⃗� ) = 0 (3.8)

    where only the convective flux appears, since mass does not diffuse.

    3.1.2 Momentum equation

    The momentum equation corresponds to Newton’s second law of motion, that relates

    the forces acting on an object to its acceleration through its mass. In this case, contributions

    to the source terms come from external volume forces (such as gravity or applied forces)

    and from internal forces (stress). The integral formulation of the momentum conservation

    equation is:

    𝜕

    𝜕𝑡∫ 𝜌�⃗⃗� 𝑑Ω Ω

    + ∮ (𝜌�⃗⃗� )�⃗⃗� 𝑆

    ⋅ 𝑑𝑆 = ∫ 𝑓 𝑒𝑑ΩΩ

    + ∮ �̿�𝑆

    ⋅ 𝑑𝑆 (3.9)

    where 𝑓 𝑒 accounts for external volume forces and �̿� expresses the stress, which represents

    the internal deformability of a fluid, depends on the position and on the orientation of the

    surface it acts on and is represented by a tensor. Assuming that the fluid is Newtonian, stress

    can be decomposed into an isotropic component (pressure) and a viscous shear stress tensor

    �̿�, that represents the internal friction force of fluid layers against each other.

  • 3.1 Conservation Laws 26

    �̿� = −𝑝𝐼 ̿ + �̿� (3.10)

    Working out equation (3.10) into (3.9), the differential formulation of the momentum

    conservation equation can be derived:

    𝜕(𝜌�⃗⃗� )

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌�⃗⃗� ∗ �⃗⃗� ) = 𝜌𝑔 − ∇𝑝 + ∇⃗⃗ ⋅ �̿� (3.11)

    The viscous shear stress tensor can then be expressed in terms of the flow velocity adopting

    Newton’s law for viscous fluids:

    �̿� = 2𝜇�̿� −

    2

    3𝜇∇(∇⃗⃗ ⋅ �⃗⃗� ) (3.12)

    where is the dynamic viscosity of the fluid and �̿� is its strain rate tensor:

    �̿� =

    1

    2(∇�⃗⃗� 𝑇 + ∇�⃗⃗� ) (3.13)

    eventually leading to the Navier-Stokes equation:

    𝜕(𝜌�⃗⃗� )

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌�⃗⃗� ∗ �⃗⃗� ) = 𝜌𝑔 − ∇𝑝 + 𝜇∇2�⃗⃗� +

    1

    3𝜇∇(∇⃗⃗ ⋅ �⃗⃗� ) (3.14)

    3.1.3 Energy equation

    The energy equation states that the total energy et, defined as the sum of fluid internal

    energy plus its kinetic energy per unit mass, conserves. In this case both conductive and

    diffusive fluxes take part in the equation, while the volume source terms are the work of the

    volume forces 𝑓 𝑒 and the heat sources qH, and the surface sources are the result of the work

    done on the fluid by the internal shear stress acting on the surface of the control volume.

    With these premises the integral formulation of the energy equation is:

    𝜕

    𝜕𝑡∫ 𝜌𝑒𝑡𝑑Ω Ω + ∮ 𝜌𝑒𝑡 �⃗⃗�

    𝑆

    ⋅ 𝑑𝑆 = ∮ 𝑘∇⃗⃗ T𝑆 ⋅ 𝑑𝑆 + ∫ (𝜌𝑓 𝑒 ⋅ �⃗⃗� + 𝑞𝐻)𝑑ΩΩ + ∮ (�̿�𝑆 ⋅ �⃗⃗�

    ) ⋅ 𝑑𝑆 (3.15)

    where k is the thermal conductivity of the fluid, responsible for the presence of the diffusive

    flux. Expressing the stress tensor in its isotropic and viscous shear stress component, two

    possible expressions of the differential formulation of the energy equation can be written,

    one in terms of total energy et and one with respect to total enthalpy ht:

    𝜕(𝜌𝑒𝑡)

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌𝑒𝑡�⃗⃗� ) = ∇⃗⃗ ⋅ (𝑘∇⃗⃗ 𝑇) − ∇⃗⃗ ⋅ (𝑝�⃗⃗� ) + ∇⃗⃗ ⋅ (�̿� ⋅ �⃗⃗� ) + 𝜌𝑔 ⋅ �⃗⃗� + 𝑞𝐻 (3.16)

    𝜕(𝜌ℎ𝑡)

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌ℎ𝑡 �⃗⃗� ) =

    𝜕𝑝

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝑘∇⃗⃗ 𝑇) + ∇⃗⃗ ⋅ (�̿� ⋅ �⃗⃗� ) + 𝜌𝑔 ⋅ �⃗⃗� + 𝑞𝐻 (3.17)

  • 3.2 Turbulence 27

    3.2 Turbulence

    Turbulence is a three-dimensional, unsteady, rotational fluid motion with broad-

    banded fluctuations of flow quantities occurring in both time and space. Its origin lies in the

    nonlinearity of the Navier-Stokes equations, whose main nonlinearity is provided by the

    convection term, and its onset is triggered for sufficiently high values of nonlinearity

    parameters (such as the Reynolds number). It is the final state of a transition process

    composed by a succession of fluid-dynamic instabilities that break the regular laminar

    profiles leading to the formation of unsteady vortices. Turbulence is characterized by:

    • Fluctuations of flow quantities

    • Unstable vortical structures, called eddies, whose size ranges from the problem length

    scale to very small scale, depending on the Reynolds number which represents the

    ratio of inertial forces to viscous forces (the larger Re, the smaller the scale)

    • Dissipation of energy, that is inviscidly transferred from larger to smaller eddies

    through the Kolmogorov cascade, until viscous dissipation occurs at the level of the

    smallest eddies

    • Enhanced diffusivity due to the chaotic motion, that improves mixing via transport

    Due to the complexity and the perceived randomness of turbulent flows, an analytical

    description is practically impossible, therefore one might resort to a statistical description

    of the flow.

    3.2.1 Reynolds Averaged Navier-Stokes Equations

    The idea of Reynlods consists in writing each flow quantity as a summation of a mean

    and a fluctuating component:

    𝜙 = �̅�(𝑥) + 𝜙′ (3.18)

    �̅�(𝑥) =1

    ΔT∫ 𝜙(𝑥, 𝑡)𝑑𝑡

    𝑡+Δ𝑇2

    𝑡−ΔT2

    (3.19)

    The such written terms are put in the Navier-Stokes equations, then the equations

    themselves are time averaged. The advantage of this strategy lies in the fact that the

    averaging procedure of fluctuating terms nullifies them, however there is also a drawback:

    newborn mixed terms, difficult to be evaluated, appear.

    Applying the Reynolds procedure to the continuity equation is straightforward. The

    mean mass balance equation is formally identical to the instantaneous one:

    𝜕𝜌

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌�⃗⃗̅� ) = 0 (3.20)

  • 3.2 Turbulence 28

    The mean momentum equation is more complex due to the nonlinear term:

    𝜕(𝜌�⃗⃗̅� )

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌 (�⃗⃗̅� + �⃗� ) ∗ (�⃗⃗̅� + �⃗� ))

    ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅= 𝜌𝑔 − ∇�̅� + 𝜇∇2�⃗⃗̅� +

    1

    3𝜇∇(∇⃗⃗ ⋅ �⃗⃗̅� ) (3.21)

    where �⃗⃗̅� stands for the mean component of the flow velocity while �⃗� is the fluctuating

    component. From some algebraic steps:

    ∇⃗⃗ ⋅ (𝜌 (�⃗⃗̅� + �⃗� ) ∗ (�⃗⃗̅� + �⃗� ))

    ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅̅ ̅= ∇⃗⃗ ⋅ (𝜌�⃗⃗̅� ∗ �⃗⃗̅� ) + ∇⃗⃗ ⋅ (𝜌�⃗� ∗ �⃗� ̅̅ ̅̅ ̅̅ ̅) (3.22)

    then the (3.21) becomes:

    𝜕(𝜌�⃗⃗̅� )

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌�⃗⃗̅� ∗ �⃗⃗̅� ) = 𝜌𝑔 − ∇�̅� + 𝜇∇2�⃗⃗̅� +

    1

    3𝜇∇ (∇⃗⃗ ⋅ �⃗⃗̅� ) − ∇⃗⃗ ⋅ (𝜌�⃗� ∗ �⃗� ̅̅ ̅̅ ̅̅ ̅) (3.23)

    The fluctuating component, appearing in divergence form and put on the right-hand side,

    acts like a stress added to the viscous molecular one; it is called Reynolds stress and it is a

    symmetric tensor combining velocity fluctuations:

    �̿� = −(𝜌�⃗� ∗ �⃗� ̅̅ ̅̅ ̅̅ ̅) = −𝜌 [𝑢2̅̅ ̅ 𝑢𝑣̅̅̅̅ 𝑢𝑤̅̅ ̅̅𝑣𝑢̅̅̅̅ 𝑣2̅̅ ̅ 𝑣𝑤̅̅ ̅̅𝑤𝑢̅̅ ̅̅ 𝑤𝑣̅̅ ̅̅ 𝑤2̅̅ ̅̅

    ] (3.24)

    whose trace is:

    𝑡𝑟(𝑟)̿ = −𝜌(𝑢2̅̅ ̅ + 𝑣2̅̅ ̅ + 𝑤2̅̅ ̅̅ ) = −2𝜌𝜅 (3.25)

    where is the turbulent kinetic energy, while u, v and w are the fluctuating components of

    the velocity along the three orthogonal directions x, y and z. Thus, it is clear that turbulence

    behaves like an additional viscosity inside the momentum equation. Unfortunately, the

    equations do not provide any direct expression for the Reynolds stresses, therefore a closure

    problem arises and modeling is required to achieve solution.

    Finally, applying Reynolds averaging to the thermal energy conservation equation,

    obtained subtracting the mechanical terms from the total energy balance equation, one can

    get:

    𝜕(𝜌𝑐�̅�)

    𝜕𝑡+ ∇⃗⃗ ⋅ (𝜌𝑐�̅��⃗⃗̅� ) = 𝑘∇2�̅� − ∇⃗⃗ ⋅ (𝜌𝑐𝑇′�⃗� ̅̅ ̅̅ ) (3.26)

    Again, the nonlinear convective term causes the presence of a combined fluctuating term

    analogous to the Reynolds stress, which is called turbulent heat flux, and a closure problem

    arises as well.

  • 3.2 Turbulence 29

    3.2.2 Boussinesq’s hypothesis

    The Reynolds stress tensor is symmetric and can be expressed as sum of an isotropic

    and a deviatoric anisotropic component �̿�.

    �̿� = −𝜌

    2

    3𝜅 + �̿� (3.27)

    To achieve an effective modeling of the deviatoric component, Boussinesq proposed a purely

    formal analogy with the Newton’s stress - strain-rate law, modeling the deviatoric

    component and consequently the Reynolds stress tensor as directly proportional to the

    mean strain rate tensor through a scalar coefficient T called eddy viscosity:

    �̿� = −2𝜇𝑇�̿̅� (3.28)

    A similar shortcoming was proposed for the turbulent heat flux, introducing the eddy

    diffusivity kT:

    −𝜌𝑐𝑇′�⃗⃗� ̅̅ ̅̅̅ = 𝑘𝑇∇�̅� (3.29)

    Introducing (3.28) and (3.29) inside, respectively, equations (3.23) and (3.26) it appears

    clearly the way that turbulence enhances mixing rates increasing diffusion coefficients, both

    thermal and molecular:

    𝜕(�⃗⃗̅� )

    𝜕𝑡+ ∇⃗⃗ ⋅ (�⃗⃗̅� ∗ �⃗⃗̅� ) = 𝑔 −

    ∇�̅�

    𝜌+

    𝜇 + 𝜇𝑇𝜌

    ∇2�⃗⃗̅� (3.30)

    𝜕(�̅�)

    𝜕𝑡+ ∇⃗⃗ ⋅ (�̅��⃗⃗̅� ) =

    𝑘 + 𝑘𝑇𝑐𝜌

    ∇2�̅� (3.31)

    where in the equations above the properties of the fluid have been assumed constant. The

    system is drastically simplified, reducing the non-linear fluctuating terms to diffusive

    elements in the equations. Turbulent viscosity and diffusivity are linked through the

    turbulent Prandtl number, defined as:

    PrT = 𝐶𝜇𝑇𝑘𝑇

    (3.32)

    However, at least a model is needed to evaluate the eddy viscosity.

    3.3 Boundary Layer Theory

    Pressure-relief devices are characterized by internal flows: in a PRV the flow is guided


Recommended