diff --git a/tutorials/AMB2018-02-B/README.md b/tutorials/AMB2018-02-B/README.md index ffa1705..210a5a7 100644 --- a/tutorials/AMB2018-02-B/README.md +++ b/tutorials/AMB2018-02-B/README.md @@ -57,7 +57,16 @@ Defines the laser path, laser power, and scan speed or dwell time. constant/dynamicMeshDict ``` -Defines the dynamic mesh/refinement settings. +Defines the dynamic mesh/refinement settings and cell-count-based runtime +redistribution. + +```text +system/decomposeParDict +``` + +Selects Scotch for the initial decomposition and PT-Scotch for optional runtime +redistribution. It also enables the `refinementHistory` constraint required to +keep refinement siblings together for unrefinement. ```text system/blockMeshDict @@ -152,6 +161,17 @@ refinement The refinement region projects along the heat source path and targets a desired average cell load per processor. +Runtime redistribution is disabled by default with `type none` in +`constant/dynamicMeshDict`. Change it to `type distributor` to enable the +provided PT-Scotch configuration. The mesh distributor then checks every 10 +time steps and redistributes when an active refinement model creates more than +10% cell-count imbalance. These are starting values; production cases should +tune `redistributionInterval` and `maxImbalance` for their mesh and MPI count. + +The tutorial uses OpenFOAM's generic `distributor`, which balances cell counts. +Do not change its type to `loadBalancer`: that component requires registered +per-cell `cpuLoad` objects that AdditiveFOAM does not currently provide. + ### Coefficients `model` @@ -233,6 +253,11 @@ enabled false; `solidificationData` writes solidification events for CET analysis. `ExaCA` writes temperature history data for ExaCA input files. +The ExaCA function object supports refinement on a fixed processor +decomposition but not runtime mesh redistribution. Keep the distributor set to +`type none` in `constant/dynamicMeshDict` when combining ExaCA with an active +refinement model. + The `Allrun` script calls the reconstruction helpers after the solver finishes: ```sh diff --git a/tutorials/AMB2018-02-B/constant/dynamicMeshDict b/tutorials/AMB2018-02-B/constant/dynamicMeshDict index 5def0f0..0ba4eb7 100644 --- a/tutorials/AMB2018-02-B/constant/dynamicMeshDict +++ b/tutorials/AMB2018-02-B/constant/dynamicMeshDict @@ -36,4 +36,17 @@ topoChanger dumpLevel true; } +// Cell-count-based redistribution for parallel AMR. +// To enable, change type from "none" to "distributor". +distributor +{ + type none; + + libs ("libfvMeshDistributors.so"); + + redistributionInterval 10; + + maxImbalance 0.10; +} + // ************************************************************************* // diff --git a/tutorials/AMB2018-02-B/system/decomposeParDict b/tutorials/AMB2018-02-B/system/decomposeParDict index da6a847..bdb38ce 100644 --- a/tutorials/AMB2018-02-B/system/decomposeParDict +++ b/tutorials/AMB2018-02-B/system/decomposeParDict @@ -17,6 +17,18 @@ FoamFile numberOfSubdomains 8; -method scotch; +decomposer scotch; + +distributor ptscotch; + +libs ("libptscotchDecomp.so"); + +constraints +{ + refinementHistory + { + type refinementHistory; + } +} // ************************************************************************* //