Modeling and Simulation
Modeling and Simulation
Modeling and Simulation
Guillaume Dubois
This book was previously published in French as La simulation numérique: Enjeux et bonnes pratiques pour
l’industrie (Numerical simulation: Challenges and best practices for industry) by Dunod, Malakoff, France.
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have
been made to publish reliable data and information, but the author and publisher cannot assume responsibility
for the validity of all materials or the consequences of their use. The authors and publishers have attempted to
trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if
permission to publish in this form has not been obtained. If any copyright material has not been acknowledged
please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system, without
written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com
(http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Dan-
vers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a
variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of
payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only
for identification and explanation without intent to infringe.
—Gandhi
Foreword
vii
Special Thanks
To Taylor & Francis, especially Cindy Renee Carelli, executive editor, and
Renee Nakash, editorial assistant, for their professionalism and the quality
of their work.
To Dorothée Dorwood and Olivier Franceschi, the Traductorz, for the quality
of their translation and their great conviviality.
To Benoît Parmentier, whom fate took away violently and whom I wish could
have proofread this book, for training me when I was starting out.
To the Ethiopian farmers from 2000 years ago who discovered coffee and
enabled me to write this book within a few weeks, by night.
Finally, to Doug, the fictional engineer we follow in this book, who, although
he doesn’t exist, helped me a lot in my writing.
ix
Contents
2 A Bit of History................................................................................................9
2.1 Before 1940.............................................................................................. 9
2.2 From 1940 to 1960: The First Steps of Numerical Simulation........ 10
2.3 From 1960 to 1980: The Evolution of Numerical Simulation.......... 11
2.4 From 1980 to 1995: The Revolution of Numerical Simulation....... 13
2.5 From 1995 to 2015: The Spread of Numerical Simulation.............. 14
2.6 Three Lessons from History............................................................... 16
xi
xii Contents
He has progressively held the different roles discussed in this book: mod-
eling engineer—developing models, team manager—managing these engi-
neers, project manager—being a client of these teams.
xiii
This book has been translated by Dorothée Dorwood and Olivier Franceschi.
Introduction
The purpose of this work is to bring the clearest answers to these ques-
tions. Our goal here is to contribute to knowledge sharing in order to open
pathways to the expansion of numerical simulation and maximize the cre-
ation of value for our society.
Observation: The objective of this work is not to explain in detail digital
methods and techniques adapted to specific fields. Many works exist about
these topics (including Pratique de la simulation numérique, Dunod).
xvii
xviii Introduction
Who Is This Book For? (To Be Read First If You Are in a Hurry)
This work targets three types of people:
1
2 Modeling and Simulation
Ice cube
Air
Water
c
T0
hwater
Twater
FIGURE 1.1
The system studied: an ice cube floating in a glass of water.
Where:
t is time
hwater is the heat convection coefficient between the water and the ice cube
Twater is the water temperature
T0 is the temperature of the ice cube
c(t) is the width of the cube, still frozen
Our hypothesis is that the heat exchanges with the air, at the upper side
of the ice cube, are insignificant compared with those of the water, and we
are simplifying the problem by also assuming all the other sides are fully in
contact with the water.
Heat energy contained in the ice cube can be approximated as
Where:
E0 is the ice cube’s energy once it has melted
Lwater fusion is the mass enthalpy of the state change from a liquid to a solid
state
Usual physics laws allow us to predict the total exchanged power equal to
the variation of the system’s energy. Thus, we can write
What Is Numerical Simulation? 3
∂E cube (t)
= Pexchanged (t)
∂(t)
c(tfinal) = 0
FIGURE 1.2
Mathematical model vs. reality.
This is a model!
To thoroughly illustrate our example, we can test this model on a specific
situation. The model is solved analytically, and the solution of this set of
equations is (calculation details are skipped)
c(t = 0) = 2 cm
Twater = 20°C
T0 = 0°C
hwater = 250 W/K/m
2
Lwater fusion = 334 kJ/kg
ρice = 917 kg/m 3
Ice cube
Solid
Air
Water
c
T0
hwater Twater
FIGURE 1.3
The new system studied: the ice cube is now touching a solid made of steel.
∂E (t)
cube = Pexchanged (t)
∂t
c(tfinal ) = 0
or
∂c(t) 1
= − A + B 2
∂t c (t)
A = 5hwater (Twater − T0 )
3Lwater fusion ρice
B = ϕsolid
3Lwater fusion ρice
c(tfinal ) = 0
This very simple addition (the heated solid) complicates the situation. Here,
the equation isn’t analytically solvable (without using inverse trigonometric
functions; that would also require the digital tool).
We have to use numerical methods to solve the equation. For instance, we
can reject time, considering an infinitesimal time frame dt (we will take here
dt = 0.1 s).
c(t + dt) − c ( t ) 1
= − A + B 2
dt c (t)
c(tfinal ) = 0
6 Modeling and Simulation
We are thereby able to calculate c step by step, until the value reaches 0.
c(t = 0) = c0
1
c(dt) = c(t = 0) − dt A + B 2
c (t = 0 )
1
c(2 * dt) = c(t = dt) − dt A + B 2
c (t = dt )
1
c(3 * dt) = c(t = 2 * dt) − dt A + B 2
c ( t = 2 * dt )
...
1
c(n * dt) = c(t = ( n − 1) * dt) − dt A + B 2
c (t = (n − 1) * dt)
c(tfiinal ) = 0
In this way, there are n calculations to operate to be able to find the final
value (n being the number of iterations to perform before stopping); that is to
say, before c(n*dt) becomes negative. We’ll see that tfinal ≈ 455 s ≈ 8 mn, where
dt = 0.1 s; so 4550 calculations must be performed to find the answer!
This is the moment the digital tool unveils its usefulness. It is able to per-
form these 4550 calculations in a split second, whereas a human being would
have needed several hours. A computer just needs these previous equations
translated into a digital language to solve them (see the numerical model in
Figure 1.4).
By using a computer and the appropriate software, these calculations are
performed in a split second, and the solution we find is tfinal ≈ 455 s ≈ 8 mn.
Thus, in 99% of the situations encountered in industry, mathematical mod-
els are converted into numerical models, in order to solve them with digital
tools.
As explained in the previous paragraph, a numerical simulation is the action
of performing a test with a numerical model.
T_water = 273.15 + 20
T_0 = 273.15 + 0
h_water = 250
L_water_fusion = 334 *10^3
Rho_ice = 917
Phi_solid = 1
c = 0.02
∂c(t) 1
t = 0 =− A+B 2
Delta_t = 0.1 ∂t c (t)
Print t c(tfinal)=0
FIGURE 1.4
Numerical mode, mathematical model, and reality.
d
dt x = f ( x , u, θ, t)
y = h( x , u, θ, t)
Where:
x is the state vector, including variables selected to define the system
y is the output vector, including the variables to be observed
u is the input vector, including the variables defining the system
request
θ is the setting vector, including the setting variables of the system
∂c(t) 5h (T −T ) ϕsolid 1
= − water water 0 +
∂t 3Lwater fusion ρice 3Lwater fusion ρice c (t)
2
y = c(t)
Where:
x = c(t)
y = c(t)
u = [Twater T0 ϕsolid ]
θ = [ hwater Lwater fusion ρice ]
8 Modeling and Simulation
The model being simple, we only have a single state variable, and the out-
put variable is equal to the state variable.
1.
A model is testable: It is possible to predict, without live experiments,
the behavior of the system in a specific situation.
2.
A model is a representation: It is necessary to comprehend the system
to represent it, and the model itself includes this knowledge.
These two core values, combined with the power of the tools of digital
technology, generate huge potential to support industrial companies. More
details will be covered in Chapter 3.
Bibliography
Balci O. 1990. Guidelines for successful simulation studies. In Proceedings of the 1990
Winter Simulation Conference . Piscataway, NJ: IEEE.
Balci O. 1994. Validation, verification, and testing techniques throughout the life cycle
of a simulation study. In Proceedings of the 1994 Winter Simulation Conference .
Piscataway, NJ: IEEE.
Banks J., Carson II J. S., and Nelson B. L. 1996. Discrete-Event System Simulation , 2nd
edn. Englewood Cliffs, NJ: Prentice Hall.
Breno B., de Franç a N., and Horta Travassos G. 2013. Reporting guidelines for sim-
ulation-based studies in software engineering. Evaluation and Assessment in
Software Engineering (EASE 2012) , 16th International Conference, Ciudad Real,
Spain.
Chwif L., Barretto M. R. P., and Paul R. J. 2000. On simulation model complexity. In
Proceedings of the 2000 Winter Simulation Conference . Piscataway, NJ: IEEE.
Emshoff J. R. and Sisson R. L. 1970. Design and Use of Computer Simulation Models .
New York, NY: Macmillan.
Fishwick P. A. 1995. Simulation Model Design and Execution: Building Digital Worlds .
Englewood Cliffs, NJ: Prentice-Hall.
Fritzon P. 2014. Principles of Object Oriented Modeling and Simulation with Modelica .
Hoboken, NJ: Wiley.
Hills P. R. 1971. HOCUS . Egham, Surrey, UK: P-E Group.
Hollocks B. W. 2008. Intelligence, innovation and integrity, KD Tocher and the dawn
of simulation. Journal of Simulation 2(3): 128– 137.
Innis G. and Rexstad E. 1983. Simulation model simplification techniques.
SIMULATION 41: 7– 15.
Kleijnen J. P. C. 1995. Verification and validation of simulation models. European
Journal of Operational Research 82: 145– 162.
Kotter J. P. 1996. Leading Change . Boston, MA: Harvard Business School Press.
Law A. M. and McComas M. G. 1991. Secrets of successful simulation studies. In
Proceedings of the 1991 Winter Simulation Conference , ed. Charnes J. M., Morrice
D. M., Brunner D. T., Swain J. J., pp. 21– 27. Piscataway, NJ: IEEE.
Ljung L. and Glac T. 1994. Modeling of Dynamic Systems . Englewood Cliffs, NJ:
Prentice Hall.
Nance R. E. 1993. A history of discrete event simulation programming languages. The
Second ACM SIGPLAN Conference on History of Programming Languages,
April 20– 23, 1993, Cambridge, MA, pp. 149– 175.
Nance R. E. and Sargent R. G. 2002. Perspectives on the evolution of simulation.
Operations Research 50(1): 161– 172.
Nance R. E., Goldsman D., and Wilson J.R. 2010. A brief history of simulation revis-
ited. In Proceedings of the 2010 Winter Simulation Conference . Piscataway, NJ: IEEE.
Naylor T. H., Balintfy J. L., Burdick D. S., and Chu K. 1966. Computer Simulation
Techniques . New York, NY: Wiley.
141
142 Bibliography