ENH: make sourceInfo sub-dictionary optional for topoSet (#1060)

- helps reduce clutter in the topoSetDict files.

  Caveats when using this.

  The older specification styles using "name" will conflict with the
  set name. Eg,

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        sourceInfo
        {
            name   inlet;
        }
    }

    would flattened to the following
    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        name   inlet;
    }
    which overwrites the "name" used for the faceSet.

    The solution is to use the updated syntax:

    {
        name    f0
        type    faceSet;
        action  add;
        source  patchToFace;
        patch   inlet;
    }
This commit is contained in:
Mark Olesen
2018-11-07 10:33:36 +01:00
parent 6090faedef
commit 5f556ffb4a
120 changed files with 612 additions and 1851 deletions

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
{
name heaterCellSet;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
{
name heater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
// leftSolid
@ -55,20 +46,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100 )(-0.01001 0.00999 100);
}
box (-100 0 -100 )(-0.01001 0.00999 100);
}
{
name leftSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
// rightSolid
@ -77,20 +62,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01001 0 -100 )(100 0.00999 100);
}
box (0.01001 0 -100 )(100 0.00999 100);
}
{
name rightSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
// topAir
@ -99,20 +78,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.00999 -100 )(100 100 100);
}
box (-100 0.00999 -100 )(100 100 100);
}
{
name topAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
@ -122,40 +95,28 @@ actions
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
{
name bottomWaterCellSet;
@ -167,10 +128,7 @@ actions
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set bottomWaterCellSet;
}
set bottomWaterCellSet;
}
);

View File

@ -24,10 +24,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (15.5 15.5 0)(24.5 24.5 9);
}
box (15.5 15.5 0)(24.5 24.5 9);
}
// floor
@ -36,21 +33,15 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0 0 -2)(41 41 0);
}
box (0 0 -2)(41 41 0);
}
{
{
name floor;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set floor;
}
set floor;
}
//air
@ -65,10 +56,7 @@ actions
type cellSet;
action subtract;
source cellToCell;
sourceInfo
{
set floor;
}
set floor;
}
{
@ -76,10 +64,7 @@ actions
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set solid; // name of cellSet
}
set solid; // cellSet
}
{
@ -87,10 +72,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (17 17 0)(23 23 7.5);
}
box (17 17 0)(23 23 7.5);
}
//- Define again solid
@ -99,10 +81,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (15.5 15.5 0)(24.5 24.5 9);
}
box (15.5 15.5 0)(24.5 24.5 9);
}
{
@ -110,10 +89,7 @@ actions
type cellSet;
action subtract;
source cellToCell;
sourceInfo
{
set cavity;
}
set cavity;
}
{
@ -121,10 +97,7 @@ actions
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set solid; // name of cellSet
}
set solid; // cellSet
}
);

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
box (-0.01001 0 -100)(0.01001 0.00999 100);
}
{
name heaterCellSet;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
{
name heater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
// leftSolid
@ -55,20 +46,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100 )(-0.01001 0.00999 100);
}
box (-100 0 -100 )(-0.01001 0.00999 100);
}
{
name leftSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
// rightSolid
@ -77,20 +62,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01001 0 -100 )(100 0.00999 100);
}
box (0.01001 0 -100 )(100 0.00999 100);
}
{
name rightSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
// topAir
@ -99,20 +78,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.00999 -100 )(100 100 100);
}
box (-100 0.00999 -100 )(100 100 100);
}
{
name topAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
@ -122,40 +95,28 @@ actions
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
{
name bottomWaterCellSet;
@ -167,10 +128,7 @@ actions
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set bottomWaterCellSet;
}
set bottomWaterCellSet;
}
);

View File

