mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: createPatch: demo case
This commit is contained in:
@ -0,0 +1,102 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2406 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// outlet1
|
||||
// +-+
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// +-----------+-+
|
||||
// |inlet | |
|
||||
// +-----------+-+
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// | |
|
||||
// +-+
|
||||
// outlet2
|
||||
|
||||
scale 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(0.19 -0.02 0) //4=0
|
||||
(0.23 -0.02 0) //5=1
|
||||
(0.23 0.02 0) //6=2
|
||||
(0.19 0.02 0) //7=3
|
||||
|
||||
(0.19 -0.02 0.01) //20=4
|
||||
(0.23 -0.02 0.01) //21=5
|
||||
(0.23 0.02 0.01) //22=6
|
||||
(0.19 0.02 0.01) //23=7
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
// central block
|
||||
hex (0 1 2 3 4 5 6 7) central (12 12 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
central_walls
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
// Central block
|
||||
(1 2 6 5)
|
||||
);
|
||||
}
|
||||
|
||||
// Connecting to inlet
|
||||
central_inlet
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
|
||||
// Connecting to bottom
|
||||
central_bottom
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
);
|
||||
}
|
||||
|
||||
// Connecting to top
|
||||
central_top
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(2 3 7 6)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2406 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application pimpleFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,178 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2406 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object createPatchDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Do a synchronisation of coupled points after creation of any patches.
|
||||
// Note: this does not work with points that are on multiple coupled patches
|
||||
// with transformations (i.e. cyclics).
|
||||
pointSync false;
|
||||
|
||||
// Patches to create.
|
||||
patches
|
||||
(
|
||||
// Central <-> Inlet
|
||||
// ~~~~~~~~~~~~~~~~~
|
||||
|
||||
{
|
||||
//- Master side patch
|
||||
name central_inlet_couple;
|
||||
patchInfo
|
||||
{
|
||||
type cyclicACMI;
|
||||
nonOverlapPatch central_inlet_blockage;
|
||||
neighbourPatch inlet_central_couple;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (central_inlet);
|
||||
}
|
||||
{
|
||||
//- Blockage
|
||||
name central_inlet_blockage;
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (central_inlet);
|
||||
}
|
||||
|
||||
{
|
||||
//- Master side patch
|
||||
name inlet_central_couple;
|
||||
patchInfo
|
||||
{
|
||||
type cyclicACMI;
|
||||
nonOverlapPatch inlet_central_blockage;
|
||||
neighbourPatch central_inlet_couple;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (inlet_couple);
|
||||
}
|
||||
{
|
||||
//- Blockage
|
||||
name inlet_central_blockage;
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (inlet_couple);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Central <-> Bottom
|
||||
// ~~~~~~~~~~~~~~~~~~
|
||||
|
||||
{
|
||||
//- Master side patch
|
||||
name central_bottom_couple;
|
||||
patchInfo
|
||||
{
|
||||
type cyclicACMI;
|
||||
nonOverlapPatch central_bottom_blockage;
|
||||
neighbourPatch bottom_central_couple;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (central_bottom);
|
||||
}
|
||||
{
|
||||
//- Blockage
|
||||
name central_bottom_blockage;
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (central_bottom);
|
||||
}
|
||||
|
||||
{
|
||||
//- Master side patch
|
||||
name bottom_central_couple;
|
||||
patchInfo
|
||||
{
|
||||
type cyclicACMI;
|
||||
nonOverlapPatch bottom_central_blockage;
|
||||
neighbourPatch central_bottom_couple;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (bottom_couple);
|
||||
}
|
||||
{
|
||||
//- Blockage
|
||||
name bottom_central_blockage;
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (bottom_couple);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Central <-> Top
|
||||
// ~~~~~~~~~~~~~~~
|
||||
|
||||
{
|
||||
//- Master side patch
|
||||
name central_top_couple;
|
||||
patchInfo
|
||||
{
|
||||
type cyclicACMI;
|
||||
nonOverlapPatch central_top_blockage;
|
||||
neighbourPatch top_central_couple;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (central_top);
|
||||
}
|
||||
{
|
||||
//- Blockage
|
||||
name central_top_blockage;
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (central_top);
|
||||
}
|
||||
|
||||
{
|
||||
//- Master side patch
|
||||
name top_central_couple;
|
||||
patchInfo
|
||||
{
|
||||
type cyclicACMI;
|
||||
nonOverlapPatch top_central_blockage;
|
||||
neighbourPatch central_top_couple;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (top_couple);
|
||||
}
|
||||
{
|
||||
//- Blockage
|
||||
name top_central_blockage;
|
||||
patchInfo
|
||||
{
|
||||
type wall;
|
||||
}
|
||||
constructFrom patches;
|
||||
patches (top_couple);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2406 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) Gauss limitedLinearV 1;
|
||||
|
||||
turbulence Gauss limitedLinear 1;
|
||||
div(phi,k) $turbulence;
|
||||
div(phi,epsilon) $turbulence;
|
||||
div(phi,nuTilda) $turbulence;
|
||||
div(phi,s) $turbulence;
|
||||
div(phi,R) $turbulence;
|
||||
div(R) Gauss linear;
|
||||
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,73 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2406 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2406 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name central_inlet_A;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
patch central_inlet_A;
|
||||
}
|
||||
{
|
||||
name inlet_couple_A;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
patch inlet_couple_A;
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user