ENH: tutorial update

This commit is contained in:
andy
2014-01-27 15:41:54 +00:00
parent f0cec33f88
commit c380695ead
30 changed files with 65 additions and 50311 deletions

View File

@ -21,24 +21,14 @@ runApplication renumberMesh -overwrite
# force removal of fields generated by snappy # force removal of fields generated by snappy
\rm -rf 0 \rm -rf 0
# - generate face/cell sets and zones # - generate face/cell sets and zones
#runApplication setSet -batch 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
# - create the inlet/outlet and AMI patches # - create the inlet/outlet and AMI patches
runApplication createPatch -overwrite runApplication createPatch -overwrite
# - test by running moveDynamicMes # - test by running moveDynamicMes
#runApplication moveDynamicMesh -checkAMI #runApplication moveDynamicMesh -checkAMI
# - set the initial fields
# - apply the initial fields
cp -rf 0.org 0 cp -rf 0.org 0

View File

@ -64,7 +64,7 @@ geometry
} }
} }
} }
propellerTip.obj propellerTip.obj.gz
{ {
type triSurfaceMesh; type triSurfaceMesh;
name propellerTip; name propellerTip;

View File

@ -9,6 +9,7 @@ cleanCase
cd ../wingMotion2D_simpleFoam cd ../wingMotion2D_simpleFoam
cleanCase cleanCase
rm -rf 0
cd ../wingMotion2D_pimpleDyMFoam cd ../wingMotion2D_pimpleDyMFoam
cleanCase cleanCase

View File

@ -13,6 +13,7 @@ runApplication snappyHexMesh -overwrite
cd ../wingMotion2D_simpleFoam cd ../wingMotion2D_simpleFoam
runApplication extrudeMesh runApplication extrudeMesh
runApplication createPatch -overwrite runApplication createPatch -overwrite
cp -r 0.org 0
runApplication simpleFoam runApplication simpleFoam
# Copy the mesh from the steady state case and map the results to a # Copy the mesh from the steady state case and map the results to a

View File

@ -35,26 +35,26 @@ FoamFile
nFaces 62; nFaces 62;
startFace 25291; startFace 25291;
} }
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 25353;
}
front front
{ {
type empty; type empty;
inGroups 1(empty); inGroups 1(empty);
nFaces 12565; nFaces 12565;
startFace 25353; startFace 25731;
} }
back back
{ {
type empty; type empty;
inGroups 1(empty); inGroups 1(empty);
nFaces 12565; nFaces 12565;
startFace 37918; startFace 38296;
}
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 50483;
} }
) )

View File

@ -35,26 +35,26 @@ FoamFile
nFaces 62; nFaces 62;
startFace 25291; startFace 25291;
} }
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 25353;
}
front front
{ {
type empty; type empty;
inGroups 1(empty); inGroups 1(empty);
nFaces 12565; nFaces 12565;
startFace 25353; startFace 25731;
} }
back back
{ {
type empty; type empty;
inGroups 1(empty); inGroups 1(empty);
nFaces 12565; nFaces 12565;
startFace 37918; startFace 38296;
}
wing
{
type wall;
inGroups 1(wall);
nFaces 378;
startFace 50483;
} }
) )

View File

