ENH: propeller: updated setup

This commit is contained in:
mattijs
2014-01-24 14:39:21 +00:00
parent 072ee4ff2f
commit 727650e613
14 changed files with 83 additions and 280 deletions

View File

@ -21,6 +21,9 @@ internalField uniform (0 0 0);
boundaryField boundaryField
{ {
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet inlet
{ {
type uniformFixedValue; type uniformFixedValue;
@ -40,7 +43,7 @@ boundaryField
value uniform (0 0 0); value uniform (0 0 0);
} }
outerCylinder innerCylinder
{ {
type fixedValue; type fixedValue;
value uniform (0 0 0); value uniform (0 0 0);

View File

@ -21,6 +21,9 @@ internalField uniform 1;
boundaryField boundaryField
{ {
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet inlet
{ {
type fixedValue; type fixedValue;
@ -33,17 +36,10 @@ boundaryField
inletValue $internalField; inletValue $internalField;
} }
outerCylinder wall
{ {
type zeroGradient; type zeroGradient;
value $internalField; value $internalField;
}
"propeller.*"
{
type zeroGradient;
value $internalField;
}
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -21,6 +21,9 @@ internalField uniform 0.0495;
boundaryField boundaryField
{ {
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet inlet
{ {
type fixedValue; type fixedValue;
@ -34,13 +37,7 @@ boundaryField
value $internalField; value $internalField;
} }
outerCylinder wall
{
type epsilonWallFunction;
value $internalField;
}
"propeller.*"
{ {
type epsilonWallFunction; type epsilonWallFunction;
value $internalField; value $internalField;

View File

@ -21,6 +21,9 @@ internalField uniform 0.06;
boundaryField boundaryField
{ {
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet inlet
{ {
type fixedValue; type fixedValue;
@ -34,13 +37,7 @@ boundaryField
value $internalField; value $internalField;
} }
outerCylinder wall
{
type kqRWallFunction;
value $internalField;
}
"propeller.*"
{ {
type kqRWallFunction; type kqRWallFunction;
value $internalField; value $internalField;

View File

@ -21,6 +21,9 @@ internalField uniform 0;
boundaryField boundaryField
{ {
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet inlet
{ {
type calculated; type calculated;
@ -33,13 +36,7 @@ boundaryField
value uniform 0; value uniform 0;
} }
outerCylinder wall
{
type nutkWallFunction;
value uniform 0;
}
"propeller.*"
{ {
type nutkWallFunction; type nutkWallFunction;
value uniform 0; value uniform 0;

View File

@ -21,6 +21,9 @@ internalField uniform 1e5;
boundaryField boundaryField
{ {
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
inlet inlet
{ {
type fixedFluxPressure; type fixedFluxPressure;
@ -32,12 +35,7 @@ boundaryField
value $internalField; value $internalField;
} }
outerCylinder wall
{
type fixedFluxPressure;
}
"propeller.*"
{ {
type fixedFluxPressure; type fixedFluxPressure;
} }

View File

@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions . $WM_PROJECT_DIR/bin/tools/CleanFunctions
# remove surface # remove surface
\rm -f constant/triSurface/propellerTip.obj.gz \rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
cleanCase cleanCase

View File

@ -15,6 +15,9 @@ runApplication blockMesh
runApplication surfaceFeatureExtract runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite runApplication snappyHexMesh -overwrite
runApplication renumberMesh -overwrite
# force removal of fields generated by snappy # force removal of fields generated by snappy
\rm -rf 0 \rm -rf 0
cp -rf 0.org 0 cp -rf 0.org 0
@ -22,34 +25,21 @@ cp -rf 0.org 0
# - generate face/cell sets and zones # - generate face/cell sets and zones
#runApplication setSet -batch removeRedundantZones.setSet
#mv log.setSet log.removeRedundantZones.setSet
runApplication topoSet -dict system/removeRedundantZones.topoSetDict
mv log.topoSet log.removeRedundantZones.topoSet
#runApplication setSet -batch createInletOutletSets.setSet #runApplication setSet -batch createInletOutletSets.setSet
#mv log.setSet log.createInletOutletSets.setSet #mv log.setSet log.createInletOutletSets.setSet
runApplication topoSet -dict system/createInletOutletSets.topoSetDict runApplication topoSet -dict system/createInletOutletSets.topoSetDict
mv log.topoSet log.createInletOutletSets.topoSet #mv log.topoSet log.createInletOutletSets.topoSet
#runApplication setSet -batch createAMIFaces.setSet
#mv log.setSet log.createAMIFaces.setSet
runApplication topoSet -dict system/createAMIFaces.topoSetDict
mv log.topoSet log.createAMIFaces.topoSet
# - create the inlet/outlet patches # - create the inlet/outlet and AMI patches
runApplication createPatch -overwrite runApplication createPatch -overwrite
# - test by running moveDynamicMes
#runApplication moveDynamicMesh -checkAMI
# - apply the initial fields # - apply the initial fields
cp -rf 0.org 0 cp -rf 0.org 0
# - create the AMI faces by creating baffles, and then splitting the mesh
runApplication createBaffles -overwrite
runApplication mergeOrSplitBaffles -split -overwrite

View File

@ -1,110 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name innerCylinderSmall;
type cellSet;
action new;
source cylinderToCell;
sourceInfo
{
p1 (0 -0.08 0);
p2 (0 0.06 0);
radius 0.12;
}
}
{
name outerCells;
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set innerCylinderSmall;
}
}
{
name outerCells;
type cellSet;
action invert;
}
{
name innerCylinderSmall;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set innerCylinderSmall;
}
}
{
name innerCylinderSmallFace;
type faceSet;
action new;
source cellToFace;
sourceInfo
{
set innerCylinderSmall;
option all;
}
}
{
name innerCylinderSmallFace;
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set outerCells;
option all;
}
}
{
name innerCylinderSmall;
type faceZoneSet;
action new;
source setsToFaceZone;
sourceInfo
{
faceSet innerCylinderSmallFace;
cellSet innerCylinderSmall;
}
}
// Dummy faceSet for creating initial patches
{
name dummyFaces;
type faceSet;
action new;
source labelToFace;
sourceInfo
{
value ();
}
}
);
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Whether to convert internal faces only (so leave boundary faces intact).
// This is only relevant if your face selection type can pick up boundary
// faces.
internalFacesOnly true;
// Baffles to create.
baffles
{
baffleFaces
{
//- Use predefined faceZone to select faces and orientation.
type faceZone;
zoneName innerCylinderSmall;
patches
{
master
{
//- Master side patch
name AMI1;
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI2;
transform noOrdering;
}
slave
{
//- Slave side patch
name AMI2;
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI1;
transform noOrdering;
}
}
}
}
// ************************************************************************* //

View File

@ -24,7 +24,7 @@ actions
source patchToFace; source patchToFace;
sourceInfo sourceInfo
{ {
name outerCylinder; name innerCylinder;
} }
} }

View File

@ -23,27 +23,50 @@ pointSync false;
patches patches
( (
{ {
name inlet; //- Master side patch
name AMI1;
patchInfo
{
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI2;
transform noOrdering;
}
constructFrom patches;
patches (innerCylinderSmall);
}
{
//- Slave side patch
name AMI2;
patchInfo
{
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI1;
transform noOrdering;
}
constructFrom patches;
patches (innerCylinderSmall_slave);
}
{
name inlet;
patchInfo patchInfo
{ {
type patch; type patch;
} }
constructFrom set; constructFrom set;
set inletFaces; set inletFaces;
} }
{ {
name outlet; name outlet;
patchInfo patchInfo
{ {
type patch; type patch;
} }
constructFrom set; constructFrom set;
set outletFaces; set outletFaces;
} }
); );

View File

@ -1,32 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name innerCylinder;
type cellZoneSet;
action remove;
}
{
name innerCylinderSmall;
type cellZoneSet;
action remove;
}
);
// ************************************************************************* //

View File

@ -204,13 +204,12 @@ castellatedMeshControls
innerCylinder innerCylinder
{ {
level (2 3); level (2 3);
cellZone innerCylinder;
faceZone innerCylinder;
cellZoneInside inside;
} }
innerCylinderSmall innerCylinderSmall
{ {
level (4 4); level (4 4);
faceType boundary;
cellZone innerCylinderSmall; cellZone innerCylinderSmall;
faceZone innerCylinderSmall; faceZone innerCylinderSmall;
cellZoneInside inside; cellZoneInside inside;
@ -288,7 +287,7 @@ castellatedMeshControls
// Whether any faceZones (as specified in the refinementSurfaces) // Whether any faceZones (as specified in the refinementSurfaces)
// are only on the boundary of corresponding cellZones or also allow // are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones. // free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true; allowFreeStandingZoneFaces false;
} }
@ -312,10 +311,22 @@ snapControls
// before upon reaching a correct mesh. // before upon reaching a correct mesh.
nRelaxIter 5; nRelaxIter 5;
//- Highly experimental and wip: number of feature edge snapping // Feature snapping
// iterations. Leave out altogether to disable.
// Do not use here since mesh resolution too low and baffles present // Number of feature edge snapping iterations.
nFeatureSnapIter 20; // Leave out altogether to disable.
nFeatureSnapIter 10;
// Detect (geometric only) features by sampling the surface
// (default=false).
implicitFeatureSnap true;
// Use castellatedMeshControls::features (default = true)
explicitFeatureSnap false;
// Detect features between multiple surfaces
// (only for explicitFeatureSnap, default = false)
multiRegionFeatureSnap true;
} }
@ -466,15 +477,6 @@ meshQualityControls
} }
// Advanced
// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this. // Note: the write tolerance needs to be higher than this.