@ -21,10 +21,7 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01 0.1 -0.01) (0.02 0.11 0.01);
}
box (0.01 0.1 -0.01) (0.02 0.11 0.01);
}
);

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 -100 -100) (100 0.1 0.25);
}
box (-100 -100 -100) (100 0.1 0.25);
}
{
name c0;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-100 -100 0.45) (100 0.1 100);
}
box (-100 -100 0.45) (100 0.1 100);
}
{
name c0;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-100 0.05 0.33) (100 0.1 0.38);
}
box (-100 0.05 0.33) (100 0.1 0.38);
}
{
name c0;

View File

@ -22,22 +22,16 @@ actions
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (-0.126 0.08665 0.2565) (0.02 0.090665 0.446);
}
box (-0.126 0.08665 0.2565) (0.02 0.090665 0.446);
}
{
{
name f1Zone;
type faceZoneSet;
action new;
source setAndNormalToFaceZone;
sourceInfo
{
faceSet f1;
normal (0 1 0);
}
faceSet f1;
normal (0 1 0);
}
{
@ -45,11 +39,8 @@ actions
type cellZoneSet;
action new;
source faceToCell;
sourceInfo
{
set f1Zone;
option neighbour;
}
set f1Zone;
option neighbour;
}
{
@ -57,10 +48,7 @@ actions
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set c1;
}
set c1;
}
);

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 -100 -100) (100 0.1 0.25);
}
box (-100 -100 -100) (100 0.1 0.25);
}
{
name c0;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-100 -100 0.45) (100 0.1 100);
}
box (-100 -100 0.45) (100 0.1 100);
}
{
name c0;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-100 0.05 0.33) (100 0.1 0.38);
}
box (-100 0.05 0.33) (100 0.1 0.38);
}
{
name c0;

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 -100 -100) (100 0.1 0.25);
}
box (-100 -100 -100) (100 0.1 0.25);
}
{
name c0;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-100 -100 0.45) (100 0.1 100);
}
box (-100 -100 0.45) (100 0.1 100);
}
{
name c0;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-100 0.05 0.33) (100 0.1 0.38);
}
box (-100 0.05 0.33) (100 0.1 0.38);
}
{
name c0;

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
{
name heaterCellSet;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
{
name heater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
// leftSolid
@ -55,20 +46,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100 )(-0.01001 0.00999 100);
}
box (-100 0 -100)(-0.01001 0.00999 100);
}
{
name leftSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
// rightSolid
@ -77,20 +62,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01001 0 -100 )(100 0.00999 100);
}
box (0.01001 0 -100 )(100 0.00999 100);
}
{
name rightSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
// topAir
@ -99,20 +78,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.00999 -100 )(100 100 100);
}
box (-100 0.00999 -100 )(100 100 100);
}
{
name topAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
@ -122,40 +95,28 @@ actions
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
{
name bottomWaterCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
{
name bottomWaterCellSet;
@ -167,10 +128,7 @@ actions
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set bottomWaterCellSet;
}
set bottomWaterCellSet;
}
);

View File

@ -23,31 +23,22 @@ actions
type cellSet;
action new;
source zoneToCell;
sourceInfo
{
zone cylinder;
}
zone cylinder;
}
{
name rotorFaces;
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set rotorCells;
option all;
}
set rotorCells;
option all;
}
{
name rotorFaces;
type faceSet;
action subset;
source boxToFace;
sourceInfo
{
box (-100 -100 0.1) (100 100 0.15);
}
box (-100 -100 0.1) (100 100 0.15);
}
{
@ -55,10 +46,7 @@ actions
type faceSet;
action new;
source faceToFace;
sourceInfo
{
set rotorFaces;
}
set rotorFaces;
}
{
@ -66,10 +54,7 @@ actions
type faceSet;
action subset;
source boxToFace;
sourceInfo
{
box (-100 0.249 -100) (100 0.251 100);
}
box (-100 0.249 -100) (100 0.251 100);
}
{
@ -77,10 +62,7 @@ actions
type faceSet;
action new;
source faceToFace;
sourceInfo
{
set rotorFaces;
}
set rotorFaces;
}
{
@ -88,10 +70,7 @@ actions
type faceSet;
action subset;
source boxToFace;
sourceInfo
{
box (0.249 -100 -100) (0.251 100 100);
}
box (0.249 -100 -100) (0.251 100 100);
}
{
@ -99,20 +78,14 @@ actions
type faceSet;
action add;
source faceToFace;
sourceInfo
{
set rotorBlades2;
}
set rotorBlades2;
}
{
name rotorBlades;
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet rotorBladesFaceSet;
}
faceSet rotorBladesFaceSet;
}
);

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source zoneToCell;
sourceInfo
{
zones (cylinder innerCylinder);
}
zones (cylinder innerCylinder);
}
{
name rotorCells;
type cellSet;
action subset;
source boxToCell;
sourceInfo
{
box (-100 -100 0.1) (100 100 0.15);
}
box (-100 -100 0.1) (100 100 0.15);
}
{
name rotor;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rotorCells;
}
set rotorCells;
}
);

View File

@ -23,30 +23,21 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
box (-0.01001 0 -100 )(0.01001 0.00999 100);
}
{
name heaterCellSet;
type cellSet;
action add;
source boxToCell;
sourceInfo
{
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
}
{
name heater;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
// leftSolid
@ -55,20 +46,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0 -100 )(-0.01001 0.00999 100);
}
box (-100 0 -100)(-0.01001 0.00999 100);
}
{
name leftSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
// rightSolid
@ -77,20 +62,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.01001 0 -100 )(100 0.00999 100);
}
box (0.01001 0 -100 )(100 0.00999 100);
}
{
name rightSolid;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
// topAir
@ -99,20 +78,14 @@ actions
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 0.00999 -100 )(100 100 100);
}
box (-100 0.00999 -100 )(100 100 100);
}
{
name topAir;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
@ -122,40 +95,28 @@ actions
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set heaterCellSet;
}
set heaterCellSet;
}
{
name bottomAirCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set leftSolidCellSet;
}
set leftSolidCellSet;
}
{
name bottomAirCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set rightSolidCellSet;
}
set rightSolidCellSet;
}
{
name bottomAirCellSet;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set topAirCellSet;
}
set topAirCellSet;
}
{
name bottomAirCellSet;
@ -167,10 +128,7 @@ actions
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set bottomAirCellSet;
}
set bottomAirCellSet;
}
);