mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: more flexible finiteArea patch selection (#2084)
- support wordRes for selecting patch names
- ownerPolyPatch specification is now optional, which simplifies input
and also supports a faMesh spanning different patches but with a
single boundary condition.
Alternatively, can specify more granularity if required.
```
polyMeshPatches ( "top.*" );
boundary
{
inlet1
{
type patch;
ownerPolyPatch top1; // <- specific to this portion
neighbourPolyPatch inlet;
}
inlet2
{
type patch;
ownerPolyPatch top2; // <- specific to this portion
neighbourPolyPatch inlet;
}
outlet
{
type patch;
neighbourPolyPatch outflow;
}
bound
{
type symmetry;
neighbourPolyPatch bound;
}
}
```
This commit is contained in:
@ -21,7 +21,6 @@ boundary
|
||||
sealing
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch window;
|
||||
neighbourPolyPatch fixedWall;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,35 +21,30 @@ boundary
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch film;
|
||||
neighbourPolyPatch inlet;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch film;
|
||||
neighbourPolyPatch outlet;
|
||||
}
|
||||
|
||||
side
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch film;
|
||||
neighbourPolyPatch side;
|
||||
}
|
||||
|
||||
symmetry
|
||||
{
|
||||
type symmetry;
|
||||
ownerPolyPatch film;
|
||||
neighbourPolyPatch symmetry;
|
||||
}
|
||||
|
||||
cylinder
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch film;
|
||||
neighbourPolyPatch cylinder;
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,12 +22,18 @@ referenceLevel 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
inlet1
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
|
||||
inlet2
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.9;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
|
||||
@ -20,7 +20,13 @@ internalField uniform (0.05 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
inlet1
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
inlet2
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
|
||||
@ -18,6 +18,9 @@ FoamFile
|
||||
// Depending on the decomposition, the outflow boundary may
|
||||
// coincide with a processor patch.
|
||||
|
||||
// Additionally the plate is split into two top zones (top1 top2)
|
||||
// with different inlet boundary conditions
|
||||
|
||||
scale 0.1;
|
||||
|
||||
height 0.1;
|
||||
@ -26,6 +29,8 @@ len 3;
|
||||
out 1;
|
||||
out #eval{ $out + $len };
|
||||
|
||||
width_2 #eval{ 0.5 * $width };
|
||||
|
||||
nx 60;
|
||||
ny 20;
|
||||
nz 1;
|
||||
@ -33,25 +38,40 @@ nout 20;
|
||||
|
||||
vertices
|
||||
(
|
||||
// bottom
|
||||
/* 0*/ (0 0 0)
|
||||
/* 1*/ ($len 0 0)
|
||||
/* 2*/ ($len $width 0)
|
||||
/* 3*/ (0 $width 0)
|
||||
/* 4*/ (0 0 $height)
|
||||
/* 5*/ ($len 0 $height)
|
||||
/* 6*/ ($len $width $height)
|
||||
/* 7*/ (0 $width $height)
|
||||
/* 2*/ ($out 0 0)
|
||||
|
||||
/* 8*/ ($out 0 0)
|
||||
/* 9*/ ($out 1 0)
|
||||
/*10*/ ($out 0 $height)
|
||||
/*11*/ ($out 1 $height)
|
||||
/* 3*/ (0 $width_2 0)
|
||||
/* 4*/ ($len $width_2 0)
|
||||
/* 5*/ ($out $width_2 0)
|
||||
|
||||
/* 6*/ (0 $width 0)
|
||||
/* 7*/ ($len $width 0)
|
||||
/* 8*/ ($out $width 0)
|
||||
|
||||
// top
|
||||
/* 9*/ (0 0 $height)
|
||||
/*10*/ ($len 0 $height)
|
||||
/*11*/ ($out 0 $height)
|
||||
|
||||
/*12*/ (0 $width_2 $height)
|
||||
/*13*/ ($len $width_2 $height)
|
||||
/*14*/ ($out $width_2 $height)
|
||||
|
||||
/*15*/ (0 $width $height)
|
||||
/*16*/ ($len $width $height)
|
||||
/*17*/ ($out $width $height)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) ($nx $ny $nz) grading (1 1 1)
|
||||
hex (1 8 9 2 5 10 11 6) ($nout $ny $nz) grading (1 1 1)
|
||||
hex (0 1 4 3 9 10 13 12) ($nx $ny $nz) grading (1 1 1)
|
||||
hex (1 2 5 4 10 11 14 13) ($nout $ny $nz) grading (1 1 1)
|
||||
|
||||
hex (3 4 7 6 12 13 16 15) ($nx $ny $nz) grading (1 1 1)
|
||||
hex (4 5 8 7 13 14 17 16) ($nout $ny $nz) grading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
@ -61,7 +81,8 @@ boundary
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
(0 9 12 3)
|
||||
(3 12 15 6)
|
||||
);
|
||||
}
|
||||
|
||||
@ -70,12 +91,11 @@ boundary
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 7 6 2)
|
||||
(1 5 4 0)
|
||||
(0 1 10 9)
|
||||
(1 2 11 10)
|
||||
|
||||
// outflow
|
||||
(1 8 10 5)
|
||||
(2 6 11 9)
|
||||
(7 6 15 16)
|
||||
(8 7 16 17)
|
||||
);
|
||||
}
|
||||
|
||||
@ -84,7 +104,8 @@ boundary
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(8 9 10 11)
|
||||
(2 5 14 11)
|
||||
(5 8 17 14)
|
||||
);
|
||||
}
|
||||
|
||||
@ -93,17 +114,29 @@ boundary
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
(1 8 9 2)
|
||||
);
|
||||
(0 3 4 1)
|
||||
(1 4 5 2)
|
||||
|
||||
(3 6 7 4)
|
||||
(4 7 8 5)
|
||||
);
|
||||
}
|
||||
|
||||
top
|
||||
top1
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(9 10 13 12)
|
||||
);
|
||||
}
|
||||
|
||||
top2
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(12 13 16 15)
|
||||
);
|
||||
}
|
||||
|
||||
@ -112,7 +145,8 @@ boundary
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(5 10 11 6)
|
||||
(10 11 14 13)
|
||||
(13 14 17 16)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@ -14,29 +14,33 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
polyMeshPatches ( top );
|
||||
polyMeshPatches ( "top.*" );
|
||||
|
||||
boundary
|
||||
{
|
||||
inlet
|
||||
inlet1
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch top;
|
||||
ownerPolyPatch top1;
|
||||
neighbourPolyPatch inlet;
|
||||
}
|
||||
|
||||
inlet2
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch top2;
|
||||
neighbourPolyPatch inlet;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch top;
|
||||
// neighbourPolyPatch outlet;
|
||||
neighbourPolyPatch outflow;
|
||||
}
|
||||
|
||||
bound
|
||||
{
|
||||
type symmetry;
|
||||
ownerPolyPatch top;
|
||||
neighbourPolyPatch bound;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,21 +21,18 @@ boundary
|
||||
left
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch top;
|
||||
neighbourPolyPatch left;
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch top;
|
||||
neighbourPolyPatch right;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
ownerPolyPatch top;
|
||||
neighbourPolyPatch frontAndBack;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,6 @@ boundary
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
ownerPolyPatch freeSurface;
|
||||
neighbourPolyPatch frontAndBack;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,21 +21,18 @@ boundary
|
||||
left
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch top;
|
||||
neighbourPolyPatch left;
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type patch;
|
||||
ownerPolyPatch top;
|
||||
neighbourPolyPatch right;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
ownerPolyPatch top;
|
||||
neighbourPolyPatch frontAndBack;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user