You are on page 1of 56

1E407 Individual Inquiry & Seminars

INTERACTIVE WEB BASED RISK ASSESSMENT SYSTEM


By: KIEN TRAN
Department of Chemical Engineering
The University of Queensland

Supervisor: ASSOCIATED PROFESSOR IAN CAMERON Date: 27TH OCTOBER 2000

55 Beams Rd Boondall Qld 4034

27th October 2000

The Executive Dean Faculty of Engineering, Physical Sciences and Architecture The University of Queensland St Lucia Qld 4072

Dear Sir,

I hereby submit for consideration my Individual Inquiry entitled: Interactive Web-based Risk Assessment System in partial fulfillment of the Bachelor of Engineering (Chemical) Honours degree for which I have been studying. To the best of my knowledge all the work presented is original except where otherwise acknowledged. Yours Sincerely,

Kien Tran

Individual Inquiry Web-base Interactive Risk Assessment System

Acknowledgements
I wish to take this opportunity to say a big thankyou to the following people for their continuous inputs and support throughout the course of this Individual Inquiry. The work presented in this Individual Inquiry could never have been accomplished so smoothly without the help and support from these people.

To my Individual Inquiry supervisor, Associated Professor Ian Cameron for his invaluable advice and input to the modeling aspect and the models implemented during the course of this work.

And to my great friend, Ben Wong for passing on the knowledge he gained from previous work on the HEVAN project. Many parts of the work presented in this Individual Inquiry could not have been attained without his knowledge and experience with the operation of the HEVAN calculation engine.

Again, I like to express all my gratitude for these two extraordinary people for helping me through the course of the Individual Inquiry.

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

Abstract
The Hazard EVent ANalysis package or HEVAN was created as an interactive Web based risk assessment tool to assist town planners and process engineers in design involving storing, handling and transportation of hazardous chemicals. The main feature of HEVAN is the set of detailed analysis models, which allow users to predict the physical effects of major hazards such as release of dangerous chemicals, fire radiation and explosion.

The objectives of the Individual Inquiry are to complete the set of detailed analysis models of the HEVAN package and to revise the structure of HEVAN to make it easier to use.

The Individual Inquiry required a lot of knowledge beyond the normal Chemical Engineering curriculum, particularly computer and Internet programming. A substantial amount of time was devoted to the study of these areas in order to implement new models successfully.

Five new models were successfully added to the current collection of detailed analysis models of the HEVAN package. The material property database had been upgraded to include up to 36 components. The general structure of HEVAN had also been revised.

Kien Tran

ii

Individual Inquiry Web-base Interactive Risk Assessment System

TABLE OF CONTENTS
ACKNOWLEDGEMENTS______________________________________________I ABSTRACT_________________________________________________________ II TABLE OF CONTENTS _____________________________________________ III LIST OF TABLES __________________________________________________ IV LIST OF FIGURES _________________________________________________ IV 1.0 INTRODUCTION________________________________________________ 1
1.1 The Hazardous EVent ANalysis (HEVAN) Package _______________________ 1 1.2 Thesis Objectives ____________________________________________________ 3

2.0 LITERATURE REVIEW __________________________________________ 4


2.1 Risk Management ___________________________________________________ 4
2.1.1 2.2.1 2.2.2 2.2.3 Consequence Analysis Models__________________________________________ 5 The World Wide Web (WWW) __________________________________________ 9 HyperText Markup Language (HTML) ____________________________________ 9 CGI Programming _____________________________________________________ 9

2.2 The Internet ________________________________________________________ 8

3.0 APPROACH ___________________________________________________ 10 4.0 THE DETAILED ANALYSIS MODELS ____________________________ 11


4.1 HEVAN Operating Structure _________________________________________ 11

Program __________________________________________________________ 11
4.2 How the Detailed Analysis Models are Set Up ___________________________ 12 4.3 How the Detailed Analysis Model Work ________________________________ 13 4.4 Implementation of Models ___________________________________________ 15 4.5 Debugging _________________________________________________________ 16

5.0 PROGRESS MADE TO HEVAN __________________________________ 17


5.1 Validating the Models _______________________________________________ 17
5.1.1 5.1.1 5.1.2 Thermal Radiation from a Rectangular Pool Fire__________________________ 18 Dispersion of Gas from a Continuous Area Source________________________ 19 Continuous Point Source Dispersion Contours ___________________________ 21

6.0 DISCUSSION __________________________________________________ 23 7.0 RECOMMENDATION FOR FURTHER WORKS ____________________ 24 8.0 CONCLUSION _________________________________________________ 25 9.0 REFERENCES_________________________________________________ 26 APPENDIX 1 ______________________________________________________ 27 APPENDIX 2 ______________________________________________________ 29 APPENDIX 3 ______________________________________________________ 32 APPENDIX 4 ______________________________________________________ 36 GLOSSARY________________________________________________________ 50

Kien Tran

iii

Individual Inquiry Web-base Interactive Risk Assessment System

List of Tables
Table 4-1 Summary of Program Functions .............................................................11 Table 4-2 Content of HEVAN Sub-directories........................................................12 Table 4-3 Common Errors and their Causes............................................................16 Table 5-1 Inputs for Thermal Radiation from a Pool Fire model .............................19 Table 5-2 Inputs for Dispersion of Gas from a continuous area source model .........20 Table 5-3 Inputs for Continuous point source dispersion contours model................22

List of Figures
Figure 1-1 Screenshot of HEVAN starting page .......................................................2 Figure 2-1 Effect and Vulnerability Models..............................................................5 Figure 4-1 Diagram of How the detailed analysis model work................................13 Figure 5-1 Plot of Thermal Radiation from a Pool Fire ...........................................18 Figure 5-2 Plot of Dispersion of Gas from a continuous area source .......................20 Figure 5-3 Plot of Continuous point source dispersion contours..............................21

Kien Tran

iv

Individual Inquiry Web-base Interactive Risk Assessment System

1.0 INTRODUCTION
Every operational activity associated with chemicals always carries an elemental of risk of hazards occurring. The effects of such chemical hazards can be devastating: facilities can be destroyed, the environment can be harmed and lives can be lost. That is why it is essential to have models available for assessing the physical effects of accidental releases of hazardous chemicals.

The Internet has come a long way since its beginning in the 1960s. The Internet has emerged as a powerful medium for communication and transfer of information. It is continually growing and is expected to accelerate at greater speed year by year in the future. The Internet therefore offers a great potential for important applications such as risk assessment tools for chemical hazards. Hence the Hazardous EVent ANalysis package or HEVAN was created to take advantage of the Internet promising capabilities.

The main benefit arising from the use of the Internet is the speed and ease of upgrading. For all existing risk management software on the market, a new upgrade package has to be produced and distributed to the customers whenever a new upgrade is made. This process can be very tedious and time consuming. However if the risk management package is Internet based, only the online package has to be upgraded for every customer to have access to the new features. The new package can be access any time given the customer has access to the Internet. 1.1 The Hazardous EVent ANalysis (HEVAN) Package

The Hazardous EVent ANalysis package or HEVAN is a Web-based interactive risk assessment system, which provides supports for decision making into landuse planning issues relating to operations involving dangerous substances. This project is a joint effort between the Brisbane City Council, Logan City Council, Caltex and the University of Queensland Chemical Engineering Department. The project has been developed for several years and ongoing refinement and upgrade are continually made to improve the package.

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

The complete HEVAN Web site will contain: Information and resources for the identification, analysis and management of risks concerned with hazardous substances. Detailed analysis models to predict the impact of a range of different hazard events and incidents. Decision support for the design and operation of facilities handling hazardous substances and the transportation of such substances. References to International and Australian regulations and standards related to hazardous substances. Strategic links to other related Web sites on the Internet.

A screenshot of the front page of the HEVAN Web site is shown in Figure 1-1.

