TUT: mesh: clean up tutorials

This commit is contained in:
Kutalmis Bercin
2021-06-04 10:19:30 +01:00
committed by Andrew Heather
parent 6120e13d29
commit 3a858ac682
413 changed files with 623 additions and 1608672 deletions

View File

@ -1,52 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 1 -1 0 0 0 0];
internalField uniform $flowVelocity;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}
lowerWall
{
type fixedValue;
value $internalField;
}
motorBikeGroup
{
type noSlip;
}
#include "include/frontBackUpperPatches"
}
// ************************************************************************* //

View File

@ -1,15 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
inlet
{
type fixedValue;
value $internalField;
}
// ************************************************************************* //

View File

@ -1,19 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
upperWall
{
type slip;
}
frontAndBack
{
type slip;
}
// ************************************************************************* //

View File

@ -1,14 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
flowVelocity (20 0 0);
pressure 0;
turbulentKE 0.24;
turbulentOmega 1.78;
// ************************************************************************* //

View File

@ -1,53 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $turbulentKE;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
//- Define inlet conditions
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
lowerWall
{
type kqRWallFunction;
value $internalField;
}
motorBikeGroup
{
type kqRWallFunction;
value $internalField;
}
#include "include/frontBackUpperPatches"
}
// ************************************************************************* //

View File

@ -1,64 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
frontAndBack
{
type calculated;
value uniform 0;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
lowerWall
{
type nutkWallFunction;
value uniform 0;
}
upperWall
{
type calculated;
value uniform 0;
}
motorBikeGroup
{
type nutkWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,52 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 0 -1 0 0 0 0];
internalField uniform $turbulentOmega;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
lowerWall
{
type omegaWallFunction;
value $internalField;
}
motorBikeGroup
{
type omegaWallFunction;
value $internalField;
}
#include "include/frontBackUpperPatches"
}
// ************************************************************************* //

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $pressure;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
lowerWall
{
type zeroGradient;
}
motorBikeGroup
{
type zeroGradient;
}
#include "include/frontBackUpperPatches"
}
// ************************************************************************* //

View File

@ -5,8 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
cleanCase0
# Remove surface and features
rm -f constant/triSurface/*.eMesh
rm -rf constant/extendedFeatureEdgeMesh
rm -rf constant
#------------------------------------------------------------------------------

View File

@ -3,6 +3,12 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
mkdir -p constant
cp -rf \
"$FOAM_TUTORIALS"/resources/geometry/motorBike_leakDetection \
constant/triSurface
# Alternative decomposeParDict name:
decompDict="-decomposeParDict system/decomposeParDict.6"
## Standard decomposeParDict name:

View File

@ -1,21 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 1.5e-05;
// ************************************************************************* //

View File

@ -1,4 +0,0 @@
Directory to house tri-surfaces
The Allrun script copies the surface from the $FOAM_TUTORIALS/resources/geometry
directory

View File

@ -1,134 +0,0 @@
# Wavefront OBJ file written 2018-08-03T14:33:08
o bag_open
# points : 42
# faces : 78
# zones : 1
# 0 bag (nFaces: 78)
# <points count="42">
v 0.731382 -0.184759 1.21724
v 0.730354 0.179212 1.2226
v 0.763861 -0.186029 1.30968
v 0.762833 0.177942 1.31504
v 0.767511 -0.186152 1.31877
v 0.768041 -0.186168 1.31992
v 0.766482 0.177819 1.32413
v 0.773217 -0.186297 1.3297
v 0.772189 0.177674 1.33506
v 0.779326 -0.186416 1.33893
v 0.778297 0.177555 1.34429
v 1.11457 -0.181694 1.08265
v 1.11354 0.182278 1.08801
v 0.7863 -0.186523 1.34752
v 0.785272 0.177448 1.35288
v 0.794069 -0.186617 1.35537
v 0.79304 0.177355 1.36073
v 0.802557 -0.186696 1.36242
v 0.801529 0.177275 1.36778
v 0.811685 -0.186762 1.3686
v 0.810657 0.17721 1.37396
v 0.821369 -0.186812 1.37385
v 0.820341 0.17716 1.37921
v 0.831521 -0.186846 1.37812
v 0.830492 0.177126 1.38348
v 0.842048 -0.186864 1.38138
v 0.841019 0.177107 1.38674
v 0.852854 -0.186866 1.38359
v 0.851825 0.177105 1.38895
v 0.863837 -0.186852 1.38474
v 0.862809 0.177119 1.3901
v 0.874894 -0.186822 1.38481
v 0.873866 0.177149 1.39017
v 0.885914 -0.186776 1.3838
v 0.884886 0.177195 1.38916
v 0.898014 -0.186706 1.38141
v 0.895756 0.177257 1.38708
v 0.907386 -0.186638 1.37858
v 0.896986 0.177265 1.38677
v 0.906357 0.177333 1.38394
v 1.18436 -0.184423 1.2813
v 1.18333 0.179549 1.28666
# </points>
# <faces count="78">
g bag
f 2 1 4
f 4 1 3
f 3 5 4
f 4 5 7
f 7 5 6
f 9 6 8
f 10 9 8
f 10 11 9
f 10 14 11
f 11 14 15
f 15 14 16
f 17 16 18
f 19 18 20
f 21 20 22
f 23 22 24
f 25 24 26
f 27 26 28
f 29 28 30
f 31 30 32
f 33 32 34
f 35 34 37
f 35 33 34
f 34 36 37
f 37 36 39
f 39 36 38
f 40 39 38
f 33 31 32
f 31 29 30
f 29 27 28
f 27 25 26
f 25 23 24
f 23 21 22
f 21 19 20
f 19 17 18
f 17 15 16
f 9 7 6
f 13 2 40
f 42 13 40
f 7 9 4
f 4 9 11
f 40 11 33
f 35 40 33
f 35 37 40
f 40 37 39
f 11 15 33
f 33 15 31
f 31 15 17
f 29 17 19
f 27 19 21
f 25 21 23
f 25 27 21
f 27 29 19
f 29 31 17
f 2 4 40
f 40 4 11
f 41 38 12
f 12 38 1
f 1 38 3
f 3 38 10
f 8 3 10
f 8 6 3
f 3 6 5
f 36 34 38
f 38 34 32
f 10 32 14
f 10 38 32
f 32 30 14
f 14 30 16
f 16 30 28
f 18 28 26
f 20 26 24
f 22 20 24
f 20 18 26
f 18 16 28
f 42 40 41
f 41 40 38
f 41 12 42
f 42 12 13
# </faces>

View File

@ -1,28 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -12,7 +12,6 @@ FoamFile
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
@ -83,4 +82,5 @@ boundary
}
);
// ************************************************************************* //

View File

@ -22,8 +22,7 @@ DebugSwitches
//shortestPath 1;
}
application simpleFoam;
application snappyHexMesh;
startFrom startTime;

View File

@ -1,37 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
cuttingPlane
{
type surfaces;
libs (sampling);
writeControl writeTime;
surfaceFormat vtk;
fields ( p U );
interpolationScheme cellPoint;
surfaces
{
yNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (0 1 0);
}
interpolate true;
}
}
}
// ************************************************************************* //

View File

@ -17,11 +17,11 @@ FoamFile
numberOfSubdomains 6;
method hierarchical;
// method ptscotch;
coeffs
{
n (3 2 1);
}
// ************************************************************************* //

View File

@ -1,17 +0,0 @@
// -*- C++ -*-
// Minimal example of using the ensight write function object.
// Many more options possible
ensightWrite
{
type ensightWrite;
libs (utilityFunctionObjects);
log true;
// Fields to output (words or regex)
fields (U p "(k|epsilon|omega)");
writeControl writeTime;
writeInterval 1;
}
// ************************************************************************* //

View File

@ -1,41 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
forceCoeffs1
{
type forceCoeffs;
libs (forces);
writeControl timeStep;
timeInterval 1;
log yes;
patches (motorBikeGroup);
rho rhoInf; // Indicates incompressible
rhoInf 1; // Redundant for incompressible
liftDir (0 0 1);
dragDir (1 0 0);
CofR (0.72 0 0); // Axle midpoint on ground
pitchAxis (0 1 0);
magUInf 20;
lRef 1.42; // Wheelbase length
Aref 0.75; // Estimated
/*
binData
{
nBin 20; // output data into 20 bins
direction (1 0 0); // bin direction
cumulative yes;
}
*/
}
// ************************************************************************* //

