1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
|
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
// 1. Create cellZones
// Create cellSet topBlock from cellZone topBlock created by blockMesh
{
name topBlockCells;
type cellSet;
action new;
source zoneToCell;
zone topBlock;
}
// Create cellSet centralBlock from cellZone centralBlock created by blockMesh
{
name centralBlockCells;
type cellSet;
action new;
source zoneToCell;
zone centralBlock;
}
// Create cellSet bottomBlock from cellZone bottomBlock created by blockMesh
{
name bottomBlockCells;
type cellSet;
action new;
source zoneToCell;
zone bottomBlock;
}
// 2. Get the faces at the top patch
// Get all the faces in the top patch
{
name top;
type faceSet;
action new;
source patchToFace;
patch top;
}
// Only keep those that border the top block topBlock
{
name top;
type faceSet;
action subset;
source cellToFace;
set topBlockCells;
option all;
}
// Convert top from faceSet to faceZone
{
name top;
type faceZoneSet;
action new;
source setAndNormalToFaceZone;
faceSet top;
normal (0 -1 0);
}
// 3. Get the faces on the border of cellZones topBlock and centralBlock
// Get all faces in topBlock
{
name centralTopFaces;
type faceSet;
action new;
source cellToFace;
set topBlockCells;
option all;
}
// Get the faces that border topBlock and centralBlock
{
name centralTopFaces;
type faceSet;
action subset;
source cellToFace;
set centralBlockCells;
option all;
}
// Convert topBlockFaces from faceSet to faceZone
{
name centralTopFaces;
type faceZoneSet;
action new;
source setsToFaceZone;
faceSet centralTopFaces;
cellSet topBlockCells;
}
// 4. Get all the faces on the border of cellZones centralBlock and
// bottomBlock
// Get all faces in bottomBlock
{
name centralBottomFaces;
type faceSet;
action new;
source cellToFace;
set bottomBlockCells;
option all;
}
// Get the faces that border centralBlock and bottomBlock
{
name centralBottomFaces;
type faceSet;
action subset;
source cellToFace;
set centralBlockCells;
option all;
}
// Convert centralBottomFaces from faceSet to faceZone
{
name centralBottomFaces;
type faceZoneSet;
action new;
source setsToFaceZone;
faceSet centralBottomFaces;
cellSet centralBlockCells;
}
// 5. Get the faces at bottom patch
// Get all the faces in the bottom patch
{
name bottom;
type faceSet;
action new;
source patchToFace;
patch bottom;
}
// Only keep those that border the bottom block bottomBlockCells
{
name bottom;
type faceSet;
action subset;
source cellToFace;
set bottomBlockCells;
option all;
}
// Convert bottom from faceSet to faceZone
{
name bottom;
type faceZoneSet;
action new;
source setAndNormalToFaceZone;
faceSet bottom;
normal (0 1 0);
}
// AJH New - create additional face zones to enable solid body motion
// for the majority of the action area around the sphere, and only apply
// layer addition-removal (LAR) at the extremities
// create cell zone at top of domain for LAR region
{
name LARTopCells;
type cellSet;
action new;
source cellToCell;
set topBlockCells;
}
{
name LARTopCells;
type cellSet;
action subset;
source boxToCell;
box (-100 0.95 -100)(100 100 100);
}
{
name LARTopCells;
type cellZoneSet;
action new;
source setToCellZone;
set LARTopCells;
}
// upate old topBlock cellZone
{
name topBlockCells;
type cellSet;
action subtract;
source cellToCell;
set LARTopCells;
}
{
name topBlock;
type cellZoneSet;
action remove;
}
{
name topBlock;
type cellZoneSet;
action new;
source setToCellZone;
set topBlockCells;
}
// generate face zone between LARTopCells and topBlockCells cellSets
{
name LARTopFaces;
type faceSet;
action new;
source cellToFace;
set LARTopCells;
option all;
}
{
name LARTopFaces;
type faceSet;
action subset;
source cellToFace;
set topBlockCells;
option all;
}
{
name LARTopFaces;
type faceZoneSet;
action new;
source setsToFaceZone;
faceSet LARTopFaces;
cellSet topBlockCells;
}
);
// ************************************************************************* //
|