|
[Sponsors] |
Dynamic load balancing and adaptive mesh refinement |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 11, 2023, 14:18 |
Dynamic load balancing and adaptive mesh refinement
|
#1 |
New Member
Join Date: Jun 2011
Posts: 22
Rep Power: 15 |
All,
I'm running the incompressibleVoF solver module with adaptive mesh refinement in OpenFOAM 11. As the calculation proceeds, I'd like to rebalance the mesh distribution to make the best use of parallel processing. I've tried using both the "distributor" and "loadBlanacer". The snippet below is from my dynamicMeshDict, and it shows how I've defined the "loadBalancer." Code:
distributor { type loadBalancer; libs ("libfvMeshDistributors.so"); // How often to redistribute redistributeInterval 10; // Maximum fractional cell distribution imbalance // before rebalancing maxImbalance 0.1; } Encouraged a bit by the results from "loadBalancer", I tried to activate the cpuLoads debug switch in my controlDict, but this didn't do anything. Is there anyone who has succeeded in dynamically redistributing the mesh as part of an adaptive mesh refinement case? If so, I'd be very grateful for instructions, advice, or anything that might be helpful to me. Thanks, TimboJones |
|
October 2, 2023, 02:07 |
|
#2 |
New Member
Join Date: Apr 2022
Posts: 9
Rep Power: 4 |
I don't have a direct answer for you, but was searching how to best implement this in an upcoming simulation. These may be useful to us:
https://github.com/OpenFOAM/OpenFOAM...83fc482040a37c It does seem odd that the "demo case" referenced by that description does not include the maxImbalance parameter: https://github.com/OpenFOAM/OpenFOAM...ynamicMeshDict |
|
October 3, 2023, 17:43 |
|
#3 |
Member
Kellis
Join Date: Mar 2017
Posts: 39
Rep Power: 9 |
Hi Timbo,
I've been encountering the same issue with my simulations. Did you ever find a solution? I've attached a simple test case that replicates the error you are encountering. It's a solid block heated from the top with the mesh set to refine within a certain temperature range. I'm trying to use the 3rd party Zoltan library to redistribute, but am always getting this error: Code:
Courant Number mean: 2.13896e-17 max: 1.2843e-15 Selected 0 cells for refinement out of 8000. Selected 0 split points out of a possible 900. Redistributing mesh with imbalance 0.875 refinementHistory add : found refinementHistory refinementHistory add : adding refinementHistory refinementHistory apply : found refinementHistory refinementHistory apply : adding refinementHistory [2] [2] [2] --> FOAM FATAL ERROR: [2] Cannot find a internal patch in 4 ( top defaultFaces procBoundary2to0 procBoundary2to3 ) of types 4 ( wall patch processor processor ) An internal patch must be provided for the exposed internal faces. [2] [2] From function Foam::label Foam::fvMeshDistribute::findInternalPatch() const [2] in file fvMeshDistribute/fvMeshDistribute.C at line 385. [2] FOAM parallel run exiting Thanks, Kellis |
|
October 3, 2023, 19:07 |
|
#4 |
Member
Kellis
Join Date: Mar 2017
Posts: 39
Rep Power: 9 |
Following up on this after inspecting the blockMeshDict in the floatingObject tutorial case, which has the entry:
Code:
internal { type internal; faces (); } none: 231s distributor: 122s This seems like a dramatic improvement, but I set the case up as a worst-case scenario where all of the refinement happens on a physical boundary away from the initial processor boundaries. The optionalCpuLoad class used for the loadBalancing type only appears to get called by chemistryModel (and even then only when the flag is set), so I don't think you'll be able to use it in a solver that doesn't have chemistry enabled unless you want to do some coding. Check out the multicomponentFluid / counterFlowFlame2D_GRI tutorial for an example on that one. |
|
Tags |
amr, load balacing, mesh refinement |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam Combustion SIG | dlahaye | OpenFOAM Announcements from Other Sources | 0 | August 14, 2023 12:39 |
foam-extend-4.1 release | hjasak | OpenFOAM Announcements from Other Sources | 19 | July 16, 2021 06:02 |
about load balancing when using dynamicRefineFvMesh | jianfeng | OpenFOAM | 1 | May 17, 2021 10:22 |
Mesh generation toolsSierra | smith | OpenFOAM | 0 | June 29, 2006 14:16 |