fvMeshDistributors: New library for mesh redistribution and load-balancing
Basic support is now provided for dynamic mesh redistribution, particularly for
load-balancing. The mesh distributor is selected in the optional 'distributor'
entry in dynamicMeshDict, for example in the
multiphase/interFoam/RAS/floatingObject tutorial case when run in parallel using
the new Allrun-parallel script
distributor
{
type decomposer;
libs ("libfvMeshDistributors.so");
redistributionInterval 10;
}
in which the 'decomposer' form of redistribution is selected to call the mesh
decomposition method specified in decomposeParDict to re-decompose the mesh for
redistribution. The redistributionInterval entry specifies how frequently mesh
redistribution takes place, in the above every 10th time-step. An optional
maxImbalance entry is also provided to control redistribution based on the cell
distribution imbalance:
Class
Foam::fvMeshDistributor::decomposer
Description
Dynamic mesh redistribution using the decomposer
Usage
Example of single field based refinement in all cells:
\verbatim
distributor
{
type decomposer;
libs ("libfvMeshDistributors.so");
// How often to redistribute
redistributionInterval 10;
// Maximum fractional cell distribution imbalance
// before rebalancing
maxImbalance 0.1;
}
\endverbatim
Currently mesh refinement/unrefinement and motion with redistribution is
supported but many aspects of OpenFOAM are not yet and will require further
development, in particular fvModels and Lagrangian.
Also only the geometry-based simple and hierarchical decomposition method are
well behaved for redistribution, scotch and ptScotch cause dramatic changes in
mesh distribution with a corresponding heavy communications overhead limiting
their usefulness or at least the frequency with which they should be called to
redistribute the mesh.
This commit is contained in:
@ -20,6 +20,8 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
stationaryWalls
|
||||
{
|
||||
type noSlip;
|
||||
|
||||
@ -20,6 +20,8 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
stationaryWalls
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
@ -20,6 +20,8 @@ internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
stationaryWalls
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
|
||||
@ -20,6 +20,8 @@ internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
stationaryWalls
|
||||
{
|
||||
type kqRWallFunction;
|
||||
|
||||
@ -20,6 +20,8 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
stationaryWalls
|
||||
{
|
||||
type nutkWallFunction;
|
||||
|
||||
@ -20,6 +20,8 @@ internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
stationaryWalls
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
|
||||
@ -20,6 +20,8 @@ internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
|
||||
stationaryWalls
|
||||
{
|
||||
type fixedValue;
|
||||
|
||||
@ -4,13 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Set application name
|
||||
application=$(getApplication)
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication subsetMesh -overwrite c0 -patch floatingObject -noFields
|
||||
runApplication setFields
|
||||
runApplication $application
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
17
tutorials/multiphase/interFoam/RAS/floatingObject/Allrun-parallel
Executable file
17
tutorials/multiphase/interFoam/RAS/floatingObject/Allrun-parallel
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication subsetMesh -overwrite c0 -patch floatingObject -noFields
|
||||
runApplication setFields
|
||||
|
||||
runApplication decomposePar
|
||||
runParallel $(getApplication)
|
||||
runApplication reconstructParMesh
|
||||
runApplication reconstructPar
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -120,4 +120,14 @@ topoChanger
|
||||
}
|
||||
|
||||
|
||||
distributor
|
||||
{
|
||||
type decomposer;
|
||||
|
||||
libs ("libfvMeshDistributors.so");
|
||||
|
||||
redistributionInterval 10;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -46,6 +46,7 @@ boundary
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
|
||||
atmosphere
|
||||
{
|
||||
type patch;
|
||||
@ -54,11 +55,18 @@ boundary
|
||||
(4 5 6 7)
|
||||
);
|
||||
}
|
||||
|
||||
floatingObject
|
||||
{
|
||||
type wall;
|
||||
faces ();
|
||||
}
|
||||
|
||||
internal
|
||||
{
|
||||
type internal;
|
||||
faces ();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
numberOfSubdomains 8;
|
||||
|
||||
method scotch;
|
||||
method hierarchical;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
@ -25,7 +25,7 @@ simpleCoeffs
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
n (2 2 2);
|
||||
order xyz;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user