Figure 1-1 Screenshot of HEVAN starting page

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

Some other important potentials of HEVAN apart from assisting town planners and engineers in process safety design are: 1.2 In emergency response situation where the emergency team must determined the danger zone around the hazard site Use as an educational tool for risk management Commercial prospects where a password entry system is applied Thesis Objectives

The objectives of this Individual Inquiry are: To complete the collection of detailed analysis models of the HEVAN package To revise the structure of HEVAN Web site to make it user-friendly

The goal for the completion of this Individual Inquiry was to have HEVAN developed to a stage where it could be used for the purpose it designed for.

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

2.0 LITERATURE REVIEW


This section looks at information relating to this Individual Inquiry. This Individual Inquiry required a reasonable amount of proficiency in each of the following area: Modelling Internet HTML C programming UNIX operating system

The last three parts of the above are not part of the normal Chemical Engineering curriculum, hence a substantial amount of time of the Individual Inquiry were devoted in researching and learning these areas. 2.1 Risk Management

Risk management is an important field of the process industry aimed at reducing the risk of hazards occurring. To understand risk management one must know the definitions of risk management, hazard and risk.

RISK MANAGEMENT is the systematic application of policies, practices, and resources to the assessment and control of risk affecting human health and safety and the environment. Hazard, risk, and cost/benefit analysis are used to support development of risk reduction options, program objectives, and prioritization of issues and resources. A critical role of the safety regulator is to identify activities involving significant risk and to establish an acceptable level of risk. Near zero risk can be very costly and in most cases is not achievable [1].

HAZARD is the inherent characteristic of a material, condition, or activity that has the potential to cause harm to people, property, or the environment [1].

RISK is the combination of the likelihood and the consequence of a specified hazard being realized. It is a measure of harm or loss associated with an activity [1].

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

2.1.1 Consequence Analysis Models There are two main types of consequence analysis models employed in risk management to determine the effects of hazards. These are effect and vulnerability models. The effect models used mathematical models to predict the effects of hazard events in term of measurable quantities, such as concentration of toxic gases, radiation levels from fires or pressures from explosions. The vulnerability models concentrated on the impact on resources, such as people, facilities and the environment. The relationship between these types of models and how they are applied are illustrated in Figure 2-1.

EFFECT AND VULNERABILITY MODELS

EFFECT MODELS

Physical Effects from Physical Phenomena

ENVIRONMENT

VULNERABILITY MODELS

Calculated Damage to Resource

Figure 2-1 Effect and Vulnerability Models (adapted from [2]) The set of detailed analysis models of the HEVAN package is effect models. They are used to predict the effects of four major classes of hazard events:

Releases Fire radiation Dispersion Explosion

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

2.1.1.1 Releases The release models are used to estimate the outflow of liquids and gases escaping from ruptured vessel or pipe. There are seven models listed under this section in the HEVAN Web site:

1. Gas Outflow from Vessel 2. Gas Outflow from a Pipe 3. Liquid Outflow from Vessel 4. Liquid Outflow from a Pipe 5. Liquefied Gas Outflow from Vessel 6. Liquefied Gas Outflow from a Pipe 7. Initial Flash Fraction of Superheated Liquid

Of these seven models only five (1,2,3,5,7) were implemented at the start of this Individual Inquiry. 2.1.1.2 Fire Radiation The fire radiation models are used to estimate the heat load radiated from a fire event at an object. There are three models listed under this category in HEVAN:

1. Thermal Radiation from a BLEVE 2. Thermal Radiation from a Flare 3. Thermal Radiation from a Pool Fire

Of these three models only the first two were implemented at the start of this Individual Inquiry. 2.1.1.3 Dispersion The dispersion models are used to estimate the spread of gases and vapours to the environment due to turbulent airflow. The dispersion models employed by HEVAN are based on the Gaussian plume models, which are derived from the Gaussian distribution. There are four models listed under this category in HEVAN:

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

1. Dispersion of Gas from a Continuous Point Source 2. Dispersion of Gas from a Continuous Area Source 3. Continuous Point Source Dispersion Contours 4. Dispersion from an Instantaneous Source (Puff)

Of these four models only two (1,4) were implemented at the beginning of this Individual Inquiry. 2.1.1.4 Explosion The explosion models are used to estimate the impact of vapour cloud explosion where a cloud of explosive vapour or gas is ignited causing a shock wave. There are three models listed in this category of HEVAN:

1. Vapour Cloud Explosion (TNO Shock Wave) 2. Vapour Cloud Explosion (TNO Correlation) 3. Vapour Cloud Explosion (TNT Equivalence)

All three models had been implemented at the start of this Individual Inquiry. 2.1.1.5 Incidents Incidents are chains of events occurring in consecutive order. For example, gas released from a ruptured pipe can lead to a dispersion event, upon on ignition can lead to a flash fire or vapour cloud explosion. There are three models listed under this category in HEVAN:

1. BLEVE Scenario (Fireball + First Degree Burns) 2. BLEVE Scenario (Fireball + Second Degree Burns) 3. BLEVE Scenario (Fireball + Fatal Burns)

Only the first of these three models was implemented at the start of this Individual Inquiry.

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

2.2

The Internet

In the late 1960s, the ARPA, a division of the US Department of Defense began developing a network called the ARPANET. This network was aimed to allow the US authorities to communicate and maintain control of their missiles even after a nuclear strike. Over the years, the ARPANET has evolved into the Internet of today through cooperative research amongst the academic communities. The biggest potential of the Internet was the unlimited power to communicate and exchange information from anywhere in the world, given one has access to the Internet via either a phone line or a local network.

The Internet is global computer network interconnecting numerous computer networks [4]. A set of common protocols called Transmission Control Protocol/ Internet Protocol (TCP/IP) is used to connect the networks together on the Internet. These protocols determine how computers communicate with each other. Some important functions developed for today Internet were:

Sending and receiving electronic mail (e-mail) Transferring files between computers (FTP) Reading and posting messages on electronic message boards Internet chatting and live video conferencing

The Internet has experiencing a phenomenon growth rate over the years and will continue to grow at breakneck speed in the future as more access and awareness reach the general population. Almost all organisations in the world today have regconised the great commercial potential of the Internet and has already began exploiting this potential. This was clearly demonstrated by the increasing number of commercial Web sites on the Internet, especially Internet shopping sites. Hence, the implementation of important technologies such as simulation engines or risk management software online would be a logical step for many organisations to take advantage of the growing exposure of the Internet to the general public markets. However, there are very few Web sites found on the Internet that contains similar features as HEVAN.

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

2.2.1 The World Wide Web (WWW) The core of the Internet is the World Wide Web, which is an information system interconnected together by hypertext links of Web pages. Web pages are documents that can contain text, images, audio and video. Each Web page can have several hypertexts linking it to other pages thus forming a Web of information. The Web can be surf through any type of Internet browsers with the most common ones used are Netscape Navigator and Microsoft Internet Explorer.

As HEVAN is a Web-based package it can be accessed via the World Wide Web.

2.2.2 HyperText Markup Language (HTML) Hypertext Markup Language or HTML is a simple programming language derived from SGML (Standard Generalised Markup Language), which is used to create Web pages. HTML uses a set of tags, similar to the way Microsoft Word uses Styles to describe the elements inside a Web page such as headings, paragraphs and lists. Due to its simplicity, HTML can be written using any simple text-editing program such as Notepad or more advanced HTML editor such as Microsoft Frontpage. A sample HTML page of the HEVAN package is included in the Appendix for illustration purposes.

2.2.3 CGI Programming Common Gateway Interface or CGI is a method of allowing programs on a Web server to be run by using data sent from a browser [3]. CGI is used to run the detailed analysis models of HEVAN via the data sent from the HTML input pages. It is then use to generate an output Web page of the result dynamically and send it back to the user on the Net. The CGI scripts can be written in any computer programming language, such as Perl, C or Java as long as the server supports it. The CGI script of HEVAN was written in C language.

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

