File size: 4,223 Bytes
5a600cf | 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 | /*--------------------------------*- 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 dictionary;
location "system";
object createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// This is a sample configuration for creating baffles. Notes:
//
// - This utility usually converts internal faces into two boundary faces.
//
// - It can also convert boundary faces into a boundary face on a different
// patch.
//
// - Faces are selected to make into baffles by specifying either a faceZone or
// a surface.
//
// - Each selection requires two patches to be specified; the owner (or master)
// and the neighbour (or slave).
//
// - Orientation matters. Internal faces will be split into two faces, and the
// face that is oriented in the same direction as the zone or surface will be
// added to the owner/master patch. The other face will be added to the
// neighbour/slave patch. Boundary faces will be added to the owner patch if
// they are oriented in the same direction as the zone or surface, and they
// will be added to the neighbour patch otherwise.
//
// - Optionally, fields can also be modified. If the added patches are of
// non-constrained type then patch-field entries must be provided for all
// fields.
//
// Whether to convert internal faces only, and ignore any boundary faces that
// are in the selection
internalFacesOnly true;
// Whether to add patch fields to the field files
fields true;
// Baffles to create
baffles
{
// Wall baffle example
baffleFaces
{
// Use a surface to select faces and orientation.
type surface;
surface triSurface;
name baffle1D.stl;
// Owner patch
owner
{
name baffleWall0;
type wall;
// Patch field settings (can be omitted if fields = false)
patchFields
{
p
{
type zeroGradient;
}
U
{
type noSlip;
}
}
}
// Neighbour patch. Use the same settings as for the owner.
neighbour
{
name baffleWall1;
$owner;
}
}
// Cyclic example
cyclicFaces
{
// Use a zone to select faces and orientation
type faceZone;
zoneName cyclicFaces;
// Owner patch
owner
{
name fan0;
type cyclic;
neighbourPatch fan1;
transform none;
// Patch field settings. Note U (and others) are not needed because
// the patch that is being created is of constrained type, so the
// fields can be constructed automatically. A field for p is given
// here as it is an override (see the 'patchType' entry).
patchFields
{
p
{
type fan;
patchType cyclic;
jump uniform 0;
value uniform 0;
jumpTable polynomial 1((100 0));
}
}
}
// Neighbour patch
neighbour
{
name fan1;
type cyclic;
neighbourPatch fan0;
transform none;
// Patch field settings
patchFields
{
p
{
type fan;
patchType cyclic;
value uniform 0;
}
}
}
}
}
// ************************************************************************* //
|