In Search of Reduced Simulation Times
The EcoPot project aims to identify more efficient container geometries for cooking food on open fires with gathered wood, as one billion people on earth still cook.
To achieve this, certain assumptions are made to generate geometric models in CAD format. We hope to explore heat transfer fins, pot curvature, and lid design. Our goal is to design a pot that will require less wood to be gathered.
Once these geometries are created, their efficiency is evaluated through simulations in OpenFOAM. The main drawback is that these simulations require significant processing time.
Initially, the project was developed on a MacBook Pro with 12 M4-Pro cores, but simulations could take days or even weeks. For this reason, the AWS EC2 service was used, which allows running virtual machines provided by Amazon.
The first tests were carried out using a 16-CPU (32 vCPU) instance; however, due to the complexity of the simulated cases, execution times remained high.
To further reduce simulation times, a 64-CPU (128 vCPU) instance was tested, and a benchmarking analysis was performed.
Benchmarking
For this analysis, the coolingSphere tutorial included in OpenFOAM 12 (openfoam.org version) was used. This case was chosen because it shares similar characteristics with the ones intended to be simulated.
The simulation time in the controlDict file was modified from 1 s to 30 s, considering that this interval would yield more representative results and highlight performance differences.
Additionally, the decomposeParDict dictionary was adjusted to enable the desired number of processor cores. The results obtained are presented in the following table:

It is important to note that ClockTime was considered instead of ExecutionTime, since both values were very similar. These results were plotted, and the corresponding trend lines were observed:

It is observed that the difference between both configurations is not significant, approximately 500 s, which is negligible.
To complement the analysis, the equations of the trend lines for each case were calculated to estimate the total time required for a longer simulation.
The formulas of the linear trend lines shown in the graph are:
16-CPU: y = 84.828x – 2.6345
64-CPU: y = 67.531x + 1.3655
where x represents the simulated time and y the execution time.
Costs
For a simulated time of 2000 s, the estimated execution times are:
16-CPU: 47.13 h
64-CPU: 37.52 h
Considering AWS costs (1.3 USD/h for 16 CPUs and 5 USD/h for 64 CPUs), the total expenses would be:
16-CPU: 61.26 USD
64-CPU: 187.59 USD
This represents a very significant cost difference for a reduction of only about 10 hours in simulation time.
In conclusion, alternative strategies will continue to be explored to accelerate simulations, prioritizing the balance between cost and performance within the context of this project. For OpenFOAM on the Cooling Sphere case, using more than 16 cores does not provide a useful or linear speed-up.
Interested in joining the EcoPot project? Reach out to Public Invention Founder and Head Coach Robert Read, or Volunteer Coordinator Miriam Castillo.
If interested in spreading the word about this project, feel free to use the Spanish translation of this article.

