Simulating the World Cup with Simcenter Amesim - Femto Engineering - Femto Engineering

Simulating the World Cup with Simcenter Amesim

Could engineering simulation software predict the outcome of the FIFA World Cup? We set out to find out. Using Simcenter Amesim, we built a model that simulates football matches and predicts an entire tournament. What started as a fun challenge quickly became a powerful demonstration of how Simcenter Amesim can be customized with mathematical models, state charts, Python, and APIs to simulate far more than traditional engineering systems.

From free kicks to a full tournament

During the UEFA EURO 2024 tournament, we published an article demonstrating how custom Supercomponents can be used in Simcenter Amesim to simulate a football free kick.

For this year’s FIFA World Cup, we decided to take the concept one step further.

Instead of simulating a single shot, we created a model capable of simulating complete football matches and an entire tournament. As a final challenge, we entered its predictions into the Femto Engineering World Cup prediction league to see how it would perform against human colleagues.

This article explains how the model was built and demonstrates how the flexibility and customization capabilities of Simcenter Amesim can be applied to your own engineering projects.

Building the Model

Although Simcenter Amesim does not (yet) include a football library, virtually anything that can be described mathematically can be modeled using the Signal & Control library.

The first step is determining the probability that a team scores a goal. We compare the attacking strength of one team with the defensive strength of its opponent. Since football is never entirely predictable, we also introduce an underdog factor to represent randomness.

Setting the underdog factor (R) to 1 makes the match completely random, while setting it to 0 means the outcome depends entirely on the teams’ statistics. Increasing R increases the likelihood of surprising upsets.


We add a random number generator to give a random number between zero and one every second of simulated time. When the goal chance for a team is below the randomly generated number, we add a goal to their score.

Match control with a state chart

Since in knockout phase matches there may be overtime, we set up a state chart as referee to determine the final whistle.

The state chart determines the match phase based on the time and the score difference (delta).

 

Three scenarios are possible:

·         No overtime
The state chart starts at the first half, transitions to 2nd half when the timer reaches 45 minutes, and then to end at 90 minutes

·         Overtime allowed – no draw
If extra time is enabled, the branch on the right is active. If the score different is not 0, the transition to end is made immediately.

·         Overtime allowed – draw
When the 90 minutes mark is reached and the score delta is equal to 0, the transition to the first extra time is made. Followed by the second extra time and the final whistle.

The match phase is an output variable to this state_chart. The simulation end time is set to 120 minutes, but if the match_phase equals 5 the simulation is stopped early using the STOP0 component.

Amesim App: Pre- and post-processing

Pre- and postprocessing for the model is done in a custom app.
Using the drag-and-drop App Designer, we generated the graphical user interface (GUI).

The App Designer generates the skeleton of a python program for us. We then extended it with custom functionality, including:

·         A function that uses the Python requests package to retrieve statistics from each team from an online API. The data is cached locally to limit the amount of connections to the API.

·         A function that automatically updates the Amesim model parameters based on the user selections in the interface.

·         Then a function can be called to run the simulation in x amount of times.

·         Finally, custom post-processing functions that analyze and visualize the results.

Since thousands of matches are simulated, only the final score of each simulation is stored.

The results are processed into a Win / Draw / Loss distribution and a histogram showing the frequency of every final score.

Final model

Bringing it all together, we have a model that showcases Amesim’s flexibility in a fun way.
Here is its rendition of the world cup final of Spain versus Argentina, where it expects a close matchup, with a 1-0 win for Spain as the most likely scenario.

 

At Femto, we let it fill out the office World Cup prediction league; and it achieved a solid 2nd place, beating out all but one of its human competitors.

The Simcenter Amesim (version 2604) model can be found here. Feel free to modify the model for future tournaments, experiment with different prediction strategies, or simply use it as inspiration for your own projects.

 

 

Takeaways

Simcenter Amesim is a strong simulation tool. With its strong catalogue of ready to use physical components, it is possible to simulate and solve a very wide range of engineering problems, ranging from hydraulic controls and battery thermal management to complete ship propulsion systems and rocket engines.

Even if your application is not covered by the standard component libraries, Simcenter Amesim provides the flexibility to build almost any model. As this project demonstrates, you can combine mathematical models, custom components, Python code, state charts, and Apps to simulate virtually any dynamic system. In this article we took data from an external API, but we could just as easily request data from an internal database, or from our AI chatbot of choice.

If you are interested in the Simcenter Amesim Software, or in our simulation services, do not hesitate to contact us.

 

August 5, 2026
get in touch

Do you need more information or want to discuss your project? Reach out to us anytime and we’ll happily answer your questions.

about us

At Femto Engineering we help companies achieve their innovation ambitions with engineering consultancy, software, and R&D.
We are Siemens DISW Expert Partner for Simcenter Femap, Simcenter 3D, Simcenter Amesim, Simcenter STAR-CCM+SDC verifier, Altair HyperWorks, Altair SimSolid and Altair PhysicsAI. Get in touch and let us make CAE work for you.

Privacy policy

×

Be ahead in FEA & CFD

Sign up for our newsletter to get free resources, news and updates monthly in your inbox. Share in our expertise!