tutorials: planarCouette: Simplify creation of cyclic patches
This commit is contained in:
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication createPatch -overwrite
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -50,17 +50,19 @@ boundary
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
left
|
||||
cyc_half0
|
||||
{
|
||||
type wall;
|
||||
type cyclic;
|
||||
neighbourPatch cyc_half1;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
right
|
||||
cyc_half1
|
||||
{
|
||||
type wall;
|
||||
type cyclic;
|
||||
neighbourPatch cyc_half0;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
|
||||
@ -1,95 +0,0 @@
|
||||
/*--------------------------------*- 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;
|
||||
object createPatchDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// 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.
|
||||
// - always: remove zero-sized (non-coupled) patches (that were not added)
|
||||
|
||||
// 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 true;
|
||||
|
||||
// Optional: Write cyclic matches into .obj format; defaults to false.
|
||||
// writeCyclicMatch false;
|
||||
|
||||
// Patches to create.
|
||||
patches
|
||||
(
|
||||
{
|
||||
// Name of new patch
|
||||
name cyc_half0;
|
||||
|
||||
// Dictionary to construct new patch from
|
||||
patchInfo
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch cyc_half1;
|
||||
}
|
||||
|
||||
// How to construct: either from 'patches' or 'set'
|
||||
constructFrom patches;
|
||||
|
||||
// If constructFrom = patches : names of patches. Wildcards allowed.
|
||||
patches (left);
|
||||
|
||||
// If constructFrom = set : name of faceSet
|
||||
set f0;
|
||||
}
|
||||
{
|
||||
// Name of new patch
|
||||
name cyc_half1;
|
||||
|
||||
// Dictionary to construct new patch from
|
||||
patchInfo
|
||||
{
|
||||
type cyclic;
|
||||
neighbourPatch cyc_half0;
|
||||
}
|
||||
|
||||
// How to construct: either from 'patches' or 'set'
|
||||
constructFrom patches;
|
||||
|
||||
// If constructFrom = patches : names of patches. Wildcards allowed.
|
||||
patches (right);
|
||||
|
||||
// If constructFrom = set : name of faceSet
|
||||
set f0;
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user