Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
0712a686
Commit
0712a686
authored
Apr 16, 2010
by
mattijs
Browse files
Merge branch 'master' into splitCyclic
parents
cff25803
af095081
Changes
14
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C
View file @
0712a686
...
...
@@ -614,21 +614,56 @@ Foam::polyMesh::polyMesh
<<
"Found "
<<
nFaces
-
defaultPatchStart
<<
" undefined faces in mesh; adding to default patch."
<<
endl
;
boundary_
.
set
(
nAllPatches
,
polyPatch
::
New
// Check if there already exists a defaultFaces patch as last patch
// and reuse it.
label
patchI
=
findIndex
(
boundaryPatchNames
,
defaultBoundaryPatchName
);
if
(
patchI
!=
-
1
)
{
if
(
patchI
!=
boundaryFaces
.
size
()
-
1
||
boundary_
[
patchI
].
size
())
{
FatalErrorIn
(
"polyMesh::polyMesh(... construct from shapes...)"
)
<<
"Default patch "
<<
boundary_
[
patchI
].
name
()
<<
" already has faces in it or is not"
<<
" last in list of patches."
<<
exit
(
FatalError
);
}
WarningIn
(
"polyMesh::polyMesh(... construct from shapes...)"
)
<<
"Reusing existing patch "
<<
patchI
<<
" for undefined faces."
<<
endl
;
boundary_
.
set
(
defaultBoundaryPatchType
,
defaultBoundaryPatchName
,
nFaces
-
defaultPatchStart
,
defaultPatchStart
,
boundary_
.
size
()
-
1
,
boundary_
)
);
patchI
,
polyPatch
::
New
(
boundaryPatchTypes
[
patchI
],
boundaryPatchNames
[
patchI
],
nFaces
-
defaultPatchStart
,
defaultPatchStart
,
patchI
,
boundary_
)
);
}
else
{
boundary_
.
set
(
nAllPatches
,
polyPatch
::
New
(
defaultBoundaryPatchType
,
defaultBoundaryPatchName
,
nFaces
-
defaultPatchStart
,
defaultPatchStart
,
boundary_
.
size
()
-
1
,
boundary_
)
);
nAllPatches
++
;
nAllPatches
++
;
}
}
// Reset the size of the boundary
...
...
tutorials/incompressible/pimpleFoam/t-junction/0/U
View file @
0712a686
...
...
@@ -20,27 +20,36 @@ internalField uniform (0 0 0);
boundaryField
{
inlet
inlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
outlet1
outlet1
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
outlet2
outlet2
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
defaultFaces
baffles
{
type fixedValue;
value uniform ( 0 0 0 );
}
fan
{
type cyclic;
value uniform ( 0 0 0 );
}
defaultFaces
{
type fixedValue;
value uniform (0 0 0);
...
...
tutorials/incompressible/pimpleFoam/t-junction/0/epsilon
View file @
0712a686
...
...
@@ -27,23 +27,33 @@ boundaryField
mixingLength 0.01; // 1cm - half channel height
value uniform 1;
}
outlet1
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
outlet2
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
baffles
{
type epsilonWallFunction;
value uniform 1;
}
fan
{
type cyclic;
value uniform 1;
}
defaultFaces
{
type epsilonWallFunction;
value uniform
0
;
value uniform
1
;
}
}
...
...
tutorials/incompressible/pimpleFoam/t-junction/0/k
View file @
0712a686
...
...
@@ -27,23 +27,34 @@ boundaryField
intensity 0.05; // 5% turbulent intensity
value uniform 1;
}
outlet1
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
outlet2
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
baffles
{
type kqRWallFunction;
value uniform 1;
}
fan
{
type cyclic;
value uniform 1;
}
defaultFaces
{
type kqRWallFunction;
value uniform
0
;
value uniform
1
;
}
}
...
...
tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda
View file @
0712a686
...
...
@@ -34,7 +34,15 @@ boundaryField
{
type zeroGradient;
}
baffles
{
type zeroGradient;
}
fan
{
type cyclic;
value uniform 0;
}
defaultFaces
{
type zeroGradient;
...
...
tutorials/incompressible/pimpleFoam/t-junction/0/nut
View file @
0712a686
...
...
@@ -38,7 +38,16 @@ boundaryField
type calculated;
value uniform 0;
}
baffles
{
type nutkWallFunction;
value uniform 0;
}
fan
{
type cyclic;
value uniform 0;
}
defaultFaces
{
type nutkWallFunction;
...
...
tutorials/incompressible/pimpleFoam/t-junction/0/p
View file @
0712a686
...
...
@@ -20,7 +20,7 @@ internalField uniform 100000;
boundaryField
{
inlet
inlet
{
//type totalPressure;
//p0 uniform 100040;
...
...
@@ -38,18 +38,28 @@ boundaryField
value uniform 100040;
}
outlet1
outlet1
{
type fixedValue;
value uniform 100010;
}
outlet2
outlet2
{
type fixedValue;
value uniform 100000;
}
baffles
{
type zeroGradient;
}
fan
{
type fan;
patchType cyclic;
f 2 ( 50 -0.1 );
value uniform 100000;
}
defaultFaces
{
type zeroGradient;
...
...
tutorials/incompressible/pimpleFoam/t-junction/Allrun
0 → 100755
View file @
0712a686
#!/bin/sh
# Source tutorial run functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
# Get application name
application
=
`
getApplication
`
runApplication blockMesh
# Creating patches 'out of nothing' so willl get undefined value which
# might cause floating point error
unset
FOAM_SIGFPE
unset
FOAM_SETNAN
# Add cyclic baffles for fan
runApplication setSet
-batch
selectCyclics.setSet
runApplication createBaffles cyclicFaces fan
-overwrite
# Add wall baffles
rm
log.setSet
runApplication setSet
-batch
selectBaffles.setSet
rm
log.createBaffles
runApplication createBaffles baffleFaces baffles
-overwrite
runApplication
$application
tutorials/incompressible/pimpleFoam/t-junction/README.txt
View file @
0712a686
15/8/8 Simple T-junction. Inlet on left, one outlet at bottom, one at top.
300-04-16 T-junction with baffles and fan.
Inlet on left, one outlet at bottom, one at top.
To test multiple outlets.
tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict
View file @
0712a686
...
...
@@ -100,6 +100,16 @@ patches
(
(8 18 19 9)
)
wall baffles
()
cyclic fan
()
wall defaultFaces
()
);
mergePatchPairs
...
...
tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/boundary
View file @
0712a686
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version:
1.6
|
| \\ / O peration | Version:
dev
|
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
...
...
@@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
4
6
(
inlet
{
...
...
@@ -35,6 +35,19 @@ FoamFile
nFaces 25;
startFace 10100;
}
baffles
{
type wall;
nFaces 0;
startFace 10125;
}
fan
{
type cyclic;
nFaces 0;
startFace 10125;
featureCos 0.9;
}
defaultFaces
{
type wall;
...
...
tutorials/incompressible/pimpleFoam/t-junction/selectBaffles.setSet
0 → 100644
View file @
0712a686
faceSet baffleFaces new boxToFace (0.099 -10 -10)(0.101 10 10)
# Remove the centre faces that become fan
faceSet baffleFaces delete boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016)
faceZoneSet baffleFaces new setToFaceZone baffleFaces
tutorials/incompressible/pimpleFoam/t-junction/selectCyclics.setSet
0 → 100644
View file @
0712a686
faceSet cyclicFaces new boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016)
cellSet cyclicFacesSlaveCells new boxToCell (-10 -10 -10)(0.1 10 10)
faceZoneSet cyclicFaces new setsToFaceZone cyclicFaces cyclicFacesSlaveCells
tutorials/incompressible/pimpleFoam/t-junction/system/controlDict
View file @
0712a686
...
...
@@ -15,6 +15,8 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs ("libOpenFOAM.so" "libincompressibleTurbulenceModel.so" "libincompressibleRASModels.so");
application pimpleFoam;
startFrom startTime;
...
...
@@ -37,7 +39,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression
off
;
writeCompression
uncompressed
;
timeFormat general;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment