mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: snappyHexMesh: add buffer layers before snapping
This commit is contained in:
62
tutorials/mesh/moveDynamicMesh/badMove/0/pointDisplacement
Normal file
62
tutorials/mesh/moveDynamicMesh/badMove/0/pointDisplacement
Normal file
@ -0,0 +1,62 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2309 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
arch "LSB;label=32;scalar=64";
|
||||
class pointVectorField;
|
||||
location "0";
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
$minX
|
||||
}
|
||||
minY
|
||||
{
|
||||
$minX
|
||||
}
|
||||
maxY
|
||||
{
|
||||
$minX
|
||||
}
|
||||
minZ
|
||||
{
|
||||
$minX
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
$minX
|
||||
}
|
||||
boundaryEdges
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue table
|
||||
(
|
||||
( 0.0 (0 0 0))
|
||||
( 1.0 (1.0 -1.0 0))
|
||||
//(10.0 (0 0 0))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
17
tutorials/mesh/moveDynamicMesh/badMove/Allclean
Executable file
17
tutorials/mesh/moveDynamicMesh/badMove/Allclean
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -rf constant/extendedFeatureEdgeMesh
|
||||
|
||||
#- From pointMesh generation
|
||||
rm -rf constant/pointMesh
|
||||
rm -f constant/triSurface/blockMesh.obj
|
||||
|
||||
#- From surfaceFeatureExtract
|
||||
rm -f constant/triSurface/box222.eMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
23
tutorials/mesh/moveDynamicMesh/badMove/Allrun
Executable file
23
tutorials/mesh/moveDynamicMesh/badMove/Allrun
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- Generate mesh
|
||||
runApplication blockMesh
|
||||
|
||||
runApplication surfaceMeshExtract \
|
||||
-featureAngle 45 \
|
||||
-patches '(minX maxY)' \
|
||||
constant/triSurface/blockMesh.obj
|
||||
|
||||
#- For postprocessing: extract new pointPatches as vtk files
|
||||
setSet <<EOF
|
||||
pointSet p0 new patchToPoint boundaryEdges
|
||||
EOF
|
||||
|
||||
#- Morph mesh to the surface (.obj file) and feature-edges (.eMesh file)
|
||||
#- Note: needs point-based motion solver
|
||||
runApplication moveDynamicMesh
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
1
tutorials/mesh/moveDynamicMesh/badMove/README.txt
Normal file
1
tutorials/mesh/moveDynamicMesh/badMove/README.txt
Normal file
@ -0,0 +1 @@
|
||||
Testing relaxation of mesh motion
|
||||
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2312 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverFvMesh;
|
||||
|
||||
// For point-bcs
|
||||
motionSolverLibs (fvMotionSolvers);
|
||||
|
||||
motionSolver displacementPointSmoothing;
|
||||
displacementPointSmoothingCoeffs
|
||||
{
|
||||
// Use geometricElementTransform to maintain relative sizes
|
||||
//pointSmoother geometricElementTransform;
|
||||
//transformationParameter 0.667;
|
||||
//nPointSmootherIter 10;
|
||||
|
||||
pointSmoother laplacian;
|
||||
nPointSmootherIter 10;
|
||||
relaxationFactors (1.0 0.8 0.6 0.4 0.2 0.0);
|
||||
meshQuality
|
||||
{
|
||||
#includeEtc "caseDicts/meshQualityDict"
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
95
tutorials/mesh/moveDynamicMesh/badMove/system/blockMeshDict
Normal file
95
tutorials/mesh/moveDynamicMesh/badMove/system/blockMeshDict
Normal file
@ -0,0 +1,95 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2312 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
// Inner block
|
||||
(-2 -2 -2)
|
||||
( 2 -2 -2)
|
||||
( 2 2 -2)
|
||||
(-2 2 -2)
|
||||
(-2 -2 2)
|
||||
( 2 -2 2)
|
||||
( 2 2 2)
|
||||
(-2 2 2)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (5 5 4) grading (1 1 1) // Inner block
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
minX
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 0) // block 0: x-min
|
||||
);
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1) // block 0: x-max
|
||||
);
|
||||
}
|
||||
|
||||
minY
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 2) // block 0: y-min
|
||||
);
|
||||
}
|
||||
|
||||
maxY
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 3) // block 0: y-max
|
||||
);
|
||||
}
|
||||
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 4) // block 0: z-min
|
||||
);
|
||||
}
|
||||
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 5) // block 0: z-max
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
53
tutorials/mesh/moveDynamicMesh/badMove/system/controlDict
Normal file
53
tutorials/mesh/moveDynamicMesh/badMove/system/controlDict
Normal file
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2312 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
DebugSwitches
|
||||
{
|
||||
pointBoundaryMesh 1;
|
||||
}
|
||||
|
||||
application moveDynamicMesh;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 10;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
44
tutorials/mesh/moveDynamicMesh/badMove/system/fvSchemes
Normal file
44
tutorials/mesh/moveDynamicMesh/badMove/system/fvSchemes
Normal file
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2312 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
33
tutorials/mesh/moveDynamicMesh/badMove/system/fvSolution
Normal file
33
tutorials/mesh/moveDynamicMesh/badMove/system/fvSolution
Normal file
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2312 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"cellDisplacement.*"
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
smoother GaussSeidel;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PIMPLE
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user