ENH: add non-blocking handling for cyclicAMI (#2963)

Co-authored-by: Mark Olesen <>
This commit is contained in:
mattijs
2023-08-17 16:03:05 +02:00
committed by Mark OLESEN
parent 539d538d5a
commit 69169c5abe
18 changed files with 1612 additions and 312 deletions

View File

@ -0,0 +1,93 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 0;
boundaryField
{
cyclicAMI
{
type cyclicAMI;
value $internalField;
}
// solid1
solid1_top
{
type uniformFixedValue;
uniformValue 1;
}
solid1_left
{
type zeroGradient;
}
solid1_right
{
type zeroGradient;
}
// solid2
solid2_left
{
type zeroGradient;
}
solid2_right
{
type zeroGradient;
}
solid2_bottom
{
type uniformFixedValue;
uniformValue 0;
}
// solid1
solid1_b_top
{
type uniformFixedValue;
uniformValue 1;
}
solid1_b_left
{
type zeroGradient;
}
solid1_b_right
{
type zeroGradient;
}
// solid2
solid2_b_left
{
type zeroGradient;
}
solid2_b_right
{
type zeroGradient;
}
solid2_b_bottom
{
type uniformFixedValue;
uniformValue 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,14 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
# restore0Dir
runApplication blockMesh
runApplication decomposePar
runParallel $(getApplication)
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
DT 4e-05;
// ************************************************************************* //

View File

@ -0,0 +1,269 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
vertices
(
// solid1
(-0.1 0.00 -0.05)
( 0.1 0.00 -0.05)
( 0.1 0.04 -0.05)
(-0.1 0.04 -0.05)
(-0.1 0.00 0.05)
( 0.1 0.00 0.05)
( 0.1 0.04 0.05)
(-0.1 0.04 0.05)
// solid2
(-0.1 -0.04 -0.05)
( 0.1 -0.04 -0.05)
( 0.1 0.00 -0.05)
(-0.1 0.00 -0.05)
(-0.1 -0.04 0.05)
( 0.1 -0.04 0.05)
( 0.1 0.00 0.05)
(-0.1 0.00 0.05)
// solid1_b
( 0.2 0.00 -0.05)
( 0.4 0.00 -0.05)
( 0.4 0.04 -0.05)
( 0.2 0.04 -0.05)
( 0.2 0.00 0.05)
( 0.4 0.00 0.05)
( 0.4 0.04 0.05)
( 0.2 0.04 0.05)
// solid2_b
( 0.2 -0.04 -0.05)
( 0.4 -0.04 -0.05)
( 0.4 0.00 -0.05)
( 0.2 0.00 -0.05)
( 0.2 -0.04 0.05)
( 0.4 -0.04 0.05)
( 0.4 0.00 0.05)
( 0.2 0.00 0.05)
);
blocks
(
hex (0 1 2 3 4 5 6 7) solid1 (5 10 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) solid2 (4 10 1) simpleGrading (1 1 1)
hex (16 17 18 19 20 21 22 23) solid1_b (3 7 1) simpleGrading (1 1 1)
hex (24 25 26 27 28 29 30 31) solid2_b (7 7 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
solid1_bottom
{
type cyclicAMI;
inGroups (coupleGroup);
coupleGroup coupleGroup;
faces
(
(1 5 4 0)
);
}
solid1_top
{
type wall;
faces
(
(3 7 6 2)
);
}
solid1_left
{
type wall;
faces
(
(0 4 7 3)
);
}
solid1_right
{
type wall;
faces
(
(2 6 5 1)
);
}
solid1_frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
solid2_bottom
{
type wall;
faces
(
(9 13 12 8)
);
}
solid2_top
{
type cyclicAMI;
inGroups (coupleGroup);
coupleGroup coupleGroup;
faces
(
(11 15 14 10)
);
}
solid2_left
{
type wall;
faces
(
(8 12 15 11)
);
}
solid2_right
{
type wall;
faces
(
(10 14 13 9)
);
}
solid2_frontAndBack
{
type empty;
faces
(
(8 11 10 9)
(12 13 14 15)
);
}
// block b
// ~~~~~~~
solid1_b_bottom
{
type cyclicAMI;
inGroups (coupleGroup_b);
coupleGroup coupleGroup_b;
faces
(
(17 21 20 16)
);
}
solid1_b_top
{
type wall;
faces
(
(19 23 22 18)
);
}
solid1_b_left
{
type wall;
faces
(
(16 20 23 19)
);
}
solid1_b_right
{
type wall;
faces
(
(18 22 21 17)
);
}
solid1_b_frontAndBack
{
type empty;
faces
(
(16 19 18 17)
(20 21 22 23)
);
}
solid2_b_bottom
{
type wall;
faces
(
//(9 13 12 8)
(25 29 28 24)
);
}
solid2_b_top
{
type cyclicAMI;
inGroups (coupleGroup_b);
coupleGroup coupleGroup_b;
faces
(
//(11 15 14 10)
(27 31 30 26)
);
}
solid2_b_left
{
type wall;
faces
(
//(8 12 15 11)
(24 28 31 27)
);
}
solid2_b_right
{
type wall;
faces
(
//(10 14 13 9)
(26 30 29 25)
);
}
solid2_b_frontAndBack
{
type empty;
faces
(
//(8 11 10 9)
(24 27 26 25)
//(12 13 14 15)
(28 29 30 31)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application laplacianFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 2;
deltaT 1;
//writeControl runTime;
//writeInterval 0.1;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -0,0 +1,26 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- The total number of domains (mandatory)
numberOfSubdomains 4;
//- The decomposition method (mandatory)
method hierarchical;
n (4 1 1);
// NOTE: no patch constraints!
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState; //Euler;
}
gradSchemes
{
default Gauss linear;
grad(T) Gauss linear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
laplacian(DT,T) Gauss linear corrected;
laplacian(DTV,T) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,35 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2312 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
T
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 2;
}
// ************************************************************************* //