ENH: cyclicACMI: optional scaling with PatchFunction1.

Added 'scale' parameter to cyclicACMI. Scales the amount of 'coupledness' (= mask). Allows opening/closing without mesh motion.
This commit is contained in:
Mattijs Janssens
2020-12-11 10:35:06 +00:00
committed by Andrew Heather
parent 6ac8e06245
commit 31ecf0d732
20 changed files with 1499 additions and 162 deletions

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
outlet1
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
outlet2
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
wall
{
type noSlip;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 200;
boundaryField
{
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.01; // 1cm - half channel height
value $internalField;
}
outlet1
{
type inletOutlet;
inletValue $internalField;
}
outlet2
{
type inletOutlet;
inletValue $internalField;
}
wall
{
type epsilonWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,54 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.2;
boundaryField
{
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05; // 5% turbulent intensity
value $internalField;
}
outlet1
{
type inletOutlet;
inletValue $internalField;
}
outlet2
{
type inletOutlet;
inletValue $internalField;
}
wall
{
type kqRWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nuTilda;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type zeroGradient;
}
outlet1
{
type zeroGradient;
}
outlet2
{
type zeroGradient;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type calculated;
value uniform 0;
}
outlet1
{
type calculated;
value uniform 0;
}
outlet2
{
type calculated;
value uniform 0;
}
wall
{
type nutkWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type uniformTotalPressure;
p0 table
(
(0 40)
//(0 10)
//(1 40)
);
}
outlet1
{
type fixedValue;
value uniform 10;
}
outlet2
{
type fixedValue;
value uniform 10;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object s;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet1
{
type inletOutlet;
inletValue $internalField;
}
outlet2
{
type inletOutlet;
inletValue $internalField;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,2 @@
Copy of T-junction tutorial. Inlet on left, one outlet at bottom, one at top.
cyclicAMI with switching to direct flow to bottom or top

View File

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

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,284 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// outlet1
// +-+
// | |
// | |
// | |
// | |
// +-----------+-+
// |inlet | |
// +-----------+-+
// | |
// | |
// | |
// | |
// +-+
// outlet2
scale 1;
vertices
(
(0.0 -0.01 0) //0
(0.19 -0.01 0)
(0.19 0.01 0) //2
(0.0 0.01 0)
(0.19 -0.02 0) //4
(0.23 -0.02 0)
(0.23 0.02 0) //6
(0.19 0.02 0)
(0.2 -0.21 0) //8
(0.22 -0.21 0)
(0.22 -0.02 0) //10
(0.2 -0.02 0)
(0.2 0.02 0) //12
(0.22 0.02 0)
(0.22 0.21 0) //14
(0.2 0.21 0)
// Z
(0.0 -0.01 0.01)
(0.19 -0.01 0.01)
(0.19 0.01 0.01)
(0.0 0.01 0.01)
(0.19 -0.02 0.01)
(0.23 -0.02 0.01)
(0.23 0.02 0.01)
(0.19 0.02 0.01)
(0.2 -0.21 0.01)
(0.22 -0.21 0.01)
(0.22 -0.02 0.01)
(0.2 -0.02 0.01)
(0.2 0.02 0.01)
(0.22 0.02 0.01)
(0.22 0.21 0.01)
(0.2 0.21 0.01)
);
blocks
(
// inlet block
hex (0 1 2 3 16 17 18 19) inlet (50 5 1) simpleGrading (1 1 1)
// central block
hex (4 5 6 7 20 21 22 23) central (12 12 1) simpleGrading (1 1 1)
// bottom block
hex (8 9 10 11 24 25 26 27) bottom (5 50 1) simpleGrading (1 1 1)
// top block
hex (12 13 14 15 28 29 30 31) top (5 50 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(0 16 19 3)
);
}
outlet1
{
type patch;
faces
(
(8 9 25 24)
);
}
outlet2
{
type patch;
faces
(
(14 15 31 30)
);
}
walls
{
type wall;
faces
(
// Inlet block
(2 3 19 18)
(0 1 17 16)
// Central block
(5 6 22 21)
// Bottom block
(8 24 27 11)
(9 10 26 25)
// Top block
(13 14 30 29)
(12 28 31 15)
);
}
// Inlet - Central block
// ~~~~~~~~~~~~~~~~~~~~~
inlet_central_couple
{
type cyclicACMI;
neighbourPatch central_inlet_couple;
nonOverlapPatch inlet_central_blockage;
faces
(
(1 2 18 17)
);
}
inlet_central_blockage
{
type wall;
faces
(
(1 2 18 17)
);
}
central_inlet_couple
{
type cyclicACMI;
neighbourPatch inlet_central_couple;
nonOverlapPatch central_inlet_blockage;
faces
(
(4 20 23 7)
);
}
central_inlet_blockage
{
type wall;
faces
(
(4 20 23 7)
);
}
// Central - Bottom block
// ~~~~~~~~~~~~~~~~~~~~~
bottom_central_couple
{
type cyclicACMI;
neighbourPatch central_bottom_couple;
nonOverlapPatch bottom_central_blockage;
faces
(
(10 11 27 26)
);
scale table
(
(0.00 1.0)
(0.20 1.0)
(0.30 0.0)
);
}
bottom_central_blockage
{
type wall;
faces
(
(10 11 27 26)
);
}
central_bottom_couple
{
type cyclicACMI;
neighbourPatch bottom_central_couple;
nonOverlapPatch central_bottom_blockage;
faces
(
(4 5 21 20)
);
}
central_bottom_blockage
{
type wall;
faces
(
(4 5 21 20)
);
}
// Central - Top block
// ~~~~~~~~~~~~~~~~~~~
top_central_couple
{
type cyclicACMI;
neighbourPatch central_top_couple;
nonOverlapPatch top_central_blockage;
faces
(
(12 13 29 28)
);
scale table
(
(0.00 0.0)
(0.20 0.0)
(0.30 1.0)
);
}
top_central_blockage
{
type wall;
faces
(
(12 13 29 28)
);
}
central_top_couple
{
type cyclicACMI;
neighbourPatch top_central_couple;
nonOverlapPatch central_top_blockage;
faces
(
(6 7 23 22)
);
}
central_top_blockage
{
type wall;
faces
(
(6 7 23 22)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pimpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.4;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.01;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep yes;
maxCo 1.0;
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 3;
method scotch;
// ************************************************************************* //

View File

@ -0,0 +1,57 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(phi,s) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,74 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
tolerance 1e-06;
relTol 0.01;
smoother GaussSeidel;
}
"(pFinal|pcorrFinal)"
{
solver GAMG;
tolerance 1e-06;
relTol 0;
smoother GaussSeidel;
}
"(U|k|epsilon|s)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-05;
relTol 0.1;
}
"(U|k|epsilon|s)Final"
{
$U;
tolerance 1e-05;
relTol 0;
}
}
PIMPLE
{
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
correctPhi false;
}
relaxationFactors
{
equations
{
"U.*" 1;
"k.*" 1;
"epsilon.*" 1;
"s.*" 1;
}
}
// ************************************************************************* //