mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Add the OpenFOAM source tree
This commit is contained in:
46
tutorials/basic/laplacianFoam/flange/0/T
Normal file
46
tutorials/basic/laplacianFoam/flange/0/T
Normal file
@ -0,0 +1,46 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 273;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
patch1
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
patch2
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 273;
|
||||
}
|
||||
|
||||
patch3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
patch4
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 573;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
10
tutorials/basic/laplacianFoam/flange/Allclean
Executable file
10
tutorials/basic/laplacianFoam/flange/Allclean
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf EnSight Ensight Fieldview > /dev/null 2>&1
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
27
tutorials/basic/laplacianFoam/flange/Allrun
Executable file
27
tutorials/basic/laplacianFoam/flange/Allrun
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get application name
|
||||
application=`getApplication`
|
||||
|
||||
runAnsysToFoam()
|
||||
{
|
||||
if [ -f log.ansysToFoam ]
|
||||
then
|
||||
echo "ansysToFoam already run on $PWD: remove log file to re-run"
|
||||
else
|
||||
echo "ansysToFoam: converting mesh $1"
|
||||
ansysToFoam $1 -scale $2 > log.ansysToFoam 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
runAnsysToFoam flange.ans 0.001
|
||||
runApplication $application
|
||||
runApplication foamToEnsight
|
||||
runApplication foamToEnsightParts
|
||||
runApplication foamToVTK
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,46 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
4
|
||||
(
|
||||
patch1
|
||||
{
|
||||
type patch;
|
||||
nFaces 2440;
|
||||
startFace 15316;
|
||||
}
|
||||
patch2
|
||||
{
|
||||
type patch;
|
||||
nFaces 348;
|
||||
startFace 17756;
|
||||
}
|
||||
patch3
|
||||
{
|
||||
type patch;
|
||||
nFaces 96;
|
||||
startFace 18104;
|
||||
}
|
||||
patch4
|
||||
{
|
||||
type patch;
|
||||
nFaces 384;
|
||||
startFace 18200;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
4
|
||||
(
|
||||
patch1
|
||||
{
|
||||
type patch;
|
||||
physicalType adiabatic;
|
||||
startFace 15316;
|
||||
nFaces 2440;
|
||||
}
|
||||
|
||||
patch2
|
||||
{
|
||||
type patch;
|
||||
physicalType fixedTemp;
|
||||
startFace 17756;
|
||||
nFaces 348;
|
||||
}
|
||||
|
||||
patch3
|
||||
{
|
||||
type patch;
|
||||
physicalType adiabatic;
|
||||
startFace 18104;
|
||||
nFaces 96;
|
||||
}
|
||||
|
||||
patch4
|
||||
{
|
||||
type patch;
|
||||
physicalType fixedTemp;
|
||||
startFace 18200;
|
||||
nFaces 384;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
DT DT [ 0 2 -1 0 0 0 0 ] 4e-05;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
16235
tutorials/basic/laplacianFoam/flange/flange.ans
Normal file
16235
tutorials/basic/laplacianFoam/flange/flange.ans
Normal file
File diff suppressed because it is too large
Load Diff
49
tutorials/basic/laplacianFoam/flange/system/controlDict
Normal file
49
tutorials/basic/laplacianFoam/flange/system/controlDict
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application laplacianFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 3;
|
||||
|
||||
deltaT 0.005;
|
||||
|
||||
writeControl runTime;
|
||||
|
||||
writeInterval 0.1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
57
tutorials/basic/laplacianFoam/flange/system/fvSchemes
Normal file
57
tutorials/basic/laplacianFoam/flange/system/fvSchemes
Normal file
@ -0,0 +1,57 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(T) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(DT,T) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
T ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
35
tutorials/basic/laplacianFoam/flange/system/fvSolution
Normal file
35
tutorials/basic/laplacianFoam/flange/system/fvSolution
Normal file
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
T
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 2;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/basic/potentialFoam/cylinder/0.org/U
Normal file
55
tutorials/basic/potentialFoam/cylinder/0.org/U
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
down
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
up
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
left
|
||||
{
|
||||
type uniformFixedValue;
|
||||
uniformValue constant (1 0 0);
|
||||
}
|
||||
|
||||
cylinder
|
||||
{
|
||||
type symmetry;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/basic/potentialFoam/cylinder/0.org/p
Normal file
55
tutorials/basic/potentialFoam/cylinder/0.org/p
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
down
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
up
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
left
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
cylinder
|
||||
{
|
||||
type symmetry;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
11
tutorials/basic/potentialFoam/cylinder/Allclean
Executable file
11
tutorials/basic/potentialFoam/cylinder/Allclean
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
34
tutorials/basic/potentialFoam/cylinder/Allrun
Executable file
34
tutorials/basic/potentialFoam/cylinder/Allrun
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application=`getApplication`
|
||||
|
||||
|
||||
# This case uses the #codeStream which is disabled by default. Enable for
|
||||
# just this case.
|
||||
MAIN_CONTROL_DICT=`foamEtcFile controlDict`
|
||||
if [ -f "$MAIN_CONTROL_DICT" ]
|
||||
then
|
||||
echo "Modifying ${MAIN_CONTROL_DICT} to enable allowSystemOperations"
|
||||
|
||||
# Clean up on termination and on Ctrl-C
|
||||
trap 'mv ${MAIN_CONTROL_DICT}.$$ ${MAIN_CONTROL_DICT} 2>/dev/null; exit 0' \
|
||||
EXIT TERM INT
|
||||
cp ${MAIN_CONTROL_DICT} ${MAIN_CONTROL_DICT}.$$
|
||||
|
||||
echo "Enabling allowSystemOperations in ${MAIN_CONTROL_DICT}."
|
||||
|
||||
sed \
|
||||
-e s/"\(allowSystemOperations[ \t]*\)\([0-9]\);"/"\1 1;"/g \
|
||||
${MAIN_CONTROL_DICT}.$$ > ${MAIN_CONTROL_DICT}
|
||||
fi
|
||||
|
||||
cp -r 0.org 0 > /dev/null 2>&1
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
runApplication streamFunction
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,156 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices #codeStream
|
||||
{
|
||||
codeInclude
|
||||
#{
|
||||
#include "pointField.H"
|
||||
#};
|
||||
|
||||
code
|
||||
#{
|
||||
pointField points(19);
|
||||
points[0] = point(0.5, 0, -0.5);
|
||||
points[1] = point(1, 0, -0.5);
|
||||
points[2] = point(2, 0, -0.5);
|
||||
points[3] = point(2, 0.707107, -0.5);
|
||||
points[4] = point(0.707107, 0.707107, -0.5);
|
||||
points[5] = point(0.353553, 0.353553, -0.5);
|
||||
points[6] = point(2, 2, -0.5);
|
||||
points[7] = point(0.707107, 2, -0.5);
|
||||
points[8] = point(0, 2, -0.5);
|
||||
points[9] = point(0, 1, -0.5);
|
||||
points[10] = point(0, 0.5, -0.5);
|
||||
points[11] = point(-0.5, 0, -0.5);
|
||||
points[12] = point(-1, 0, -0.5);
|
||||
points[13] = point(-2, 0, -0.5);
|
||||
points[14] = point(-2, 0.707107, -0.5);
|
||||
points[15] = point(-0.707107, 0.707107, -0.5);
|
||||
points[16] = point(-0.353553, 0.353553, -0.5);
|
||||
points[17] = point(-2, 2, -0.5);
|
||||
points[18] = point(-0.707107, 2, -0.5);
|
||||
|
||||
// Duplicate z points
|
||||
label sz = points.size();
|
||||
points.setSize(2*sz);
|
||||
for (label i = 0; i < sz; i++)
|
||||
{
|
||||
const point& pt = points[i];
|
||||
points[i+sz] = point(pt.x(), pt.y(), -pt.z());
|
||||
}
|
||||
|
||||
os << points;
|
||||
#};
|
||||
};
|
||||
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (5 4 9 10 24 23 28 29) (10 10 1) simpleGrading (1 1 1)
|
||||
hex (0 1 4 5 19 20 23 24) (10 10 1) simpleGrading (1 1 1)
|
||||
hex (1 2 3 4 20 21 22 23) (20 10 1) simpleGrading (1 1 1)
|
||||
hex (4 3 6 7 23 22 25 26) (20 20 1) simpleGrading (1 1 1)
|
||||
hex (9 4 7 8 28 23 26 27) (10 20 1) simpleGrading (1 1 1)
|
||||
hex (15 16 10 9 34 35 29 28) (10 10 1) simpleGrading (1 1 1)
|
||||
hex (12 11 16 15 31 30 35 34) (10 10 1) simpleGrading (1 1 1)
|
||||
hex (13 12 15 14 32 31 34 33) (20 10 1) simpleGrading (1 1 1)
|
||||
hex (14 15 18 17 33 34 37 36) (20 20 1) simpleGrading (1 1 1)
|
||||
hex (15 9 8 18 34 28 27 37) (10 20 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 0 5 (0.469846 0.17101 -0.5)
|
||||
arc 5 10 (0.17101 0.469846 -0.5)
|
||||
arc 1 4 (0.939693 0.34202 -0.5)
|
||||
arc 4 9 (0.34202 0.939693 -0.5)
|
||||
arc 19 24 (0.469846 0.17101 0.5)
|
||||
arc 24 29 (0.17101 0.469846 0.5)
|
||||
arc 20 23 (0.939693 0.34202 0.5)
|
||||
arc 23 28 (0.34202 0.939693 0.5)
|
||||
arc 11 16 (-0.469846 0.17101 -0.5)
|
||||
arc 16 10 (-0.17101 0.469846 -0.5)
|
||||
arc 12 15 (-0.939693 0.34202 -0.5)
|
||||
arc 15 9 (-0.34202 0.939693 -0.5)
|
||||
arc 30 35 (-0.469846 0.17101 0.5)
|
||||
arc 35 29 (-0.17101 0.469846 0.5)
|
||||
arc 31 34 (-0.939693 0.34202 0.5)
|
||||
arc 34 28 (-0.34202 0.939693 0.5)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
down
|
||||
{
|
||||
type symmetryPlane;
|
||||
faces
|
||||
(
|
||||
(0 1 20 19)
|
||||
(1 2 21 20)
|
||||
(12 11 30 31)
|
||||
(13 12 31 32)
|
||||
);
|
||||
}
|
||||
right
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 3 22 21)
|
||||
(3 6 25 22)
|
||||
);
|
||||
}
|
||||
up
|
||||
{
|
||||
type symmetryPlane;
|
||||
faces
|
||||
(
|
||||
(7 8 27 26)
|
||||
(6 7 26 25)
|
||||
(8 18 37 27)
|
||||
(18 17 36 37)
|
||||
);
|
||||
}
|
||||
left
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(14 13 32 33)
|
||||
(17 14 33 36)
|
||||
);
|
||||
}
|
||||
cylinder
|
||||
{
|
||||
type symmetry;
|
||||
faces
|
||||
(
|
||||
(10 5 24 29)
|
||||
(5 0 19 24)
|
||||
(16 10 29 35)
|
||||
(11 16 35 30)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
144
tutorials/basic/potentialFoam/cylinder/system/controlDict
Normal file
144
tutorials/basic/potentialFoam/cylinder/system/controlDict
Normal file
@ -0,0 +1,144 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application potentialFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
difference
|
||||
{
|
||||
// Load the library containing the 'coded' functionObject
|
||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||
type coded;
|
||||
// Name of on-the-fly generated functionObject
|
||||
redirectType error;
|
||||
code
|
||||
#{
|
||||
// Lookup U
|
||||
Info<< "Looking up field U\n" << endl;
|
||||
const volVectorField& U = mesh().lookupObject<volVectorField>("U");
|
||||
|
||||
Info<< "Reading inlet velocity uInfX\n" << endl;
|
||||
|
||||
scalar ULeft = 0.0;
|
||||
label leftI = mesh().boundaryMesh().findPatchID("left");
|
||||
const fvPatchVectorField& fvp = U.boundaryField()[leftI];
|
||||
if (fvp.size())
|
||||
{
|
||||
ULeft = fvp[0].x();
|
||||
}
|
||||
reduce(ULeft, maxOp<scalar>());
|
||||
|
||||
dimensionedScalar uInfX
|
||||
(
|
||||
"uInfx",
|
||||
dimensionSet(0, 1, -1, 0, 0),
|
||||
ULeft
|
||||
);
|
||||
|
||||
Info << "U at inlet = " << uInfX.value() << " m/s" << endl;
|
||||
|
||||
|
||||
scalar magCylinder = 0.0;
|
||||
label cylI = mesh().boundaryMesh().findPatchID("cylinder");
|
||||
const fvPatchVectorField& cylFvp = mesh().C().boundaryField()[cylI];
|
||||
if (cylFvp.size())
|
||||
{
|
||||
magCylinder = mag(cylFvp[0]);
|
||||
}
|
||||
reduce(magCylinder, maxOp<scalar>());
|
||||
|
||||
dimensionedScalar radius
|
||||
(
|
||||
"radius",
|
||||
dimensionSet(0, 1, 0, 0, 0),
|
||||
magCylinder
|
||||
);
|
||||
|
||||
Info << "Cylinder radius = " << radius.value() << " m" << endl;
|
||||
|
||||
volVectorField UA
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"UA",
|
||||
mesh().time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
U
|
||||
);
|
||||
|
||||
Info<< "\nEvaluating analytical solution" << endl;
|
||||
|
||||
const volVectorField& centres = UA.mesh().C();
|
||||
volScalarField magCentres(mag(centres));
|
||||
volScalarField theta(acos((centres & vector(1,0,0))/magCentres));
|
||||
|
||||
volVectorField cs2theta
|
||||
(
|
||||
cos(2*theta)*vector(1,0,0)
|
||||
+ sin(2*theta)*vector(0,1,0)
|
||||
);
|
||||
|
||||
UA = uInfX*(dimensionedVector(vector(1,0,0))
|
||||
- pow((radius/magCentres),2)*cs2theta);
|
||||
|
||||
// Force writing of UA (since time has not changed)
|
||||
UA.write();
|
||||
|
||||
volScalarField error("error", mag(U-UA)/mag(UA));
|
||||
|
||||
Info<<"Writing relative error in U to " << error.objectPath()
|
||||
<< endl;
|
||||
|
||||
error.write();
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/basic/potentialFoam/cylinder/system/fvSchemes
Normal file
55
tutorials/basic/potentialFoam/cylinder/system/fvSchemes
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default leastSquares;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
35
tutorials/basic/potentialFoam/cylinder/system/fvSolution
Normal file
35
tutorials/basic/potentialFoam/cylinder/system/fvSolution
Normal file
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
potentialFlow
|
||||
{
|
||||
nNonOrthogonalCorrectors 3;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
52
tutorials/basic/potentialFoam/pitzDaily/0.org/U
Normal file
52
tutorials/basic/potentialFoam/pitzDaily/0.org/U
Normal file
@ -0,0 +1,52 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (10 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
50
tutorials/basic/potentialFoam/pitzDaily/0.org/p
Normal file
50
tutorials/basic/potentialFoam/pitzDaily/0.org/p
Normal file
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
11
tutorials/basic/potentialFoam/pitzDaily/Allclean
Executable file
11
tutorials/basic/potentialFoam/pitzDaily/Allclean
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
14
tutorials/basic/potentialFoam/pitzDaily/Allrun
Executable file
14
tutorials/basic/potentialFoam/pitzDaily/Allrun
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application=`getApplication`
|
||||
|
||||
cp -r 0.org 0 > /dev/null 2>&1
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
runApplication streamFunction
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,173 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-20.6 0 -0.5)
|
||||
(-20.6 3 -0.5)
|
||||
(-20.6 12.7 -0.5)
|
||||
(-20.6 25.4 -0.5)
|
||||
(0 -25.4 -0.5)
|
||||
(0 -5 -0.5)
|
||||
(0 0 -0.5)
|
||||
(0 3 -0.5)
|
||||
(0 12.7 -0.5)
|
||||
(0 25.4 -0.5)
|
||||
(206 -25.4 -0.5)
|
||||
(206 -8.5 -0.5)
|
||||
(206 0 -0.5)
|
||||
(206 6.5 -0.5)
|
||||
(206 17 -0.5)
|
||||
(206 25.4 -0.5)
|
||||
(290 -16.6 -0.5)
|
||||
(290 -6.3 -0.5)
|
||||
(290 0 -0.5)
|
||||
(290 4.5 -0.5)
|
||||
(290 11 -0.5)
|
||||
(290 16.6 -0.5)
|
||||
(-20.6 0 0.5)
|
||||
(-20.6 3 0.5)
|
||||
(-20.6 12.7 0.5)
|
||||
(-20.6 25.4 0.5)
|
||||
(0 -25.4 0.5)
|
||||
(0 -5 0.5)
|
||||
(0 0 0.5)
|
||||
(0 3 0.5)
|
||||
(0 12.7 0.5)
|
||||
(0 25.4 0.5)
|
||||
(206 -25.4 0.5)
|
||||
(206 -8.5 0.5)
|
||||
(206 0 0.5)
|
||||
(206 6.5 0.5)
|
||||
(206 17 0.5)
|
||||
(206 25.4 0.5)
|
||||
(290 -16.6 0.5)
|
||||
(290 -6.3 0.5)
|
||||
(290 0 0.5)
|
||||
(290 4.5 0.5)
|
||||
(290 11 0.5)
|
||||
(290 16.6 0.5)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 6 7 1 22 28 29 23) (18 7 1) simpleGrading (0.5 1.8 1)
|
||||
hex (1 7 8 2 23 29 30 24) (18 10 1) simpleGrading (0.5 4 1)
|
||||
hex (2 8 9 3 24 30 31 25) (18 13 1) simpleGrading (0.5 0.25 1)
|
||||
hex (4 10 11 5 26 32 33 27) (180 18 1) simpleGrading (4 1 1)
|
||||
hex (5 11 12 6 27 33 34 28) (180 9 1) edgeGrading (4 4 4 4 0.5 1 1 0.5 1 1 1 1)
|
||||
hex (6 12 13 7 28 34 35 29) (180 7 1) edgeGrading (4 4 4 4 1.8 1 1 1.8 1 1 1 1)
|
||||
hex (7 13 14 8 29 35 36 30) (180 10 1) edgeGrading (4 4 4 4 4 1 1 4 1 1 1 1)
|
||||
hex (8 14 15 9 30 36 37 31) (180 13 1) simpleGrading (4 0.25 1)
|
||||
hex (10 16 17 11 32 38 39 33) (25 18 1) simpleGrading (2.5 1 1)
|
||||
hex (11 17 18 12 33 39 40 34) (25 9 1) simpleGrading (2.5 1 1)
|
||||
hex (12 18 19 13 34 40 41 35) (25 7 1) simpleGrading (2.5 1 1)
|
||||
hex (13 19 20 14 35 41 42 36) (25 10 1) simpleGrading (2.5 1 1)
|
||||
hex (14 20 21 15 36 42 43 37) (25 13 1) simpleGrading (2.5 0.25 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 22 23 1)
|
||||
(1 23 24 2)
|
||||
(2 24 25 3)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(16 17 39 38)
|
||||
(17 18 40 39)
|
||||
(18 19 41 40)
|
||||
(19 20 42 41)
|
||||
(20 21 43 42)
|
||||
);
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 25 31 9)
|
||||
(9 31 37 15)
|
||||
(15 37 43 21)
|
||||
);
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 6 28 22)
|
||||
(6 5 27 28)
|
||||
(5 4 26 27)
|
||||
(4 10 32 26)
|
||||
(10 16 38 32)
|
||||
);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(22 28 29 23)
|
||||
(23 29 30 24)
|
||||
(24 30 31 25)
|
||||
(26 32 33 27)
|
||||
(27 33 34 28)
|
||||
(28 34 35 29)
|
||||
(29 35 36 30)
|
||||
(30 36 37 31)
|
||||
(32 38 39 33)
|
||||
(33 39 40 34)
|
||||
(34 40 41 35)
|
||||
(35 41 42 36)
|
||||
(36 42 43 37)
|
||||
(0 1 7 6)
|
||||
(1 2 8 7)
|
||||
(2 3 9 8)
|
||||
(4 5 11 10)
|
||||
(5 6 12 11)
|
||||
(6 7 13 12)
|
||||
(7 8 14 13)
|
||||
(8 9 15 14)
|
||||
(10 11 17 16)
|
||||
(11 12 18 17)
|
||||
(12 13 19 18)
|
||||
(13 14 20 19)
|
||||
(14 15 21 20)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
49
tutorials/basic/potentialFoam/pitzDaily/system/controlDict
Normal file
49
tutorials/basic/potentialFoam/pitzDaily/system/controlDict
Normal file
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application potentialFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes
Normal file
55
tutorials/basic/potentialFoam/pitzDaily/system/fvSchemes
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
35
tutorials/basic/potentialFoam/pitzDaily/system/fvSolution
Normal file
35
tutorials/basic/potentialFoam/pitzDaily/system/fvSolution
Normal file
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
potentialFlow
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
50
tutorials/basic/scalarTransportFoam/pitzDaily/0/T
Normal file
50
tutorials/basic/scalarTransportFoam/pitzDaily/0/T
Normal file
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
upperWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
lowerWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
12281
tutorials/basic/scalarTransportFoam/pitzDaily/0/U
Normal file
12281
tutorials/basic/scalarTransportFoam/pitzDaily/0/U
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,173 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-20.6 0 -0.5)
|
||||
(-20.6 3 -0.5)
|
||||
(-20.6 12.7 -0.5)
|
||||
(-20.6 25.4 -0.5)
|
||||
(0 -25.4 -0.5)
|
||||
(0 -5 -0.5)
|
||||
(0 0 -0.5)
|
||||
(0 3 -0.5)
|
||||
(0 12.7 -0.5)
|
||||
(0 25.4 -0.5)
|
||||
(206 -25.4 -0.5)
|
||||
(206 -8.5 -0.5)
|
||||
(206 0 -0.5)
|
||||
(206 6.5 -0.5)
|
||||
(206 17 -0.5)
|
||||
(206 25.4 -0.5)
|
||||
(290 -16.6 -0.5)
|
||||
(290 -6.3 -0.5)
|
||||
(290 0 -0.5)
|
||||
(290 4.5 -0.5)
|
||||
(290 11 -0.5)
|
||||
(290 16.6 -0.5)
|
||||
(-20.6 0 0.5)
|
||||
(-20.6 3 0.5)
|
||||
(-20.6 12.7 0.5)
|
||||
(-20.6 25.4 0.5)
|
||||
(0 -25.4 0.5)
|
||||
(0 -5 0.5)
|
||||
(0 0 0.5)
|
||||
(0 3 0.5)
|
||||
(0 12.7 0.5)
|
||||
(0 25.4 0.5)
|
||||
(206 -25.4 0.5)
|
||||
(206 -8.5 0.5)
|
||||
(206 0 0.5)
|
||||
(206 6.5 0.5)
|
||||
(206 17 0.5)
|
||||
(206 25.4 0.5)
|
||||
(290 -16.6 0.5)
|
||||
(290 -6.3 0.5)
|
||||
(290 0 0.5)
|
||||
(290 4.5 0.5)
|
||||
(290 11 0.5)
|
||||
(290 16.6 0.5)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 6 7 1 22 28 29 23) (18 7 1) simpleGrading (0.5 1.8 1)
|
||||
hex (1 7 8 2 23 29 30 24) (18 10 1) simpleGrading (0.5 4 1)
|
||||
hex (2 8 9 3 24 30 31 25) (18 13 1) simpleGrading (0.5 0.25 1)
|
||||
hex (4 10 11 5 26 32 33 27) (180 18 1) simpleGrading (4 1 1)
|
||||
hex (5 11 12 6 27 33 34 28) (180 9 1) edgeGrading (4 4 4 4 0.5 1 1 0.5 1 1 1 1)
|
||||
hex (6 12 13 7 28 34 35 29) (180 7 1) edgeGrading (4 4 4 4 1.8 1 1 1.8 1 1 1 1)
|
||||
hex (7 13 14 8 29 35 36 30) (180 10 1) edgeGrading (4 4 4 4 4 1 1 4 1 1 1 1)
|
||||
hex (8 14 15 9 30 36 37 31) (180 13 1) simpleGrading (4 0.25 1)
|
||||
hex (10 16 17 11 32 38 39 33) (25 18 1) simpleGrading (2.5 1 1)
|
||||
hex (11 17 18 12 33 39 40 34) (25 9 1) simpleGrading (2.5 1 1)
|
||||
hex (12 18 19 13 34 40 41 35) (25 7 1) simpleGrading (2.5 1 1)
|
||||
hex (13 19 20 14 35 41 42 36) (25 10 1) simpleGrading (2.5 1 1)
|
||||
hex (14 20 21 15 36 42 43 37) (25 13 1) simpleGrading (2.5 0.25 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 22 23 1)
|
||||
(1 23 24 2)
|
||||
(2 24 25 3)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(16 17 39 38)
|
||||
(17 18 40 39)
|
||||
(18 19 41 40)
|
||||
(19 20 42 41)
|
||||
(20 21 43 42)
|
||||
);
|
||||
}
|
||||
upperWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(3 25 31 9)
|
||||
(9 31 37 15)
|
||||
(15 37 43 21)
|
||||
);
|
||||
}
|
||||
lowerWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 6 28 22)
|
||||
(6 5 27 28)
|
||||
(5 4 26 27)
|
||||
(4 10 32 26)
|
||||
(10 16 38 32)
|
||||
);
|
||||
}
|
||||
frontAndBack
|
||||
{
|
||||
type empty;
|
||||
faces
|
||||
(
|
||||
(22 28 29 23)
|
||||
(23 29 30 24)
|
||||
(24 30 31 25)
|
||||
(26 32 33 27)
|
||||
(27 33 34 28)
|
||||
(28 34 35 29)
|
||||
(29 35 36 30)
|
||||
(30 36 37 31)
|
||||
(32 38 39 33)
|
||||
(33 39 40 34)
|
||||
(34 40 41 35)
|
||||
(35 41 42 36)
|
||||
(36 42 43 37)
|
||||
(0 1 7 6)
|
||||
(1 2 8 7)
|
||||
(2 3 9 8)
|
||||
(4 5 11 10)
|
||||
(5 6 12 11)
|
||||
(6 7 13 12)
|
||||
(7 8 14 13)
|
||||
(8 9 15 14)
|
||||
(10 11 17 16)
|
||||
(11 12 18 17)
|
||||
(12 13 19 18)
|
||||
(13 14 20 19)
|
||||
(14 15 21 20)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
DT DT [ 0 2 -1 0 0 0 0 ] 0.01;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application scalarTransportFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.1;
|
||||
|
||||
deltaT 0.0001;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 50;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,57 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,T) Gauss linearUpwind grad(T);
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(DT,T) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
T ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,35 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
T
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user