INT: polyline: new extrusion model

Allows specification of extrusion path using blockMesh 'edges' syntax.
See tutorials/mesh/extrudeMesh/polyline

Contribution by Ivor Clifford/Paul Scherrer Institut
This commit is contained in:
Ivor Clifford
2020-10-22 10:12:46 +01:00
committed by mattijs
parent e11c072bc4
commit d8525f1746
12 changed files with 732 additions and 2 deletions

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
#------------------------------------------------------------------------------
cleanCase0
#------------------------------------------------------------------------------

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
runApplication extrudeMesh
mkdir 0
runApplication checkMesh -writeAllFields
#------------------------------------------------------------------------------

View File

@ -0,0 +1,76 @@
# vtk DataFile Version 2.0
triSurface
ASCII
DATASET POLYDATA
POINTS 150 float
-0.00118462 0.00145556 0.05 0.00362917 -0.00794343 0.05 0.00906034 0.00261524 0.05 -0.000733732 0.00987627 0.05 -0.00640955 -0.0075571 0.05 -0.010337 0.00220302 0.05 -0.0103681 0.012258 0.05 0.0101661 0.0125848 0.05 0.0152507 -0.0094649 0.05 -0.000146367 0.0183159 0.05
0.0190301 -0.00123334 0.05 5.77316e-16 -0.0192282 0.05 0.00893781 -0.0172851 0.05 -0.0192619 -0.00364522 0.05 -0.0158594 -0.012329 0.05 -0.00875674 -0.0180861 0.05 -0.0200044 0.00666196 0.05 0.0200294 0.00713721 0.05 -0.0107011 0.0223748 0.05 0.010384 0.0225978 0.05
-0.0205437 0.0166667 0.05 0.0205411 0.0169122 0.05 -0.000402551 0.0281378 0.05 0.0279622 -0.00741418 0.05 0.0171381 -0.0237049 0.05 0.00651776 -0.02856 0.05 0.0244607 -0.0164807 0.05 -0.0269584 -0.0120452 0.05 -0.00589008 -0.028961 0.05 -0.0296495 0.000266096 0.05
-0.0185784 -0.0233062 0.05 0.0298837 0.00136826 0.05 -0.0303624 0.0111111 0.05 0.0303728 0.0112074 0.05 -0.0205437 0.0277778 0.05 0.0205437 0.0277778 0.05 0.010398 0.0333888 0.05 -0.0107249 0.0333333 0.05 -0.0303624 0.0222222 0.05 0.0303624 0.0222222 0.05
-0.00062261 0.0389992 0.05 -0.0131668 -0.0376289 0.05 -0.0376289 -0.0131668 0.05 0.0131668 -0.0376289 0.05 0.0376289 -0.0131668 0.05 -0.0337554 -0.0212104 0.05 -0.0212104 -0.0337554 0.05 0.0212104 -0.0337554 0.05 -0.0281898 -0.0281898 0.05 0.0281898 -0.0281898 0.05
-0.0396159 -0.00446292 0.05 -0.00446292 -0.0396159 0.05 0.00446292 -0.0396159 0.05 0.0396159 -0.00446292 0.05 0.0339259 -0.021305 0.05 -0.0401812 0.00555556 0.05 0.0401812 0.00555556 0.05 -0.0401812 0.0166667 0.05 0.0401812 0.0166667 0.05 0.0205437 0.0388889 0.05
-0.0205437 0.0388889 0.05 -0.0303624 0.0333333 0.05 0.0303624 0.0333333 0.05 -0.0106454 0.0449279 0.05 0.00998637 0.0452813 0.05 -0.0401812 0.0277778 0.05 0.0401812 0.0277778 0.05 -0.05 0 0.05 0.05 0 0.05 6.56949e-16 -0.05 0.05
-0.0450484 -0.0216942 0.05 -0.0216942 -0.0450484 0.05 0.0450484 -0.0216942 0.05 0.0216942 -0.0450484 0.05 -0.0390916 -0.0311745 0.05 -0.0311745 -0.0390916 0.05 0.0390916 -0.0311745 0.05 0.0311745 -0.0390916 0.05 -0.0487464 -0.011126 0.05 -0.011126 -0.0487464 0.05
0.011126 -0.0487464 0.05 0.0487464 -0.011126 0.05 -0.00064175 0.0505428 0.05 -0.05 0.0111111 0.05 0.05 0.0111111 0.05 -0.0303624 0.0444444 0.05 0.0303624 0.0444444 0.05 -0.0202711 0.0502331 0.05 0.0199458 0.0504426 0.05 -0.05 0.0222222 0.05
0.05 0.0222222 0.05 -0.0401812 0.0388889 0.05 0.0401812 0.0388889 0.05 -0.0106296 0.0575545 0.05 0.00923272 0.0590338 0.05 -0.05 0.0333333 0.05 0.05 0.0333333 0.05 -0.00174385 0.0607159 0.05 -0.0303624 0.0555556 0.05 0.0303624 0.0555556 0.05
-0.0401812 0.05 0.05 0.0401812 0.05 0.05 0.0203616 0.0612505 0.05 -0.0203915 0.0612551 0.05 -0.05 0.0444444 0.05 0.05 0.0444444 0.05 0.000547585 0.0701127 0.05 -0.0106694 0.0696509 0.05 0.0110806 0.0703326 0.05 -0.0401812 0.0611111 0.05
0.0401812 0.0611111 0.05 -0.0303019 0.0669473 0.05 0.0303018 0.0669474 0.05 -0.0208313 0.0717012 0.05 0.021081 0.0716942 0.05 -0.05 0.0555556 0.05 0.05 0.0555556 0.05 -0.00555556 0.0803624 0.05 0.00555556 0.0803624 0.05 0.0166148 0.0804898 0.05
-0.0166333 0.0804897 0.05 0.0397529 0.0724965 0.05 -0.0397532 0.0724964 0.05 -0.05 0.0666667 0.05 0.05 0.0666667 0.05 -0.0287799 0.0796819 0.05 0.0287814 0.0796885 0.05 0 0.0901812 0.05 0.0111111 0.0901812 0.05 -0.0111111 0.0901812 0.05
0.0402393 0.0830685 0.05 -0.0402396 0.0830686 0.05 -0.05 0.0777778 0.05 0.05 0.0777778 0.05 0.0222222 0.0901812 0.05 -0.0222222 0.0901812 0.05 0.0344393 0.0903502 0.05 -0.0344394 0.0903503 0.05 0.00555556 0.1 0.05 -0.00555556 0.1 0.05
0.0166667 0.1 0.05 -0.0166667 0.1 0.05 -0.05 0.0888889 0.05 0.05 0.0888889 0.05 0.0277778 0.1 0.05 -0.0277778 0.1 0.05 -0.0388889 0.1 0.05 0.0388889 0.1 0.05 -0.05 0.1 0.05 0.05 0.1 0.05
POLYGONS 257 1028
3 104 100 115 3 91 100 104 3 65 91 95 3 55 83 67 3 57 89 83 3 50 67 78 3 45 70 74 3 46 48 75 3 51 41 79 3 41 71 79
3 42 78 70 3 109 123 115 3 122 132 123 3 43 52 80 3 131 142 132 3 76 72 54 3 47 73 77 3 146 148 142 3 44 54 72 3 53 44 81
3 56 53 68 3 66 58 90 3 92 66 96 3 101 92 105 3 133 121 124 3 130 121 133 3 149 147 143 3 110 116 124 3 143 136 130 3 134 136 144
3 128 134 140 3 128 119 134 3 129 117 127 3 131 122 125 3 146 137 145 3 58 84 90 3 91 104 95 3 65 95 89 3 48 74 75 3 49 77 76
3 52 69 80 3 55 57 83 3 57 65 89 3 50 55 67 3 42 50 78 3 48 45 74 3 27 42 45 3 46 75 71 3 29 55 50 3 30 45 48
3 51 79 69 3 30 41 28 3 52 51 69 3 28 41 51 3 41 46 71 3 42 27 50 3 42 70 45 3 43 25 52 3 109 115 100 3 127 138 139
3 122 123 109 3 137 146 142 3 129 139 141 3 43 80 73 3 131 132 122 3 135 141 145 3 24 43 47 3 32 57 55 3 44 26 54 3 47 43 73
3 49 76 54 3 49 24 47 3 49 47 77 3 44 72 81 3 38 65 57 3 53 23 44 3 53 81 68 3 61 91 65 3 56 68 84 3 56 31 53
3 85 100 91 3 58 56 84 3 66 90 96 3 92 96 105 3 98 109 100 3 92 62 66 3 101 105 116 3 126 114 112 3 110 101 116 3 136 147 144
3 130 133 143 3 130 126 121 3 110 124 121 3 102 99 112 3 143 147 136 3 126 130 136 3 134 144 140 3 128 140 138 3 127 128 138 3 111 122 109
3 129 127 139 3 125 137 131 3 135 129 141 3 135 120 129 3 137 135 145 3 137 142 131 3 125 135 137 3 113 125 111 3 120 135 125 3 86 92 101
3 118 128 127 3 117 129 120 3 103 113 111 3 118 127 117 3 88 86 99 3 119 128 118 3 126 136 134 3 99 101 110 3 112 110 121 3 126 134 119
3 112 121 126 3 99 110 112 3 108 119 118 3 39 58 66 3 86 101 99 3 106 118 117 3 33 56 58 3 62 92 86 3 34 61 38 3 39 66 62
3 20 38 32 3 30 48 46 3 52 28 51 3 49 26 24 3 33 58 39 3 31 56 33 3 23 53 31 3 44 23 26 3 10 23 31 3 111 125 122
3 25 43 24 3 8 26 23 3 52 25 28 3 12 25 24 3 30 46 41 3 17 31 33 3 30 15 14 3 27 45 30 3 27 14 13 3 29 50 27
3 29 32 55 3 29 13 16 3 16 20 32 3 35 39 62 3 38 57 32 3 85 98 100 3 59 62 86 3 61 65 38 3 85 91 61 3 85 60 87
3 98 111 109 3 107 117 120 3 98 85 87 3 103 111 98 3 21 33 39 3 60 85 61 3 34 60 61 3 20 34 38 3 11 28 25 3 16 32 29
3 13 29 27 3 14 27 30 3 5 16 13 3 15 30 28 3 4 13 14 3 11 15 28 3 4 14 15 3 103 98 87 3 113 120 125 3 107 106 117
3 12 11 25 3 12 1 11 3 24 8 12 3 4 11 1 3 18 34 20 3 17 10 31 3 21 7 17 3 21 17 33 3 37 60 34 3 35 21 39
3 63 87 60 3 59 36 35 3 59 35 62 3 93 103 87 3 88 59 86 3 102 112 114 3 102 88 99 3 102 94 88 3 114 126 119 3 114 108 102
3 108 114 119 3 107 113 103 3 106 108 118 3 94 102 108 3 97 94 106 3 107 120 113 3 49 54 26 3 24 26 8 3 64 59 88 3 94 108 106
3 93 107 103 3 82 64 94 3 107 97 106 3 64 88 94 3 40 63 37 3 36 59 64 3 36 64 40 3 19 21 35 3 19 35 36 3 22 37 18
3 2 10 17 3 6 20 16 3 7 21 19 3 2 8 10 3 2 17 7 3 3 5 0 3 8 1 12 3 8 23 10 3 1 8 2 3 4 0 5
3 0 1 2 3 4 15 11 3 5 13 4 3 6 16 5 3 3 2 7 3 9 22 18 3 18 20 6 3 37 34 18 3 22 19 36 3 63 93 87
3 63 60 37 3 82 97 93 3 0 4 1 3 3 9 6 3 82 40 64 3 82 93 63 3 40 82 63 3 22 36 40 3 22 40 37 3 9 7 19
3 9 18 6 3 9 3 7 3 9 19 22 3 3 0 2 3 3 6 5 3 107 93 97 3 97 82 94
CELL_DATA 257
FIELD attributes 1
region 1 257 float
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.1 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 0.0001;
writeControl runTime;
writeInterval 0.1;
purgeWrite 0;
writeFormat binary;
writePrecision 8;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
// ************************************************************************* //

