[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-117904-en":3,"doc-seo-117904-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},117904,16904993612988,"Olivia Brown","https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd",6,"Technology","Efficiently Combining Machine Learning with OpenFOAM using SmartSim","A technical slide deck presenting an end-to-end workflow to integrate machine learning into OpenFOAM simulations using SmartSim. It covers SmartRedis as the data hub for CFD data, training artifacts, and model inference, coordinated through an orchestrator and parallel execution. The material explains concurrent online training/inference requirements, data movement strategies for high-performance clusters, and native support via Python/C/C++/Fortran. It also introduces online post-processing and real-time visualization, including ML-driven mesh motion approximation.","EFFICIENTLY COMBINING MACHINE LEARNING WITH OPENFOAM USING SMARTSIM  \n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner 1  \nUNRESTRICTED  \n© Thomas Ott  \nOPENFOAM + ML  \nwhile (runTime.loop())  \nMPI Rank 0 MPI Rank 1  \nMPI_Rank 2 MPI_Rank 3  \nTraining Data  \n• Agglomerates training data.  \n• Trains on other resources.  \n• Online training and inference requires synchronization with the CFD algorithm.  \n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner 2  \nUNRESTRICTED  \nOPENFOAM + ML  \nSmartRedis Client API  \n| \u003Cbr> |\n| --- |\n| \u003Cbr>Data Sources |\n\n\n| \u003Cbr> |\n| --- |\n| \u003Cbr>Code / Scripts |\n\nSmartRedis Client API  \nML Model Training  \nPYTORCH | TENSORFLOW | ONNX  \n• SmartSim Orchestrator: implementing the computational workflow.  \n• Jupyter Notebook or Python script – straightforward API.  \n• SmartRedis Database: CFD data, trained model, model inference.  \n• Straightforward API in C++ (!!) and Python.  \n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner 3  \nUNRESTRICTED  \nSMARTSIM  \n\n| \u003Cbr>\u003Cbr>Native Parallel / HighPerformance Code\u003Cbr>Python | C | C++ | Fortran\u003Cbr>\u003Cbr> | Apollo, Cray XC/EX/CS, or other supported cluster system |  |\n| --- | --- | --- |\n|  | \u003Cbr>TCP |  |\n| Data Movement Strategies  SmartRedis DataSets\u003Cbr>~~ ~~ [[0.2, 0.7, 0.3, 0.9], [0.1, 0.5, 0.1, 0.2], [0.9, 0.7, 0.8, 0.9]\u003Cbr>\u003Cbr>Data Movement Strategies\u003Cbr>]~~ ~~ |  |  |\n\n|  |  |\n| --- | --- |\n| Filesystem |  |\n\n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner 4  \nUNRESTRICTED  \nONLINE POST-PROCESSING  \nUser Story: I want to perform postprocessing while my simulation is running.  \n• We usually use OpenFOAM Function Objects to store secondary data (CSV) to disk.  \n• This data can be processed by a Jupyter Notebook and visualized and quantified live.  \nOpenFOAM Function Object   \nOpenFOAM Function Object  \nRank1  \nSecondary  \nData  \nSecondary  \nData  \nVisualize secondary data and stop bad simulations early  \n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner 5  \nUNRESTRICTED  \nONLINE POST-PROCESSING  \nUser Story: I want to perform postprocessing using Machine Learning while my simulation is running.  \n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner 6  \nUNRESTRICTED  \nONLINE POST-PROCESSING  \nUser Story: I want to perform visualization and analysis while my simulation is running • Stream data from C/C++/Fortran simulations for analysis, and visualization in real time.  \n• No reading/writing to slow shared filesystems  \nTensors  \n(e.g., Fortran Arrays)  \n\n| Shard 1\u003Cbr>\u003Cbr>Shard n\u003Cbr> | \u003Cbr>Data Scripts\u003Cbr>.\u003Cbr>.\u003Cbr>.\u003Cbr>\u003Cbr>Data Scripts |\n| --- | --- |\n\nT . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner  \nUNRESTRICTED  \nSmartRedis Python Clientsends/gets Tensors as NumPy arrays  \nOn-demand concurrent workflows  \n7  \nONLINE ML MESH MOTION  \n• User story: I want to use a machine-learning model to approximate mesh-motion displacements.  \nwhile (runTime.loop())  \nMPI Rank 0 MPI Rank 1  \nMPI_Rank 2 MPI_Rank 3  \nTraining Data  \n• Agglomerates training data.  \n• Trains on other resources.  \n• Online training and inference requires synchronization with the CFD algorithm.  \n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner  \nUNRESTRICTED  \n9  \nDATA FLOW PATTERNS  \n• Concurrent data flow patterns require synchronization.  \n• Synchronization is done by checking for data (e.g. keys) in the SmartRedis database.  \n28.07.2023 T . M a ric | A . E. Shao | A . Rigazzi | M. Ellis | E. Fade li | A . Weiner 10  \nUNRESTRICTED","cbCairgzcXc6ptaO","https://ap.wps.com/l/cbCairgzcXc6ptaO","pdf",1608265,1,25,"English","en",105,"# OpenFOAM + ML\n## SmartSim Orchestrator and SmartRedis Client API\n## ML Model Training (PyTorch/TensorFlow/ONNX)\n## Data Movement Strategies and High-Performance Execution\n## Online Post-Processing with ML\n## Online ML Mesh Motion\n## Data Flow Patterns and Synchronization","[{\"question\":\"How does SmartSim integrate machine learning with OpenFOAM during simulation runtime?\",\"answer\":\"SmartSim provides the computational workflow orchestration while SmartRedis stores CFD data, the trained model, and inference results. The system runs concurrently with the CFD algorithm and coordinates training/inference needs.\"},{\"question\":\"What is the role of SmartRedis in the ML workflow?\",\"answer\":\"SmartRedis acts as the centralized database for CFD datasets and ML artifacts, enabling synchronized online training and inference. Client APIs move data between the simulation and ML components.\"},{\"question\":\"How is online post-processing performed while the simulation is running?\",\"answer\":\"Instead of relying only on slow filesystem writes, the workflow streams secondary data for real-time processing. Jupyter notebooks can visualize and quantify results live, and ML can be used for tasks like mesh-motion approximation.\"}]","Efficiently Combining Machine Learning with OpenFOAM using SmartSim | PDF",1785680300,63,{"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},"efficiently-combining-machine-learning-with-openfoam-using-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/technology/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/efficiently-combining-machine-learning-with-openfoam-using-smartsim/117904/",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-02",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},"How does SmartSim integrate machine learning with OpenFOAM during simulation runtime?","Question",{"text":75,"@type":76},"SmartSim provides the computational workflow orchestration while SmartRedis stores CFD data, the trained model, and inference results. The system runs concurrently with the CFD algorithm and coordinates training/inference needs.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"What is the role of SmartRedis in the ML workflow?",{"text":80,"@type":76},"SmartRedis acts as the centralized database for CFD datasets and ML artifacts, enabling synchronized online training and inference. Client APIs move data between the simulation and ML components.",{"name":82,"@type":73,"acceptedAnswer":83},"How is online post-processing performed while the simulation is running?",{"text":84,"@type":76},"Instead of relying only on slow filesystem writes, the workflow streams secondary data for real-time processing. Jupyter notebooks can visualize and quantify results live, and ML can be used for tasks like mesh-motion approximation.","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,113,118,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":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":111,"slug":112},50,"technology",{"id":114,"doc_module":4,"doc_module_name":46,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":119,"doc_module":4,"doc_module_name":46,"category_name":120,"show_sort_weight":121,"slug":122},8,"Research & Report",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"]