CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[Other] A novel Chemistry Load Balancing Model for OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 4 Post By janGaertner

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2024, 04:00
Default A novel Chemistry Load Balancing Model for OpenFOAM
  #1
New Member
 
Jan Gaertner
Join Date: Nov 2017
Posts: 20
Rep Power: 8
janGaertner is on a distinguished road
Hello OpenFOAM Community,


I am excited to announce the release of a new load balancing library designed to enhance the performance of OpenFOAM's reacting solvers in parallel environments. This development is particularly significant for those working with reacting flows, where the computational cost of calculating chemical reaction rates can greatly surpass the costs associated with integrating convective and diffusive transport terms.


Key Features and Benefits:
  • Seamless Integration: The library integrates smoothly with any OpenFOAM reacting solver that incorporates finite-rate chemistry, ensuring ease of use and wide applicability.
  • Support for Standard and TDAC Models: It is compatible with both the standard and dynamic adaptive chemistry model (TDAC) in OpenFOAM.
  • Enhanced Load Balancing: By exchanging information between processes via MPI calls and tracking ODE solution times on a cell level, the library significantly addresses load imbalances.
Performance Validation:
The library has been rigorously validated on various test cases, including extensive simulations on the HLRS Hawk super-computer using up to 8000 cores. Results show that the load-balanced models produce identical results to the original unbalanced models, with substantial speed-up factors:
  • Up to 6x speed-up for the standard model.
  • Up to 5x speed-up for the TDAC model.
Despite observing non-linear scaling at lower cell counts per processor, the load-balanced models consistently outperform their unbalanced counterparts, making them the preferred choice for reacting flow simulations in OpenFOAM.

Conclusion:
This novel load balancing library is a robust solution for improving the efficiency of reacting flow simulations in OpenFOAM, especially in massively parallel computing environments. I encourage the community to explore and integrate this library into their simulations to take advantage of the significant performance enhancements it offers.
Feel free to reach out for more information or if you have any questions. Your feedback and experiences with the library would be greatly appreciated!


Best regards,


Jan Gärtner


GitHub Link: https://github.com/ITV-Stuttgart/loa...ChemistryModel
Article Link: https://www.sciencedirect.com/scienc...10465524002455
janGaertner is offline   Reply With Quote

Old   August 26, 2024, 12:44
Lightbulb Add custom chemistry model to the load balancing library
  #2
New Member
 
Join Date: May 2019
Posts: 6
Rep Power: 7
Pablok is on a distinguished road
Dear Jan,
Thanks for your contribution. I tested the library on a simple test case and it worked well.
I have my own custom chemistry model and would like to add it to the list of models available for the load balancing library. Do you know how much of an effort it would be for me to modify the source file for this task?

Best regards,

Pablo
Pablok is offline   Reply With Quote

Old   August 28, 2024, 03:52
Default
  #3
New Member
 
Jan Gaertner
Join Date: Nov 2017
Posts: 20
Rep Power: 8
janGaertner is on a distinguished road
Hello Pablo,


The chemistry model is the main part of the library. If you add additional functionalities on top of the StandardModel, hence you can derive from it, it should be fairly straight forward. Otherwise it will require substantial changes to your existing model to use these functions. On the other hand, if you modify the ODE solver it is plug-and-play.



Best to see how it is done for the TDAC model, which builds on top of the StandardModel.



Best,


Jan
janGaertner is offline   Reply With Quote

Old   August 28, 2024, 05:11
Default
  #4
New Member
 
Join Date: May 2019
Posts: 6
Rep Power: 7
Pablok is on a distinguished road
Thanks for your quick answer.

My chemistry model is a copy of the StandardChemistryModel with some modification (it calls Cantera to calculate the reaction rates).
So I was thinking that I could create a class like loadBalancedMyChemistryModel by copying the loadBalancedChemistryModel class, change the name in the files, modify the macro in makeLoadBalancedChemistrySolverTypes.H and try to compile the library.

I'll give it a try and see if it works.

Best,

Pablo
Pablok is offline   Reply With Quote

Old   August 28, 2024, 05:30
Default
  #5
New Member
 
Jan Gaertner
Join Date: Nov 2017
Posts: 20
Rep Power: 8
janGaertner is on a distinguished road
Hello Pablo,


it seems you replace OpenFOAMs ODE integration by calling the Cantera function to solve the concentration. This should be then fairly easy to integrate. Copy the loadBalancedChemistryModel, call it e.g., loadBalancedCanteraChemistryModel and then replace in the solveCell function the solve command in Line 392-398 in LoadBalancedChemistryModel.C.


Best of luck,


Jan
janGaertner is offline   Reply With Quote

Old   August 28, 2024, 09:20
Default
  #6
New Member
 
Join Date: May 2019
Posts: 6
Rep Power: 7
Pablok is on a distinguished road
Hi Jan,
I just compiled the load balancing library with my chemistry model and it seems to work. I just tested it on 4 cores for a 1D flame simulation, I guess I have to try it with 100+ cores if I want to observe a speed up of the computational time.
Thanks for your help and feedback!

Pablo
Pablok is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions about solar load model ( How to define albedo, when is view factor needed?) B_R_Khan OpenFOAM Running, Solving & CFD 0 January 10, 2022 02:16
Does solar load model accommodate diffuse radiations? B_R_Khan OpenFOAM Verification & Validation 2 January 10, 2022 01:28
Load Balancing Algorithm Accidental_Apoptosis Main CFD Forum 2 June 15, 2017 12:57
The problem of Stiff Chemistry Solver in Multiphase model shenzhou1987 FLUENT 1 January 11, 2016 02:52
about Subgrid-scale model impecca OpenFOAM Running, Solving & CFD 4 December 20, 2013 10:36


All times are GMT -4. The time now is 22:17.