1.1 Concept Behind Simulation
Simulation from its basic definition is the imitation of an actual process. In modern times, the software definition of simulation is also availablethe representation of the behavior or characteristics of one system through the use of another system, especially a computer program designed for the purpose. Though most engineers spend a significant amount of time simulating the systems they study, simulation as the above-defined concept is something almost everyone has been exposed to at some point of time. Simulation by its definition is when a real-world process is repeated. Let us look at some examples of simulation that we never stopped to think about.
For most of us who were born when computers were ubiquitous household machines, the first form of simulations is computer games. A computer game may be a car racing game, a war or fighting game, playing chess against the computer, or one of the strategy games that have become very popular recently. Almost all of these are imitations of real-world events. Behind the fancy graphics and the celebrity status characters lies a very complex algorithm that creates the environment where gamers find themselves constantly challenged. The environment changes to make the game tougher for the gamer in various forms - stronger enemies, tougher road conditions to drive on or more complex chess moves. These are examples of how a computer program has been designed to provide an entertaining platform for a user and also the program adjusts to user inputs not only in allowing the user to navigate the software but in making the platform more challenging for the user.
As the time comes for younger adults to get their driving licenses, they are quite often exposed to driving simulators. Unlike the video games, these have a more practical purpose in providing a new driver with necessary skills and also offering advice on road safety and illegal manoeuvres. Nowadays, there are some countries in the world where a driving license can be issued on passing a virtual driving test on a simulator rather than a road test. This shows how greater faith is being placed on simulators where the judgment of an experienced professional was the only one that was trusted. A more advanced form of simulator is the flight simulator made available to pilots during training. However, these are rarely accepted as the only form of training due to the critical nature of the skill to be acquired.
As adults, most of us have used simulators without knowing it, for example tax planning software. Almost everyone uses it when the time comes to file our tax returns. How much would we be paying in taxes? How much would we save by investing in Plan A and how does that compare with Plan B? Which expenses are tax deductible? Does your place of residence bring you tax benefits? Does your nature of employment entitle you to deductible expenses? If anyone reading this book has never used a tax planning software, you probably are paying way too much in taxes. In this case again, there is a fairly complex program that asks users for every detail that could affect their taxes and calculates the tax owed.
One of the most complex forms of simulation that have not yet been fully mastered is that of weather forecasting. With the mobile phone in everyones hand, almost everyone looks at the weather forecast before stepping out of the house. Weather forecast is incredibly challenging because it is very strongly dependent on location - coastal versus inland, tropical versus temperate, equator versus sub-Arctic. And weather forecast still is an incredible challenge. The most powerful form of weather prediction is the storm watch. This is where a storm is tracked from the time it builds up to the time is finally dies. The number of variables that are involved in weather forecasting is simply mind-boggling.
With the above background on examples of simulators that everyone is exposed to, let us examine the specialized simulators that this book is all about. A simulation is a powerful and convenient way to monitor and understand a physical process. Simulation involves representing the physical process in the form of mathematical equations which is called a mathematical model and solving them over time. The inputs to the mathematical model are the factors which affect the physical process, and the outputs of the mathematical model are the physical quantities that are of interest for a variety of reasonsefficiency, safety, endurance, and many others.
1.2 The Reason for Simulation
There a number of reasons why engineers will want to simulate the system that they are designing, and we shall examine them one after the other. The simplest reason for simulating a physical system is because computers powerful enough to perform simulations are now ubiquitous. Fifty years back, in order to run a computer program, an engineer would have to buy processing time on a mainframe. This processing time was quite expensive, and therefore physical systems were simulated when building a prototype was very expensive. Nowadays, a reasonably powerful computer can be purchased off the shelf, and engineering software can be installed on almost every machine. So the answer to the first question Why do you want to simulate a physical system? is Why not?.
To describe the other advantages, let us progress gradually from simple cases to more complex cases. If an engineer was designing a system that was fairly simple say for example a pendulum or a battery operated miniature motor, it is possible to skip the simulation step and by trial and error arrive at the final design. However, every design needs parts and supplies to be procured as well as structures fabricated. A change in the design will only result in repeated procurement of new supplies and parts and modifications to the structures or completely new structures becoming necessary. A simulation of these simple systems could significantly reduce the number of designs if not produce a working design at the first step. The result is lower time to finalize the design, lower cost of the project, and less waste.
Now for a more complicated case, let us suppose that an engineer needs to design a power supply. This design requires a detailed understanding of the power requirements of the intended load, the topology of the power supply that will achieve such quality of power, and finally a method to control devices such that this power quality is always achieved. In such an engineering project, there are several components and variables that need to chosen appropriately and furthermore, the choice of one affects the other. For example, a filter at the output of the power supply can be chosen such that it ensures that the power provided at the output is of a desired nature. However, this filter might make the control of the power device extremely complex or even impossible. If this engineering project were to be directly realized at the prototype stage, it would be very time-consuming, involving several changes and possibly even failures that could result in damaged components. On the other hand, a simulation would help to eliminate the designs that are completely infeasible. The final implementation stage could then require minor modifications as the simulation may not have taken some physical phenomenon into account. Simulation has thus helped to significantly simplify the design process.