{"id":6489,"date":"2023-05-15T12:08:00","date_gmt":"2023-05-15T10:08:00","guid":{"rendered":"https:\/\/eurocc.nscc.sk\/?p=6489"},"modified":"2024-03-13T14:48:53","modified_gmt":"2024-03-13T13:48:53","slug":"use-case-prenos-a-optimalizacia-pracovneho-toku-cfd-vypoctov-v-hpc-prostredi","status":"publish","type":"post","link":"https:\/\/eurocc.nscc.sk\/en\/use-case-prenos-a-optimalizacia-pracovneho-toku-cfd-vypoctov-v-hpc-prostredi\/","title":{"rendered":"<strong>Use case: Transfer and optimization of CFD calculations workflow in HPC environment<\/strong>"},"content":{"rendered":"<div class=\"is-layout-flow wp-block-group alignfull posts-all\"><div class=\"wp-block-group__inner-container\">\n<div class=\"is-layout-flex wp-container-4 wp-block-columns\">\n<div class=\"is-layout-flow wp-block-column\" style=\"flex-basis:60%\">\n<div class=\"is-layout-flow wp-block-group alignfull\"><div class=\"wp-block-group__inner-container\">\n<p><strong>Use case: Transfer and optimization of CFD calculations workflow in HPC environment<\/strong><\/p>\n<\/div><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p class=\" translation-block\"><strong>Authors:<\/strong> J\u00e1n \u0160koviera (National competence centre for HPC), Sylvain Suzan (Shark Aero)<\/p>\n\n\n\n<p>Shark Aero company designs and manufactures ultralight sport aircrafts with two-seat tandem cockpit. For design development they use popular open-source software package openFOAM [1]. The CFD (Computational Fluid Dynamics) simulations use the Finite Elements Method (FEM). After the model is created, using a Computer-Aided Design (CAD) software, it is divided into discrete cells, so called \u201cmesh\u201d. The simulation accuracy depends strongly on mesh density with the computational and memory requirements rising with the 3rd power of the number of mesh vertices.\nFor some simulations the computational demands can be a limiting factor. Workflow transfer into High-Performance Computing (HPC) environment was thus undertaken, with a special focus on the investigation of computational tasks parallelization efficiency for a given model type.<\/p>\n\n\n\n<p> <\/p>\n<\/div>\n\n\n\n<div class=\"is-layout-flow wp-block-column\">\n<figure class=\"wp-block-image alignwide size-full\"><a href=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/0C1A5470_500px.jpeg\"><img decoding=\"async\" loading=\"lazy\" width=\"500\" height=\"333\" src=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/0C1A5470_500px.jpeg\" alt=\"\" class=\"wp-image-6522\" srcset=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/0C1A5470_500px.jpeg 500w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/0C1A5470_500px-300x200.jpeg 300w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/0C1A5470_500px-18x12.jpeg 18w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>METHODS<\/p>\n\n\n\n<p>Compute nodes with 2x6 cores Intel Xeon L5640 @ 2,27GHz, 48 GB RAM and 2x500 GB were used for this project. All calculations were done in a standard HPC environment using Slurm job scheduling system. This is an acceptable solution for this type of workloads where no real-time response, nor immediate data processing is required. \nFor the CFD simulations we continued to use OpenFOAM &amp; ParaView version 9 software packages. Singularity container was used for calculation deployment, having in mind potential transfer of the workload to another HPC system. The speed-up gained from just straight away transfer to HPC system was approximately 1.5x compared to a standard laptop.<\/p>\n\n\n\n<p>PARALLLEZIATION<\/p>\n\n\n\n<p>Parallelized task execution can increase the speed of the overall calculation by utilizing more computing units concurrently. In order to parallelize the task one needs to divide the original mesh into domains - parts that will be processed concurrently. The domains, however, need to communicate through the processor boundaries i.e. domain sides where the original enclosing mesh was divided. The larger the processor boundary surface is, the more I\/O is required in order to resolve the boundary conditions.  Processor boundary communication is facilitated by the distributed memory Message Passing Interface (MPI) protocol, and the distinction of difference between CPU cores and different compute nodes is abstracted from user. This leads to certain limitations on efficient usage of many parallel processes, since overly parallelized job executions can be actually slower due to communication and I\/O bottlenecks. Therefore, the domains should be created in a way that minimizes the processor boundaries. One possible strategy is to divide the original mesh only in co-planar direction with the smallest side of the original enclosing mesh. By careless division into domains the amount of data to be transferred increases beyond reasonable measure. If one chooses to use mesh division in multiple axes, one also creates more processor boundaries.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/shark1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/shark1.png\" alt=\"\" class=\"wp-image-6491\" width=\"610\" height=\"342\" srcset=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/shark1.png 780w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/shark1-300x168.png 300w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/shark1-768x431.png 768w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/shark1-18x10.png 18w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 1: Illustration of mesh segmentation. The encoling mesh is represented by the transparent boxes<\/figcaption><\/figure><\/div>\n\n\n<p>The calculations were done in four steps: enclosing mesh creation, mesh segmentation, model inclusion and CFD simulation. The enclosing mesh creation was done using the blockMesh utility, the mesh segmentation step was done using the decomposePar utility, the model inclusion was done using the snappyHexMesh program, and the CFD simulation itself was done using SimpleFoam. The most computationally demanding step is snappyHexMesh. This is understandable from the fact that while in CFD simulation the calculation needs to be done several times for every edge of the mesh and every iteration, in the case of model inclusion one creates new vertices and deletes old ones based on the position of vertices in the model mesh. This requires creation of an \u201coctree\u201d (partitioning of three-dimensional space by recursively subdividing it into eight octants), repeated inverse search, and octree re-balancing. Each of these processes is N*log(N) in the best case scenario, and N2 in the worst case, N being the number of vertices. The CFD itself scales linearly with number of edges, i.e. \u201cclose to\u201d linearly with N (only spatially proximate nodes are interconnected).<sup>2<\/sup> We developed a workflow that creates a number of domains that can be directly parallelized with the yz plane (x being the axis of the aircraft nose), which simplifies the decision making. After inclusion of a new model, one can simply specify the number of domains and run the calculation minimizing the human intervention needed to parallelize the calculation.<\/p>\n\n\n\n<p>RESULTS AND CONCLUSION<\/p>\n\n\n\n<p>The relative speedup of the processes calculation is mainly determined by limited I\/O. If the computational tasks are well below I\/O bounding, the speed is inversely proportional to the number of domains. In less demanding calculations, i.e. for small models, the processes can be easily over-parallelized.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/image.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/image-1024x333.png\" alt=\"\" class=\"wp-image-6492\" width=\"610\" height=\"198\" srcset=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/image-1024x333.png 1024w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/image-300x98.png 300w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/image-768x250.png 768w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/image-18x6.png 18w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2023\/06\/image.png 1032w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><\/a><figcaption class=\"wp-element-caption\">Figure 2: Dependence of real elapsed time on the number of processes for snappyHexMesh and simpleFoam.  In the case of simpleFoam the time starts to diverge for more than 8 processes, since the data trafic overcomes the paralellization advantage. Ideal scaling shows the theoretical time needed to finish the calculation, if the data trafic and processor boundary condition resolution was not involved.<\/figcaption><\/figure><\/div>\n\n\n<p>Once the mesh density is high enough, the time to calculate the CFD step is also inversely proportional to the number of parallel processes. As shown in the second pair of figures with twofold increase in mesh density, the calculations are below I\/O bounding even in the CFD step. Even though the CFD step is in this case comparatively fast to the meshing process, the calculation of long time intervals could make it the most time consuming step.<\/p>\n\n\n\n<p>The aircraft parts design requires simulations of a relatively small models multiple times under altering conditions. The mesh density needed for these simulations falls into medium category.\nWhen transferring the calculations to the HPC environment, we had to take into account the real needs of the end user in terms of model size, mesh density and result precision required. There are several advantages of using HPC:<\/p>\n\n\n\n<ul>\n<li>The end user is relieved of the need to maintain his own computational capacities.<\/li>\n\n\n\n<li>Even when restricted to single thread jobs the simulations can be offloaded to HPC with high speed up, making even very demanding and precise calculations feasible.<\/li>\n\n\n\n<li>For even more effective calculations a simple way of utilizing parallelization was determined, for this particular workload. Limitations of parallel runs for the given use case and conditions were identified. The total increase in speed that was reached in practical conditions is 7.3 times. The speed-up generally grows with the calculation complexity and the mesh precision.<\/li>\n<\/ul>\n\n\n\n<p><br><\/p>\n\n\n\n<div class=\"is-horizontal is-content-justification-center is-layout-flex wp-container-5 wp-block-buttons\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/en\/success-stories\/\">Success-Stories<\/a><\/div>\n<\/div>\n\n\n<div class=\"display-posts-listing grid\"><div class=\"listing-item\"><a class=\"image\" href=\"https:\/\/eurocc.nscc.sk\/en\/umela-inteligencia-a-superpocitac-ako-nova-zbran-proti-ekologickym-havariam\/\"><img width=\"300\" height=\"164\" src=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/kl-300x164.png\" class=\"attachment-medium size-medium wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/kl-300x164.png 300w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/kl-768x420.png 768w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/kl-18x10.png 18w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/kl.png 908w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a class=\"title\" href=\"https:\/\/eurocc.nscc.sk\/en\/umela-inteligencia-a-superpocitac-ako-nova-zbran-proti-ekologickym-havariam\/\"><strong>Artificial Intelligence and a Supercomputer as a New Weapon Against Environmental Disasters<\/strong><\/a> <span class=\"date\">26 Mar<\/span> <span class=\"excerpt-dash\">-<\/span> <span class=\"excerpt\">Scientists from Nitra, Slovakia are teaching machines to predict industrial failures before they can cause damage. Thanks to collaboration with the European supercomputer LUMI, they have developed a digital \u201cguardian\u201d capable of detecting pipeline leaks or manufacturing faults with high accuracy\u2014helping protect both the environment and companies\u2019 budgets.<\/span><\/div><div class=\"listing-item\"><a class=\"image\" href=\"https:\/\/eurocc.nscc.sk\/en\/slovensky-recept-na-ferove-hry-a-spokojnejsich-hracov\/\"><img width=\"300\" height=\"164\" src=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/lm-300x164.png\" class=\"attachment-medium size-medium wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/lm-300x164.png 300w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/lm-768x420.png 768w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/lm-18x10.png 18w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/lm.png 908w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a class=\"title\" href=\"https:\/\/eurocc.nscc.sk\/en\/slovensky-recept-na-ferove-hry-a-spokojnejsich-hracov\/\"><strong>The Slovak Recipe for Fair Play and Happier Players<\/strong><\/a> <span class=\"date\">25 Mar<\/span> <span class=\"excerpt-dash\">-<\/span> <span class=\"excerpt\">Do you play games on your phone and sometimes feel like the game just doesn\u2019t understand you? Experts from Nitra, Slovakia, have used one of Europe\u2019s most powerful supercomputers to change that. Thanks to the Italian giant named Leonardo, they discovered how to read between the lines of player behavior and make the gaming experience more personal and fair.<\/span><\/div><div class=\"listing-item\"><a class=\"image\" href=\"https:\/\/eurocc.nscc.sk\/en\/mestske-budovy-sa-prebudzaju-slovenska-ai-dava-druhu-sancu-nevyuzitym-priestorom\/\"><img width=\"300\" height=\"200\" src=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/NextUseAI-300x200.png\" class=\"attachment-medium size-medium wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/NextUseAI-300x200.png 300w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/NextUseAI-1024x683.png 1024w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/NextUseAI-768x512.png 768w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/NextUseAI-18x12.png 18w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/NextUseAI-1200x800.png 1200w, https:\/\/eurocc.nscc.sk\/wp-content\/uploads\/2026\/03\/NextUseAI.png 1536w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a class=\"title\" href=\"https:\/\/eurocc.nscc.sk\/en\/mestske-budovy-sa-prebudzaju-slovenska-ai-dava-druhu-sancu-nevyuzitym-priestorom\/\"><strong>Urban buildings awaken: Slovak AI gives a second chance to underused spaces<\/strong><\/a> <span class=\"date\">4 Mar<\/span> <span class=\"excerpt-dash\">-<\/span> <span class=\"excerpt\">Mest\u00e1 s\u00fa \u017eiv\u00e9 organizmy, ktor\u00e9 sa neust\u00e1le menia. Mnoh\u00ed z n\u00e1s v\u0161ak v susedstve denne m\u00ed\u0148aj\u00fa tich\u00e9 svedectv\u00e1 minulosti \u2013 pr\u00e1zdne \u0161koly, nevyu\u017e\u00edvan\u00e9 \u00farady \u010di ch\u00e1traj\u00face verejn\u00e9 budovy. \u010casto si kladieme ot\u00e1zky: \u201ePre\u010do je to zatvoren\u00e9?\u201c \u201eNemohol by tu by\u0165 rad\u0161ej denn\u00fd stacion\u00e1r, \u0161k\u00f4lka alebo kult\u00farne centrum?\u201c<\/span><\/div><\/div>\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Shark Aero company designs and manufactures ultralight sport aircrafts with two-seat tandem cockpit. For design development they use popular open-source software package openFOAM [1]. The CFD (Computational Fluid Dynamics) simulations use the Finite Elements Method (FEM). After the model is created, using a Computer-Aided Design (CAD) software, it is divided into discrete cells, so called \u201cmesh\u201d. The simulation accuracy depends strongly on mesh density with the computational and memory requirements rising with the 3rd power of the number of mesh vertices.\nFor some simulations the computational demands can be a limiting factor. Workflow transfer into High-Performance Computing (HPC) environment was thus undertaken, with a special focus on the investigation of computational tasks parallelization efficiency for a given model type.<\/p>","protected":false},"author":2,"featured_media":6497,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"templates\/template-full-width.php","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/posts\/6489"}],"collection":[{"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/comments?post=6489"}],"version-history":[{"count":11,"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/posts\/6489\/revisions"}],"predecessor-version":[{"id":8529,"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/posts\/6489\/revisions\/8529"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/media\/6497"}],"wp:attachment":[{"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/media?parent=6489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/categories?post=6489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eurocc.nscc.sk\/en\/wp-json\/wp\/v2\/tags?post=6489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}