View File

@ -16,42 +16,30 @@ FoamFile
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(U) cellLimited Gauss linear 1;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,k) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}

View File

@ -14,73 +14,5 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-7;
relTol 0.01;
}
Phi
{
$p;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
consistent yes;
}
potentialFlow
{
nNonOrthogonalCorrectors 10;
}
relaxationFactors
{
equations
{
U 0.9;
k 0.7;
omega 0.7;
}
}
cache
{
grad(U);
}
// ************************************************************************* //

View File

@ -1,58 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
streamLines
{
// Where to load it from
libs (fieldFunctionObjects);
type streamLine;
// Output every
writeControl writeTime;
// writeInterval 10;
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; //csv; //ensight;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
// Names of fields to sample. Should contain above velocity field!
fields (p U k);
// Steps particles can travel before being removed
lifeTime 10000;
//- Specify either absolute length of steps (trackLength) or a number
// of subcycling steps per cell (nSubCycle)
// Size of single track segment [m]
//trackLength 1e-3;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
// Cloud name to use
cloud particleTracks;
// Seeding method.
seedSampleSet
{
type uniform;
axis x; //distance;
// Note: tracks slightly offset so as not to be on a face
start (-1.001 -0.05 0.0011);
end (-1.001 -0.05 1.0011);
nPoints 20;
}
}
// ************************************************************************* //

View File

@ -1,100 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// Interpolate U to create near-wall UNear
near
{
// Where to load it from
libs (fieldFunctionObjects);
type nearWallFields;
// Output every
writeControl writeTime;
// Calculate every
executeControl writeTime;
// Fields to be sampled. Per field original name and mapped field to
// create.
// Note: fields only get updated when writing!
fields
(
(U UNear)
);
// Patches/groups to sample (regular expressions)
patches (motorBikeGroup);
// Distance to sample
distance 0.001;
}
// Use UNear to track along wall
wallBoundedStreamLines
{
// Where to load it from (if not already in solver)
libs (fieldFunctionObjects);
type wallBoundedStreamLine;
// Output every
writeControl writeTime;
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
// Velocity field to use for tracking.
U UNear;
// Interpolation method. Default is cellPoint.
// interpolationScheme pointMVC;
// Tracked forwards (+U) or backwards (-U)
trackForward true;
interpolationScheme cellPoint;
// Names of fields to sample. Should contain above velocity field!
fields (p U k UNear);
// Steps particles can travel before being removed
lifeTime 100;
// Cloud name to use
cloud wallBoundedParticleTracks;
// Seeding method.
seedSampleSet
{
type patchSeed;
uniformCoeffs
{
axis x; //distance;
start (0.0035 0.0999 0.0001);
end (0.0035 0.0999 0.0099);
nPoints 20;
}
cloudCoeffs
{
axis x; //distance;
points ((0.351516548679288 -0.0116085375585099 1.24));
}
patchSeedCoeffs
{
patches (motorBikeGroup);
axis x; //distance;
maxPoints 20000;
}
}
}
// ************************************************************************* //