View File

@ -0,0 +1,65 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
constructFrom surface;
surface "<constant>/triSurface/channel.vtk";
flipNormals false;
extrudeModel polyline;
nLayers 200;
expansionRatio 1.0;
polylineCoeffs
{
vertices 10
(
( 0 0 0.05 ) //0
( 0 0 0.75 )
( 0 -0.3 1.05 ) //2
( 0 -0.7 1.05 )
( 0 -1 1.35 ) //4
( 0 -1 1.75 )
( 0.3 -1 2.05 ) //6
( 0.826794919 -1 2.05 )
( 1.08660254 -1 1.9 ) //8
( 1.5 -1 1.183974596 )
);
edges 9
(
line 0 1
arc 1 2 ( 0 -0.087867966 0.962132034 )
line 2 3
arc 3 4 ( 0 -0.912132034 1.137867966 )
line 4 5
arc 5 6 ( 0.087867966 -1 1.962132034 )
line 6 7
arc 7 8 ( 0.976794919 -1 2.009807621 )
line 8 9
);
toleranceCheck 1e-6;
}
mergeFaces false;
mergeTol 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,63 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.1 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
// default Gauss linear;
default cellMDLimited leastSquares 1.0;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss upwind;
div(phi,k) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div(phi,epsilon) bounded Gauss upwind;
div((nuEff*dev(grad(U).T()))) Gauss linear;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div(U) Gauss linear;
}
laplacianSchemes
{
// default Gauss linear corrected;
default Gauss linear limited 0.5 corrected;
}
interpolationSchemes
{
default linear;
interpolate(U) linear;
}
snGradSchemes
{
default limited 0.5 corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //

View File

@ -0,0 +1,109 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.1 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"p|pFinal"
{
solver GAMG;
tolerance 1e-7;
relTol 1e-3;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
};
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 1e-3;
nSweeps 1;
};
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 1e-3;
nSweeps 1;
};
epsilon
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 1e-3;
nSweeps 1;
};
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 1e-3;
nSweeps 1;
};
}
blockSolver
{
nNonOrthogonalCorrectors 1;
nCorrectors 2;
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
}
PISO
{
nCorrectors 3;
}
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
potentialFlow
{
nNonOrthogonalCorrectors 1;
}
relaxationFactors
{
p 0.3;
U 0.7;
k 0.7;
omega 0.7;
epsilon 0.7;
}
// ************************************************************************* //