diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0/U b/tutorials/incompressible/simpleFoam/pipeCyclic/0/U index 838bd119c2..90ac0e556a 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0/U +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0/U @@ -20,34 +20,25 @@ internalField uniform (1 0 0); boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type codedFixedValue; - value uniform (1 0 0); name swirl; - code #{ + code + #{ const vector axis(1, 0, 0); - - vectorField v(2.0*this->patch().Cf() ^ axis); - v.replace(vector::X, 1.0); + vectorField v(2*this->patch().Cf() ^ axis); + v.replace(vector::X, 1); operator==(v); #}; + value $internalField; } outlet { - type inletOutlet; - inletValue uniform (1 0 0); - value uniform (1 0 0); - } - side1 - { - type cyclicAMI; - value uniform (1 0 0); - } - side2 - { - type cyclicAMI; - value uniform (1 0 0); + type pressureInletOutletVelocity; + value $internalField; } walls { diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0/epsilon b/tutorials/incompressible/simpleFoam/pipeCyclic/0/epsilon index 6d341c89a9..57df7a586c 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0/epsilon +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0/epsilon @@ -20,32 +20,24 @@ internalField uniform 1; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type turbulentMixingLengthDissipationRateInlet; mixingLength 0.5; - value uniform 1; + value $internalField; } outlet { type inletOutlet; - inletValue uniform 1; - value uniform 1; - } - side1 - { - type cyclicAMI; - value uniform 1; - } - side2 - { - type cyclicAMI; - value uniform 1; + inletValue $internalField; + value $internalField; } walls { type epsilonWallFunction; - value uniform 1; + value $internalField; } } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0/k b/tutorials/incompressible/simpleFoam/pipeCyclic/0/k index 74cb9afc63..41635d4f61 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0/k +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0/k @@ -20,27 +20,19 @@ internalField uniform 1; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.05; - value uniform 1; + value $internalField; } outlet { type inletOutlet; - inletValue uniform 1; - value uniform 1; - } - side1 - { - type cyclicAMI; - value uniform 1; - } - side2 - { - type cyclicAMI; - value uniform 1; + inletValue $internalField; + value $internalField; } walls { diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0/nuTilda b/tutorials/incompressible/simpleFoam/pipeCyclic/0/nuTilda deleted file mode 100644 index 4301f76bd6..0000000000 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0/nuTilda +++ /dev/null @@ -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; - } -} - - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0/nut b/tutorials/incompressible/simpleFoam/pipeCyclic/0/nut index a5f1c147f5..0bfc131007 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0/nut +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0/nut @@ -20,30 +20,22 @@ internalField uniform 0; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type calculated; - value uniform 0; + value $internalField; } outlet { type calculated; - value uniform 0; - } - side1 - { - type cyclicAMI; - value uniform 0; - } - side2 - { - type cyclicAMI; - value uniform 0; + value $internalField; } walls { type nutkWallFunction; - value uniform 0; + value $internalField; } } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0/p b/tutorials/incompressible/simpleFoam/pipeCyclic/0/p index f3d0421e51..f3069c22aa 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0/p +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0/p @@ -20,24 +20,17 @@ internalField uniform 0; boundaryField { + #includeEtc "caseDicts/setConstraintTypes" + inlet { type zeroGradient; } outlet { - type fixedValue; - value uniform 0; - } - side1 - { - type cyclicAMI; - value uniform 0; - } - side2 - { - type cyclicAMI; - value uniform 0; + type totalPressure; + p0 uniform 0; + value $internalField; } walls { diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean index 13feeccd09..27276efe95 100755 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allclean @@ -4,8 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm -f 0/cellDist - -cleanCase +cleanCase & rm -f 0/cellDist #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun index c6061c78a7..2ba339d534 100755 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun @@ -9,7 +9,7 @@ application=$(getApplication) runApplication blockMesh runApplication topoSet -runApplication refineHexMesh c0 -overwrite +runApplication refineHexMesh c0 -noFields -overwrite runApplication decomposePar -cellDist runParallel $application diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict b/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict index fcc2bc0e2d..bdbdb6cf4c 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/blockMeshDict @@ -15,37 +15,32 @@ FoamFile convertToMeters 1; -//- Half angle of wedge in degrees -halfAngle 45.0; +//- Half angle of wedge in degrees [deg] +halfAngle 45; //- Radius of pipe [m] radius 0.5; - -radHalfAngle #calc "degToRad($halfAngle)"; -y #calc "$radius*sin($radHalfAngle)"; -minY #calc "-1.0*$y"; -z #calc "$radius*cos($radHalfAngle)"; -minZ #calc "-1.0*$z"; +//- Derived quantities +radHalfAngle #calc "degToRad($halfAngle)"; +y #calc "$radius*sin($radHalfAngle)"; +z #calc "$radius*cos($radHalfAngle)"; vertices ( - (0.0 0.0 0) //0 - (10 0.0 0) - (10 0.0 0) //2 - (0.0 0.0 0) - - (0.0 $minY $z) //4 - (10 $minY $z) - (10 $y $z) //6 - (0.0 $y $z) - + (0 0 0) + (10 0 0) + (10 0 0) + (0 0 0) + (0 #neg $y $z) + (10 #neg $y $z) + (10 $y $z) + (0 $y $z) ); 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 @@ -76,30 +71,22 @@ boundary side1 { - type cyclicAMI; + type cyclic; neighbourPatch side2; faces ( (0 1 5 4) ); - - transformType rotational; - rotationAxis (1 0 0); - rotationCentre (0 0 0); } side2 { - type cyclicAMI; + type cyclic; neighbourPatch side1; faces ( (7 6 2 3) ); - - transformType rotational; - rotationAxis (1 0 0); - rotationCentre (0 0 0); } walls diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes index df0499fda4..eb463af919 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSchemes @@ -30,9 +30,6 @@ divSchemes div(phi,U) bounded Gauss limitedLinearV 1; div(phi,k) 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; } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSolution b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSolution index 16e6db0e32..56920be7ce 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/fvSolution @@ -20,7 +20,6 @@ solvers { solver GAMG; smoother GaussSeidel; - tolerance 1e-06; relTol 0.05; } @@ -28,7 +27,6 @@ solvers pFinal { $p; - tolerance 1e-06; relTol 0; } @@ -43,23 +41,14 @@ solvers "(U|k|epsilon)Final" { $U; - tolerance 1e-05; relTol 0; } } -PIMPLE -{ - nOuterCorrectors 4; - nCorrectors 1; - nNonOrthogonalCorrectors 0; - pRefCell 0; - pRefValue 0; -} - SIMPLE { nNonOrthogonalCorrectors 0; + residualControl { p 1e-2; diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/system/topoSetDict b/tutorials/incompressible/simpleFoam/pipeCyclic/system/topoSetDict index 10a9c68551..e7a84abacc 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/system/topoSetDict +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/system/topoSetDict @@ -16,44 +16,12 @@ FoamFile 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; type cellSet; action new; - source faceToCell; - set f0; - option any; - } - - - { - name walls; - type faceSet; - action new; - source patchToFace; - patch "walls"; - } - { - name c0; - type cellSet; - action delete; - source faceToCell; - set walls; - option any; + source boxToCell; + box (-1e6 -1e6 -1e6)(1e6 -0.15 0.3); } );