From 1116ba803aa6109c095cfa5998982eebaa46b13d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 2 Dec 2018 11:14:04 +0100 Subject: [PATCH] TUT: use defaultPatch for naming instead of explicit Default_Boundary_Region - tutorials based on squareBend used Default_Boundary_Region explicitly defined since they predated the defaultPatch renaming (2008). The name 'Default_Boundary_Region' was for convenience as the default name when converting to PROSTAR or CCM formation, but can now be changed to something more generic. - define wall boundary conditions for squareBend using a general regex to allow future splitting of wall types by name. --- .../rhoPimpleFoam/RAS/squareBendLiq/0/T | 12 ++-- .../rhoPimpleFoam/RAS/squareBendLiq/0/U | 10 ++-- .../rhoPimpleFoam/RAS/squareBendLiq/0/alphat | 18 +++--- .../rhoPimpleFoam/RAS/squareBendLiq/0/epsilon | 24 ++++---- .../rhoPimpleFoam/RAS/squareBendLiq/0/k | 18 +++--- .../rhoPimpleFoam/RAS/squareBendLiq/0/nut | 22 +++---- .../rhoPimpleFoam/RAS/squareBendLiq/0/p | 10 ++-- .../RAS/squareBendLiq/system/blockMeshDict | 57 +++++++------------ .../compressible/rhoSimpleFoam/squareBend/0/T | 2 +- .../compressible/rhoSimpleFoam/squareBend/0/U | 10 ++-- .../rhoSimpleFoam/squareBend/0/alphat | 14 +++-- .../rhoSimpleFoam/squareBend/0/epsilon | 28 ++++----- .../compressible/rhoSimpleFoam/squareBend/0/k | 12 ++-- .../rhoSimpleFoam/squareBend/0/nut | 24 ++++---- .../compressible/rhoSimpleFoam/squareBend/0/p | 14 ++--- .../squareBend/system/blockMeshDict | 57 +++++++------------ .../rhoSimpleFoam/squareBendLiq/0/T | 12 ++-- .../rhoSimpleFoam/squareBendLiq/0/U | 14 +++-- .../rhoSimpleFoam/squareBendLiq/0/alphat | 18 +++--- .../rhoSimpleFoam/squareBendLiq/0/epsilon | 30 +++++----- .../rhoSimpleFoam/squareBendLiq/0/k | 18 +++--- .../rhoSimpleFoam/squareBendLiq/0/nut | 26 +++++---- .../rhoSimpleFoam/squareBendLiq/0/p | 10 ++-- .../squareBendLiq/system/blockMeshDict | 57 +++++++------------ .../incompressible/simpleFoam/squareBend/0/U | 12 ++-- .../simpleFoam/squareBend/0/epsilon | 28 ++++----- .../incompressible/simpleFoam/squareBend/0/k | 14 +++-- .../simpleFoam/squareBend/0/nut | 24 ++++---- .../incompressible/simpleFoam/squareBend/0/p | 6 +- .../squareBend/system/blockMeshDict | 57 +++++++------------ 30 files changed, 303 insertions(+), 355 deletions(-) diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/T b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/T index 237aa1ebb2..d5b4392801 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/T +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/T @@ -20,12 +20,6 @@ internalField uniform 300; boundaryField { - Default_Boundary_Region - { - type fixedValue; - value uniform 350; - } - inlet { type fixedValue; @@ -37,6 +31,12 @@ boundaryField type inletOutlet; inletValue $internalField; } + + "(?i).*walls" + { + type fixedValue; + value uniform 350; + } } // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/U b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/U index 6c34cf7113..3d8c270177 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/U +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/U @@ -20,11 +20,6 @@ internalField uniform (0 0 0); boundaryField { - Default_Boundary_Region - { - type noSlip; - } - inlet { type flowRateInletVelocity; @@ -37,6 +32,11 @@ boundaryField type pressureInletOutletVelocity; value $internalField; } + + "(?i).*walls" + { + type noSlip; + } } // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/alphat b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/alphat index 3e9116f477..1be1d97313 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/alphat +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/alphat @@ -20,23 +20,23 @@ internalField uniform 0; boundaryField { - Default_Boundary_Region - { - type compressible::alphatWallFunction; - Prt 0.85; - value uniform 0; - } - inlet { type calculated; - value uniform 0; + value $internalField; } outlet { type calculated; - value uniform 0; + value $internalField; + } + + "(?i).*walls" + { + type compressible::alphatWallFunction; + Prt 0.85; + value $internalField; } } diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/epsilon b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/epsilon index efeb88351f..1ba38d1417 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/epsilon +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/epsilon @@ -20,27 +20,27 @@ internalField uniform 200; boundaryField { - Default_Boundary_Region - { - type epsilonWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 200; - } - inlet { type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; - value uniform 200; + value $internalField; } outlet { type inletOutlet; - inletValue uniform 200; - value uniform 200; + inletValue $internalField; + value $internalField; + } + + "(?i).*walls" + { + type epsilonWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value $internalField; } } diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/k b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/k index 67ca7e8d60..8e17c0601e 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/k +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/k @@ -20,24 +20,24 @@ internalField uniform 1; boundaryField { - Default_Boundary_Region - { - type kqRWallFunction; - value uniform 1; - } - inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.05; - value uniform 1; + value $internalField; } outlet { type inletOutlet; - inletValue uniform 1; - value uniform 1; + inletValue $internalField; + value $internalField; + } + + "(?i).*walls" + { + type kqRWallFunction; + value $internalField; } } diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/nut b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/nut index cdf09029fb..06e37b0570 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/nut +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/nut @@ -20,25 +20,25 @@ internalField uniform 0; boundaryField { - Default_Boundary_Region - { - type nutkWallFunction; - Cmu 0.09; - kappa 0.41; - E 9.8; - value uniform 0; - } - inlet { type calculated; - value uniform 0; + value $internalField; } outlet { type calculated; - value uniform 0; + value $internalField; + } + + "(?i).*walls" + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value $internalField; } } diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/p b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/p index d9a7b63d62..22879d0e9a 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/p +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/0/p @@ -20,11 +20,6 @@ internalField uniform 1e5; boundaryField { - Default_Boundary_Region - { - type zeroGradient; - } - inlet { type zeroGradient; @@ -35,6 +30,11 @@ boundaryField type fixedValue; value $internalField; } + + "(?i).*walls" + { + type zeroGradient; + } } // ************************************************************************* // diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/system/blockMeshDict b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/system/blockMeshDict index 90d32fdba4..214392d34d 100644 --- a/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/system/blockMeshDict +++ b/tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq/system/blockMeshDict @@ -59,48 +59,20 @@ blocks edges ( - // block 2 - arc 1 8 ( 17.678 17.678 25) - arc 11 18 ( 17.678 17.678 -25) - arc 3 9 ( 53.033 53.033 25) - arc 13 19 ( 53.033 53.033 -25) - // block 3 - arc 7 8 ( 17.678 -17.678 25) - arc 17 18 ( 17.678 -17.678 -25) - arc 5 9 ( 53.033 -53.033 25) - arc 15 19 ( 53.033 -53.033 -25) + // block 2 + arc 1 8 (17.678 17.678 25) + arc 11 18 (17.678 17.678 -25) + arc 3 9 (53.033 53.033 25) + arc 13 19 (53.033 53.033 -25) + // block 3 + arc 7 8 (17.678 -17.678 25) + arc 17 18 (17.678 -17.678 -25) + arc 5 9 (53.033 -53.033 25) + arc 15 19 (53.033 -53.033 -25) ); boundary ( - // is there no way of defining all my 'defaultFaces' to be 'wall'? - Default_Boundary_Region - { - type wall; - faces - ( - // block0 - ( 0 1 3 2 ) - ( 11 10 12 13 ) - ( 0 10 11 1 ) - ( 2 3 13 12 ) - // block1 - ( 4 5 7 6 ) - ( 15 14 16 17 ) - ( 4 14 15 5 ) - ( 6 7 17 16 ) - // block2 - ( 1 8 9 3 ) - ( 18 11 13 19 ) - ( 3 9 19 13 ) - ( 1 11 18 8 ) - // block3 - ( 5 9 8 7 ) - ( 19 15 17 18 ) - ( 5 15 19 9 ) - ( 7 8 18 17 ) - ); - } inlet { type patch; @@ -124,4 +96,13 @@ mergePatchPairs ( ); + +// The defaultFaces == outside "walls" +defaultPatch +{ + name walls; + type wall; +} + + // ************************************************************************* // diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/T b/tutorials/compressible/rhoSimpleFoam/squareBend/0/T index 186b1a72b3..b361610943 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/T +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/T @@ -33,7 +33,7 @@ boundaryField inletValue $internalField; } - ".*" + "(?i).*walls" { type zeroGradient; } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/U b/tutorials/compressible/rhoSimpleFoam/squareBend/0/U index 5e496b5e9c..ead86e469e 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/U +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/U @@ -20,22 +20,24 @@ internalField uniform (0 0 0); boundaryField { - Default_Boundary_Region - { - type noSlip; - } inlet { type flowRateInletVelocity; massFlowRate constant 0.5; rhoInlet 0.5; // Guess for rho } + outlet { type inletOutlet; value $internalField; inletValue $internalField; } + + "(?i).*walls" + { + type noSlip; + } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/alphat b/tutorials/compressible/rhoSimpleFoam/squareBend/0/alphat index 9840e88090..098370c360 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/alphat +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/alphat @@ -20,22 +20,24 @@ internalField uniform 0; boundaryField { - Default_Boundary_Region - { - type compressible::alphatWallFunction; - Prt 0.85; - value $internalField; - } inlet { type calculated; value $internalField; } + outlet { type calculated; value $internalField; } + + "(?i).*walls" + { + type compressible::alphatWallFunction; + Prt 0.85; + value $internalField; + } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/epsilon b/tutorials/compressible/rhoSimpleFoam/squareBend/0/epsilon index 81ca69fefc..787628d16c 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/epsilon +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/epsilon @@ -20,7 +20,21 @@ internalField uniform 200; boundaryField { - Default_Boundary_Region + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 0.005; + value $internalField; + } + + outlet + { + type inletOutlet; + value $internalField; + inletValue $internalField; + } + + "(?i).*walls" { type epsilonWallFunction; Cmu 0.09; @@ -28,18 +42,6 @@ boundaryField E 9.8; value $internalField; } - inlet - { - type turbulentMixingLengthDissipationRateInlet; - mixingLength 0.005; - value $internalField; - } - outlet - { - type inletOutlet; - value $internalField; - inletValue $internalField; - } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/k b/tutorials/compressible/rhoSimpleFoam/squareBend/0/k index 8a7be5c659..973fcd1dc0 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/k +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/k @@ -20,23 +20,25 @@ internalField uniform 1; boundaryField { - Default_Boundary_Region - { - type kqRWallFunction; - value $internalField; - } inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.05; value $internalField; } + outlet { type inletOutlet; value $internalField; inletValue $internalField; } + + "(?i).*walls" + { + type kqRWallFunction; + value $internalField; + } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/nut b/tutorials/compressible/rhoSimpleFoam/squareBend/0/nut index b68ffbf2a6..1fe04552a7 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/nut +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/nut @@ -20,7 +20,19 @@ internalField uniform 0; boundaryField { - Default_Boundary_Region + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + "(?i).*walls" { type nutkWallFunction; Cmu 0.09; @@ -28,16 +40,6 @@ boundaryField E 9.8; value $internalField; } - inlet - { - type calculated; - value $internalField; - } - outlet - { - type calculated; - value $internalField; - } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/0/p b/tutorials/compressible/rhoSimpleFoam/squareBend/0/p index 9121067add..9b9fab07c7 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/0/p +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/0/p @@ -20,18 +20,16 @@ internalField uniform 110000; boundaryField { - Default_Boundary_Region - { - type zeroGradient; - } inlet { type zeroGradient; + //type mixed; - refValue $internalField; - refGradient uniform 0; - valueFraction uniform 0.3; + //refValue $internalField; + //refGradient uniform 0; + //valueFraction uniform 0.3; } + outlet { type fixedValue; @@ -49,7 +47,7 @@ boundaryField //pInf $internalField; } - ".*" + "(?i).*walls" { type zeroGradient; } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/system/blockMeshDict b/tutorials/compressible/rhoSimpleFoam/squareBend/system/blockMeshDict index 90d32fdba4..214392d34d 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/system/blockMeshDict +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/system/blockMeshDict @@ -59,48 +59,20 @@ blocks edges ( - // block 2 - arc 1 8 ( 17.678 17.678 25) - arc 11 18 ( 17.678 17.678 -25) - arc 3 9 ( 53.033 53.033 25) - arc 13 19 ( 53.033 53.033 -25) - // block 3 - arc 7 8 ( 17.678 -17.678 25) - arc 17 18 ( 17.678 -17.678 -25) - arc 5 9 ( 53.033 -53.033 25) - arc 15 19 ( 53.033 -53.033 -25) + // block 2 + arc 1 8 (17.678 17.678 25) + arc 11 18 (17.678 17.678 -25) + arc 3 9 (53.033 53.033 25) + arc 13 19 (53.033 53.033 -25) + // block 3 + arc 7 8 (17.678 -17.678 25) + arc 17 18 (17.678 -17.678 -25) + arc 5 9 (53.033 -53.033 25) + arc 15 19 (53.033 -53.033 -25) ); boundary ( - // is there no way of defining all my 'defaultFaces' to be 'wall'? - Default_Boundary_Region - { - type wall; - faces - ( - // block0 - ( 0 1 3 2 ) - ( 11 10 12 13 ) - ( 0 10 11 1 ) - ( 2 3 13 12 ) - // block1 - ( 4 5 7 6 ) - ( 15 14 16 17 ) - ( 4 14 15 5 ) - ( 6 7 17 16 ) - // block2 - ( 1 8 9 3 ) - ( 18 11 13 19 ) - ( 3 9 19 13 ) - ( 1 11 18 8 ) - // block3 - ( 5 9 8 7 ) - ( 19 15 17 18 ) - ( 5 15 19 9 ) - ( 7 8 18 17 ) - ); - } inlet { type patch; @@ -124,4 +96,13 @@ mergePatchPairs ( ); + +// The defaultFaces == outside "walls" +defaultPatch +{ + name walls; + type wall; +} + + // ************************************************************************* // diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/T b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/T index 237aa1ebb2..d5b4392801 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/T +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/T @@ -20,12 +20,6 @@ internalField uniform 300; boundaryField { - Default_Boundary_Region - { - type fixedValue; - value uniform 350; - } - inlet { type fixedValue; @@ -37,6 +31,12 @@ boundaryField type inletOutlet; inletValue $internalField; } + + "(?i).*walls" + { + type fixedValue; + value uniform 350; + } } // ************************************************************************* // diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/U b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/U index 87e347cb07..763df97a60 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/U +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/U @@ -20,21 +20,23 @@ internalField uniform (0 0 0); boundaryField { - Default_Boundary_Region - { - type noSlip; - } inlet { type flowRateInletVelocity; massFlowRate constant 5; rhoInlet 1000; // Guess for rho } + outlet { type inletOutlet; - value uniform (0 0 0); - inletValue uniform (0 0 0); + inletValue $internalField; + value $internalField; + } + + "(?i).*walls" + { + type noSlip; } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/alphat b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/alphat index 8f78e17557..0067620d6a 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/alphat +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/alphat @@ -21,21 +21,23 @@ internalField uniform 0; boundaryField { - Default_Boundary_Region - { - type compressible::alphatWallFunction; - Prt 0.85; - value uniform 0; - } inlet { type calculated; - value uniform 0; + value $internalField; } + outlet { type calculated; - value uniform 0; + value $internalField; + } + + "(?i).*walls" + { + type compressible::alphatWallFunction; + Prt 0.85; + value $internalField; } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/epsilon b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/epsilon index 208143e906..94b39414db 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/epsilon +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/epsilon @@ -21,25 +21,27 @@ internalField uniform 200; boundaryField { - Default_Boundary_Region + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 0.005; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + "(?i).*walls" { type epsilonWallFunction; Cmu 0.09; kappa 0.41; E 9.8; - value uniform 200; - } - inlet - { - type turbulentMixingLengthDissipationRateInlet; - mixingLength 0.005; - value uniform 200; - } - outlet - { - type inletOutlet; - inletValue uniform 200; - value uniform 200; + value $internalField; } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/k b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/k index 9a4811d43b..44d6ac84a0 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/k +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/k @@ -21,22 +21,24 @@ internalField uniform 1; boundaryField { - Default_Boundary_Region - { - type kqRWallFunction; - value uniform 1; - } inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.05; - value uniform 1; + value $internalField; } + outlet { type inletOutlet; - inletValue uniform 1; - value uniform 1; + inletValue $internalField; + value $internalField; + } + + "(?i).*walls" + { + type kqRWallFunction; + value $internalField; } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/nut b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/nut index a3c8861e67..cae18a460b 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/nut +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/nut @@ -21,23 +21,25 @@ internalField uniform 0; boundaryField { - Default_Boundary_Region + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + "(?i).*walls" { type nutkWallFunction; Cmu 0.09; kappa 0.41; E 9.8; - value uniform 0; - } - inlet - { - type calculated; - value uniform 0; - } - outlet - { - type calculated; - value uniform 0; + value $internalField; } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/p b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/p index baccb9c62b..7d370c9c38 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/p +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/0/p @@ -20,19 +20,21 @@ internalField uniform 1e5; boundaryField { - Default_Boundary_Region - { - type zeroGradient; - } inlet { type zeroGradient; } + outlet { type fixedValue; value $internalField; } + + "(?i).*walls" + { + type zeroGradient; + } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/system/blockMeshDict b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/system/blockMeshDict index 90d32fdba4..214392d34d 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBendLiq/system/blockMeshDict +++ b/tutorials/compressible/rhoSimpleFoam/squareBendLiq/system/blockMeshDict @@ -59,48 +59,20 @@ blocks edges ( - // block 2 - arc 1 8 ( 17.678 17.678 25) - arc 11 18 ( 17.678 17.678 -25) - arc 3 9 ( 53.033 53.033 25) - arc 13 19 ( 53.033 53.033 -25) - // block 3 - arc 7 8 ( 17.678 -17.678 25) - arc 17 18 ( 17.678 -17.678 -25) - arc 5 9 ( 53.033 -53.033 25) - arc 15 19 ( 53.033 -53.033 -25) + // block 2 + arc 1 8 (17.678 17.678 25) + arc 11 18 (17.678 17.678 -25) + arc 3 9 (53.033 53.033 25) + arc 13 19 (53.033 53.033 -25) + // block 3 + arc 7 8 (17.678 -17.678 25) + arc 17 18 (17.678 -17.678 -25) + arc 5 9 (53.033 -53.033 25) + arc 15 19 (53.033 -53.033 -25) ); boundary ( - // is there no way of defining all my 'defaultFaces' to be 'wall'? - Default_Boundary_Region - { - type wall; - faces - ( - // block0 - ( 0 1 3 2 ) - ( 11 10 12 13 ) - ( 0 10 11 1 ) - ( 2 3 13 12 ) - // block1 - ( 4 5 7 6 ) - ( 15 14 16 17 ) - ( 4 14 15 5 ) - ( 6 7 17 16 ) - // block2 - ( 1 8 9 3 ) - ( 18 11 13 19 ) - ( 3 9 19 13 ) - ( 1 11 18 8 ) - // block3 - ( 5 9 8 7 ) - ( 19 15 17 18 ) - ( 5 15 19 9 ) - ( 7 8 18 17 ) - ); - } inlet { type patch; @@ -124,4 +96,13 @@ mergePatchPairs ( ); + +// The defaultFaces == outside "walls" +defaultPatch +{ + name walls; + type wall; +} + + // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/squareBend/0/U b/tutorials/incompressible/simpleFoam/squareBend/0/U index 75b769442f..d6bd3aa99c 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/0/U +++ b/tutorials/incompressible/simpleFoam/squareBend/0/U @@ -22,20 +22,22 @@ boundaryField { #includeEtc "caseDicts/setConstraintTypes" - Default_Boundary_Region - { - type noSlip; - } inlet { type fixedValue; value uniform (10 0 0); } + outlet { type inletOutlet; - value $internalField; inletValue $internalField; + value $internalField; + } + + "(?i).*walls" + { + type noSlip; } } diff --git a/tutorials/incompressible/simpleFoam/squareBend/0/epsilon b/tutorials/incompressible/simpleFoam/squareBend/0/epsilon index 81ca69fefc..3bc8591891 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/0/epsilon +++ b/tutorials/incompressible/simpleFoam/squareBend/0/epsilon @@ -20,7 +20,21 @@ internalField uniform 200; boundaryField { - Default_Boundary_Region + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 0.005; + value $internalField; + } + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + "(?i).*walls" { type epsilonWallFunction; Cmu 0.09; @@ -28,18 +42,6 @@ boundaryField E 9.8; value $internalField; } - inlet - { - type turbulentMixingLengthDissipationRateInlet; - mixingLength 0.005; - value $internalField; - } - outlet - { - type inletOutlet; - value $internalField; - inletValue $internalField; - } } diff --git a/tutorials/incompressible/simpleFoam/squareBend/0/k b/tutorials/incompressible/simpleFoam/squareBend/0/k index 8a7be5c659..b0c0aa4aaa 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/0/k +++ b/tutorials/incompressible/simpleFoam/squareBend/0/k @@ -20,22 +20,24 @@ internalField uniform 1; boundaryField { - Default_Boundary_Region - { - type kqRWallFunction; - value $internalField; - } inlet { type turbulentIntensityKineticEnergyInlet; intensity 0.05; value $internalField; } + outlet { type inletOutlet; - value $internalField; inletValue $internalField; + value $internalField; + } + + "(?i).*walls" + { + type kqRWallFunction; + value $internalField; } } diff --git a/tutorials/incompressible/simpleFoam/squareBend/0/nut b/tutorials/incompressible/simpleFoam/squareBend/0/nut index b68ffbf2a6..1fe04552a7 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/0/nut +++ b/tutorials/incompressible/simpleFoam/squareBend/0/nut @@ -20,7 +20,19 @@ internalField uniform 0; boundaryField { - Default_Boundary_Region + inlet + { + type calculated; + value $internalField; + } + + outlet + { + type calculated; + value $internalField; + } + + "(?i).*walls" { type nutkWallFunction; Cmu 0.09; @@ -28,16 +40,6 @@ boundaryField E 9.8; value $internalField; } - inlet - { - type calculated; - value $internalField; - } - outlet - { - type calculated; - value $internalField; - } } diff --git a/tutorials/incompressible/simpleFoam/squareBend/0/p b/tutorials/incompressible/simpleFoam/squareBend/0/p index 1a64888502..2f5961d8bd 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/0/p +++ b/tutorials/incompressible/simpleFoam/squareBend/0/p @@ -22,10 +22,6 @@ boundaryField { #includeEtc "caseDicts/setConstraintTypes" - Default_Boundary_Region - { - type zeroGradient; - } inlet { type zeroGradient; @@ -39,7 +35,7 @@ boundaryField value $internalField; } - ".*" + "(?i).*walls" { type zeroGradient; } diff --git a/tutorials/incompressible/simpleFoam/squareBend/system/blockMeshDict b/tutorials/incompressible/simpleFoam/squareBend/system/blockMeshDict index 90d32fdba4..214392d34d 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/system/blockMeshDict +++ b/tutorials/incompressible/simpleFoam/squareBend/system/blockMeshDict @@ -59,48 +59,20 @@ blocks edges ( - // block 2 - arc 1 8 ( 17.678 17.678 25) - arc 11 18 ( 17.678 17.678 -25) - arc 3 9 ( 53.033 53.033 25) - arc 13 19 ( 53.033 53.033 -25) - // block 3 - arc 7 8 ( 17.678 -17.678 25) - arc 17 18 ( 17.678 -17.678 -25) - arc 5 9 ( 53.033 -53.033 25) - arc 15 19 ( 53.033 -53.033 -25) + // block 2 + arc 1 8 (17.678 17.678 25) + arc 11 18 (17.678 17.678 -25) + arc 3 9 (53.033 53.033 25) + arc 13 19 (53.033 53.033 -25) + // block 3 + arc 7 8 (17.678 -17.678 25) + arc 17 18 (17.678 -17.678 -25) + arc 5 9 (53.033 -53.033 25) + arc 15 19 (53.033 -53.033 -25) ); boundary ( - // is there no way of defining all my 'defaultFaces' to be 'wall'? - Default_Boundary_Region - { - type wall; - faces - ( - // block0 - ( 0 1 3 2 ) - ( 11 10 12 13 ) - ( 0 10 11 1 ) - ( 2 3 13 12 ) - // block1 - ( 4 5 7 6 ) - ( 15 14 16 17 ) - ( 4 14 15 5 ) - ( 6 7 17 16 ) - // block2 - ( 1 8 9 3 ) - ( 18 11 13 19 ) - ( 3 9 19 13 ) - ( 1 11 18 8 ) - // block3 - ( 5 9 8 7 ) - ( 19 15 17 18 ) - ( 5 15 19 9 ) - ( 7 8 18 17 ) - ); - } inlet { type patch; @@ -124,4 +96,13 @@ mergePatchPairs ( ); + +// The defaultFaces == outside "walls" +defaultPatch +{ + name walls; + type wall; +} + + // ************************************************************************* //