[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-127004-en":3,"doc-seo-127004-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},127004,2336474466412,"Ezra","https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d",8,"Research & Report","Combining Machine Learning with Computational Fluid Dynamics using OpenFOAM and SmartSim","Machine learning combined with computational fluid dynamics enables improved simulations of technical and natural systems, but CFD+ML implementations are difficult at scale due to data exchange, synchronization, and heterogeneous hardware execution. This work presents an effective, scalable approach using open-source OpenFOAM and SmartSim. SmartSim’s orchestrator simplifies CFD+ML development by enabling scalable data exchange between ML and CFD clients, and demonstrates coupling OpenFOAM components with ML, including preprocessing/postprocessing, function objects, and mesh-motion solvers. An OpenFOAM sub-module with examples supports real-world application starts.","arXiv :2402 . 16196v2 [ cs .LG] 23 Apr 2024  \nCombining Machine Learning with Computational Fluid Dynamics using OpenFOAM and SmartSim  \nTomislav Maric 1*†, Mohammed Elwardi Fadeli 1†, Alessandro Rigazzi2†, Andrew Shao3†, Andre Weiner4†  \n1* Mathematical Modeling and Analysis Institute, Mathematics Department, TU  \nDarmstadt, Darmstadt, Germany.  \n2 HPC&AI, Hewlett Packard Enterprise, Basel, Switzerland.  \n3 HPC&AI, Hewlett Packard Enterprise, Victoria, BC, Canada.  \n4 Institute of Fluid Mechanics, TU Dresden, Dresden, Germany.  \n*Corresponding author(s). E-mail(s): [maric@mma.tu-darmstadt.de](maric@mma.tu-darmstadt.de) ; Contributing authors: elwardi.fadeli@tu-darmstadt.de; [alessandro.rigazzi@hpe.com](alessandro.rigazzi@hpe.com) ;  \n[andrew.shao@hpe.com](andrew.shao@hpe.com) ; andre.weiner@tu-dresden.de;  \n†These authors contributed equally to this work.  \nAbstract  \nThis is the accepted preprint of the published article: [https://doi.org/10.1007/s11012-024-01797-z](https://doi.org/10.1007/s11012-024-01797-z), please refer to the published article when citing this work.  \nCombining machine learning (ML) with computational fluid dynamics (CFD) opens many possibilities for improving simulations of technical and natural systems. However, CFD+ML algorithms require exchange of data, synchronization, and calculation on heterogeneous hardware, making their implementation for large-scale problems exceptionally challenging. We provide an effective and scalable solution to developing CFD+ML algorithms using open source software OpenFOAM and SmartSim. SmartSim provides an Orchestrator that significantly simplifies the programming of CFD+ML algorithms enables scalable data exchange between ML and CFD clients. We show how to leverage SmartSim to effectively couple different segments of OpenFOAM with ML, including pre/postprocessing applications, function objects, and mesh motion solvers. We additionally provide an OpenFOAM sub-module with examples that can be used as starting points for real-world applications in CFD+ML.  \nKeywords: machine learning, computational fluid dynamics, workflow  \n1 Introduction  \nMachine learning (ML) and artificial intelligence (AI) methods are increasingly being applied to scientific research, with the field of computational fluid dynamics (CFD) being no exception. This has led to the emergence of at least two hybrid AI/numerical simulation paradigms: AI-in-the-loop and AI-outsidethe-loop. Both of these are distinguished by the coupling of an AI method with the simulation to forma new hybrdi, CFD+ML algorithm. In the case of AI-in-the-loop, the AI method is embedded within the simulation as a part of the numerical solver. For example, this could be an artificial neural network (ANN) surrogate model for sub-grid-scale physics or an ML model trained in-situ as the simulation progresses. AI-around-the-loop refers to the application of AI methods which interacts with the system  \nvia its inputs and outputs. Common examples include automated parameter tuning using black-box optimization techniques which where the simulation output forms a part of the objective function. In both cases, the most widely used programming language of choice is Python, though common ML frameworks provide C++ Application Programming Interfaces (API) as well.  \nImplementing hybrid CFD+ML algorithms in simulation codes like OpenFOAM presents challenges when operating at high-performance computing scales. This paper specifically focuses on three questions • How should ML be embedded into OpenFOAM as part of a simulation?  \n• For CPU-based codes like OpenFOAM, what computing architectures allow for efficient use of CPU and GPU resources?  \n• What are the basic workflow design patterns that can be composed to create complex CFD+ML applications?  \nThese questions have thus far inhibited the integration of AI/ML, simulation methods, and HighPerformance Computing (HPC) . While the literature (particularly in the CFD realm), has a number of exam","cbCaioA84Lz7HVHX","https://ap.wps.com/l/cbCaioA84Lz7HVHX","pdf",3711343,1,21,"English","en",105,"# Introduction\n## AI-in-the-loop vs AI-around-the-loop\n## Challenges at HPC scale\n## Loosely coupled CFD+ML design hypothesis\n## SmartSim-enabled implementation approach\n## Example hybrid CFD+ML workflows","[{\"question\":\"What are the two main CFD+ML coupling paradigms discussed in the paper?\",\"answer\":\"The paper distinguishes AI-in-the-loop, where the AI is embedded in the numerical solver, and AI-around-the-loop, where AI interacts through the simulation’s inputs and outputs.\"},{\"question\":\"Why is implementing hybrid CFD+ML algorithms challenging for large-scale problems?\",\"answer\":\"The core difficulties include exchanging data, synchronizing components, and running computations on heterogeneous hardware, especially at HPC scales.\"},{\"question\":\"How does SmartSim help build CFD+ML workflows with OpenFOAM?\",\"answer\":\"SmartSim provides an Orchestrator that simplifies programming and enables scalable data exchange between ML and CFD clients, facilitating coupling of OpenFOAM components with ML.\"}]","Combining Machine Learning with Computational Fluid Dynamics using OpenFOAM and SmartSim | PDF",1785936222,53,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"combining-machine-learning-with-computational-fluid-dynamics-using-openfoam-and-smartsim","",{"@graph":36,"@context":85},[37,54,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/combining-machine-learning-with-computational-fluid-dynamics-using-openfoam-and-smartsim/127004/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":62,"encodingFormat":61,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-05",true,{"@type":65,"interactionType":66,"userInteractionCount":4},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What are the two main CFD+ML coupling paradigms discussed in the paper?","Question",{"text":75,"@type":76},"The paper distinguishes AI-in-the-loop, where the AI is embedded in the numerical solver, and AI-around-the-loop, where AI interacts through the simulation’s inputs and outputs.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Why is implementing hybrid CFD+ML algorithms challenging for large-scale problems?",{"text":80,"@type":76},"The core difficulties include exchanging data, synchronizing components, and running computations on heterogeneous hardware, especially at HPC scales.",{"name":82,"@type":73,"acceptedAnswer":83},"How does SmartSim help build CFD+ML workflows with OpenFOAM?",{"text":84,"@type":76},"SmartSim provides an Orchestrator that simplifies programming and enables scalable data exchange between ML and CFD clients, facilitating coupling of OpenFOAM components with ML.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]