Você está na página 1de 89

APPLICATION OF NEWTONS LAW OF COOLING

CASE STUDY: ESTIMATION OF TIME OF DEATH


IN MURDER

BY
SAMUEL ASANTE (BSC. COMPUTER SCIENCE)
PG 6317711

A Thesis Submitted to the Department of Mathematics, Kwame Nkrumah University of


Science and Technology, in partial fulfillment of the requirement for the degree of

MASTER OF SCIENCE: Industrial Mathematics


College of Science/ Institute of Distance Learning.

APRIL, 2013

DECLARATION
I hereby declare that this submission is my own work towards the MSc. and that, to the
best of my knowledge; it contains neither material previously published by another
person nor material, which has been accepted for the award of any other degree of the
University, except where the acknowledgement has been made in the text.

SAMUEL ASANTE (20249016)

Student Name & ID No.

Signature

Date

Certified by:
Dr. E. OSEI-FRIMPONG

Supervisor Name

Signature

Date

Certified by:
PROF. S.K. AMPONSAH

Signature

Date

Head of Dept. Name

Certified by:
PROF. I.K. DONTWI

Dean-IDL

Signature

ii

Date

DEDICATION
To my lovely wife, Cordelia and children
David, Eugenia and Desmond

iii

ACKNOWLEDGEMENT
First and foremost, I heartily express my sincerest gratitude to the Almighty God for
seeing me through this thesis successfully.
Next, I wish to express my profound gratitude to my honorable supervisor Dr. E. OseiFrimpong for suggesting the thesis topic and also for his guidance, encouragement and
contributions throughout this study. I am very much thankful for all his support and
patience throughout the program.
I would also like to thank all the lecturers of the courses I offered during the MSc
Industrial Mathematics program.
My special word of thanks goes to my wife, Cordelia, and children David, Eugenia and
Desmond for their understanding, love and support throughout my study.
Finally, my special gratitude goes to my mother, Ernestina Ansaah, and my dearest
brother,
Wilberforce Barfour Ansah (Okapi) .Their support, love, encouragement and care have
always been of great help.

iv

ABSTRACT
Determining the time of death of a person is a major responsibility of forensic
investigation. This study presents a mathematical model based on Newtons law of
cooling to determine the time of death of a person. Emphasis is put on the development
of the method and computer software taking advantage of the decrease in body
temperature. The model is based on four parameters: temperature of the body at time t,
temperature of the surrounding area at time t, the weight of the body and the condition of
the body. Computer software using Microsoft visual C sharp that allows first calculation
of the time of death and graphical representation of the cooling of dead bodies is
presented. The algorithms are based on a first-order linear differential equation
formulated by Newton and modified with a two-exponential-model by Marshall and
Hoare (1962). Several calculations are run by the program and the results are presented to
allow comparism so that different parameters may be assumed and their effect on the
length of the cooling period be assessed. Data from the following sources: Handbuch
Gerichtliche Medizin, Volume 1 by Bernd Brinkmann and Burkhand Madea and
ACTAMORPHOLOGIC, 2006; vol 3(2):51-54 Medical journal of Macedonian
Association of Anatomists and Morphologists (MAAM) are used to test the computer
solution. We conclude that the cooling model which includes the post mortem plateau
gave good results and therefore the model can be applied to all cases.

CONTENTS
DECLARATION.ii
DEDICATIONiii
ACKNOWLEDGEMENT..iv
ABSTRACT.v
CHAPTER 11
INTRODUCTION...1
1.1

Brief Introduction of Chapter 1...1

1.2

Background of the Study...2

1.2.1

History of Newtons Law of Cooling2

1.2.2

Newtons Law of Cooling..3

1.2.3

Introduction to the Principle of Heat Transfer...3

1.2.4

Profile of Study Area.7

1.2.5

Some Basic Definitions..9

1.3

Problem Statement..17

1.4

Main Objective17

1.4.1

Specific Objectives..17

1.5

Justification.17

1.6

Methodology...18

1.7

Organization of the Study...18

vi

CHAPTER 2.20
REVIEW OF RELATED STUDIES.20
2.1

Review of Previous Studies.20

CHAPTER 3..31
METHODOLOGY31
3.1

Model Assumptions31

3.2

Newtons Model..32

3.2.1

Solution of Newtons Equation (Model)..32

3.3

Rate of Post Mortem Cooling..34

3.4

The following Assumptions are also made.35

3.5

Software Development38

3.5.1