@ -14,55 +14,41 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
// a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
// is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.
// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
// and centre to make matching easier
// - always create both halves in one invocation with correct 'neighbourPatch'
// setting.
// - optionally pointSync true to guarantee points to line up.
// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
// "face 0 area does not match neighbour 2 by 0.0100005%"
// " -- possible face ordering problem."
// - in polyMesh/boundary file:
// - loosen matchTolerance of all cyclics to get case to load
// - or change patch type from 'cyclic' to 'patch'
// and regenerate cyclic as above
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclics).
pointSync false; pointSync false;
// Patches to create.
patches patches
( (
{ {
// Name of new patch // Name of new patch
name wing; name front;
// Type of new patch // Type of new patch
patchInfo patchInfo
{ {
type wall; type empty;
} }
// How to construct: either from 'patches' or 'set' // How to construct: either from 'patches' or 'set'
constructFrom patches; constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed. // If constructFrom = patches : names of patches. Wildcards allowed.
patches ( wing_5degrees.obj_WALL10 ); patches (symFront);
}
{
// Name of new patch
name back;
// Type of new patch
patchInfo
{
type empty;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (symBack);
} }
); );

View File

@ -21,10 +21,10 @@ FoamFile
constructFrom patch; constructFrom patch;
sourceCase "../wingMotion_snappyHexMesh"; sourceCase "../wingMotion_snappyHexMesh";
sourcePatches (front); sourcePatches (symFront);
// If construct from patch: patch to use for back (can be same as sourcePatch) // If construct from patch: patch to use for back (can be same as sourcePatch)
exposedPatchName back; exposedPatchName symBack;
// Flip surface normals before usage. Valid only for extrude from surface or // Flip surface normals before usage. Valid only for extrude from surface or
// patch. // patch.

View File

@ -68,18 +68,18 @@ boundary
); );
} }
front symFront
{ {
type empty; type symmetryPlane;
faces faces
( (
(4 5 6 7) (4 5 6 7)
); );
} }
back symBack
{ {
type empty; type symmetryPlane;
faces faces
( (
(0 3 2 1) (0 3 2 1)

View File

@ -31,6 +31,7 @@ geometry
wing_5degrees.obj wing_5degrees.obj
{ {
type triSurfaceMesh; type triSurfaceMesh;
name wing;
} }
refinementBox refinementBox
@ -95,7 +96,7 @@ castellatedMeshControls
refinementSurfaces refinementSurfaces
{ {
wing_5degrees.obj wing
{ {
// Surface-wise min and max refinement level // Surface-wise min and max refinement level
level (5 5); level (5 5);
@ -180,7 +181,7 @@ addLayersControls
// Per final patch (so not geometry!) the layer information // Per final patch (so not geometry!) the layer information
layers layers
{ {
"wing.*" wing
{ {
nSurfaceLayers 3; nSurfaceLayers 3;
} }

View File

@ -50,7 +50,7 @@ boundaryField
inletValue $internalField; inletValue $internalField;
} }
porosity_ascii porosity
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -53,7 +53,7 @@ boundaryField
inletValue uniform (0 0 0); inletValue uniform (0 0 0);
} }
porosity_ascii porosity
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -59,7 +59,7 @@ boundaryField
value uniform 200; value uniform 200;
} }
porosity_ascii porosity
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -59,7 +59,7 @@ boundaryField
value uniform 1; value uniform 1;
} }
porosity_ascii porosity
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -57,7 +57,7 @@ boundaryField
value uniform 0; value uniform 0;
} }
porosity_ascii porosity
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -47,7 +47,7 @@ boundaryField
value $internalField; value $internalField;
} }
porosity_ascii porosity
{ {
type zeroGradient; type zeroGradient;
} }

View File

@ -44,7 +44,7 @@ boundaryField
zGround $zGround; zGround $zGround;
} }
"terrain_.*" terrain
{ {
type uniformFixedValue; type uniformFixedValue;
uniformValue (0 0 0); uniformValue (0 0 0);

View File

@ -25,7 +25,7 @@ boundaryField
{ {
#include "include/ABLConditions" #include "include/ABLConditions"
"terrain_.*" terrain
{ {
type epsilonWallFunction; type epsilonWallFunction;
Cmu 0.09; Cmu 0.09;

View File

@ -37,7 +37,7 @@ boundaryField
uniformValue constant $turbulentKE; uniformValue constant $turbulentKE;
} }
"terrain_.*" terrain
{ {
type kqRWallFunction; type kqRWallFunction;
value uniform 0.0; value uniform 0.0;

View File

@ -35,7 +35,7 @@ boundaryField
value uniform 0; value uniform 0;
} }
"terrain_.*" terrain
{ {
type nutkAtmRoughWallFunction; type nutkAtmRoughWallFunction;
z0 $z0; z0 $z0;

View File

@ -33,7 +33,7 @@ boundaryField
uniformValue constant $pressure; uniformValue constant $pressure;
} }
"terrain_.*" terrain
{ {
type zeroGradient; type zeroGradient;
} }