3.0 APPROACH
The general approach used to carry out this Individual Inquiry is:

1. Research acquired knowledge to carry out the Individual Inquiry Acquired proficiency in C and HTML programming Familiarisation with the UNIX operating system 2. Understand understand how the model in HEVAN works Analysing the source code for all the files to work out how each file work and how they are related with each other 3. Prepare prepare the models for implementation Research through various modeling books to develop the best models Develop a general calculation algorithm for each of the models to be implemented 4. Implement implement models to the collection Create the new models using C/C++ language and add them to the main calculation program 5. Verify check to see if the models operated correctly The majority of time spent on this Individual Inquiry was devoted to the first two steps since C and HTML programming is a relative new area to me. I have never programmed in either C or HTML language before except Matlab. Hence a good portion of the project was used in researching and learning these new areas. The programming aspects were achieved through reading and applying many exercises and tutorials from several basic C and HTML introduction books. Frequent meetings with my predecessor on this project, Mr. Ben Wong and my supervisor, Assoc. Prof. Ian Cameron also sped up my learning curve in C and HTML programming.

The remaining three steps were achieved with a much better progress as I am already familiar with the area of modeling through the various modeling subjects undertaken in my undergraduate curriculum. The knowledge gained from the first two steps also accelerated the implementation and verification process. Common troubles arises from this process were resolved from regular consultations with Mr. Wong and Dr. Cameron. 10

Kien Tran

Individual Inquiry Web-based Interactive Risk Assessment System

4.0 THE DETAILED ANALYSIS MODELS


This section looks at the structure of the HEVAN package, how the detailed analysis models are set up and how they work. The detailed analysis models are the most important part of the HEVAN package. These models are taken from the book, Methods for the Calculations of Physical Effects, published by TNO (The Netherlands Organisation of Applied Scientific Research) [7] [8]. 4.1 HEVAN Operating Structure

As discussed earlier, the HEVAN Web site uses a CGI script to power the detailed analysis models in its interactive library of models. The CGI script use three programs to do this:

1. Hevancal the main and most important program of HEVAN This program determines the type of model to be performed, run the calculation and generate the output data before sending it to the plotting program. 2. GNUPlot the plotting program employed hevancal This is a popular plotting program for the UNIX system, which is used by hevancal to plot the output data from the model calculation engine. 3. Ppmtogif a image converting program As the image generated by GNUPlot is in portable bitmap (PBM) format it cannot be shown on the Web, hence ppmtogif is used to convert this image to the more standard format, GIF.

The functions of each program are summarised in Table 4-1.

Table 4-1 Summary of Program Functions (adapted from [3]) Program Description Functions test.cgi The CGI script which allow users run hevancal by entering the data via a Web browser Processing data send from the Internet Creating input file for hevancal

Kien Tran

11

Individual Inquiry Web-based Interactive Risk Assessment System

The main program behind the detailed analysis models

Running server based programs: hevancal, gnuplot and ppmtogif Making and returning the Web page containing the results

Hevancal

Determine

the

type

of

data

receive in the input page Determine which type of

calculation to perform Carry out the calculations Create data file and command files for gnuplot Create Web page of message given Ppmtogif An image conversion program by hevancal during

execution Gnuplot A UNIX plotting program Plot the data receive for hevancal Create a PBM image file of plot Convert the PBM image file to a more standard file format, GIF

4.2

How the Detailed Analysis Models are Set Up

The HEVAN package resides inside the Computer Aided Process Engineering (CAPE) Web server, Daisy, which run UNIX as its operating system. Each of the detailed analysis models comprised of three files: an HTML template, an input template and a source file for calculations. All of these files and other main programs are stored inside the directory /www/www/hevan in Daisy. The details of this folder are summarised in Table 4-2. Table 4-2 Contents of HEVAN directories Directory Contents Bin Calc Hevancal program test.cgi CGI scripts Source files for hevancal

Kien Tran

12

Individual Inquiry Web-based Interactive Risk Assessment System

Effects

Model HTML forms Model input template Plot data files Plot command files Plots produced Hevancal message HTML pages

Tmp

4.3

How the Detailed Analysis Model Work

The process in which HEVAN operate the detailed analysis models on the Web is quite complex. This section gives a brief description of how HEVAN carry out the operation of running a model using inputs received from the user on the Web. The overall sequence of events is summarised in Figure 4-1.

Kien Tran

13

Individual Inquiry Web-based Interactive Risk Assessment System

Server - Daisy template file (2) Client - User's Computer data inputs (1) User's Web Browser code for plot Web page (6) test.cgi CGI script

(2) hevancal.inp (input file) data transfer over Internet data transfer within computer links message (HTML file) hevancal (3)