C Sharp (#) Programming Language..40

3.5.2

Object-Oriented Programming.41

3.5.3

Object-Oriented Design...42

3.5.4

Object-Oriented Analysis.42

3.5.5

Object...43

3.5.6

Class.43

3.6

Programming Tools.44

3.6.1

Algorithm.44

3.6.2

Pseudocode..45

vii

3.6.3

Flowcharts47

CHAPTER 4.49
DATA ANALYSIS AND RESULTS49
4.1

Source of Data.49

4.2

Parameter Estimation..50

4.3

Analysis of Results..51

4.4

Further Discussion of Results.57

CHAPTER 5.60
CONCLUSION AND RECOMMENDATIONS..60
5.1

Conclusion...60

5.2

Recommendation.60

REFERENCES..61
APPENDIX A65
APPENDIX B71

viii

LIST OF FIGURES
Figure 1.1 Sigmoidal shape of cooling curve. Mathematical description with the two
exponential model by Marshall and Hoare ...13
Figure 2.1: Henssge Nomogram for environmental temperature
up to 230C(upper)..16
Figure 3.1: Flowchart of the Computer Program...48
Figure 4.1: A chart of estimated time and known time of death...57
Figure 5.1: A chart of estimated time and known time of death58

ix

LIST OF TABLES
Table 3.1 Definitions of Variables used in the Model..38
Table 4.1 Parameter estimates of Cooling Model..51
Table 4.2 Cases with known time of death (source: Handbuch Gerichtliche Medizin,
Vol.1).52
Table 4.3 Cases with known time of death ..................53
Table 4.4 Summary of Temperature difference, estimated time of death and known time
of death...59

CHAPTER 1
INTRODUCTION
1.1

Brief Introduction of Chapter 1

Establishing the time of death or the interval between the time of death and when the
body is found cannot be determined with certainty. Unless death is witnessed, the exact
time of death cannot be determined; however, sufficient information is often available to
allow estimation of a range of time encompassing the actual moment of death. In general
the short the postmortem interval, the narrower the estimated time ranges. Conversely, a
longer postmortem interval entails a broader range estimate and after a greater chance for
error. No single observation about a dead body is a reliable or accurate indicator of the
postmortem interval. The most reliable estimate are based upon a combination of
numerous observation made of the body and the scene of death. The combination of
scene and body examination will give the investigation the best chance of reliably
estimating when death occurred (Dix and Graham, 1999).
An accurate estimate of time since death is an important aspect of every death
investigation especially in suspicious death to link a suspect to the victim and establish
the credibility of statements made by the expert witnesses (Amendt et al., 2007).
Estimation of time since death is also one of the most important object of postmortem
examination. Time passed since death continues to be a major problem for the forensic
pathologist and its determination plays an important and vital issue in medico legal cases

because of the effect that forensic experts are often required to answer questions relating
to the death in the courts of law (Kushwaha et al., 2010).

1.2
1.2.1

Background of the Study


History of Newtons Law of Cooling

This law of cooling is named after English physicist Isaac Newton who, in the late 17th
century, conducted the first experiments on the nature of cooling. Specifically, noting that
when the difference in temperature between the two bodies is small, approximately less
than 10 C, that the rate of heat loss will be proportional to the temperature difference,
Newton applied this principle to estimate the temperature of a red-hot iron ball, by
observing the time which it took to cool from a red heat to a known temperature, and
comparing this with the time taken to cool through a known range at ordinary
temperatures (The Encyclopedia Britannica, 1910). According to this law, if the excess of
the temperature of the body above its surroundings is observed at equal intervals of time,
the observed values will form a geometrical progression with a common ratio. The
inaccuracy of Newtons law becomes considerable at high temperatures. The corrected
Newtons law was formulated in 1817 by French Physicial chemist Pierre Dulong and
physicist Alexis Petit who, experimenting through temperature ranges as high as 243 C,
found that the quickness of cooling for a constant excess of temperature, increases in
geometrical progression, when the temperature of the surrounding space increases in
arithmetical progression ( Whewell,1866).

1.2.2

Newtons Law of Cooling

The Newton's Law of Cooling model computes the temperature of an object of mass M as
it is heated by a flame and cooled by the surrounding medium. The model assumes that
the temperature T within the object is uniform. This lumped system approximation is
valid if the rate of thermal energy transfer within the object is faster than the rate of
thermal energy transfer at the surface. Newtons law of cooling states that the rate at
which a warm body cools is approximately proportional to the difference between the
temperature of the warm object and the temperature of its environment. Newtons law of
cooling is generally limited to simple cases where the mode of energy transfer is
convection, from

a solid surface to a surrounding fluid in motion, and where the

temperature difference is small, approximately less than 10 C (The Encyclopedia


Britannica, 1910).When the medium into which the hot body is placed varies beyond a
simple fluid, such as in the case of a gas, solid, or vacuum, etc., this becomes a residual
effect requiring further analysis
(Whewell , 1866).

1.2.3

Introduction to the Principle of Heat Transfer

Heat transfer is a science that studies the energy transfer between two bodies due to
temperature difference. In the simplest of terms, the discipline of heat transfer is
concerned with only two things: temperature, and the flow of heat. Temperature
represents the amount of thermal energy available, whereas heat flow represents the
movement of thermal energy from place to place. On a

microscopic scale, thermal energy is related to the kinetic energy of molecules. The
greater a materials temperature, the greater the thermal agitation of its constituent
molecules (manifested both in linear motion and vibrational modes). It is natural for
regions containing greater molecular kinetic energy to pass this energy to regions with
less kinetic energy. Several material properties serve to modulate the heat transferred
between two regions at differing temperatures. Examples include thermal conductivities,
specific heats, material densities, fluid velocities, fluid viscosities, surface emissivities,
and more. Taken together, these properties serve to make the solution of many heat
transfer problems an involved process. Heat transfer mechanisms can be grouped into
three

broad

categories:

Conduction,

Convection

and

Radiation

(http://www.efunda.com/formulae/heat_transfer/home/overview.cfm,Accessed:
14/11/2012).

1.2.3.1 Conduction
Conduction is the flow of heat through solids and liquids by vibration and collision of
molecules and free electrons. The molecules of a given point of a system which are at
higher temperature vibrate faster than the molecules of other points of the same system or
of other systems- which are at lower temperature. The molecules with a higher movement
collide with the less energized molecules and transfer part of their energy to the less
energized molecules of the colder regions of the structure. For example, the heat transfer
by conduction through the bodywork of a car. Metals are the best thermal conductors;
while non-metals are poor thermal conductors. For heat to conduct from one object to

another, they must be in contact: break the contact and conduction ends (Nasif, 2009).
Another example is, a spoon in a cup of hot soup becomes warmer because the heat from
the soup is conducted along the spoon. Conduction is most effective in solids-but it can
happen in fluids.

1.2.3.2 Convection
Convection is the flow of heat through currents within a fluid (liquid or gas). Convection
is the displacement of volumes of a substance in a liquid or gaseous phase. When a mass
of a fluid is heated up, for example when it is in contact with a warmer surface, its
molecules are carried away and scattered causing that the mass of that fluid becomes less
dense. For this reason, the warmed mass will be displaced vertically and/or horizontally,
while the colder and denser mass of fluid goes down (the low-kinetic-energy molecules
displace the molecules in high-kinetic-energy states). Through this process, the molecules
of the hot fluid transfer heat continuously toward the volumes of the colder fluid. For
example, when heating up water on a stove, the volume of water at the bottom of the pot
will be warmed up by conduction from the metallic bottom of the pot and its density
decreases. Given that it gets lesser dense, it shifts upwards up to the surface of the
volume of water and displaces the upper -colder and denser- mass of water downwards,
to the bottom of the pot. Natural convection occurs when the flow of a liquid or gas is
primarily due to density differences within the fluid due to heating or cooling of that fluid
(Nasif, 2009). Forced convection occurs when the flow of fluid (liquid or gas) is
primarily due to pressure differences.

1.2.3.3 Radiation
Radiation is the transfer of heat from one object to another by means of electro-magnetic
waves. Radiative heat transfer does not require that objects be in contact or that a fluid
flow between those objects. Radiative heat transfer occurs in the void of space (thats
how the sun warms us). People in a room at 72 oF air temperature may feel
uncomfortably cold if the walls and ceiling are at 50 oF. Conversely, they may feel
uncomfortably warm if the walls are 85 oF. Even though the air temperature is the same
in both cases, the radiative cooling or warming of their bodies relative to the walls and
ceiling will affect their comfort level (people sense heat loss or gain, not temperature).
Radiation heat transfer is concerned with the exchange of thermal radiation energy
between two or more bodies. Thermal radiation is defined as electromagnetic radiation in
the wavelength range of 0.1 to 100 microns (which encompasses the visible light regime),
and arises as a result of a temperature difference between 2 bodies. No medium need
exist between the two bodies for heat transfer to take place as is needed by conduction
and convection. Rather, the intermediaries are photons which travel at the speed of light.
The heat transferred into or out of an object by thermal radiation is a function of several
components. These include its surface reflectivity, emissivity, surface area, temperature,
and geometric orientation with respect to other thermally participating objects. In turn, an
object's surface reflectivity and emissivity is a function of its surface conditions
(roughness, finish, etc.) and composition.

1.2.4

Profile of Study Area.

The Gold Coast Police Force now called the Police Service was formed in 1894 but the
real police work started in the then Gold Coast, now the Republic of Ghana, in the year
1921. The Ghana Police Service is organized on National basis, with a unified command
under the Inspector-General of Police (IGP). The IGP, subject to the direction of the
Minister of Interior, is responsible for exercising general day-to-day supervision over the
operation and administration of the service.
The Ghana Police Service has, since its inception been in the frontline of the criminal
justice system of Ghana. It is clearly, the most visible arm of government as the symbol
of law and order, to the people. Ghana Police Service is mandated by Article 200 of the
1992 constitution of the Republic of Ghana, and the Police Service Act 1970 (ACT 350).
The constitution mandates the Service to operate on democratic policing principles. The
Police Service Act 1970, Act350 spells out the core functions of the service as follows:
To Protect life and Property,

To prevent and detect crime,

To apprehend and prosecute offenders,

To maintain public order, to ensure a peaceful and safe environment to facilitate


economic and social activities as a pre-requisite for making Ghana a Gateway to
West Africa.

As per the new motto of the service , TO PROTECT AND SERVE WITH HONOUR
the Ghana Police Service is committed to protect and serve all residents in their
communities, using democratic policing principles, and appropriate technology to protect
life and property, and personal dignity . The vision of the Ghana Police Service is to be a
World Class Police Service capable of delivering planned, democratic, protective, and
peaceful services up to standards of international best practice. The Ghana Police Service
is divided into twelve administrative regions, namely , Accra , Tema, Ashanti, Eastern ,
Brong Ahafo , Volta, Western , Central , Northern , Upper East, Upper West, and
Railways,

Ports

and

Harbour

Regions

(http://www.eservices.gov.gh

/GPS/SitePages/GPS-Home.aspx).
The Criminal Investigations Department (CID) is the criminal investigation arm of the
Ghana Police Service. The CID is mandated to ensure a proactive and professional
approach to the prevention and detection of crime, protection of life and property and the
apprehension and prosecution of offenders. The CID oversees criminal intelligence
gathering, training of CID detectives and criminal investigation assignments of the Ghana
Police Service. Personnel of the CID are employed as specialists in connection with
various aspects of crime detection and investigation (C.I.D., 2012).

1.2.5

Some Basic Definitions

1.2.5.1 Homicide
A homicide is a crime where a person kills someone. There are 3 different types of
homicide. There's justifiable where you're trying to protect someone and the person dies.
Excusable is when the person is killed by unlawful acts that you try to stop. Criminal
homicide is when one person kills another. Included among homicides are murder and
manslaughter, but not all homicides are a crime, particularly when there is a lack of
criminal intent. Non-criminal homicides include killing in self-defense, a misadventure
like a hunting accident or automobile wreck without a violation of law like reckless
driving, or legal (government) execution. Suicide is a homicide, but in most cases there is
no one to prosecute if the suicide is successful. Assisting or attempting suicide can be a
crime.

1.2.5.2 Post-Mortem Interval


The time elapsed from death until discovery and medical examination of the body. If the
time in question is not known, a number of medical or scientific techniques are used to
determine it. This also can refer to the stage of decomposition of the body.

1.2.5.3

Forensic Investigation

The word forensic simply means applying scientific applications or techniques to


investigate a crime. A forensic investigation is the practice of lawfully establishing
evidence and facts that are to be presented in a court of law. The term is used for nearly
all investigations, ranging from cases of financial fraud to murder. The Forensic
Investigation Unit provides expertise at crime scenes through the use of photography,
identification, evidence collection, processing, and preservation. Technicians also
perform latent fingerprint comparisons and provide expert court testimony. There are
actually a number of different techniques for forensic investigation. There are four types
of technicians in the unit: Crime Scene Technician, Latent Fingerprint Specialist, Photo
Lab Technician, and Office Support Specialist. In addition to skills required by their
specialization, each technician must have a exceptional understanding of law
enforcement techniques and needs to perform their assigned tasks in a way that assists
future courtroom proceedings.
(http://www.tampagov.net/dept_Police/about_us/Investigations_and_Support/Criminal_I
nvestigations/Forensic_Investigation/, Accessed:14/11/2012).

1.2.5.4 Crime Scene Investigation


A crime scene is any physical scene, anywhere, that may provide potential evidence to an
investigator. It may include a persons body, any type of building, vehicles, and places in
the open air or objects found at those locations. Crime scene examination therefore

10

refers to an examination where forensic or scientific techniques are used to preserve and
gather physical evidence of a crime. Crime Scene Investigation gather fingerprints, blood,
bodily fluids, and other evidence found at the crime scene in order to solve a crime or
even determine whether a crime has taken place. Investigating a crime scene can be a
very long, tedious process that should be completed by a trained professional with
excellent attention to detail. It not only encompasses collection of evidence, but also the
necessary

analysis

to

ensure

that

the

evidence

is

credible

and

relevant.(http://www.pinow.com/investigations/forensicinvestigations,Accessed:14/11/2012)
Investigating a crime scene is one of the most important parts of any criminal
investigation. If done right, it can actually be the key to solving a crime. Crime Scene
Investigators, or CSIs, use special methods and equipment for investigating a crime
scene. These methods include using certain type of equipment, special investigation
methods, and most importantly, preserving the integrity of a crime scene so that nothing
gets moved or disturbed. Investigating how a crime occurred can offer a lot of insight into
why the crime occurred at all. Since evidence gathered at a crime scene is what puts a
criminal in jail, crime scenes are very important. There are many steps that have to be
taken when conducting a criminal investigation and investigating a crime scene. Firstly,
detectives have to try and figure out why and how a crime was committed. They examine
a crime scene looking for information or clues such as fingerprints, weapons, and DNA.
They investigate the victims history to determine why someone would want to harm
them. After they have formed a hypothesis, they try to find proof that somebody
committed a crime so that they can arrest the suspects. They look at both the motive and

11

the actual evidence of the crime and try to see if their hypothesis makes sense. The
suspects then enter the criminal justice system where they are tried using the evidence
collected at the crime scene. Crime scene investigators have special equipment that they
use to investigate crime scenes. This equipment is packed into crime scene kits. They
include fingerprint powders designed to find fingerprint on surfaces, brushes, magnetic
power wands, and placards for marking important evidence, tape, scissors, tweezers, tape,
pencils, and pens. They also include chemicals for detecting bodily fluids like luminal
and black lights. Bodily fluids can be the most valuable piece of evidence because it can
yield DNA, the holy grail of proof (http://www.legalmetro.com/library/investigating-acrime-scene.html,Accessed:
14/11/2012).

1.2.5.5

Temperature Plateau

When temperature is plotted against time for the cooling of a human body, there is an
initial maintenance of body temperature which may last for some hours. That period is
what Harry Rainy in 1868 referred to as Plateau and this is shown in Figure 1.1. A
plateau is a period after death where the body does not cool at all and the body
temperature may even rise a bit (Rainy, 1968)

12

Temperature
(oC)

T0
Postmortal
temperature
Plateau

Newtons law of
cooling

T0 - Ta
Tr - Ta

Ta

Time (h)

Figure 1.1 Sigmoidal shape of cooling curve. Mathematical description with


the two exponential model by Marshall and Hoare (Source: Hengea and
Madea ,2004).

13

1.2.5.6 Henssge Nomogram Method


A nomogram also called a nomograph is a graphical calculating chart, a two-dimensional
diagram designed to allow the approximate graphical computation of a function.
(http://en.wikipedia.org/wiki/Nomogram, Accessed:14/11/2012). Henssge's nomogram is
based upon a formula which approximates the sigmoid shaped cooling curve. It requires
the measurement of deep rectal temperature and assumes a normal temperature at death
of 37.2oC.
This formula has two exponential terms within it. The first constant describes the post
mortem plateau and the second constant expresses the exponential drop of the
temperature after the plateau according to Newton's law of cooling. In an individual case,
the constant expressing the exponential drop of the temperature after the plateau is simply
calculated from the body weight. The first constant which describes the post mortem
temperature plateau was found to be significantly related to the second constant in that,
bodies with a low rate of cooling also had a longer plateau phase than bodies with a high
rate of cooling. Using previously published data which establishes that the relative length
of the post mortem temperature plateau depends upon the environmental temperature but
is nonlinear and pronounced in environmental temperatures above 23oC, Henssge
evolved two nomograms, the one for ambient temperatures above 23oC and the other for
ambient temperatures below 23oC. Figure 1.2 below shows an example of its use. Within
each of these two nomograms there is a differing allowance for the effect of
environmental temperature on the rate of cooling as well as an allowance for the effect of
body weight .In order to determine the possible time of death for each individual case, a
line is drawn that links the rectal and environment temperatures. Through the cross-point

14

obtained by the oblique line, a line is drawn and afterwards, taking into consideration the
body weight expressed in kg, the possible time of death expressed in hours is read on the
nomogram (Pounder, 1995).

15

Figure 2.1: Henssge Nomogram for environmental temperature up to 230C (upper)


(Source: Hengea and Madea, 2004)

16

1.3

Problem Statement

Determining the time of death is important in both criminal and civil cases. In criminal
cases, it can set the time of the murder, free a suspect or suggest a possible suspect. In
civil cases, the time of death might determine who inherits property or whether an
insurance policy was in force ( 2001 by CRC Press LLC). Unfortunately, there is no
system in Ghana where crime investigators rely on to estimate time of death when there
is murder. Investigators use manual and inaccurate methods to sometimes estimate the
time.

1.4

Main Objective

The main objective of the study is to determine the time of death in murder with a
modified Newtons law of cooling by Marshall and Hoare.

1.4.1 Specific Objectives

To use analytical approach to find the general solution of the model.

Develop computer software to estimate the time of death.

1.5

Justification

The number of murder cases in the country has risen by 35% between January and June
2012, according to the latest half year report on crime by the Ghana Police Service. The

17

Police have been unable to solve several of these murders. Determining time of death is
extremely important in a death investigation as it focuses the investigation into the
correct time frame. In Ghana, Investigators sometimes do not use scientific method in
solving most of these murders. Crime Investigators sometimes estimate it manually and it
takes longer time. It is against this backdrop that this research is being carried out to find
an appropriate system for estimating the time of death in murder. The study is very
important because it can help Police Investigators to determine the time of death and also
give an important piece of information in some coroner's cases, especially those that
involve criminal or insurance investigations.

1.6

Methodology

An Analytical approach to the solution of first-order linear differential equation


formulated by Newton and modified by Marshall and Hoare is first solved explicitly to
find the general solution. This task is achieved by assuming the existence of an
integrating factor. An algorithm which solves the equation is implemented. The algorithm
is further developed into computer codes by using Microsoft visual C sharp, a modern,
object-oriented, and type-safe programming language to estimate the time of death.

1.7

Organization of the Study

The thesis consists of five Chapters. In chapter 1, we considered the introduction,


background of the study, problem statement and objectives of the study. The

18

justifications, methodology of the study and thesis organization were also put forward.
Chapter 2 presents the relevant and adequate literature on the problem at hand. Chapter 3
is devoted for the research methodology of the study. In Chapter 4, we shall put forward
data collection and analysis. Also we will come up with software analysis and
development for the determination of time of death in a murder case. Chapter 5 which is
the final chapter of the study considers the conclusion and recommendation of the study.

19

CHAPTER 2
REVIEW OF RELATED STUDIES
Several researchers have carried out work on the estimation of time of death of humans.
In this Chapter, some of these related studies are discussed.

2.1

Review of Previous Studies

In Henssge et al. (1984) the authors subdivided into three groups twenty-nine corpses.
The bodies were suspended undressed in a tub holding 1,000l in nearly still water of
temperatures approximately 200, 100 and 00 C. The rectal temperature was measured,
normally until the 33rd hour postmortem. Time of death was calculated by means of the
mathematical analytical two-exponential formula suggested by Marshall and Hoare in
1962, in the version used by Brown and Marshall in 1974. The adapting parameters of the
formula were standardized according to the principle of Henssge in 1979 and in 1981 and
related to standardization by adjusting factors to body weight stated for standard values
of cooling. After termination of the postmortem temperature plateau, it was found that
undressed corpses suspended in water of temperatures of approximately 200 C and 100 C
cool as quickly as undressed corpses of half the body mass in calm air of the same
temperatures. As to the duration of the postmortem temperature plateau in water
suspension time from the time of death, it may only be indirectly concluded that it is
linked to the subsequent speed of cooling in the same way which is well known in the

20

case of air cooling. Statistical standard values were given concerning the differences
between the computed and the real times of death. Unexpectedly, the experiments in
water at approximately 00C yielded distinctly slighter temperature which were especially
marked at rectal temperatures up to approximately 110C in corpses of great body mass
and small body surface in proportion to and equally, without regard to body mass. As an
explanation of this, a decrease in the thermal conductivity of the subcutaneous adipose
tissue in connection with a decrease in tissue temperature was then discussed. Again in
2000, the authors used the temperature-based nomogram method for estimation of the
time period since death at the scene of death as the primary method within a compound
method in 72 consecutive cases The situation and cooling conditions inspected and
evaluated by the forensic pathologist at the scene were described as far as necessary to
enable handling of the method. A comparison of the estimated period since death with the
period determined by the police investigations demonstrated the reliability of the method.
There were no contradictions in any of the 60 cases between the period of death
estimated by this method and that determined by the police investigations. The criminal
investigations were effectively supported in the earliest stages in 11 cases despite the fact
that the period estimated was of considerable duration.
Also, Henssge (2006) presented that the main principle of the determination of the time
since death was the calculation of a measurable date along a time-dependent curve back
to the start point. Characteristics of the curve (e.g. the slope) and the start point were
influenced by internal and external, ante mortem and postmortem conditions. These
influencing factors were taken into consideration quantitatively in order to improve the
precision of death time estimation. It does not make any sense to study the postmortem

21

time course of any analyte without considering influencing factors and giving statistical
parameters of the variability. Comparison of different methods required an investigation
of the same postmortem interval. For practical purposes, the author concluded that the
amount of literature on estimating the time since death has a reverse correlation with its
importance in practice.
Lynnerup (1993) presented a simple BASIC computer program that enables solving of
Marshall and Hoare's equation for the postmortem cooling of bodies .In his presentation
the author stated that in the 1960s, Marshall and Hoare presented a "Standard Cooling
Curve" based on their mathematical analyses on the postmortem cooling of bodies.
Although fairly accurate under standard conditions, the "curve" or formula was based on
the assumption that the ambience temperature is constant and that the temperature at
death is known. Also, Marshall and Hoare's formula expressed the temperature as a
function of time, and not vice versa, the latter being the problem most often encountered
by forensic scientists. The author proposed that by having a computer program that solves
the equation, giving the length of the cooling period in response to a certain rectal
temperature, and which allows easy comparison of multiple solutions, the uncertainties
related to ambience temperature and temperature at death can be quantified,
substantiating estimations of time of death.
Althaus and Henssge (1999) performed cooling experiments on dummies known as
body-like cooling with sudden decrease and increase of ambient temperature in the order
of 15 0C. In the case of a sudden decrease of ambient temperature, a second temperature
plateau occurred which is shorter than the known plateau at the beginning of body
cooling. The cooling curves were described mathematically by a three-step procedure

22

based on the two-exponential term of the nomogram method. The second plateau at the
beginning of the second cooling phase in sudden decreased ambient temperature required
a lower value of the constant compared with the known value at the beginning of body
cooling. In the case of a sudden increase of ambient temperature in the order of 15 0 C,
the authors could not find a procedure to model the cooling curves mathematically.
In Guy (2000) the author used single external auditory canal (EAC) temperatures from
cases of suspicious deaths to verify the hypothesis that a single EAC temperature can be
used to estimate a time since death (TSD). Two different types of thermometers were
used (infrared and alcohol-in-glass) to record ambient and body temperatures, which
were in turn applied to previously published algorithms without the use of corrective
factors to estimate the TSD. In addition, 18 anatomical, environmental, and daily activity
factors were investigated as to whether they may influence the temperature within the
EAC and thus require the introduction of a corrective factor into an algorithm, other than
one used to take into account the difference between the rectal and EAC temperature
during life and after death. Of the ones examined, only head position, wind speed, daily
circadian rhythm, drinking of hot drinks, and possibly mental thought were shown to
influence temperature, but the difference was so small that the introduction of a
corrective factor into an algorithm was considered unnecessary.
Al-Lousi et al. (2001) described a simple, reliable, and relatively accurate method for
estimating the time since death. The method was based on the Triple-Exponential
Formulae (TEF), which the authors devised for the first time in their study. The
postmortem cooling rate of the brain, liver, and rectum in 117 forensic cases were
investigated. The method was used in the field as a computer program, reference graph,

23

or reference chart-ruler. There were six reference graphs representing the average brain,
liver, and rectal cooling curves for naked and covered body groups. The ruler was
designed for the rectal cooling curves for covered and naked bodies. This method
required one temperature measurement of the chosen body site and the environment. The
postmortem interval was estimated as a probable value.
Hartorg and Lotens (2004) analyzed two murder cases in which available methods did
not provide a sufficiently reliable estimate of the postmortem time. In both cases a study
was performed to verify the statements of suspects. The authors developed a finiteelement computer model that simulates a human torso and its clothing. With this model,
changes to the body and the environment were modeled; this was very relevant in one of
the cases, as the body had been in the presence of a small fire. In both cases it was
possible to falsify the statements of the suspects by improving the accuracy of the
postmortem time estimate. The estimated postmortem time in both cases was within the
range of Henssge's model. The standard deviation of the postmortem time estimate was
35 minutes in the first case and 45 minutes in the second case, compared to 168 minutes
in Henssge's model. In conclusion, the authors noted that the model as presented can have
additional value for improving the accuracy of the postmortem time estimate.
In Mall et al. (2005) the authors presented that the temperature-oriented death time
determination is based on mathematical model curves of postmortem rectal cooling. All
mathematical models require knowledge of the environmental conditions. In medicolegal practice homicide is sometimes not immediately suspected at the death scene but
afterwards during external examination of the body. The environmental temperature at
the death scene remains unknown or can only be roughly reconstructed. In such cases the

24

question arises whether it is possible to estimate the time since death from rectal
temperature data alone recorded over a longer time span. The authors theoretically
deduced formulae which were independent of the initial and environmental temperatures
and thus proved that the information needed for death time estimation was contained in
the rectal temperature data. Since the environmental temperature at the death scene may
differ from that during the temperature recording, an additional factor was used. This is
that the body core was thermally well isolated from the environment and that the rectal
temperature decreased after a sudden change of environmental temperature continued for
some time at a rate similar to that before the sudden change. The study further provided a
curve-fitting procedure for such scenarios. The procedure was tested in rectal cooling
data of from 35 corpses using the most commonly applied model of Henssge. In all cases
the time of death was exactly known. After admission to the medico-legal institute the
bodies were kept at a constant environmental temperature for 1236 h and the rectal
temperatures were recorded continuously. The curve-fitting procedure led to valid
estimates of the time since death in all experiments despite the unknown environmental
conditions before admission to the institute. The estimation bias was investigated
statistically. The 95% confidence intervals amounted to 4 h, which seems reasonable
compared to the 95% confidence intervals of the Henssge model with known
environmental temperature. They concluded that the presented method may be of use for
determining the time since death even in cases in which the environmental temperature
and rectal temperature at the death scene have unintentionally not been recorded.
Bisegna et al. (2007) presented a procedure for the postmortem interval estimation in the
presence of a rapid increase of ambient temperature occurred during the cooling phase.

25

The resulting disturbance produced on the cooling curve is proved to obey a twoexponential law and is removed from the theoretical or modified body temperature,
which enables the estimation of the time since death by means of the standard Nomogram
method.
Verica et al. (2007) studied estimation of time since death in the field of forensic
medicine and analyzed some of the existing methods, compared obtained results to
determine which method gives more precise results of the estimation of time since death.
The authors presented the analysis of 50 cases autopsied at the Institute of Forensic
Medicine and Criminology in Skopje, with known time of death. Rectal temperature was
taken with digital thermometer. Simultaneously, environment temperature was measured
as well as the body weight; it was recorded whether the body was covered or naked. In
order to estimate time since death, following methods were applied: Method I, Method II,
Al-Alousi and Anderson and Henssge- nomogram. Comparison of the known time of
death with the time obtained by the applied methods showed a discrepancy of few hours.
Comparison of results obtained by application of the above stated methods showed that
the Henssge-nomogram gives less discrepancy from the true time of death.
In Kalizan and Hauser (2007) a systematic two-stage study was conducted in pigs to
verify the models of postmortem body temperature decrease currently employed in
forensic medicine. During their investigations, temperature recordings were performed in
four body sites (eyeballs, orbit soft tissues, muscles and rectums). The results of their
study supported the possible use of the eyeball and also the orbit soft tissues as
temperature measuring sites at the early phase after death; they have narrowed the
significance of rectum temperature measurements to the late stage of postmortem body

26

temperature decrease, shown insignificant correlations between the body weight and the
temperature decrease rate constant and illustrated the functional increase of the time of
death estimation error as the body cools, expressed in the distinct tendency to
overestimate the calculated time of death as compared to the actual one. In the second
stage of their experiment, a lack of a plateau phase was demonstrated, at least from 30
min post mortem. It was also found that in the very early post mortem period, the kinetics
of cooling of all the body sites studied was better described by the two-exponential model
than the single exponential one. Their study also showed that the weak airflow present in
the experimental conditions did not practically affect the course of cooling of the
investigated body sites. Eyeball temperature measurements with an infra-red laser
thermometer performed during the experiment proved to be of no use for determination
of the time of death. The experiments allowed for defining the so far unreported value of
physiological temperature of pig eyeball as 38 degrees C.
In Karhunen et al. (2008) the authors presented a paper on time of death of victims found
in cold water environment. Here they presented their experience on two cases with
known post-mortem times. A 14-year-old girl (rectal temperature 15.5 C) was found
assaulted and drowned after a rainy cold night (+5 C) in wet clothing (four layers) at the
bottom of a shallow ditch, lying in non-flowing water. The post-mortem time turned out
to be 1516 h. Four days later, at the same time in the morning, after a cold (0 C) night,
a young man (rectal temperature 10.8 C) was found drowned in a shallow cold drain (+4
C) wearing similar clothing (four layers) and being exposed to almost similar
environmental and weather conditions, except of flow (7.7 l/s or 0.3 m/s) in the drain.
The post-mortem time was deduced to be 1012 hours. They tested the applicability of

27

five practical methods to estimate time of death and found Henssges temperaturetime
of death nomogram method with correction factors as the most versatile and gave also
most accurate results, although there was limited data on choosing of correction factors.
In the first case, the right correction factor was close to 1.0 (recommended 1.11.2),
suggesting that wet clothing acted like dry clothing in slowing down body cooling. In the
second case, the right correction factor was between 0.3 and 0.5, similar to the
recommended 0.35 for naked bodies in flowing water.
In Hubig et al. (2011) the authors investigated the influence of variations in the
environmental temperature, initial body core temperature, core temperature and time on
the standard deviation of the most established model commonly used in forensic practice
which was developed by Henssge to estimate the time since death. Two different
approaches were used for calculating the standard deviation: the law of error propagation
and the Monte Carlo method. Errors in environmental temperature measurements as well
as deviations of the initial rectal temperature were identified as major sources of
inaccuracies in model based death time estimation.
Michael et al. (2011) mentioned that model-based methods play an important role in
temperature-based death time determination. The most prominent method uses Marshall
and Hoare's double exponential model with Henssge's parameter determination. The
formulae contain body mass as the only non-temperature parameter. The authors said that
Henssge's method is well established since it can be adapted to non-standard cooling
situations varying the parameter body mass by multiplying it with the corrective factor.
The authors investigated the influence of measurement errors of body mass M as well as
variations of the corrective factor on the error of the Marshall and Hoare-Henssge death

28

time estimator. A formula for the relative error of death time estimator as a function of
the relative error of body mass was derived. Simple approximations of order 1 and 0
nevertheless yielded acceptable results validated by Monte Carlo simulations. They also
provided the rule of thumb according to which the quotient of the standard deviations of
the estimated death time and the standard deviations of the body mass was equal to the
quotient of the estimated death time and the body mass. Additionally, formulae and their
approximations were derived to quantify the influence of Henssge's body mass corrective
factor on death time estimation. In a range of body masses between 50 and 150 kg, the
relative variation of the body mass corrective factor is approximately equal to the relative
variation of the death time. This formula was applied and compared to computations and
to experimental cooling data with good results.
In Mergenthaler et al. (2012), the authors noted that the most common method used in
determining the estimated time since death in the early post-mortem phase is backcalculation based on rectal temperature decrease. Cooling experiments are essential for
model generation and validation. Post-mortem temperature models are necessary to
perform back-calculations. Thus far, cooling experiments have not been performed under
controlled environmental conditions. In their study they provided data on 84 post-mortem
cooling experiments under strictly controlled environmental conditions. For a period of
5 years, starting in 2003, deceased persons with a known time of death and known
environmental conditions at the death scene were transferred to a climatic chamber for
the process of body cooling. The environmental temperature was programmed to the
death scene temperature and kept constant throughout the process of body cooling. Rectal
and ambient temperatures were measured every minute. Relevant case-specific

29

information was summarized in a FileMaker database. The database serves as a reference


tool for the comparison of real cases in forensic routine and to check the plausibility of
model-derived estimates.
Smart and Kalizan (2012) examined evidence to seek an explanation of the possible
causes or contributing factors to the temperature plateau phenomenon and its influence on
time of death estimation. The concept of the temperature plateau effect was reviewed,
and investigation was conducted into its possible prediction under post mortem
conditions. The authors concluded that the appearance of a temperature plateau effect in
postmortem body core temperature decay curves is currently random and cannot be
predicted. This unpredictability is based upon the inter-individual differences in core
body temperature, hyperthermia, use of drugs, trauma, etc. and biomarker concentrations
(electrolytes, thyroxine, etc.) at ante mortem times, which will ultimately affect the shape
of the postmortem temperature decay curve. According to the authors, studies indicated
that the temperature plateau effect is diminished or even absent in the head tissues,
including eye and ear. The possibility of precise estimation of the time of death in the
early post mortem period based on eye temperature measurements was also commented.

30

CHAPTER 3
METHODOLOGY
In this chapter, an ordinary first order differential equation model for time estimation of
death is formulated. Due to the complex nature of the model, a computer program written
in Visual C # is employed to solve the model. The inputs to the program includes: the
surrounding temperature, rectal temperature of the body, mass of the body and the
condition of the body. The output is the time of death. The detailed listing and examples
of the input and output are presented in Chapter four. The general structure of the
computer program is described by the flow chart shown in figure 3.1. Some important
variables in the text and program are listed in Appendix A. The complete computer
program is presented in Appendix B. Some key terms and few theories that are relevant
to this thesis are also presented.

3.1

Model Assumptions

Temperature of the surrounding Ta is assumed to remain constant.

Temperature of the body is the same as its surface temperature. That is we assume
uniform cooling.

31

3.2 Newtons Model


Newtons law of cooling based on the assumptions above and which is also defined in
chapter one
is stated mathematically as
(3.01)
where
T : Temperature of the cooling object at time t
t : time in hours since the first reading
: Temperature of surrounding medium (Ambient temperature)
k : Constant of proportionality

3.2.1 Solution of Newtons Equation (Model)


( 3.02)
(3.03)
Multiplying both sides by the integrating factor
(3.04)
Integrating both sides with respect to t
dt

32

dt

(3.05)

(3.06)

T(t) =

+C

(3.07)

At t = 0 , T(0 ) = To
To

+C

C= To

( 3.08)
( 3.09)

( 3.10)

3.2.2

Modified Newtons Model

Rainy (1868) discovered that a period after death called plateau exist where the body
does not cool at all and the body temperature may even rise and further stated that bodies
recently dead are not found to cool in conformity with Newtons law of cooling. Rainy
modified Newtons model by determining a minimum and maximum of time within which
the time of death will be included. The model could not estimate the maximum time
because it was difficult to fix it. In 1962, Marshall and Hoare established the fact that the
basic assumption of Newtons law of cooling was invalid when applied to the very early
of the cooling of a deceased human body. Marshall and Hoare modified Newtons model
by adding an exponential term that represents the postmortem plateau. The model contains
two exponential parts. The first represents the postmortem plateau and the second constant
shows the exponential drop of time after the plateau according to Newtons law of cooling
(Leinbach, 2010)

33

3.3

Rate of Post Mortem Cooling

According to Pounder (1995), University of Dundee, the linear rate of post mortem
cooling is affected by environmental factors and other than the environmental
temperature and the body temperature at the time of death. These include:

The size of the body. The greater the surface area of the body relative to its

mass, the more rapid will be its cooling. Consequently, the heavier the physique and the
greater the obesity of the body, the slower will be the heat loss. The exposed surface area
of the body radiating heat to the environment will vary with the body position.

Clothing and coverings. These insulate the body from the environment and

therefore cooling is slower. Cooling of a naked body is half as fast as when clothed.

Movement and humidity of the air. Air movement accelerates cooling by

promoting convection and even the slightest sustained air movement is significant.
Cooling is said to be more rapid in a humid rather than dry atmosphere because moist air
is a better conductor of heat. The humidity of the atmosphere will affect cooling by
evaporation where the body or its clothing is wet.

Immersion in water. For a given environmental temperature, cooling in still

water is about twice as fast as in air, and in flowing water, about three times as fast.
Clearly the will cool more rapidly in cold water than warm water.

34

3.4

The following Assumptions are also made


In addition to the assumptions of the Newtons Model, the following are also

made.

No strong radiation(e.g. sun, heater, cooling system)

No uncertain severe changes of the cooling condition during the period


between the time of death and examination.(The place of death must be the
same as where the body was found.

The Ambient temperature is maintained at 37.20C .

Marshall and Hoare observed that the cooling of a body is being influenced initially by a
phenomenon whose effect decays with time .They approximated it with an exponential
function

(Leinbach, 2010).

The expression for the rate of cooling of a deceased body according to Marshall and
Hoare is

where
t : time
T: Body temperature in 0C
Ta : Ambient temperature in 0C,
k and P are cooling rate constants

and

C is also a constant
,

35

T(0) =To

( 3.11)

The first order differential equation

has an integrating factor

u(t) =

Multiplying through by the integration factor u(t) =


we have,

(3.12)

Therefore,

Integrating both sides

(3.13)

(3.14)

Multiplying equation (3.14) by


we have

T=

36

The solution of the linear differential equation then becomes

T(t) =
At

(3.15)

T(0) =
=

A=

Substitute

equation (3.16)

( 3.16)

into equation (3.15)

T(t) =
T(t) =
T(t) =

but

C = k(

Therefore the final solution reduces to

T(t)

with the parameters defined as follows :

37

(3.17)

Table 3.1 Definitions of Variables used in the Model


Definitions
Parameters

3.5

Rate constant known as the cooling factor

Rate constant for the Plateau

Constant

Denotes rectal temperature at any time

Ta

Denotes ambient temperature

Weight(Mass) of body

To

Denotes rectal temperature at death ( t=0)

Software Development

Computer program, a series of instructions that a computer can interpret and execute;
programs are also called software to distinguish them from hardware, the physical
equipment used in data processing. These programming instructions cause the computer
to perform arithmetic and logical operations or comparisons (and then take some
additional action based on the comparison) or to input or output data in a desired
sequence. In conventional computing the operations are executed sequentially; in parallel
processing the operations are allocated among multiple processors, which execute them

38

concurrently and share the results. Programs are often written as a series of subroutines,
which can be used in more than one program or at more than one point in the same
program. Systems programs are those that control the operation of the computer. Chief
among these is the operating system-also called the control program, executive, or
supervisor-which schedules the execution of other programs, allocates system resources,
and controls input and output operations. Processing programs are those whose execution
is controlled by the operating system. Language translators decode source programs,
written in a programming language, and produce object programs, which are in machine
language and can be understood by the computer. These include assemblers, which
translate symbolic languages that have a one-to-one relationship with machine language;
compilers, which translate an algorithmic or procedural-language program into a
machine-language program to be executed at a later time; and interpreters, which
translate source-language statements into object-language statements for immediate
execution. Other processing programs are service or utility programs, such as those that
"dump" computer memory to external storage for safekeeping and those that enable the
programmer to "trace" program execution, and application programs, which perform
business and scientific functions, such as payroll processing, accounts payable and
receivable posting, word processing, and simulation of environmental conditions (
Maddix and Morgan,1989).

39

3.5.1

C Sharp (#) Programming Language

Microsoft C# (pronounced C sharp) is a new programming language designed for


building a wide range of enterprise applications that run on the Dot NET Framework. An
evolution of Microsoft C and Microsoft C++, C# is simple, modern, type safe, and object
oriented. C# code is compiled as managed code, which means it benefits from the
services of the common language runtime. These services include language
interoperability, garbage collection, enhanced security, and improved versioning support.
C# is introduced as Visual C# in the Visual Studio Dot NET suite. Support for Visual C#
includes project templates, designers, property pages, code wizards, an object model, and
other features of the development environment. The library for Visual C# programming
is the Dot NET Framework. C# is an elegant and type-safe object-oriented language that
enables developers to build a variety of secure and robust applications that run on the
.NET Framework. You can use C# to create traditional Windows client applications,
XML Web services, distributed components, client-server applications, database
applications, and much, much more. Visual C# provides an advanced code editor,
convenient user interface designers, integrated debugger, and many other tools to make it
easier to develop applications based on version 4.0 of the C# language and version 4.0 of
the Dot NET Framework. As an object-oriented language, C# supports the concepts of
encapsulation, inheritance, and polymorphism. All variables and methods, including the
Main method, the application's entry point, are encapsulated within class definitions. A
class may inherit directly from one parent class, but it may implement any number of
interfaces. Methods that override virtual methods in a parent class require the override
keyword as a way to avoid accidental redefinition. In C#, a struct is like a lightweight

40

class; it is a stack-allocated type that can implement interfaces but does not support
inheritance (http://msdn.microsoft.com/en-s/library/aa287558%28v=vs.71%29.aspx,
Accessed:5/10/2012).

3.5.2

Object-Oriented Programming

Object-oriented programming is a method of implementation in which programs are


organized as cooperative collections of objects, each of which represents an instance of
some class, and whose classes are all members of a hierarchy of classes united via
inheritance relationships.
There are three important parts to this definition:
Object-oriented programming uses objects, not algorithms, as its fundamental
logical building blocks.
Each object is an instance of some class.
Classes may be related to one another via inheritance relationships.
A program may appear to be object-oriented, but if any of these elements is missing, it is
not an object-oriented program.
Specifically, programming without inheritance is distinctly not object oriented; that
would merely be programming with abstract data types
( http://www.uobabylon.edu.iq/uobColeges/ad_downloads/4_13173_344.pdf,
Accessed : 5/10,2012).

41

3.5.3

Object-Oriented Design

Object-oriented design is a method of design encompassing the process of object oriented


decomposition and a notation for depicting both logical and physical as well as static and
dynamic models of the system under design. There are two important parts to this
definition: object-oriented design leads to an object-oriented decomposition and uses
different notations to express different models of the logical (class and object structure)
and physical (module and process architecture) design of a system, in addition to the
static and dynamic aspects of the system
(source:http://www.mcs.vuw.ac.nz/research/design1/1996/submissions/17Owen_Astrach
an.htm, Accessed: 5/10/2012)

3.5.4 Object-Oriented Analysis


Object-oriented analysis is a method of analysis that examines requirements from the
perspective of the classes and objects found in the vocabulary of the problem domain.
Basically, the products of object-oriented analysis serve as the models from which we
may start an object-oriented design; the products of object-oriented design can then be
used as blueprints for completely implementing a system using object-oriented
programming methods.(http://www.mactech.com/articles/
frameworks/6_4/OO_Analysis_and_Design.html, Accessed: 5/10/2012)

42

3.5.5

Object

An object represents a unique instance of a data structure defined by the template


provided by its class. Each object has its own values for the variables belonging to its
class and responds to methods defined by that class. After an object has been created
(instantiated) from a class, you can change its properties. A property is an attribute of an
object. Properties define:

Object characteristics, such as name or value.

The state of an object such as deleted or changed.

Some properties are read-only and cannot be set, such as Name or Author. Other
properties can be set, such as Value or Label. Objects are different from other data
structures. They include code (in the form of methods), not just static data. A method is a
procedure or routine, associated with one or more classes, that acts on an object
(http://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/
(psbooks/tpcd/chapter.htm?File=tpcd/htm/tp cd04.htm, Accessed:5/10/2012).

3.5.6 Class
A class is a set of objects that share a common structure and a common behavior. Every
object is associated with a class. For example, all the objects that capture information
about employees could fall into a class called Employee, because there are attributes

43

(e.g., ID number, First name, Last name address, birth date, phone, and sex) and methods
(e.g., calculate Salary, employee status, and Pension Scheme) that all employees share. A
class therefore defines the properties of an object and the methods used to control the
objects behavior.

3.6

Programming Tools

3.6.1 Algorithm
An algorithm is a procedure for solving a problem in terms of the actions to be executed
and the order in which those actions are to be executed. An algorithm is merely the
sequence of steps taken to solve a problem. The steps are normally sequence, selection,
iteration, and a case-type statement
(source: http://www.unf.edu/~broggio/cop2221/2221pseu.htm, Accessed: 5/10/2012).

44

3.6.2 Pseudocode
Pseudocode is a kind of structured English for describing algorithms. It allows the
designer to focus on the logic of the algorithm without being distracted by details of
language syntax. At the same time, the Pseudocode needs to be complete. It describes
the entire logic of the algorithm so that implementation becomes a rote mechanical task
of translating line by line into source code
(source: http://users.csc.calpoly.edu/~jdalbey/SWE/pdl_std.html, Accessed:5/10/2012)

Steps
Initialize counter to zero
Initialize rectal temperature, ambient temperature and Initial temperature to zero
Initialize Time of death to 0.001.
Define other variables like rate constants k, p, xValue, yValue and TotalValue.
Input Rectal temperature T
Input Ambient temperature Ta
Input Initial temperature To
Input Weight of body M
Select body condition as Condition
Calculate Body surface area as

BSA=0.1173*W*100.6466

Calculate size Factor as SF=0.8*BSA*10000/W


Calculate rate constant k from

k = 0.0006125 *SF 0.05373

45

If Condition is equal to Clothed body then


calculate p=0.3
else if Condition is equal to Naked body then
calculate p= 0.4
end if
Set maximum counter to MAXIMUM_VALUE
while counter is less than MAXIMUM_VALUE
calculate xValue =
calculate yValue =

calculate TotalValue=xValue + yValue


subtract TotalValue from T
if the difference is less than threshold then
set time of death to Time
exit from loop
else
add 0.001 to time of death
end if
increase the counter by 1
end while
print Time of death is equal to ,Time
end program

46

3.6.3 Flowcharts
A flow Chart is a diagrammatic representation that illustrates the sequence of operations
to be performed to get the solution of a problem. Flow charts are generally drawn in the
early stages of formulating computer solutions. Flowcharts facilitate communication
between programmers and business people. These flowcharts play a vital role in the
programming of a problem and are quite helpful in understanding the logic of
complicated and lengthy problems. Once the flowchart is drawn, it becomes easy to write
the program in any high level language. Often we see how flowcharts are helpful in
explaining the program to others. Hence, it is correct to say that a flowchart is a must for
the better documentation of a complex program
(source: http://www.edrawsoft.com/Flowchart-Definition.php, Accessed: 5/10/2012).
In this thesis, we shall concern ourselves with the program flow chart, which describes
what operations and in what sequence are required to solve the Newtons cooling model.
The flow chart is shown below

47

Flowchart of the Model


Start
Input Initial Temp To
Set t= 0.001

Select condition
If condition==clothed, P =0.3
If condition== naked , P=0.4
1. Input Rectal Temp T
2. Input Room Temp Ta
3. Input Initial Temp To

Set diff= T*0.00001


BSA=0.1173*W*100.6466
SF =0.8*BSF*10000/w
K=0.0006125-0.5373

Count = 0
yes
while count > 0
No
kt

x=Ta +(To-Ta)e
pt
-kt
y=(k/k-p)(To-Ta)(e - e )
Total= x+y

Set Value= T -Total

yes
If Value <= diff
Set Time = t

No
t= t + 0.001

Output Time

Count=Count+1

Figure 3.1: Flowchart of the Computer Program.

48

Stop

CHAPTER 4
DATA ANALYSIS AND RESULTS
In this chapter, a computer program that solves the model by iteration is presented.
Firstly, the program accepts the ambient temperature, weight of the body, rectal
temperature and initial temperature as inputs. The program also takes clothing into
account when solving the model. The body surface area (BSA) is calculated based on the
formulae provided by Livingston and Lee (2001).The rate constant k termed cooling
factor is calculated using Marshalls linear relationship k = size factor * 0.0006125
0.05375 (Lynnerup,1993). The program also request if the body is naked or clothed and
base on the answer given, the value for the rate constant for the plateau p is chosen. Once
the program accepts all the inputs along with the calculated parameters, the time since
death is determined.

4.1 Source of Data


Data for analyzing the model were obtained from the following sources in the literature
(ACTA MORPHOLOGIC,2006; vol 3(2):51-54 Medical journal of Macedonian
Association of Anatomists and Morphologists (MAAM), Handbuch Gerichtliche
Medizin, Volume 1 by Bernd Brinkmann, and Burkhand Madea).

49

4.2

Parameter Estimation

The parameters of the model are estimated based on the following information
(Lynnerup, 1993).
BSA = 0.1173 * W * 100.6466
where
BSA: Body surface Area
W

: weight of the body.

SF = 0.8 * BSA (m2) / W (kg)


where

SF: Size Factor of the body.

The parameter k which is the rate constant of the Newtons model is given by
k = SF * 0.0006125 0.05375
For clothed body, p =0.3 and for naked body p= 0.4
The above parameter estimates are summarized in table 4.1 below.

50

Table 4.1 Parameter estimates of Cooling Model


Parameter

Value

Source

SF * 0.0006125 0.05375

Lynnerup (1993)
Journal of Forensic
sciences

0.3 for Clothed body

Lynnerup (1993)

0.4 for Naked body

Journal of Forensic
sciences

4.3

Analysis of Results

Analysis of 59 cases obtained from the following sources in the literature: ACTA
MORPHOLOGIC, 2006; vol 3(2):51-54, Medical journal of Macedonian Association of
Anatomists and Morphologists (MAAM) and Handbuch Gerichtliche Medizin, Volume 1
by Bernd Brinkmann, and Burkhand Madea with Known time of death is presented.
Rectal temperature and environmental temperature were measured as well as the body
weight. The clothing condition (naked or clothed) was also recorded. Comparison is
made between the known time of death with the time obtained from the computer
software. Tables 4.2 and 4.3 below summarize all the 59 cases together with results
obtained by the computer program.

51

Table 4.2 Cases with known time of death (source: Handbuch Gerichtliche

5.69

22.50 / 23.0

22.75

32.8

57

7.70

7.77

18.0 / 19.0

18.75

33.5

96

11.30

6.98

25.0 / 27.3

26.15

33.3

78

11.60

10.04

26.4 / 27.4

26.90

33.0

116

29.10

14.05

1.50 / 1.50

1.50

16.7

78

16.60

16.64

4.50 / 6.0

5.25

28.3

69

8.40

7.81

16.7 / 18.2

17.45

26.3

71

16.90

15.14

15.7 / 17.2

16.45

25.4

56

13.90

14.08

MEAN

(TOC)

2
3
4
5
6
7
8
9

52

MODEL

DEATH OF THE

5.80

NAKED ( - )
ESTIMATED TIME SINCE

62

CLOTHED ( +)

KNOWN TIME OF DEATH

33.1

TEMPERATURE
RECTAL
(TOC)

16.00

TEMPERATURE

15.5 / 16.5

AMBIENT

O
(T
C) WEIGHT(kg)
BODY

AMBIENT TEMPERATURE

CAE

Medizin, Vol.1)

Table 4.3 Cases with known time of death (source: ACTA MORPHOLOGIC, 2006

51

34.9

17

65

168

3.94

54

34.4

22

65

160

5.44

54

35.1

19.3

78

180

4.29

26

34.7

22.5

75

166

4.85

16

35.9

22.4

65

175

2.96

49

33

24

75

176

7.94

35

36.5

21

80

175

2.07

38

32.8

22.4

80

174

7.70

20

32.2

22

58

165

7.35

53

MODEL

DEATH OF THE

ESTIMATED TIME SINCE

(-)
NAKED

CLOTHED ( +)

BODY HEIGHT(cm)

O
(T
C) WEIGHT(kg)
BODY

TEMPERATURE

AMBIENT

(TOC)

RECTAL TEMPERATURE

KNOWN TIME OF DEATH

SEX

AGE

CASE

Vol. 3(2):51-54)

10

55

34

21

75

172

5.41

11

58

33.2

16.5

60

158

5.47

12

69

33

20

78

173

6.47

13

52

34.1

24.5

70

166

6.86

14

44

32

21

57

160

7.15

15

35

30.6

16

80

175

8.79

16

53

32.5

21.3

80

172

8.42

17

75

33

24

78

176

8.86

18

76

33.9

24

82

175

7.44

19

60

33.8

24

84

178

7.69

20

59

33

22.5

70

164

7.76

21

44

35.4

30

75

177

7.17

22

62

32

21

72

168

7.86

23

38

32.4

21.2

55

159

6.66

54

24

60

32.6

21

85

180

7.60

25

29

32

24

50

159

8.16

26

57

10

31.6

19

78

174

8.61

27

40

10

30.9

23

80

180

12.14

28

42

12

27.2

15.7

75

173

12.39

29

44

13

29.6

24

80

178

16.23

30

74

13

28.8

21

83

180

13.64

31

54

13

28.1

16.5

80

179

11.14

32

53

14

28.4

18

75

172

11.29

33

67

14

27.2

20.6

54

151

13.42

34

32

14

27.5

20

45

166

11.42

35

36

15

27

23

75

174

21.55

36

60

15

25.9

24.4

76

175

33.07

37

53

15

24.1

23.6

75

180

49.05

55

38

37

15

24.5

20

80

181

23.35

39

32

16

24

21

73

166

27.07

40

37

17

23.5

23

95

187

58.30

41

25

19

23

19

80

184

25.91

42

25

19

23.3

22

95

180

41.52

43

20

19

23

22

85

184

45.06

44

24

20

22.7

17

75

180

21.53

45

75

20

22.5

17

70

173

21.30

46

34

20

22.5

17

76

175

22.18

47

31

21

22

20.6

65

155

33.76

48

44

22

21.6

21

73

175

49.26

49

24

24

21.3

20

80

178

41.50

50

58

24

21.8

21

60

163

39.67

56

4.4

Further Discussion of Results

The developed model of cooling is validated against known data provided in Tables 4.2
and 4.3 above. Results obtained by the computer program of the model show that there is
no significant difference between the known time of death and the estimated time of
death of the model. This is illustrated in Figures 4.1 and 4.2 below. From the charts in
Figures 4.1 and 4.2, it is possible to see that with a total of 7 and 37 cases respectively,
there was either no discrepancy or very small difference in time between the known time
of death and the estimated time of death of the model.

Time of Death(Hrs)

Column Chart of Time of Death


30
25
20
15
10
5
0

1
5.8

2
7.7

3
11.3

Estimated Time of Death of


5.69
Model

7.77

6.98 10.04 14.05 16.64 7.81 15.14 14.08

Known Time of Death

4
11.6

5
29.1

6
16.6

Cases

Figure 4.1: A chart of estimated time and known time of death

57

7
8.4

8
16.9

9
13.9

Column chart of time of death


70

Time of Death(hrs(

60
50
40
30
20
10
0
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49

Cases
Known Time of Death

Estimated Time of Death of Model

Figure 4.2: A chart of estimated time and known time of death.


The results however, show some level of discrepancies from the known time of death. In
Figure 4.2, the chart shows some level of discrepancies from case numbers 34 to 43 and
from 47 to 50. This happened as a result of temperature difference between the
environmental (ambient) and rectal temperatures. When the post mortem period increased
above 15hrs, the difference between the ambient temperature and the rectal temperature
were very small. From Table 4.3, case numbers 44, 45 and 46 gave a very small
difference between the known time of death and the estimated time of death because the
temperature difference between the ambient and rectal temperatures were big.

58

Table 4.4 summarizes the temperature difference between the ambient and rectal
temperatures, the known time of death and the estimated time of death obtained from the
computer software.
Table 4.4 Summary of Temperature difference, estimated time of death and
known time of death

Temperature

Difference Known time of Death

Estimated time of death

(0C)

17.9

3.94

16.7

5.47

13.0

6.47

12.6

10

8.61

10.4

14

11.29

7.8

13

13.64

4.5

15

23.35

3.0

16

27.07

2.5

21

33.76

1.5

19

41.52

1.0

19

45.06

0.6

22

49.26

59

CHAPTER 5
CONCLUSION AND RECOMMENDATIONS

5.1

Conclusion

Estimation of time of death by using the model show that accuracy of results largely
depends on the length of postmortem period. From the analysis, it was observed that the
shorter the postmortem period, the more accurate is the estimate of time of death .The
inaccuracy of the model becomes considerable at low temperature difference between
the rectal and ambient temperatures. Consequently, the longer the post mortem interval,
the wider is the range of estimate as to when death probably occurred. We conclude that
the Marshall and Hoare double exponential model is the most appropriate model for
estimating the time of death in murder.

5.2

Recommendation

Variables such as posture of the body, site of reading of the postmortem body
temperature, emaciation and micro-environment (rain, humidity etc) that were not
considered in this thesis for the determination of time of death could be study to improve
the current model to account for the long post mortem period and to accurately estimate
time of death. This improvement can be used for scientific crime investigation.

60

REFERENCES

Al-Alousi, L.M., Anderson, R.A., Worster, D.M., and Land, D.V. (2002),
Factors influencing the precision of estimating the postmortem interval using the
triple-exponential formulae (TEF). Part I. A study of the effect of body variables
and covering of the torso on the postmortem brain, liver and rectal cooling rates in
117 forensic cases. Forensic Science International (125) .

Amendt, J., Campobasso, C.P., Gaudry, E., Reiter, C., LeBlanc, H.N., and Hall,
M.J. (2007), Best practice in forensic entomology--standards and guidelines.
European Association for Forensic Entomology

Besson, U. (2010), The History of the Cooling Law: When the Search for
Simplicity can be an Obstacle.

Brown, A. and Marshall, T.K. (1974), Body temperature as a means of estimating


the time of death.

Clark, D. (2011), Beginning C# Object-Oriented Programming.

Dix, J. and Graham, M. (1999),Time of death, Decomposition and Identification:


An Atlas

Green, M.A., Wright, J.C. (1985), Postmortem interval estimation from body
temperature data only. Forensic Sci Int .

Hartog, E.A., Lotens, W.A. (2004),European Journal of Applied Physiology


Postmortem time estimation using body temperature and a finite-element
computer model.

61

Hengea, C., Madea, B. (2004), Estimation of the time since death in the early
post-mortem period.

Henssge, C. (1979), Zeitschrift fur Rechtsmedizin. Journal of Legal Medicine


Precision of estimating the time of death by mathematical expression of rectal
body cooling.

Henssge, C. (1988), Death Time Estimation in Case Work: I. The Rectal


Temperature Time of Death Nomogram, Forensic Science International.

Henssge, C. (1992), Rectal temperature time of death nomogram: dependence of


corrective factors on the body weight under stronger thermic insulation
conditions. Forensic Sci. Int.

Henssge, C., Althaus, L., Bolt, J. Freislederer, A, Haffner, H.-T., Henssge,


C.A., Hoppe, B. and Schneider, V. (2011), Experiences with a compound method
for estimating the time since death .

Hoste, L. and Pottel, H. (2012), Is Body Surface Area the Appropriate Index for
Glomerular Filtration Rate? Basic Nephrology and Acute Kidney Injury, Prof.
Manisha Sahay (Ed).

Hubig M, Mergenthaler H, Mall G, (2011), Influence of measurement errors on


temperature- based death time determination.

Kushawaha, V., Yadav, M., Srivastava, A.K. and Agarwal, A. (2010), Time since
death from degenerative changes in the Kidney.

Leinbach, P. and Leinbach, C. (2000), Estimating Time Since Death.

62

Leinbach, C. L., (2010), Mathematical models for establishing time since death
during the postmortem period.

Leinbach, C. (2011), Beyond Newtons Law of Cooling Updated Methods for


Estimating time since Death.

Lynnerup, N. (1993), A Computer program for the estimation of time of death,


Journal of Forensic sciences, JFSCA.

Madea, B. and Henssge, C. (2006), Estimation of the time since death.

Madea, B. (2009), Time of Death Determinations.

Mall, G., Eisenmenger, W. (2005), Institute of Legal Medicine, Ludwig


Maximilians-University,

Frauenlobstrasse

7a,

80337

Munich,

Germany.

mall@uni- mainz.de Legal Medicine (Tokyo, Japan)

Marshall, T.K. and Hoare, F.E. (1962), Estimating the time of death. The rectal
cooling after death and its mathematical expression, Journal of Forensic Sciences
7, 56 81.

Melson C. (2005), Newtons law of Cooling.

Nasif, N. (2009),Heat Transfer,Conduction,Convection and Radiation.

Pankovic, V. and Darko, V. K. (2010) ,Modification of the Newtons cooling


law and Mpemba effect.

63

Pashinian, G.A., Tuchik, E.S. and Ekspertiza, S. (1997), An analysis of the errors
in determining the time of death by cadaveric changes during the Performance of
the initial inquiry activities (PMID: 9254449),

Rutty, G.N. (2000), The estimation of the time since death using temperatures
recorded from the external auditory canal Part I: Can a temperature be recorded
and interpreted from this site?41-51Forensic Science, Medicine and Pathology .

Silverman, M.P. (2000), Radiation, Conduction, and the Way Objects Cool:
Newtons Hot Block Experiment 300 Years Later.

Verica, P., Janeska, B., Gutevska, A. and Chakar Z., (2006), Estimation of time
since death by the Henssge-nomogram.

Verica, P., Janeska, B., Gutevska, A. and Duma, A. (2007), Post mortem cooling
of the body and estimation of time since death.

Wagner, B. (2010), Effective C#: 50 specific ways to improve your C#, - 2nd
Edition Pearson Education Inc.

Whewell, W. (1866), History of the Inductive Sciences, (section: Correction of


Newtons law of cooling, pgs. 149-50). Appleton.

64

APPENDIX A
The controls that are referred to in the code
Object

Name

Description

type
TextBox

txttime

TextBox

txtrectal

TextBox

txtmass

TextBox

txtambient

TextBox

txtInitial

TextBox

txtLogPath

Button

btnOK

Button

btnSave

Button

btnExit

Button

btnNext

A read only text box that displays time


of death
A text box that accepts a rectal
temperature
A text box that accepts the mass of body

text

box

that

accepts

ambient

temperature
A

text

box

that

accepts

initial

temperature
A read only text box that displays the
path the records are kept
Calculates the time of death when
clicked
Saves the records when clicked

Closes the form when clicked

Clears the textboxes when clicked

65

Object type
Object
Label

Label

Label

Label

Label
Property

Value

Name

lblTimeofDeath

AutoSize

True

Font

Times New Roman, 12F

Location

Point(132, 188)

Size

(124, 23)

Text

Time of Death

Name

lblPath

AutoSize

True

Font

Times New Roman, 12F

Location

Point(203, 227)

Size

(47, 23)

Text

Path

Name

lblmass

AutoSize

True

Font

Times New Roman, 12F

Location

Point(133, 149)

Size

(125, 23)

Text

Mass of body

Name

lblRectalTemperature

AutoSize

True

Font

Times New Roman, 12F

Location

Point(88, 114)

Size

(172, 23)

66

Label

Label

Text

Rectal Temperature

Name

lblInitialTemperature

AutoSize

True

Font

Times New Roman, 12F

Location

Point(97, 79)

Size

(168, 23)

Text

Initial Temperature

Name

lblAmbientTemperature

AutoSize

True

Font

Times New Roman, 12F

Location

Point(75, 45)

Size

(190, 23)

Text

Ambient Temperature

Object type
Object
Textbox

Textbox

Textbox

Property

Value

Name

txtLogPath

Enabled

False

Font

Times New Roman, 12F

Fontstyle

Regular

Location

Point(268,227)

Multiline

True

Size

(155,27)

Text

c:\\Test\Death Time.txt

Name

txttime

Enabled

False

67

Textbox

Textbox

Textbox

Textbox

Font

Times New Roman, 12F

Fontstyle

Bold

Location

Point(268,185)

Multiline

True

Size

(155,23)

ForeColor

Blue

Name

txtambient

Font

Times New Roman, 12F

Fontstyle

Bold

Location

Point(268,42)

Multiline

True

Size

(155,23)

Name

txtInitial

Font

Times New Roman, 12F

Fontstyle

Regular

Location

Point(268,76)

Multiline

True

Size

(155,23)

Name

txtRectal

Font

Times New Roman, 12F

Fontstyle

Regular

Location

Point(268,111)

Multiline

True

Size

(155,23)

Name

txtmass

Font

Times New Roman, 12F

68

Fontstyle

Regular

Location

Point(268,146)

Multiline

True

Size

(155,23)

Object type
Object
Exit

Button
Property

Value

Name

btnExit

Location

Point(342, 331)

Size

(54,23)

Text

Exit

UseVisualStyle

True

BackColor

Save

Name

btnSave

Location

Point(207, 331)

Size

(64,23)

Text

Save

UseVisualStyle

True

BackColor

Next

Name

btnNext

Location

Point(277, 331)

Size

(64,23)

Text

Next

UseVisualStyle

True

BackColor

69

OK

Name

btnOK

Location

Point(143, 331)

Size

(64,23)

Text

Ok

UseVisualStyle

True

BackColor

70

APPENDIX B
Program Structure
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Numeric;
using ZedGraph;

71

namespace THESIS_2013
{

public partial class frmMainApp : Form


{
// Initialising variables
Int64

MAXCOUNT = Int64.MaxValue;

int

Count;

double

Ta = 0,Time = 0, To = 37.2, xValue = 0.0,yValue = 0.0,

TotalValue = 0.0;
double

p = 0, k = 0, t = 0.001, T = 0, W = 0, BSA = 0, SF = 0;

string

Option;

public frmMainApp()
{
InitializeComponent();
}

private void btnexit_Click(object sender, EventArgs e)


{
this.Close();
}

private void btnok_Click(object sender, EventArgs e)


{
//double difference = Math.Abs(T * .00001);
/******************************************************

72

* This method calculates the time of death in murder


* based on Newton's law of cooling with modifications
* The rectal temperature of the body,Initial rectal temperature
* mass of the body and the rate constants are accepted
* as inputs ant the time is determined.
* ***************************************************/
try
{

if (IsValidData())
{
Ta = Convert.ToDouble(txtAmbient.Text);
W = Convert.ToDouble(txtweight.Text);
T = Convert.ToDouble(txtRectal.Text);
To = Convert.ToDouble(txtInitial.Text);
Option=Convert.ToString(cbocondition.Text);
if (Option =="Clothed Body")
{
p = 0.3;
}
else if (Option == "Naked Body")
{
p = 0.4;

73

}
// Count = 0;
BSA = 0.1173 * Math.Pow(W, 0.6466) ;
SF = 0.8 * BSA * 10000 / W;
k= 0.0006125 * SF - 0.05373;
Count = 1;
// while (Count < MAXCOUNT)
while (Count > 0)
{
xValue = Ta + (To - Ta) * Math.Exp(-k * t);
yValue = (k / (k - p)) * (To - Ta) * (Math.Exp(-p * t) - Math.Exp(-k * t));
double

difference = Math.Abs(T * 0.0001);


TotalValue = xValue + yValue;
if (Math.Abs(T - TotalValue) <= difference)
{
Time = t;
break;
}

else
{
t = t + 0.001;
}
Count++;

74

}
txttime.Text = Time.ToString("F2") + "hrs";
}
}
catch (FormatException)
{
MessageBox.Show("Invalid Numeric Format.Please check all entries", "Entry Error");
}
catch (OverflowException)
{
MessageBox.Show("Overflow Error.Please enter accurate values", "Entry Error");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, ex.GetType().ToString());
}
}

public bool IsValidData( )


{
// validate the Ambient temperature textbox
if (!IsPresent(txtAmbient, "Ambient Temperature"))
return false;

75

if (!IsDouble(txtAmbient, "Ambient Temperature"))


return false
if (!IsWithinRange(txtAmbient, "Ambient Temperature", 0))
return false;
// validate the mass of body textbox
if (!IsPresent(txtweight, "Mass of Body"))
return false;
if (!IsDouble(txtweight, "Mass of Body"))
return false;
if (!IsWithinRange(txtweight, "Mass of Body", 0))
return false;
// validate the Rectal temperature textbox
if (!IsPresent(txtRectal, "Rectal Temperature"))
return false;
if (!IsDouble(txtRectal, "Rectal Temperature"))
return false;
if (!IsWithinRange(txtRectal, "Rectal Temperature", 0))
return false;
// validate the Initial temperature textbox
if (!IsPresent(txtInitial, "Initial Temperature"))
return false;
if (!IsDouble(txtInitial, "Initial Temperature"))
return false;

76

if (!IsWithinRange(txtInitial, "Initial Temperature", 0))


return false;
}

public bool IsPresent(TextBox textbox, string name)


{
if (textbox.Text == "")
{
MessageBox.Show(name + " is a required fiel", "Entry Error");
textbox.Focus();
return false;
}
return true;
}

public bool IsDouble(TextBox textbox, string name)


{
try
{
Convert.ToDouble(textbox.Text);
return true;
}
catch (FormatException)
{
MessageBox.Show(name + "must be a decimal value", "Error Entry");

77

textbox.Focus( );
return false;
}
}

public bool IsWithinRange(TextBox textbox, string name, double min)


{
double number = Convert.ToDouble(textbox.Text);
if (number < min)
{
MessageBox.Show(name + " must not be less than zero or negative", "Error Entry");
textbox.Focus();
return false;
}
return true;
}

private void btnSave_Click(object sender, EventArgs e)


{
this.Text = Logger.LogWrite(txtLogPath.Text, txtRectal.Text, txtInitial.Text,
txtAmbient.Text, txtweight.Text, txttime.Text);
}

private void showRecordToolStripMenuItem_Click(object sender, eventArgs e)


{
frmDisplayResults mydata = new frmDisplayResults();

78

mydata.Show();
}

private void exitToolStripMenuItem_Click(object sender, EventArgs e)


{
this.Close(); this.Close();
}

private void btnNext_Click(object sender, EventArgs e)


{
txtAmbient.Clear();
txtInitial.Clear();
txtweight.Clear();
txtRectal.Clear();
txttime.Clear();
cbocondition.Text = "";
txtAmbient.Focus();
}

private void txtAmbient_TextChanged(object sender, EventArgs e)


{
txtInitial.Text = Convert.ToString(37.2);
}
}
}

79

Você também pode gostar