Commit 3e76813f authored by Franjo's avatar Franjo
Browse files

Added examples demonstrating usage of the polyhedral meshing workflow

parent f99dda6c
# Ignore everything in this directory
*
# Except this file
!.gitignore
\ No newline at end of file
#!/bin/bash
# Klas Jareteg, 2012-10-13
# Description:
# Script to run comparative case between coupled and segregated solvers.
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -r constant/polyMesh
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication pMesh
runApplication checkMesh
This tutorial demonstrates the polyhedral meshing workfow without boundary layers. It also demonstrates usage of box, line, sphere and cone refinement sources.
This diff is collapsed.
# Ignore everything in this directory
*
# Except this file
!.gitignore
\ No newline at end of file
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: franjo.juretic@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object meshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application ;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 10;
deltaT 0.05;
writeControl timeStep;
writeInterval 20;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.0 |
| \\ / A nd | Web: http://www.extend-project.de |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: franjo.juretic@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: franjo.juretic@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
};
U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
};
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| _ _ _ _ | |
| // \\ | Creative Fields cfMeshPRO |
| | cfMeshPRO | | |
| \\ _ _ _ _ // | Version: 0.0.99 |
| | Web: www.c-fields.com e-mail: support@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2;
format ascii;
class dictionary;
location "system";
object meshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
maxCellSize 40;
surfaceFile "surfaceMeshes/bunnyWrapped.fms";
objectRefinements
{
ear1
{
cellSize 20.1;
p0 ( -100 1873 -320 );
p1 ( -560 1400 0 );
radius0 200;
radius1 200;
type cone;
}
ear2
{
cellSize 20.1;
p0 ( -650 1873 -620 );
p1 ( -670 1300 0 );
radius0 200;
radius1 200;
type cone;
}
/*
insideTheBody
{
cellSize 20.1;
centre ( 0 700 0 );
radius 50;
refinementThickness 50;
type sphere;
}
muzzlePiercing
{
cellSize 20.1;
p0 ( -750 1000 450 );
p1 ( -750 1500 450 );
type line;
}
tail
{
cellSize 20.1;
centre ( 500 500 150 );
lengthX 100;
lengthY 150;
lengthZ 200;
type box;
}
*/
}
workflowControls
{
}
// ************************************************************************* //
#!/bin/bash
# Klas Jareteg, 2012-10-13
# Description:
# Script to run comparative case between coupled and segregated solvers.
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -r constant/polyMesh
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication pMesh
runApplication checkMesh -constant
This diff is collapsed.
cfMesh Example Case
Date: 08 June 2015
Application: pMesh
Goal: Demonstration of the regular expressions feature available within
cfMesh for specifying patch names in the meshDict file.
STL File: multipleOrifices.stl
STL Type: Multi-solid
Patches within the STL File (Note: Each patch is one STL Solid):
inlet_S42
outlet_S43
orifice01_S44
orifice01_S45
orifice01_S46
orifice02_S47
orifice02_S48
orifice02_S49
orifice03_S50
orifice03_S51
orifice03_S52
orifice04_S53
orifice04_S54
orifice04_S55
orifice05_S56
orifice05_S57
orifice05_S58
orifice06_S59
orifice06_S60
orifice06_S61
tubes_S62
tubes_S63
tubes_S64
tubes_S65
tubes_S66
tubes_S67
tubes_S68
tubes_S69
tubes_S70
tubes_S71
tubes_S72
tubes_S73
fixedWalls_S74
fixedWalls_S75
fixedWalls_S76
fixedWalls_S77
fixedWalls_S78
fixedWalls_S79
fixedWalls_S80
fixedWalls_S81
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: franjo.juretic@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object meshDict;
}
// ************************************************************************* //
applicationClass ;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 500;
deltaT 1;
writeControl timeStep;
writeInterval 100;
cycleWrite 0;
writeFormat ascii;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: franjo.juretic@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
}
laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: franjo.juretic@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
};
U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
};
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | cfMesh: A library for mesh generation |
| \\ / O peration | |
| \\ / A nd | Author: Franjo Juretic |
| \\/ M anipulation | E-mail: franjo.juretic@c-fields.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object meshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
surfaceFile "multipleOrifices.stl";
maxCellSize 5.0;
boundaryCellSize 2.0;
localRefinement
{
"orifice01.*"
{
cellSize 0.1;
}
"orifice02.*"
{
cellSize 0.2;
}
"orifice0[3-6].*"
{
cellSize 0.3;
}
"tubes.*"
{
cellSize 0.4;
}
}
boundaryLayers
{
nLayers 1;
thicknessRatio 1.2;
patchBoundaryLayers
{
"orifice.*"
{
nLayers 4;
thicknessRatio 1.2;
maxFirstLayerThickness 0.2;
allowDiscontinuity 0;
}
"fixedWalls.*"
{
nLayers 4;
thicknessRatio 1.2;
maxFirstLayerThickness 1.0;
allowDiscontinuity 0;
}
"tubes.*"
{
nLayers 4;
thicknessRatio 1.2;
maxFirstLayerThickness 1.0;