A Simulation Is Worth a Million Words
Dear engineers and scientists!? My friends and I have written a book you might find helpful in raising the effectiveness of your communications about complex technical topics to the next level.
Let me start by explaining the challenge and value of explaining complex systems to others with a story. Then, I will describe a software tool in a category you are unlikely to have used. I will tell you about our book on the topic and how we came to write it. Finally, I will give a few tips on how to get started.
Explaining Complex Systems with a Simulator
It is essential to start with an explanation of the problem that we would like to help you solve.?? Since you might not think about the challenge like I do, let me begin with a story containing an example.
These events happened at least 27 years ago.? I was a global SME responsible for an area of practice in petroleum engineering called 'gas lift,' which involves injecting gas into an oil well to improve its production rate.? The details are not that important to the story.? ?The important part is that gas lift is a dynamic system that is difficult to explain with graphs or a slide deck.? I tried using animated PowerPoints and drawing and redrawing curves on a whiteboard.? But, the system's behavior depends on many decisions an engineer can make, resulting in several different behavior modes.? Making a single wrong decision in this area can easily cost $2 million annually in lost revenue.? I struggled to explain everything necessary to my engineers.
At the time, the best visualization to explain this system behavior was a physical simulation.? The best was 18 meters tall (shoutout to research genius Wim der Kinderen ).? The second best was a refrigerator-sized box, which required a noisy air compressor and electrical supply.? Neither of these could represent all the essential parts of the gas lift system.? [The tall one didn't show the unloading of a string of gas lift valves.? The short one didn't explain gas lift instability.] They were expensive.? The short version was $100k in 1996 dollars if I recall correctly.?
Such was the value of improving understanding among engineers and operational staff that my friend, the late great Cleon Dunham, sought approval to spend $600k to build six short models and distribute them to various training centers worldwide.
I knew there might be a much better solution, and my solution would be no surprise to those who know me. I have been writing small applications to support my engineering work throughout my career. If I could create a realistic enough visual simulation of the system, it could be available to every engineer, illustrate all the necessary aspects, and be interactive and, therefore, engaging.?
I had recently discovered Macromedia Flash (later Adobe Flash, now defunct). I used it quickly to create such a simulator and then successfully used it in many production engineering classes for over a decade.?? ??
I wrote the more advanced successor of that app (available for free) in Python using the PyGame library.??
With simulators like this, it is straightforward to build exercises and assessments, starting from basic concepts through advanced troubleshooting by including examples and problem cases to solve.? These simulations work well in classrooms, virtual teaching, coaching, self-education, demonstrations, etc.
Lessons Learned by Building ?a Simulator
The first thing I learned from building my simulator was its incredible communication power. ?It isn't easy to express the power of learning from a simulator. ??Suddenly, knowledge appears where it was absent an hour before.? A few of us had this experience when working with the 18m tall simulator.? Another instructor and I started with the idea of building a few exercises based on common situations, and we agreed that the whole topic might be too complicated for the average student.? After an hour's work with the simulator, we started talking about how our exercises might be too trivial for them.? When we realized the change in our attitude, we almost couldn't believe how much we must have learned in such a short time.?
If that example seems farfetched, I am sure you can imagine a classroom instructor teaching pilots to fly using a whiteboard and slide decks rather than having them practice in an actual plane or expensive simulator room. A tool like Microsoft Flight Simulator would be a cheap and efficient tool. Trainee pilots could spend far more hours with it. It would be available at all times to all students, could train for a multitude of different aircraft, and help teach all sorts of dangerous and rare examples before the pilots graduated to their specialized training, the expensive simulator, and the real world.??
The second thing I learned from building my original simulator was that it wasn't an epic challenge.? It wasn't trivial either, but a substantial fraction of time building every simulation was my discovery and learning about whatever I was simulating.? You think you understand something well enough, but then you learn more about creating the simulator. ?For this reason, I encourage you to build a simulation yourself rather than contracting it out—you won’t know what you don’t know when you start.
Simulations can show physical systems, data visualizations, or both. You may have a challenging presentation to your board or management committee. ?Perhaps you have a new idea and are marketing it. ?Maybe you are presenting to a grant committee or a thesis committee.? You may want to show how something is used, assembled, or disassembled. ?Perhaps you need to explain how an accident happened.? You may have to explain statics and dynamics, fluid mechanics, biological systems, springs, pulleys, or other systems for a living. ?Perhaps you want to build an educational and entertaining game. ?
I'm sure engineers and scientists could benefit from hyper-efficient ways to communicate complex topics. Human civilization does better when engineers and scientists communicate their ideas better. So, I would like to help you learn how to build visual simulations.?
To that end, my friends and I wrote a book about building simulations and other apps using a fantastic new(ish) software tool.
A Simulation Creator You Can Learn
There are many animation tools, such as PowerPoint.? However, a visual simulation is an animation that combines a simulated model of behavior and usually interactive controls that affect the animation.
For making apps, I loved Macromedia Flash, and before that, I loved Visual Basic, Basic, and (I didn't love) Fortran.? Each was a leap ahead regarding what I could do in my limited time as a hobbyist software designer while being a full-time engineer, consultant, and instructor.? After the 'death' of Flash, I had been searching for a decent replacement for a few years.? I loved Python, but the best library I could find for visual simulations was PyGame, which was not great.? I also spent as much time making a package out of Python to distribute an executable for my simulations as I did creating the simulation.? Ultimately, I had a fiddly kluge where any change would break my whole compile.? I didn't dare update any of the software or move it around on my computer.
A year later, I stumbled across the Godot Engine.? Godot is a strange name for a video game development engine, with many game developer fans always waiting for the next version (as in 'Waiting for Godot,' the name of a famous play).?? By the time I found it, Godot had found a solid user base and had plenty of documentation and video examples for how to build video games.?
Why would a video game development engine be a logical basis for creating engineering and scientific simulations?? Video games require high framerates of complex animations, hundreds or thousands at a time.? They need attractive interfaces and cross-platform deployment.? Video games are highly innovative bespoke creations requiring a highly flexible development engine.? Someone creating a simulation would benefit from having these traits packaged into a system that is easy to use.? The other major game engines, Unreal Engine and Unity, are focused on 3D environments and are quite complex.? Godot can do 3D, too, but it is much easier to start with 2D, which is Godot's strong point.
领英推荐
Godot is free, open source, and in very active development. Its scripting language is close to Python (there is also a C# version). Much of what you find on my LinkedIn Articles Link Page are small apps and simulators made with Godot (like my GLVtoy, Error Propagation Simulator, or Tailgating Game ).???I am especially pleased with the triviality of creating shareable versions of my software using Godot.? Godot can instantly export to Windows and Linux; if you are on a Mac, you can export from there, too.? It can also create mobile phone apps, although those require the Android or iOS development kits. I love that it also exports to HTML5, which allows my simulations to run in modern browsers (even on a phone) with zero installation required.
It is easy enough that I have used Godot to teach a dozen or so children some basic computer programming.? The best thing about this tool for learning is that they can quickly make something they designed themselves and see it work.? One of my students (shoutout to Jy’Mir Fuller ) entered the Congressional App Challenge using an app he made in a few hours.? To teach them, I wrote several step-by-step guides where the next part of the story starts.
Virtual Team Writes A Book
Entirely by coincidence, in 2021, I happened across a post from a friend I worked with just before I retired, ThankGod Egbe .? ThankGod now lives in Nigeria and leads an engineering and software company, CypherCrescent .? In his early career, he wrote a book, Visual Basic for Scientists and Engineers, and sold it to university students in Nigeria.? He had posted a copy of the cover on LinkedIn.? I thought it was great that he had written a book and joked that he should update it to Python for Scientists and Engineers.?? He joked that maybe I should help.? We connected via Zoom, and I mentioned the Godot Engine, my new favorite.? By the end of the call, we had the idea to write a book showing how to create various simulations using Godot.? ThankGod introduced me to an incredible computational scientist/petroleum engineer, Lateef K. , who also works for CypherCrescent and is responsible for cool math and functions explained in the book and some of the projects.??
We each created a few simulations and then collaborated to develop their step-by-step building instructions. Some of the projects are quick and easy, and some are more complex. Then, we had to edit and rewrite everything several times, as usual when authoring a book. We never met in person throughout the process, but by working in our spare time and meeting virtually almost every week, we built all the example projects, wrote all the step-by-step guides, and published our book in three years!
The book includes these ten projects:
The book also contains instructions on downloading all the resources and code for all projects.
How to Get Our Book
We decided to release two versions of our book.?
One version, Create Compelling Science & Engineering Simulations Using the Godot Engine, is now available on paper and Kindle on Amazon.? The link is here .
Do you want a preview of our book? Here is the first part, covering the installation and building of the first project.
The other is called Fundamentals of Science and Engineering Simulations Using the Godot Engine and will be published in Nigeria this fall. It primarily targets the university and research community.?
Try Building with Godot Engine
Whether or not you get our book, I encourage you to try Godot Engine.? It is free and is a small download .? ?I currently work with version 3 (used in the book), which has the most online tutorials and exports to HTML5 very well.? Version 4 has many improvements for 3D games and is still under active development.
Before I build anything in Godot, I like to draw it out first.? I might make a quick sketch on paper.? Then, I use some sort of computer art tool.? I have used the free app Inkscape for years.? Now, I use Affinity Designer .? A vector art tool like this will allow you to draw and modify your app interface, re-scale it as you like, and export any bits you need into your Godot project folder.? For example, let's assume you want to build a clock simulation.
?
You would draw the face of the clock and the hands in Inkscape, then export each independently into the Godot project folder.?? The next step is to place them in the Godot interface. Then, write code to control each hand of the clock and add any user-interface components.? Because Godot is a game engine, you can get creative with all elements, including the interface.? When you are happy with your simulation, go to one menu and select the systems to which you want to export your stand-alone versions for distribution.
I hope you find this article interesting and consider making small apps and simulations using the Godot Engine.
If you have any questions or want some help, please feel free to contact me, [email protected]
COMPLETION AND WORKOVER ENGINEER
3 个月Still have your ESP demo simulator that prompt me to look for you on the internet. Those tools are great specially when you a toddler in the industry. Thank you very much for what you, old folk bring to the industry
Sourcing Manager at ServiceHouse B.V.
3 个月So nice to read this. I was one of the students working with Wim on building the physical 17 meter simulator. I still have great memories of that time. The possibility to get insights very quickly, once you can actually experiment with different parameters, is very valuable. Especially that we could actually see the process become stable through the transparent tubes was really helpful. I do understand that a software simulator is easier in training people worldwide, and that that was the logical next step. Especially that computing power in that time very quickly became more accessible. Thanks for sharing, loved to read it!
Consultant Petroleum Engineer
3 个月I’d forgotten how much fun we had with this stuff. This made an old man very happy.
Retired Gas Lift Specialist
3 个月Burney, your simulations have helped thousands (not an exaggeration) to learn about oil and gas processes. Thanks, and don't stop.
Collector, creator, and disseminator of good ideas.
3 个月If you want a preview, here is the first part of the book. https://waringworld.com/simbook/first%20part%20of%20Godot%20simulation%20book.pdf