(3) program plot image (GIF) gnuplot.dat (data file (4) file

(3)

gnuplot.gnu (command file) (4)

(5)

gnu plot

(4)

ppmtogif

(5)

plot image (PBM)

Figure 4-1 Diagram of How the Detailed Analysis Models Work (adapted from [3]) From Figure 4-1, the operation sequence of HEVAN is described as follow:

1. The user selected a model from the collection and enters the appropriate required input. The most important inputs are the X value, which defined the range of the X axis to be plot and the P value/s, which defined the parameter of interest to be held constant. 2. The CGI script take the inputs from the selected model HTML page specified by the user and put into an input file called hevancal.inp, which then pass to the main calculation program, hevancal.

Kien Tran

14

Individual Inquiry Web-based Interactive Risk Assessment System

3. Hevancal then process the inputs from hevancal.inp to determine which model calculation module to be used and run the calculations. It then generates the output files for plotting, gnuplot.dat and gnuplot.gnu and an HTML file for the plot image 4. The program gnuplot is then called to plot the data and create the bitmap plot image 5. The PBM image is then convert to a GIF image using ppmtogif. 6. Concurrently the CGI script takes the HTML messages and the GIF plot image and transform into a Web page and send it back to the user. 4.4 Implementation of Models

The procedure of implementing new models to the existing collection is very simple. The process is described as follow:

1. Create a calculation module and appropriate template files (HTML and inp) for the new model. Some additional calculation modules may require to be added to other main program for special calculations. For example, new view factor function has to be added to the existing collection of view factor calculation modules before it can used by any model. 2. Place the new files to the appropriate directory in HEVAN i.e. the source code to the calc directory and the template files to the effects directory. 3. Edit the main calculation files, hevancal.h and calcs.cpp to regconised the new model. 4. Edit the file Makefile to enable the new model (*.cpp) file to make into an object file (*.o). 5. Make the new hevancal program. 6. Copy the new hevancal program to the bin directory.

Kien Tran

15

Individual Inquiry Web-based Interactive Risk Assessment System

4.5

Debugging

Errors are often occurred when a new model implemented to the HEVAN package. These errors ranging from minor typing errors to the extent where some or most part of the calculation module to be rewritten. The process of resolving these errors is called debugging. There are many bugs encountered throughout the progress of this Individual Inquiry and some common errors are summarised in Table 4-3 below. Table 4-3 Common Errors and their Causes Bugs Possible Causes Hevancal output return the message unknown event in hevancal output Event name specified in template file doesnt correspond with any event name in hevancal The calculation module has not been compile into hevancal yet Plot from model does not appear Plot from other model appear Invalid input data Hevancal fail to complete the

calculations calculation module failure Event name specified does not

corresponded with any event name in hevancal Web browser returns message unable to find ?.inp Template file is missing or incorrectly name

The above errors are the most common ones encountered during the course of the Individual Inquiry. The error associated with no output plot is the most difficult one to debug since a complete review the calculation module is required in order to fix the error. A large portion of the Individual Inquiry was devoted to debugging.

Kien Tran

16

Individual Inquiry Web-based Interactive Risk Assessment System

5.0 PROGRESS MADE TO HEVAN


There were a lot of progresses made at the completion of the Individual Inquiry to improve the HEVAN package. The improvements are summarised as follow. Successful implementation of the following models:

Thermal radiation from a rectangular/circular pool fire Dispersion from a continuous area source Continuous point source dispersion contours Dispersion from an instantaneous source (puff) Vapour cloud explosion (TNT Equivalent)

Note: most of the above model calculation modules had been pre-written but has yet to be implement or need refinement.

The material property database was upgraded from five components to 36 components.

The material selection list for each model was revised to include only substances of relevant interest.

Some Web pages were fixed up for spelling mistakes and/or to include extra parameters required by the models.

However, there is still a lot of work to be done to improve the HEVAN package but this requires time.

5.1

Validating the Models

The most important part of modeling was validation. This process is used to check how well the models describe the phenomenon it was developed for. There is no correct model to any phenomenon, just the best one. Three methods were employed in validating the new models implemented to the HEVAN Web sites:

Kien Tran

17

Individual Inquiry Web-based Interactive Risk Assessment System

1. Check to see whether the displayed results showed the expected relationship between the plotting variables. 2. Perform sensitivity analysis test to determine the range of the models 3. Compare the values calculated by the models with literature values. The following summarised the results for each model implemented. 5.1.1 Thermal Radiation from a Rectangular Pool Fire In this model, the pool fire is considered as a radiator with a finite surface (the visible part of the flame) and an average radiation emittance (E) which is determined by the flame temperature, which depends on the burning material [7]. The heat radiation load is proportional to E and depends on the dimension of the radiator and on the distance to this radiator; these geometric parameters are jointly expressed in the form of so-called view factor (F). Figure 5-1 shows a plotted generated by the inputs in Table 6-1. The shape of the curves is correct as the heat load decreases with increasing distance from the fire source. The heat load values changes accordingly to any input changes. Some values calculated by this model seems to correlate well with literature values. There are still some refinements to be made to improve this model.

Figure 5-1 Plot of Thermal Radiation from a Rectangular Pool Fire

Kien Tran

18

Individual Inquiry Web-based Interactive Risk Assessment System

Table 5-1 Inputs for the Thermal Radiation from a Rectangular Pool Fire Plot Input Name Input Value Material Carbon to Hydrogen ratio of Fuel Mass Burning Rate (kg/m2.s) Length of Pool (m) Width of Pool (m) Benzene 1.0 P 0.05 0.10 0.15 10 10

Distance between Object and Edge of X 20 to 100 Pool (m) Height to Tank Top (m) Relative Humidity (%) Ambient Temperature (deg C) Wind Speed (m/s) Emittance of Clear Flame (kW/m2) Emittance of Smokey Flame (kW/m2) 0 70 25 5 120 40

5.1.1 Dispersion of Gas from a Continuous Area Source

The dispersion model is based on the Gaussian plume model, which is derived from the Gaussian distribution. Figure 5-2 shows a plot generated from the inputs given in Table 5-2. The dispersion concentration decreased accordingly of the dispersion distance as expected. The model responded well to changes in inputs. The values calculated by the model seem to be of correct magnitude.

Kien Tran

19

Individual Inquiry Web-based Interactive Risk Assessment System

Figure 5-2 Plot of Dispersion of Gas from a Continuous Area Source Table 5-2 Inputs for the Dispersion of Gas from a Continuous Area Source Plot Input Name Input Value Outflow Rate (kg/s) Roughness Factor Pasquill Stability Class Wind velocity at 10m height (m/s) Concentration Averaging Time (min) Release Height of Gas (m) Height of Plume (m) Width of Plume (m) Length of Plume (m) Downwind distance (X coordinate) Downwind distance (Y coordinate) Downwind distance (Z coordinate) Number of Summation P 10 Flat Land D Neutral 5 10 10 0 0 0 X 100 to 1000 0 0 3

Kien Tran

20

Individual Inquiry Web-based Interactive Risk Assessment System

5.1.2 Continuous Point Source Dispersion Contours In order to obtain an idea of the surface area in which the concentration is higher than a prescribed value, a concentration contour can be calculated. This model calculated the dispersion contours of a continuous point source. Figure 53 shows a plot generated from the inputs given in Table 5-3. As shown, the plot only gives half of the contour since the contour is symmetrical in shape. There is a minor error with the plot since it kept on plotting after the lateral distance reaches zero. The main hevancal program needs to be modified to fix this minor problem.

Figure 5-3 Plot of Continuous Point Source Dispersion Contours

Kien Tran

21

Individual Inquiry Web-based Interactive Risk Assessment System

Table 5-3 Inputs for the Continuous Point Source Dispersion Contours Plot Input Name Input Value Downwind distance (X coordinate) Concentration of interest (mg/m3) Outflow rate (kg/s) Roughness factor Pasquill Stability Class Wind velocity at 10m height (m/s) Concentration Averaging Time (min) Release height of gas (m) Height of Plume (m) Width of Plume (m) X 50 to 1000 P 100 200 500 3 Residential Land D Neutral 5 10 5 0 0

Kien Tran

22

Individual Inquiry Web-based Interactive Risk Assessment System

6.0 DISCUSSION
The goal for the completion of the Individual Inquiry was to develop HEVAN up to stage where it can be used for the purpose it designs for. There was a great amount of work set for the Individual Inquiry in order to achieve this goal. The majority of works were to complete the set of detailed analysis models and to restructure the Web site to make it user-friendly.

The set of detailed analysis models were nearly complete except for two outflow models, Liquid Outflow from a Pipe and Liquefied Gas Outflow from a Pipe, which will required substantial amount of work to complete. The reason for the incompletion of the set of detailed analysis models was a lot of knowledge required was outside the normal Chemical Engineering curriculum. Hence a substantial amount of time was devoted in gaining proficiency in these fields. And the original documentation, especially the source codes for calculation modules were not detailed enough.

The restructuring of the HEVAN Web site was done using the expertise of my predecessor, Mr. Ben Wong. The Web site was restructured in such a way to achieve a consistency in page format and layout. It is a lot more comprehensive and user-friendly.

Kien Tran

23

Individual Inquiry Web-based Interactive Risk Assessment System

7.0 RECOMMENDATIONS
There were a good amount of efforts made during the completion of the Individual Inquiry to continue the development of the HEVAN package. There is still a lot of work to be done to complete the set of detailed analysis models, however. There are incomplete models to implement and refinement work needs to be done to improve existing operable models. Some of these refinement works are discussed in the following.

The first and foremost task is to complete the set of detailed analysis models. The models need to be implemented are: Liquid Outflow from Pipe, Liquefied Outflow from Pipe, BLEVE Scenario (Fireball + Second Degree Burns) and BLEVE Scenario (Fireball + Fatal Burns).

The second most important task is to implement an input validation system. This system helps to prevent the user from entering invalid inputs for calculations. The system work by returning a message window detailing which input/s is invalids. Online help documents for each of the detailed analysis models is an essential addition to the current HEVAN package. So far only two models from the current library has this feature. The documentation should contain details regarding the general usage of the models and detailed explanation of how the models work.

Another great improvement is to allow the users to export the output data from hevancal to a spreadsheet program such Microsoft Excel. In this way, the users will be able to interpolate the data with more precise methods and also able to generate custom plots for presentation.

Other useful features such as the ability to customise the plots online can be a good addition to the HEVAN package. The users may be able to set the scales of the axes, show a grid, edit the title and axes, and select the colours used for the plot.

Kien Tran

24

Individual Inquiry Web-based Interactive Risk Assessment System

8.0 CONCLUSION
There has been positive efforts made toward the completion of the Individual Inquiry objectives, however, there are still a lot of work to be done to continue the development of the HEVAN package. Five new models had been added to the current collection of detailed analysis models. The material property database had been upgraded to handle up to 36 components. The overall structure of the Web site had been revised and restructures to make it more userfriendly. There are still a lot of work to be completed to develop HEVAN to a stage where it could be used for the purpose it designed for.

Kien Tran

25

Individual Inquiry Web-based Interactive Risk Assessment System

9.0 REFERENCES
[1] HAZMAT http://hazmat.dot.gov/risk-def.htm

[2]

Cameron, I. (1996) Safety Engineering: Planning for Safe Design, Control and Operation of Process Systems, Department of Chemical Engineering, UQ, Brisbane.

[3]

Wong,

B.

(1999)

Interactive

Risk

Management

Web

Tool,

Undergraduate Thesis, UQ, Brisbane.

[4]

He, J. (1998) Internet Resources for Engineers, Reed International, Port Melbourne.

[5]

Castro, E. (1996) HTML for the World Wide Web, Peachpit Press, Berkeley.

[6]

Zhang, T. (1997) Teach Yourself C in 24 hours, Sam Publishing, Indianapolis. TNO (1992) Methods for the Calculation of Physical Effect, 2nd edition, TNO, Voorburg. TNO (1997) Methods for the Calculation of Physical Effect, 3rd edition, TNO, Voorburg.

[7]

[8]

Kien Tran

26

Individual Inquiry Web-based Interactive Risk Assessment System

APPENDIX 1
MODELS TO BE IMPLEMENTED

Kien Tran

27

Individual Inquiry Web-based Interactive Risk Assessment System

The models to be added to the current collection are: Liquid Outflow from a Pipe Liquefied Outflow from a Pipe BLEVE Scenario (Fireball + Second Degree Burns) BLEVE Scenario (Fireball + Fatal Burns)

The source code (CPP) files for the two outflow models have been pre-written. The models only need to be revised/debugged before it can be implemented.

Kien Tran

28

Individual Inquiry Web-based Interactive Risk Assessment System

APPENDIX 2
LISTS OF FILES IN HEVAN SUB-DIRECTORIES

Kien Tran

29

Individual Inquiry Web-based Interactive Risk Assessment System

Table A2-1 docs directory listing


File Name Adgcode.htm Bleve.htm Contdisp.htm Detaildb.htm Dgclassif.html Effectmain.html Effects.htm Gaspipe.html Gasvessel.html Liqvessel.html Olddocs.htm Risk.phrases.htm Safetyphrases.htm Segregate.html Substances.htm Description Australian dangerous goods classification BLEVE Continuous pt dispersion Current substance DB Dangerous goods classification Main page Effects advice Gas release from a pipe No permission No permission Hevan online doc Risk phrases Safety phrases Substance incompatibility Substance advice

Table A2-2 indexes directory listing


File Name Detailed Dispers Explosion Fire Overview Release Shortcut Description DAM menu Dispersion models Explosion models Fire models Old menu (?) Release models Shortcut menu

Table A2-3 shortcuts directory listing


File Name Bleve_impact Enclosuretable Explosion_impact Fireflash Firepoolsp33 Firepooltno Liqflamgascont Liqflamgasinst Liqrelease Pressgas Pressgasjet Pressgassp33 Shortcut Tablet234 Toxcompliqgasfat Toxcompliqgasinj Toxcoolgasfat Toxcoolgasinj Toxevapliqfat Toxevapliqinj Toxpowf Toxpoxi Description Liquefied flammable gas BLEVE Substance scenario table Explosion impacts (TNT equivalent model) Flammable liquid flash fire Pool fire impacts based on total quantity (sepp33) Pool fire impacts based on pool area Liquefied flammable gas continuous release and flash fire Liquefied flammable gas instant release and flash fire liquid release rates for pressurised gas Pressurised flammable gas flash fire fatality impact Pressurised flammable gas jet fire fatality impact Pressurised flammable gas flash fire (sepp33) No permission Toxic substances (class 6) impact ratings Toxic cloud compressed liquefied gas fatal impacts Toxic cloud compressed liquefied gas injury impacts Toxic cloud - cooled liquefied gas fatal impacts Toxic cloud cooled liquefied gas injury impacts Evaporating toxic liquid fatal impacts Evaporating toxic liquid injury impacts Toxic cloud powders fatal impacts Toxic cloud powders injury impacts

Kien Tran

30

Individual Inquiry Web-based Interactive Risk Assessment System Toxpressgasfat Toxpressgasinj Vaprelease Toxic cloud pressurised gas fatal impacts Toxic cloud pressurised gas injury impacts Vapour release rates for pressurised gas

Kien Tran

31

Individual Inquiry Web-based Interactive Risk Assessment System

APPENDIX 3
SAMPLE TEMPLATE FILES OF HEVAN MODEL

Kien Tran

32

Individual Inquiry Web-based Interactive Risk Assessment System

Sample HTML template page <HTML> <BODY BGCOLOR=#FFFFFF> <H1>Thermal Radiation from a Pool Fire</H1> <P>This calculation estimates the heat flux from a rectangular pool fire at an object.</P> <FORM ACTION="/hevan/bin/test.cgi"> <INPUT NAME="template" TYPE="HIDDEN" VALUE="/www/www/hevan/effects/c6s3223.inp"> <TABLE BORDER=0 <TR><TH COLSPAN=2 ALIGN=LEFT><FONT color=blue>MATERIAL DETAILS:</FONT> <TR><TD>Material<TD> <SELECT NAME="material"> <OPTION VALUE=32>benzene <OPTION VLAUE=2>gasoline <OPTION VALUE=3>LNG <OPTION VALUE=4>kerosene <OPTION VALUE=1>methanol </SELECT> <TR><TD>Carbon to Hydrogen ratio of Fuel <TD><INPUT NAME="ratio" TYPE=RANGE MIN="0" MAX="10" VALUE="1.0"> <TR><TD>Mass Burning Rate (kg/m2.s) <TD><INPUT NAME="rate" TYPE=RANGE MIN="0" MAX="1" VALUE="P 0.1 0.5 1.0"> <TR><TH COLSPAN=2 ALIGN=LEFT><FONT color=blue>OBJECT DETAILS:</FONT> <TR><TD>Length of Pool (m) <TD><INPUT NAME="length" TYPE=RANGE MIN="0" MAX="1000" VALUE="10"> <TR><TD>Width of Pool (m) <TD><INPUT NAME="width" TYPE=RANGE MIN="0" MAX="1000" VALUE="10"> <TR><TD>Distance between Object and <BR> Edge of Pool (m) <TD><INPUT NAME="distance" TYPE=RANGE MIN="1.0" MAX="1000" VALUE="X 20 to 100"> <TR><TD>Height to Tank Top (m) <TD><INPUT NAME="distance" TYPE=RANGE MIN="1.0" MAX="100" VALUE="0">

Kien Tran

33

Individual Inquiry Web-based Interactive Risk Assessment System

<TR><TH COLSPAN=2 ALIGN=LEFT><FONT color=blue>ENVIRONMENTAL DETAILS:</FONT> <TR><TD>Relative Humidity (%) <TD><INPUT NAME="humidity" TYPE=RANGE MIN="0" MAX="100" VALUE="70"> <TR><TD>Ambient Temperature (deg C) <TD><INPUT NAME="temperature" TYPE=RANGE MIN="0" MAX="100" VALUE="25"> <TR><TD>Wind Speed (m/s) <TD><INPUT NAME="wind" TYPE=RANGE MIN="0" MAX="1000" VALUE="0"> <TR><TD>Emittance of Clear Flame (kW/m2) <TD><INPUT NAME="clear" TYPE=RANGE MIN="0.0" MAX="1000" VALUE="120"> <TR><TD>Emittance of Smokey Flame (kW/m2) <TD><INPUT NAME="smokey" TYPE=RANGE MIN="0.0" MAX="1000" VALUE="40"> </TABLE> <P><INPUT TYPE=SUBMIT VALUE=Calculate> <INPUT TYPE=RESET VALUE=Reset to Defaults></P> </FORM> <BR> <H4>(code = c6s3223)</H4> </BODY> </HTML>

Sample input (inp) template page [Calculation] Event = Radiation Title = Thermal Radiation from a Pool Fire Y-Label = Heat Flux (kW/m2) X-Label = Distance between Object and Edge of Pool (m) Output = GNUPLOT [Event] ID = Radiation TYPE = PoolFireRadiation ; Length of Pool (m) Parameter 1 = {length}
Kien Tran

34

Individual Inquiry Web-based Interactive Risk Assessment System

; Width of Pool (m) Parameter 2 = {width} ; Mass Burning Rate (kg/m2.s) Parameter 3 = {rate} ; Carbon to Hydrogen ratio of Fuel Parameter 4 = {ratio} ; Distance between Object and Edge of Pool (m) Parameter 5 = {distance} ; Wind Speed (m/s) Parameter 6 = {wind} ; Relative Humidity (%) Parameter 7 = {humidity} ; Ambient Temperature (deg C) Parameter 8 = {temperature} ; Emittance of Clear Flame (kW/m2) Parameter 9 = {clear} ; Emittance of Smokey Flame (kW/m2) Parameter 10 = {smokey} ; Height to Tank Top (m) Parameter 11 = {height} ; Material Code Parameter 12 = {material}

Kien Tran

35

Individual Inquiry Web-based Interactive Risk Assessment System

APPENDIX 4
SOURCE CODES OF THE MODELS IMPLEMENTED

Kien Tran

36

Individual Inquiry Web-based Interactive Risk Assessment System

The following are the source codes of the models implemented at the completion of this Individual Inquiry. The source codes for the main calculation programs in HEVAN directories can be access from [3]. Thermal Radiation from a pool fire (c6s3223.cpp)
/* ** ** ** Calculation of Radiation from a Rectangular Pool Fire using a View Factor (Surface Source) method.

**
** ** ** **

Chapter 6, section 3.2.2.3


TNO Report CPR 14E, Methods for the calculation of physical effects, 2nd Edition, Voorburg, 1992.

**
** **

and
Pritchard, M.J. and T.M. Binding, FIRE2: A New Approach

for Predicting ** Thermal Radiation Levels from Hydrocarbon Pool Fires,

IChemE Sym Ser ** ** ** ** ** ** Craig Newell, December 1992 Ian Cameron, November 1993 (revision 1). 130, 491-505, 1992

Alfred Aukes, December 1993 (revision 2) Flame Tilt Ian Cameron, November 1994 (revision 3) change input units

to degrees C

** Ian Cameron, October 2000 (revision 4) Tilted cylinder view factor added
*/

#include hevancal.h double heat_rad_rect_pool_fire_vf ( double *incid_par)


{

double l, w, h_f, d_p, d_eq, Ft, Fc, Fs, u, Lf, Lcf, Ecf, Esf, Ecomp, x, mdotdot, rho_a, Tau_a, percent_RH, C_H_ratio, m_star, U9_star, Uc, E, mat_code, load, load_cf, load_sf, T_a, mdotdot2, Fr, Re, theta_old ,K , a, b, c, fa, fb, fc, load_t, u_star, theta, rho_v, t_bp, mol_wt, ttop, thetarads, L1, L2, Ft1, Ft2, x1, load_comp, load_comp_ttop, Fall1, Fall2, Fw;
int max_it, m_code;

Kien Tran

37

Individual Inquiry Web-based Interactive Risk Assessment System


l = incid_par[0] ; always the w = incid_par[1] ; mdotdot = incid_par[2] ; (kg/m2.s) */ C_H_ratio = incid_par[3] ; of fuel */ x = incid_par[4] ; and flame (m) */ u = incid_par[5] ; percent_RH = incid_par[6] ; (%) */ T_a Ecf (kW/m2) */ Esf = incid_par[9] ; (kW/m2) */ ttop = incid_par[10] ; m_code=incid_par[11]; /* height to tank top (m) */ /* material code */ /* emittance of smokey flame = incid_par[7] ; = incid_par[8] ; /* atmospheric temperature */ /* emittance of clear flame /* windspeed (m/s) */ /* percent relative humidity /* distance between object /* carbon to hydrogen ratio /* length of pool (m) -

longest side */ /* width of pool (m) */ /* mass burning rate

/* Convert to true SI units */ T_a = T_a + 273.15 ; if ( ( l / w ) == 1 ) { d_p = ( l + w ) / 2 ; } else if ( ( l / w ) < 2 ) { d_eq = ( 4 * l * w ) / ( 2 * ( l + w ) ) ; /* equation 19 */ d_p = d_eq ; } else if ( (l / w ) > 2 ) { d_eq = ( 4 * ( 1.5 * w ) * w ) / ( 2 * ( ( 1.5 * w ) + w ) ) ; /* equation 19 modified as in text just below */ d_p = d_eq ;
}

printf(\n\n\n Equivalent Diameter of fire = %g (m), d_p ) ; printf(\n Area of fire = %g (m2), l*w ) ; rho_a = 1.2 ; /* density of air (kg/m3) */ /* Calculate the mass burning rate (kg/m2.s) Zabetakis & Burgess (1961) */ mdotdot2 = 0.141 * (1 - exp(-0.136 * d_p)) ; printf(\n Calculated mass burning rate (SHELL) = %g (kg/m2.s), mdotdot2) ; /* Calculate the flame height (m) using the Thomas formula */ h_f = d_p * 42 * pow( ( mdotdot / ( rho_a * sqrt ( GRAVITY * d_p ) ) ),

Kien Tran

38

Individual Inquiry Web-based Interactive Risk Assessment System

0.61 ) ; printf(\n Flame height at specified burn rate (Thomas method) = %g (m), h_f) ; /* equation 4 */ /* Calculate the flame height (m) using British Gas method (1992) */ m_star = mdotdot / (rho_a * sqrt( GRAVITY * d_p)) ; Uc = pow ( (GRAVITY * mdotdot * d_p / rho_a), 0.333 ) ; U9_star = u / Uc ;
if ( U9_star < 1 ) { U9_star = 1 ; }

Lf = 10.615 * pow( m_star, 0.305 ) * pow( U9_star, -0.03) * d_p ; printf(\n\n British Gas approach gives:) ; printf(\n Total flame height = %g (m), Lf ); Lcf = 11.404 * pow( m_star, 1.13 ) * pow( U9_star, 0.179 ) * pow( C_H_ratio, -2.49 ) * d_p ; printf(\n Clear flame length = %g (m), Lcf ) ; /* Calculate the flame tilt due to wind effects using British Gas data */ if ( u > 0 ) { Re = d_p * u / 1.5e-5 ; Fr = u * u / GRAVITY / d_p ; /* Iterate for solution of tilt equation */ K = pow(Fr,0.333)*pow(Re,0.117)*2./3.; theta_old = 0.9 ; max_it = 1 ; a = 0.1 ; b = PI / 2 ; while (fabs(tan(theta_old) cos(theta_old)*pow(Fr,0.333)*pow(Re,0.117)*2./3.) > 1e-3 ) { max_it = max_it +1; fa = tan(a)/cos(a)-K ; fb = tan(b)/cos(b)-K ; c = (a + b) / 2 ; fc = tan/cos-K ; if (fa * fc < 0) b = c; else if (fb * fc < 0) a = c; theta_old = c; if (max_it >= 50) break;} theta_old = theta_old * 180 / PI;
}

else
{

theta_old = 0.0 ;
}

printf(\n Windspeed is %g m/s , u) ; printf(\n The flame tilt is %g degrees for British Gas.,(theta_old)); /* Calculate flame tilt using Thomas/AGA method */
Kien Tran

39

Individual Inquiry Web-based Interactive Risk Assessment System

if (u <= 1.0) { theta = 0 ;


}

else
{

t_bp = 140 + 273 ; mol_wt = 105 ; rho_v = 1. /(8.314*t_bp/101.3/mol_wt) ; u_star = u / pow(mdotdot*GRAVITY*d_p/(rho_v), 0.333) ; printf(\n U-star is %g , u_star) ; if (u_star <= 1) { theta = 0 ;
}

else
{

theta = acos(1/sqrt(u_star))*180/PI ;
} }

printf(\n The flame tilt is %g degrees for Thomas.,theta); /* Now calculate the view factor given the flame shape and dimensions */ /* See if this is a fire on top of a tank */ if ( ttop > 0 ) { thetarads = theta / 57.29577951 ; /* convert to radians */ L1 = ttop / cos(thetarads) ; L2 = L1 + Lf ; /* full length calculation */ x1 = x + ttop*tan(thetarads) ; printf(\n Tank top is %g metres elevation , ttop) ; Ft2 = view_factor_tiltcylindrical( x1+d_p/2, L2, d_p/2, theta ) ; Ft1 = view_factor_tiltcylindrical( x1+d_p/2, L1, d_p/2, theta ) ; printf(\n Long flame view factor is %g , Ft2); printf(\n Short flame view factor is %g , Ft1); Ft = Ft2 - Ft1 ; Ecomp = 0.8*Esf + 0.2*Ecf ; printf(\n Composite flame emissivity is %g kW/m2 , Ecomp); printf(\n Total view factor from tank top is %g , Ft) ;
}

if ( ( l / w ) < 2 ) {
/*

Ft = view_factor_cylindrical( x+d_p/2, Lf, d_p/2 ) ; Fc = view_factor_cylindrical( x+d_p/2, Lcf, d_p/2 ) ; Fs = view_factor_cylindrical( x+d_p/2,(Lf - Lcf), d_p/2 ) ;
*/

/* Use the tilted cylindrical view factor accounting for wind tilt */ Ft = view_factor_tiltcylindrical( x+d_p/2, Lf, d_p/2, theta ) ;

Kien Tran

40

Individual Inquiry Web-based Interactive Risk Assessment System

Fc = view_factor_tiltcylindrical( x+d_p/2, Lcf, d_p/2, theta ) ; Fs = view_factor_tiltcylindrical( x+d_p/2,(Lf - Lcf), d_p/2, theta ) ;
}

else
{

Ft = view_factor_flat( x, Lf, l ) ; Fc = view_factor_flat( x, Lcf, l ) ; Fs = view_factor_flat( x, (Lf - Lcf), l ) ;


}

printf(\n\n View Factors:) ;


printf(\n printf(\n printf(\n clear flame = %g, Fc) ; smokey flame = %g, Fs) ; total flame = %g, Ft) ;

Tau_a = find_Tau_a( x, percent_RH, T_a ) ; printf( \n Transmissivity = %g, Tau_a ) ; /* E = find_E( mat_code, T_a, eta, (l + w) / 4 ) ; */ printf( \n\n Emittance of clear flame = %g (kW/m2), Ecf ) ; printf( \n Emittance of smokey flame = %g (kW/m2), Esf ) ; printf( \n Emittance of composite flame = %g (kW/m2), 0.8*Esf+0.2*Ecf) ; load_cf = Ecf * Fc * Tau_a ; load_sf = Esf * Fs * Tau_a ; load = load_cf + load_sf ; load_t = Ecf * Ft * Tau_a ; load_comp = (Ecf*0.2 + Esf*0.8)*Ft*Tau_a ; if( ttop > 0 ) { load_comp_ttop = Ecomp * Ft * Tau_a ; printf(\n Load from tank top flame (at composite emittance) = %g (kW/m2), load_comp) ;
}

printf(\n\n Load from clear flame = %g (kW/m2), load_cf) ; printf(\n Load from smokey flame = %g (kW/m2), load_sf) ; printf(\n Load from combined flame = %g (kW/m2), load) ; printf(\n Load from total flame (at clear flame emittance) = %g (kW/m2), load_t) ; printf(\n Load from total flame (at composite emittance) = %g (kW/m2), load_comp) ; /* equation 7 */ return( load_comp ) ;
}

Kien Tran

41

Individual Inquiry Web-based Interactive Risk Assessment System

Dispersion of Gas from a continuous area source (c7s382.cpp)


/* ** ** ** ** ** ** ** ** */ Craig Newell January, 1993. Concentration due to a continuous area of point sources Chapter 7. Section 3.8.

Ian Cameron March 1993 (revision 1) Kien Tran October 2000

#include hevancal.h double dispersion_cont_area(double *incid_par)


{ double x_dash, L_x, L_y, L_z , x, y, z; int z_o stability, N, i ; = incid_par[0] ; /* roughness factor (m) */ /* number 1 to 6 (A-F) */ z_o, h, u_w, C, m_dot, t_dash, delta_x,

stability = incid_par[1] ; u_w = incid_par[2] ;

/* wind at 10m (m/s) */ /* averaging time (min) */

t_dash

= incid_par[3] ;

m_dot = incid_par[4] ; h L_z L_x L_y x y z N = incid_par[5] ;

/* outflow rate (kg/s) */ /* height of source (m) */ /* height of plume (m) */ /* width of plume (m) */

= incid_par[6] ; = incid_par[7] ; = incid_par[8] ; = incid_par[9] ; = incid_par[10]; = incid_par[11]; = incid_par[12];

/* length of plume (m) */ /* x coordinate */ /* y coordinate */ /* z coordinate */ /* no. of summations */

C=0;

Kien Tran

42

Individual Inquiry Web-based Interactive Risk Assessment System

if ( L_x == 0 ) { C = ( m_dot / u_w ) * F_y( x, y, L_y , t_dash, stability, h ) * F_z( x, z, L_z , h, z_o, stability ) * 1e6 ; } else if ( L_x > 0 ) { if ( L_x >= fabs(x) && fabs(y) <= L_y && fabs( z - h ) <= L_z ) { delta_x = L_x / N ; i=0; x_dash = x ; while (x_dash != x + L_x ) { x_dash = x + i * delta_x ; C += F_y( x_dash, y, L_y, t_dash, stability ,h ) * F_z( x_dash, z, L_z, h, z_o, stability ) ; /* equation 11b */ i++ ;
}

C *= ( m_dot / ( 2 * L_x * u_w ) ) * delta_x ; C *= C*1e6; } else { delta_x = 2 * L_x / N ; i=0; x_dash = x ; while ( x_dash != x + L_x ) { x_dash = x - L_x + i * delta_x ; C += F_y( x_dash, y, L_y, t_dash, stability, h ) * F_z( x_dash, z, L_z, h, z_o, stability ) ; i++ ;
}

C *= ( m_dot / ( 2 * L_x * u_w ) ) * delta_x ; C *= C*1e6;


}

return ;

Kien Tran

43

Individual Inquiry Web-based Interactive Risk Assessment System

double F_y( double x, double y, double L_y, double t_dash, double stability, double h )
{

double

sigma_y, F ;

sigma_y = set_sigma_y( x, t_dash, stability, h ) ;


/*

printf(\n sigma_y = %f , sigma_y ) ;


*/

F=0; if ( L_y == 0 ) { F = ( 1 / ( 2.506628275 * sigma_y ) ) * exp( -1 * ( y * y ) / ( 2 * ( sigma_y * sigma_y ) ) ) ; /* equation 11c */ } else if ( L_y > 0 ) { F = ( 0.25 / L_y ) * ( erf( ( L_y - y ) / ( sigma_y * 1.414213562 ) ) + erf( ( L_y + y ) / ( sigma_y * 1.414213562 ) ) ) ; /* equation 11d */
}

return (F) ;
}

double F_z( double x, double z, double L_z, double h, double z_o, double stability )
{

double F, sigma_z ; sigma_z = set_sigma_z( x, z_o, stability, h ) ;


/*

Kien Tran

44

Individual Inquiry Web-based Interactive Risk Assessment System

printf(\n sigma_z = %f , sigma_z ) ;


*/

F=0; if ( L_z == 0 ) { F = ( 1 / ( 2.506628275 * sigma_z ) ) * ( exp( -1 * ( z - h ) * ( z - h ) / ( 2 * ( sigma_z * sigma_z ) ) ) + exp( -1 * ( z + h ) * ( z + h ) / ( 2 * ( sigma_z * sigma_z ) ) ) ) ; /* equation 11e */ } else if ( L_z > 0 ) { F = ( 0.25 / L_z ) * ( erf( ( L_z - z + h ) / ( sigma_z * 1.414213562 ) ) + erf( ( L_z + z - h ) / ( sigma_z * 1.414213562 ) ) + erf( ( L_z - z - h ) / ( sigma_z * 1.414213562 ) ) + erf( ( L_z + z + h ) / ( sigma_z * 1.414213562 ) )
) ;

return (F) ;
}

Continuous point source dispersion contours (c7s39.cpp)


/* ** ** ** ** ** ** ** ** ** ** ** */ Alfred Aukes Kien Tran December 1993 TNO Methods for the Calculation of Physical Effects, CPR14E, Voorburg, 1992 (2nd Edn). Concentration contour due to a continous point source Chapter 7. Section 3.9.

October 2000

Kien Tran

45

Individual Inquiry Web-based Interactive Risk Assessment System

#include hevancal.h double plume_contour ( double *incid_par)


{ double ,sigma_y ,sigma_z, z_o, stability, u_w, t_dash, m_dot, h, L_z, x_vz, yt, Ccont, x, y, z; C, x_vy ,L_y ,a ,b ,c ,d ,C_t ,x_hat

z_o

= incid_par[0] ;

/* roughness factor (m) */ /* number 1 to 6 */

stability = incid_par[1] ; u_w = incid_par[2] ;

/* wind at 10m (m/s) */ /* conc. averaging

t_dash time (min) */

= incid_par[3] ;

m_dot = incid_par[4] ; h L_z L_y x y z = incid_par[5] ; = incid_par[6] ; = incid_par[7] ; = incid_par[8] ; = incid_par[9] ;

/* outflow rate (kg/s) */ /* height of source (m) */ /* height of source */ /* width of source */ /* x coordinate */ /* y coordinate */

= incid_par[10] ; /* z coordinate */ concentration of interest

Ccont = incid_par[11] ; /* (mg/m3) */

C_t = pow((t_dash/10),0.2) ; C = set_stability(stability,h,&a,&b,&c,&d) ; if (z_o!=0.1) { c = c * 1.98 * log(10 * z_o); d = d - 0.059 * log(10 * z_o);} x_vy = pow((L_y / (2.15 * a * C_t)),(1/b)); x_vz = pow((L_z / (2.15 * c)),(1/d)); // x_hat = pow((m_dot / (PI * u_w * a * C_t * c * Ccont)),(1/(b+d))) x_vy ; //printf(y = %5.5f\n,x_hat); /* Equation 14a */

Kien Tran

46

Individual Inquiry Web-based Interactive Risk Assessment System

sigma_z = set_sigma_z( x + x_vz , z_o , stability,h) ; sigma_y = set_sigma_y( x + x_vy ,t_dash,stability,h) ; printf( Vertical coeff = %g (m), Horiz coeff = %g (m)\n,sigma_z,sigma_y); C = ( m_dot / ( 2 * PI * u_w * sigma_y * sigma_z ) ) * exp( -1 * ( y * y ) / ( 2 * sigma_y * sigma_y ) ) * ( exp( -1 * ( z - h ) * ( z - h ) / (2 * sigma_z * sigma_z )) + exp( -1 * ( z + h ) * ( z + h ) / (2 * sigma_z * sigma_z )) ) ; /* equation 11 */ C = C * 1e6; if (C <= Ccont) C = Ccont; yt = sigma_y * sqrt((2 * log(C / Ccont))) ; printf(Lateral Distance is %f\n, yt); /* Equation 14b */ return (yt);
}

Dispersion of Gas from an instantaneous source (puff.cpp)


/* ** ** ** ** */ Puff Dispersion Model Benjamin Wong January, 2000

#include hevancal.h
double puffdispersion (double *incid_par) { double t, C, stability; Q = incid_par[0]; /* mass of puff (kg) */ x = incid_par[1]; /* downwind distance (m) */ y = incid_par[2]; /* crosswind distance (m) */ z = incid_par[3]; /* vertical distance (m) */ H = incid_par[4]; /* height (m) */ u = incid_par[5]; /* windspeed (m/s) */ t = incid_par[6]; /* time (s) */ Q, x, y, z, H, u, sigma_x, sigma_y, sigma_z,

Kien Tran

47

Individual Inquiry Web-based Interactive Risk Assessment System


stability = incid_par[7]; */ /* Pasquill Stability Factor

/* dispersion coefficients */
if (stability == 1) { sigma_x = 0.18*pow(x,0.92); sigma_z = 0.60*pow(x,0.75); } if (stability == 2) {

sigma_x = 0.14*pow(x,0.92); sigma_z = 0.53*pow(x,0.73); } if (stability == 3) {

sigma_x = 0.10*pow(x,0.92); sigma_z = 0.34*pow(x,0.71); } if (stability == 4) {

sigma_x = 0.06*pow(x,0.92); sigma_z = 0.15*pow(x,0.70); } if (stability == 5) {

sigma_x = 0.04*pow(x,0.92); sigma_z = 0.10*pow(x,0.65); } if (stability == 6) {

sigma_x = 0.02*pow(x,0.92); sigma_z = 0.05*pow(x,0.61); }

sigma_y = sigma_x; printf(\nsigma x = %g, sigma_x); printf(\nsigma y = %g, sigma_y); printf(\nsigma z = %g, sigma_z); /* main equation - concentration */ C = Q/(pow(6.283185307, 1.5)*sigma_x*sigma_y*sigma_z)* exp(-0.5*pow((y/sigma_y),2))*exp(-0.5*pow((x-u*t)/sigma_x,2))* (exp(-0.5*pow((z-H)/sigma_z,2))+exp(-0.5*pow((z+H)/sigma_z,2)));
Kien Tran

48

Individual Inquiry Web-based Interactive Risk Assessment System

C = C*1000000; /* convert to mg/m^3 */ printf(\nThe time is %g., t); printf(\nThe concentration is %g mg/m^3., C); return( C );
}

Vapour Cloud Explosion (TNT Equivalent) (tntequiv.cpp)


/* ** ** ** ** */ VCE Model (TNT Equivalence) Benajmin Wong (2000)

#include hevancal.h
double tntequiv (double *incid_par) { double Q_tnt, r2, P, Q_f, alpha, E_mf, E_mTNT, r;

Q_f = incid_par[0]; E_mf = incid_par[1]; alpha = incid_par[2]; r = incid_par[3]; E_mTNT = 5420; Q_tnt = alpha*(Q_f*E_mf)/E_mTNT; r2 = r/pow(Q_tnt,0.333); P = 694.46*pow(r2,-1.5542); return(P);
}

Kien Tran

49

Individual Inquiry Web-based Interactive Risk Assessment System

GLOSSARY
This is a glossary of the terms used in this report that may be unfamiliar to the readers.

CGI Common Gateway Interface, a method of allowing programs on a Web server to be run using data sent from a Web browser.

HTML Hypertext Markup Language, the code used to create Web pages.

make Method of compiling a large program made up of many files or folders.

makefile A file which determine how to make a program.

UNIX Type of operating system. Common operating system used for Web server.

Kien Tran

50

You might also like