tutorials: pipeCyclic: Overhaul
The refinement cell set is now generated directly using boxToCell. The mesh now uses cyclic, rather than cyclicAMI, patches so that propagation of the refinement across the coupling can be tested. Field files have been simplified by using #includeEtc to set constraints. A best practice velocity/pressure specification has been set for the outlet boundary. Unused fields and settings have been removed.
This commit is contained in:
@ -20,34 +20,25 @@ internalField uniform (1 0 0);
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type codedFixedValue;
|
type codedFixedValue;
|
||||||
value uniform (1 0 0);
|
|
||||||
name swirl;
|
name swirl;
|
||||||
code #{
|
code
|
||||||
|
#{
|
||||||
const vector axis(1, 0, 0);
|
const vector axis(1, 0, 0);
|
||||||
|
vectorField v(2*this->patch().Cf() ^ axis);
|
||||||
vectorField v(2.0*this->patch().Cf() ^ axis);
|
v.replace(vector::X, 1);
|
||||||
v.replace(vector::X, 1.0);
|
|
||||||
operator==(v);
|
operator==(v);
|
||||||
#};
|
#};
|
||||||
|
value $internalField;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type pressureInletOutletVelocity;
|
||||||
inletValue uniform (1 0 0);
|
value $internalField;
|
||||||
value uniform (1 0 0);
|
|
||||||
}
|
|
||||||
side1
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform (1 0 0);
|
|
||||||
}
|
|
||||||
side2
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform (1 0 0);
|
|
||||||
}
|
}
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
|
|||||||
@ -20,32 +20,24 @@ internalField uniform 1;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type turbulentMixingLengthDissipationRateInlet;
|
type turbulentMixingLengthDissipationRateInlet;
|
||||||
mixingLength 0.5;
|
mixingLength 0.5;
|
||||||
value uniform 1;
|
value $internalField;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type inletOutlet;
|
||||||
inletValue uniform 1;
|
inletValue $internalField;
|
||||||
value uniform 1;
|
value $internalField;
|
||||||
}
|
|
||||||
side1
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 1;
|
|
||||||
}
|
|
||||||
side2
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 1;
|
|
||||||
}
|
}
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type epsilonWallFunction;
|
type epsilonWallFunction;
|
||||||
value uniform 1;
|
value $internalField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,27 +20,19 @@ internalField uniform 1;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type turbulentIntensityKineticEnergyInlet;
|
type turbulentIntensityKineticEnergyInlet;
|
||||||
intensity 0.05;
|
intensity 0.05;
|
||||||
value uniform 1;
|
value $internalField;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type inletOutlet;
|
type inletOutlet;
|
||||||
inletValue uniform 1;
|
inletValue $internalField;
|
||||||
value uniform 1;
|
value $internalField;
|
||||||
}
|
|
||||||
side1
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 1;
|
|
||||||
}
|
|
||||||
side2
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 1;
|
|
||||||
}
|
}
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,48 +0,0 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Version: dev
|
|
||||||
\\/ M anipulation |
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
FoamFile
|
|
||||||
{
|
|
||||||
format ascii;
|
|
||||||
class volScalarField;
|
|
||||||
location "0";
|
|
||||||
object nuTilda;
|
|
||||||
}
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
dimensions [0 2 -1 0 0 0 0];
|
|
||||||
|
|
||||||
internalField uniform 0;
|
|
||||||
|
|
||||||
boundaryField
|
|
||||||
{
|
|
||||||
inlet
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
outlet
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
side1
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
side2
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
walls
|
|
||||||
{
|
|
||||||
type zeroGradient;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -20,30 +20,22 @@ internalField uniform 0;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value uniform 0;
|
value $internalField;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type calculated;
|
type calculated;
|
||||||
value uniform 0;
|
value $internalField;
|
||||||
}
|
|
||||||
side1
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
side2
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
}
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type nutkWallFunction;
|
type nutkWallFunction;
|
||||||
value uniform 0;
|
value $internalField;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,24 +20,17 @@ internalField uniform 0;
|
|||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
|
#includeEtc "caseDicts/setConstraintTypes"
|
||||||
|
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type zeroGradient;
|
type zeroGradient;
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type totalPressure;
|
||||||
value uniform 0;
|
p0 uniform 0;
|
||||||
}
|
value $internalField;
|
||||||
side1
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
|
||||||
side2
|
|
||||||
{
|
|
||||||
type cyclicAMI;
|
|
||||||
value uniform 0;
|
|
||||||
}
|
}
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,8 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
|||||||
# Source tutorial clean functions
|
# Source tutorial clean functions
|
||||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
|
|
||||||
rm -f 0/cellDist
|
cleanCase & rm -f 0/cellDist
|
||||||
|
|
||||||
cleanCase
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@ application=$(getApplication)
|
|||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication topoSet
|
runApplication topoSet
|
||||||
runApplication refineHexMesh c0 -overwrite
|
runApplication refineHexMesh c0 -noFields -overwrite
|
||||||
|
|
||||||
runApplication decomposePar -cellDist
|
runApplication decomposePar -cellDist
|
||||||
runParallel $application
|
runParallel $application
|
||||||
|
|||||||
@ -15,37 +15,32 @@ FoamFile
|
|||||||
|
|
||||||
convertToMeters 1;
|
convertToMeters 1;
|
||||||
|
|
||||||
//- Half angle of wedge in degrees
|
//- Half angle of wedge in degrees [deg]
|
||||||
halfAngle 45.0;
|
halfAngle 45;
|
||||||
|
|
||||||
//- Radius of pipe [m]
|
//- Radius of pipe [m]
|
||||||
radius 0.5;
|
radius 0.5;
|
||||||
|
|
||||||
|
//- Derived quantities
|
||||||
radHalfAngle #calc "degToRad($halfAngle)";
|
radHalfAngle #calc "degToRad($halfAngle)";
|
||||||
y #calc "$radius*sin($radHalfAngle)";
|
y #calc "$radius*sin($radHalfAngle)";
|
||||||
minY #calc "-1.0*$y";
|
z #calc "$radius*cos($radHalfAngle)";
|
||||||
z #calc "$radius*cos($radHalfAngle)";
|
|
||||||
minZ #calc "-1.0*$z";
|
|
||||||
|
|
||||||
vertices
|
vertices
|
||||||
(
|
(
|
||||||
(0.0 0.0 0) //0
|
(0 0 0)
|
||||||
(10 0.0 0)
|
(10 0 0)
|
||||||
(10 0.0 0) //2
|
(10 0 0)
|
||||||
(0.0 0.0 0)
|
(0 0 0)
|
||||||
|
(0 #neg $y $z)
|
||||||
(0.0 $minY $z) //4
|
(10 #neg $y $z)
|
||||||
(10 $minY $z)
|
(10 $y $z)
|
||||||
(10 $y $z) //6
|
(0 $y $z)
|
||||||
(0.0 $y $z)
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
blocks
|
blocks
|
||||||
(
|
(
|
||||||
// inlet block
|
hex (0 1 2 3 4 5 6 7) (50 5 5) simpleGrading (1 1 1)
|
||||||
hex (0 1 2 3 4 5 6 7) (50 5 5) simpleGrading (1 1 1)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
edges
|
edges
|
||||||
@ -76,30 +71,22 @@ boundary
|
|||||||
|
|
||||||
side1
|
side1
|
||||||
{
|
{
|
||||||
type cyclicAMI;
|
type cyclic;
|
||||||
neighbourPatch side2;
|
neighbourPatch side2;
|
||||||
faces
|
faces
|
||||||
(
|
(
|
||||||
(0 1 5 4)
|
(0 1 5 4)
|
||||||
);
|
);
|
||||||
|
|
||||||
transformType rotational;
|
|
||||||
rotationAxis (1 0 0);
|
|
||||||
rotationCentre (0 0 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
side2
|
side2
|
||||||
{
|
{
|
||||||
type cyclicAMI;
|
type cyclic;
|
||||||
neighbourPatch side1;
|
neighbourPatch side1;
|
||||||
faces
|
faces
|
||||||
(
|
(
|
||||||
(7 6 2 3)
|
(7 6 2 3)
|
||||||
);
|
);
|
||||||
|
|
||||||
transformType rotational;
|
|
||||||
rotationAxis (1 0 0);
|
|
||||||
rotationCentre (0 0 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
walls
|
walls
|
||||||
|
|||||||
@ -30,9 +30,6 @@ divSchemes
|
|||||||
div(phi,U) bounded Gauss limitedLinearV 1;
|
div(phi,U) bounded Gauss limitedLinearV 1;
|
||||||
div(phi,k) bounded Gauss limitedLinear 1;
|
div(phi,k) bounded Gauss limitedLinear 1;
|
||||||
div(phi,epsilon) bounded Gauss limitedLinear 1;
|
div(phi,epsilon) bounded Gauss limitedLinear 1;
|
||||||
div(phi,R) bounded Gauss limitedLinear 1;
|
|
||||||
div(R) Gauss linear;
|
|
||||||
div(phi,nuTilda) bounded Gauss limitedLinear 1;
|
|
||||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,6 @@ solvers
|
|||||||
{
|
{
|
||||||
solver GAMG;
|
solver GAMG;
|
||||||
smoother GaussSeidel;
|
smoother GaussSeidel;
|
||||||
|
|
||||||
tolerance 1e-06;
|
tolerance 1e-06;
|
||||||
relTol 0.05;
|
relTol 0.05;
|
||||||
}
|
}
|
||||||
@ -28,7 +27,6 @@ solvers
|
|||||||
pFinal
|
pFinal
|
||||||
{
|
{
|
||||||
$p;
|
$p;
|
||||||
tolerance 1e-06;
|
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,23 +41,14 @@ solvers
|
|||||||
"(U|k|epsilon)Final"
|
"(U|k|epsilon)Final"
|
||||||
{
|
{
|
||||||
$U;
|
$U;
|
||||||
tolerance 1e-05;
|
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PIMPLE
|
|
||||||
{
|
|
||||||
nOuterCorrectors 4;
|
|
||||||
nCorrectors 1;
|
|
||||||
nNonOrthogonalCorrectors 0;
|
|
||||||
pRefCell 0;
|
|
||||||
pRefValue 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
SIMPLE
|
SIMPLE
|
||||||
{
|
{
|
||||||
nNonOrthogonalCorrectors 0;
|
nNonOrthogonalCorrectors 0;
|
||||||
|
|
||||||
residualControl
|
residualControl
|
||||||
{
|
{
|
||||||
p 1e-2;
|
p 1e-2;
|
||||||
|
|||||||
@ -16,44 +16,12 @@ FoamFile
|
|||||||
|
|
||||||
actions
|
actions
|
||||||
(
|
(
|
||||||
{
|
|
||||||
name f0;
|
|
||||||
type faceSet;
|
|
||||||
action new;
|
|
||||||
source patchToFace;
|
|
||||||
patch "side1";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name f0;
|
|
||||||
type faceSet;
|
|
||||||
action subset;
|
|
||||||
source boxToFace;
|
|
||||||
box (0 -100 -100)(100 -0.2 100);
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name c0;
|
name c0;
|
||||||
type cellSet;
|
type cellSet;
|
||||||
action new;
|
action new;
|
||||||
source faceToCell;
|
source boxToCell;
|
||||||
set f0;
|
box (-1e6 -1e6 -1e6)(1e6 -0.15 0.3);
|
||||||
option any;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
{
|
|
||||||
name walls;
|
|
||||||
type faceSet;
|
|
||||||
action new;
|
|
||||||
source patchToFace;
|
|
||||||
patch "walls";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name c0;
|
|
||||||
type cellSet;
|
|
||||||
action delete;
|
|
||||||
source faceToCell;
|
|
||||||
set walls;
|
|
||||||
option any;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user