Merge branch 'master' into cvm

Conflicts:
	tutorials/lagrangian/reactingParcelFilmFoam/evaporationTest/system/extrudeToRegionMeshDict
	tutorials/lagrangian/reactingParcelFilmFoam/panel/system/extrudeToRegionMeshDict
This commit is contained in:
graham
2011-04-21 12:02:49 +01:00
779 changed files with 53481 additions and 57675 deletions

View File

@ -8063,6 +8063,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 0;
}
baffleWall
{

View File

@ -8063,6 +8063,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform ( 0 0 0 0 0 0 );
}
baffleWall
{

View File

@ -8063,6 +8063,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform ( 0 0 0 0 0 0 );
}
baffleWall
{

View File

@ -8063,6 +8063,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform ( 0 0 0 0 0 0 );
}
baffleWall
{

View File

@ -8063,6 +8063,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 0;
}
baffleWall
{

View File

@ -8063,6 +8063,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 0;
}
baffleWall
{

View File

@ -34,6 +34,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 300;
}
baffleWall
{

View File

@ -34,6 +34,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 300;
}
baffleWall
{

View File

@ -34,6 +34,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 1;
}
baffleWall
{

View File

@ -34,6 +34,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 1;
}
baffleWall
{

View File

@ -8063,6 +8063,7 @@ boundaryField
blockedFaces
{
type zeroGradient;
value uniform 0;
}
baffleWall
{

View File

@ -1,8 +1,5 @@
PDR test case
The folder 0.org contains the initial fields for the original
blockMesh.
Step to introduce the PDR fields:
1) Create zero-size patches for wall or/and coupled baffles in

View File

@ -167,76 +167,101 @@ blocks
hex (29 13 12 28 73 61 60 72) (5 5 7) simpleGrading (1 1 2.985984)
);
patches
boundary
(
patch outer
(
(91 90 86 87)
(90 89 85 86)
(89 88 84 85)
(87 86 82 83)
(86 85 81 82)
(85 84 80 81)
(83 82 78 79)
(82 81 77 78)
(81 80 76 77)
(48 64 68 52)
(64 76 80 68)
(52 68 70 56)
(68 80 84 70)
(56 70 72 60)
(70 84 88 72)
(91 87 71 75)
(87 83 69 71)
(83 79 67 69)
(75 71 59 63)
(71 69 55 59)
(69 67 51 55)
(48 49 65 64)
(49 50 66 65)
(50 51 67 66)
(64 65 77 76)
(65 66 78 77)
(66 67 79 78)
(91 75 74 90)
(75 63 62 74)
(90 74 73 89)
(74 62 61 73)
(89 73 72 88)
(73 61 60 72)
)
wall ground
(
(0 4 5 1)
(1 5 6 2)
(2 6 7 3)
(4 8 9 5)
(5 9 10 6)
(6 10 11 7)
(8 12 13 9)
(9 13 14 10)
(10 14 15 11)
(4 0 48 52)
(8 4 52 56)
(12 8 56 60)
(11 15 63 59)
(7 11 59 55)
(3 7 55 51)
(0 1 49 48)
(1 2 50 49)
(2 3 51 50)
(15 14 62 63)
(14 13 61 62)
(13 12 60 61)
)
wall blockedFaces
()
wall baffleWall
()
cycic baffleCyclic_half0
()
cycic baffleCyclic_half1
()
outer
{
type patch;
faces
(
(91 90 86 87)
(90 89 85 86)
(89 88 84 85)
(87 86 82 83)
(86 85 81 82)
(85 84 80 81)
(83 82 78 79)
(82 81 77 78)
(81 80 76 77)
(48 64 68 52)
(64 76 80 68)
(52 68 70 56)
(68 80 84 70)
(56 70 72 60)
(70 84 88 72)
(91 87 71 75)
(87 83 69 71)
(83 79 67 69)
(75 71 59 63)
(71 69 55 59)
(69 67 51 55)
(48 49 65 64)
(49 50 66 65)
(50 51 67 66)
(64 65 77 76)
(65 66 78 77)
(66 67 79 78)
(91 75 74 90)
(75 63 62 74)
(90 74 73 89)
(74 62 61 73)
(89 73 72 88)
(73 61 60 72)
);
}
ground
{
type wall;
faces
(
(0 4 5 1)
(1 5 6 2)
(2 6 7 3)
(4 8 9 5)
(5 9 10 6)
(6 10 11 7)
(8 12 13 9)
(9 13 14 10)
(10 14 15 11)
(4 0 48 52)
(8 4 52 56)
(12 8 56 60)
(11 15 63 59)
(7 11 59 55)
(3 7 55 51)
(0 1 49 48)
(1 2 50 49)
(2 3 51 50)
(15 14 62 63)
(14 13 61 62)
(13 12 60 61)
);
}
blockedFaces
{
type wall;
faces ();
}
baffleWall
{
type wall;
faces ();
}
baffleCyclic_half0
{
type cyclic;
neighbourPatch baffleCyclic_half1;
faces ();
}
baffleCyclic_half1
{
type cyclic;
neighbourPatch baffleCyclic_half0;
faces ();
}
);

View File

@ -36,7 +36,6 @@ dictionaryReplacement
{
type cyclic;
}
}
}
@ -109,8 +108,8 @@ dictionaryReplacement
}
baffleWall
{
type compressible::kqRWallFunction;
value uniform 1.5;
type compressible::kqRWallFunction;
value uniform 1.5;
}
baffleCyclic_half0
{
@ -153,6 +152,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 1;
}
baffleWall
{
@ -177,6 +177,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 300;
}
baffleWall
{
@ -201,6 +202,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 300;
}
baffleWall
{
@ -225,6 +227,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 1;
}
baffleWall
{
@ -273,8 +276,9 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 0.0;
}
baffleWall
baffleWall
{
type zeroGradient;
value uniform 0.0;
@ -296,6 +300,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform (0 0 0 0 0 0);
}
baffleWall
{
@ -319,6 +324,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 0;
}
baffleWall
{
@ -342,6 +348,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform (0 0 0 0 0 0);
}
baffleWall
{
@ -365,6 +372,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform (0 0 0 0 0 0);
}
baffleWall
{
@ -388,6 +396,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 0;
}
baffleWall
{
@ -411,6 +420,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform (0 0 0 0 0 0);
}
baffleWall
{
@ -434,6 +444,7 @@ dictionaryReplacement
blockedFaces
{
type zeroGradient;
value uniform 0;
}
baffleWall
{

View File

@ -22,6 +22,13 @@ solvers
solver PCG;
preconditioner DIC;
tolerance 1e-05;
relTol 0.1;
};
rhoFinal
{
$rho;
tolerance 1e-05;
relTol 0;
};
@ -30,10 +37,25 @@ solvers
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0.1;
};
pFinal
{
$p;
tolerance 1e-6;
relTol 0;
};
"(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)"
"(b|Xi|ft|h|hu|k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
"(b|Xi|ft|h|hu|k|epsilon)Final"
{
solver PBiCG;
preconditioner DILU;
@ -42,9 +64,10 @@ solvers
}
}
PISO
PIMPLE
{
nCorrectors 2;
nOuterCorrectors 1;
nNonOrthogonalCorrectors 0;
momentumPredictor true;
}

View File

@ -76,8 +76,8 @@ ignitionSites
location (0.005 -0.02 0);
diameter 0.003;
start 0;
duration 0.05;
strength 20;
duration 0.1;
strength 100;
}
);

View File

@ -23,13 +23,13 @@ startTime 0;
stopAt endTime;
endTime 0.5;
endTime 3.0;//0.5;
deltaT 5e-06;
writeControl adjustableRunTime;
writeInterval 0.01;
writeInterval 0.1;
purgeWrite 0;

View File

@ -17,21 +17,30 @@ FoamFile
solvers
{
p
"(p|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
}
"(p|rho)Final"
{
$p;
tolerance 1e-06;
relTol 0;
}
rho
"(U|b|Su|Xi|h|hu|k)"
{
$p;
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
"(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)"
"(U|b|Su|Xi|h|hu|k)Final"
{
solver PBiCG;
preconditioner DILU;
@ -40,12 +49,17 @@ solvers
}
}
PISO
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
"(Xi|Su)" 1;
}
// ************************************************************************* //

View File

@ -17,22 +17,30 @@ FoamFile
solvers
{
p
"(p|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
relTol 0.1;
}
rho
"(p|rho)Final"
{
$p;
tolerance 1e-05;
tolerance 1e-06;
relTol 0;
}
"(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)"
"(U|b|Su|Xi|h|hu|k)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0.1;
}
"(U|b|Su|Xi|h|hu|k)Final"
{
solver PBiCG;
preconditioner DILU;
@ -41,7 +49,7 @@ solvers
}
}
PISO
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 1;
@ -53,4 +61,5 @@ relaxationFactors
"(Xi|Su)" 1;
}
// ************************************************************************* //

View File

@ -17,22 +17,30 @@ FoamFile
solvers
{
p
"(p|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
relTol 0.1;
}
rho
"(p|rho)Final"
{
$p;
tolerance 1e-05;
tolerance 1e-06;
relTol 0;
}
"(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)"
"(U|b|Su|Xi|h|hu|k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
"(U|b|Su|Xi|h|hu|k|epsilon)Final"
{
solver PBiCG;
preconditioner DILU;
@ -41,11 +49,11 @@ solvers
}
}
PISO
PIMPLE
{
nCorrectors 2;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
momentumPredictor yes;
}

View File

@ -17,7 +17,7 @@ FoamFile
psiChemistryModel ODEChemistryModel<gasThermoPhysics>;
chemistry off;
chemistry on;
chemistrySolver ode;

View File

@ -19,7 +19,7 @@ Cmix Cmix [ 0 0 0 0 0 0 0 ] 1;
ignitionProperties1
{
ignite off;
ignite on;
ignitionPoint ignitionPoint [ 0 1 0 0 0 0 0 ] ( 0.2 0 0.02 );
timing timing [ 0 0 1 0 0 0 0 ] 0;
duration duration [ 0 0 1 0 0 0 0 ] 1;

View File

@ -8,7 +8,7 @@
FoamFile
{
version 2.0;
format ascii;
format binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;

View File

@ -17,31 +17,60 @@ FoamFile
solvers
{
p
"(p|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-09;
relTol 0.1;
}
"(p|rho)Final"
{
$p;
tolerance 1e-09;
relTol 0;
}
rho
{
$p;
tolerance 1e-06;
}
"(U|Yi|hs|k|epsilon)"
"(k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0.1;
}
"(k|epsilon)Final"
{
$k;
tolerance 1e-06;
relTol 0;
}
"(U|hs)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0.1;
}
"(U|hs)Final"
{
$U;
tolerance 1e-06;
relTol 0;
}
Yi
{
$hsFinal;
}
}
PISO
PIMPLE
{
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}

View File

@ -22,26 +22,47 @@ solvers
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
}
pFinal
{
$p;
tolerance 1e-06;
relTol 0;
}
rho
{
$p;
solver PCG;
preconditioner DIC;
tolerance 1e-05;
relTol 0.1;
}
rhoFinal
{
$rho;
tolerance 1e-05;
relTol 0;
}
"(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)"
"(U|Xi|hu|ft|b|h|k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
}
"(U|ft|Xi|hu|b|h|k|epsilon)Final"
{
$U;
tolerance 1e-05;
relTol 0;
}
}
PISO
PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 1;

View File

@ -22,7 +22,7 @@ startTime 0.0;
stopAt endTime;
endTime 6.0;
endTime 2.75;
deltaT 0.001;

View File

@ -23,13 +23,13 @@ startTime 0;
stopAt endTime;
endTime 1.0;
endTime 0.3;
deltaT 1e-6;
writeControl adjustableRunTime;
writeInterval 0.1;
writeInterval 0.05;
purgeWrite 0;

View File

@ -22,27 +22,57 @@ solvers
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
}
rhoFinal
{
$rho;
tolerance 1e-06;
relTol 0;
}
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0.1;
}
pFinal
{
$p;
tolerance 1e-6;
relTol 0.0;
}
"(U|Yi|hs|k|epsilon)"
"(U|hs||k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0.1;
}
"(U|hs||k|epsilon)Final"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}
Yi
{
$hsFinal;
}
}
PISO
PIMPLE
{
momentumPredictor no;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}

View File

@ -1,3 +0,0 @@
datToFoam.C
EXE = $(FOAM_USER_APPBIN)/datToFoam

View File

@ -1,5 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lmeshTools

View File

@ -1,152 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
datToFoam
Description
Reads in a datToFoam mesh file and outputs a points file. Used in
conjunction with blockMesh.
\*---------------------------------------------------------------------------*/
#include "argList.H"
#include "Time.H"
#include "IFstream.H"
#include "OFstream.H"
#include "pointField.H"
#include "unitConversion.H"
using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
argList::noParallel();
argList::validArgs.append("dat file");
argList args(argc, argv);
if (!args.check())
{
FatalError.exit();
}
# include "createTime.H"
std::ifstream plot3dFile(args.args()[1].c_str());
string line;
std::getline(plot3dFile, line);
std::getline(plot3dFile, line);
IStringStream Istring(line);
word block;
string zoneName;
token punctuation;
label iPoints;
label jPoints;
Istring >> block;
Istring >> block;
Istring >> zoneName;
Istring >> punctuation;
Istring >> block;
Istring >> iPoints;
Istring >> block;
Istring >> jPoints;
Info<< "Number of vertices in i direction = " << iPoints << endl
<< "Number of vertices in j direction = " << jPoints << endl;
// We ignore the first layer of points in i and j the biconic meshes
label nPointsij = (iPoints - 1)*(jPoints - 1);
pointField points(nPointsij, vector::zero);
for (direction comp = 0; comp < 2; comp++)
{
label p(0);
for (label j = 0; j < jPoints; j++)
{
for (label i = 0; i < iPoints; i++)
{
double coord;
plot3dFile >> coord;
// if statement ignores the first layer in i and j
if (i>0 && j>0)
{
points[p++][comp] = coord;
}
}
}
}
// correct error in biconic meshes
forAll(points, i)
{
if (points[i][1] < 1e-07)
{
points[i][1] = 0.0;
}
}
pointField pointsWedge(nPointsij*2, vector::zero);
fileName pointsFile(runTime.constantPath()/"points.tmp");
OFstream pFile(pointsFile);
scalar a(degToRad(0.1));
tensor rotateZ =
tensor
(
1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, -::sin(a), ::cos(a)
);
forAll(points, i)
{
pointsWedge[i] = (rotateZ & points[i]);
pointsWedge[i+nPointsij] = cmptMultiply
(
vector(1.0, 1.0, -1.0),
pointsWedge[i]
);
}
Info<< "Writing points to: " << nl
<< " " << pointsFile << endl;
pFile << pointsWedge;
Info<< "End" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -57,6 +57,15 @@ PIMPLE
nNonOrthogonalCorrectors 0;
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0;
residualControl
{
"(U|k|epsilon)"
{
relTol 0;
tolerance 0.0001;
}
}
}
relaxationFactors

View File

@ -47,25 +47,5 @@ graphFormat raw;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -59,6 +59,16 @@ SIMPLE
nNonOrthogonalCorrectors 0;
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
rhoMax rhoMax [ 1 -3 0 0 0 ] 1.5;
residualControl
{
p 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -47,25 +47,5 @@ graphFormat raw;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p 1e-3;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -53,6 +53,16 @@ SIMPLE
nNonOrthogonalCorrectors 0;
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5;
rhoMax rhoMAx [ 1 -3 0 0 0 ] 2.0;
residualControl
{
p 1e-3;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -45,25 +45,5 @@ timePrecision 6;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -39,12 +39,22 @@ SIMPLE
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-4;
T 1e-2;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors
{
p_rgh 0.7;
U 0.2;
U 0.3;
T 0.5;
"(k|epsilon|R)" 0.7;
}

View File

@ -21,55 +21,55 @@ FoamFile
{
type empty;
nFaces 0;
startFace 60336;
startFace 61295;
}
minX
{
type empty;
nFaces 0;
startFace 60336;
startFace 61295;
}
maxX
{
type empty;
nFaces 0;
startFace 60336;
startFace 61295;
}
minY
{
type empty;
nFaces 0;
startFace 60336;
startFace 61295;
}
ground
{
type wall;
nFaces 590;
startFace 60336;
startFace 61295;
}
maxZ
{
type empty;
nFaces 0;
startFace 60926;
startFace 61885;
}
igloo_region0
{
type wall;
nFaces 2260;
startFace 60926;
startFace 61885;
}
twoFridgeFreezers_seal_0
{
type wall;
nFaces 1344;
startFace 63186;
startFace 64145;
}
twoFridgeFreezers_herring_1
{
type wall;
nFaces 1116;
startFace 64530;
startFace 65489;
}
)

View File

@ -45,25 +45,5 @@ timePrecision 6;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -29,16 +29,26 @@ solvers
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
tolerance 1e-07;
relTol 0.1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
nNonOrthogonalCorrectors 2;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-4;
T 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -44,25 +44,5 @@ timePrecision 6;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -46,6 +46,16 @@ SIMPLE
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -45,25 +45,5 @@ timePrecision 6;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -39,6 +39,16 @@ SIMPLE
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -45,26 +45,5 @@ timePrecision 6;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
G 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -46,6 +46,17 @@ SIMPLE
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
G 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -45,26 +45,5 @@ timePrecision 6;
runTimeModifiable true;
functions
{
residualControl1
{
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
G 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -34,7 +34,7 @@ divSchemes
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(Ji,Ii_h) Gauss linearUpwind Gauss linear; //Gauss upwind;
div(Ji,Ii_h) Gauss linearUpwind grad(Ii_h);
div((muEff*dev2(T(grad(U))))) Gauss linear;
}

View File

@ -43,6 +43,17 @@ SIMPLE
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p_rgh 1e-2;
U 1e-3;
h 1e-3;
G 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -34,7 +34,7 @@ divSchemes
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(Ji,Ii_h) Gauss linearUpwind Gauss linear; //Gauss upwind;
div(Ji,Ii_h) Gauss linearUpwind grad(U);
div((muEff*dev2(T(grad(U))))) Gauss linear;
}

View File

@ -34,7 +34,7 @@ divSchemes
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(Ji,Ii_h) Gauss linearUpwind Gauss linear; //Gauss upwind;
div(Ji,Ii_h) Gauss linearUpwind grad(U);
div((muEff*dev2(T(grad(U))))) Gauss linear;
}

View File

@ -1,126 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
MRFSimpleFoam
Description
Steady-state solver for incompressible, turbulent flow of non-Newtonian
fluids with MRF regions.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "RASModel.H"
#include "MRFZones.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readSIMPLEControls.H"
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
// Momentum predictor
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
mrfZones.addCoriolis(UEqn());
UEqn().relax();
solve(UEqn() == -fvc::grad(p));
p.boundaryField().updateCoeffs();
volScalarField rAU(1.0/UEqn().A());
U = rAU*UEqn().H();
UEqn.clear();
phi = fvc::interpolate(U, "interpolate(HbyA)") & mesh.Sf();
mrfZones.relativeFlux(phi);
adjustPhi(phi, U, p);
// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(rAU, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
#include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector
p.relax();
// Momentum corrector
U -= rAU*fvc::grad(p);
U.correctBoundaryConditions();
}
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
MRFSimpleFoam.C
EXE = $(FOAM_USER_APPBIN)/MRFSimpleFoam

View File

@ -1,11 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume

View File

@ -1,46 +0,0 @@
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
# include "createPhi.H"
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
singlePhaseTransportModel laminarTransport(U, phi);
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(U, phi, laminarTransport)
);
MRFZones mrfZones(mesh);
mrfZones.correctBoundaryVelocity(U);

View File

@ -47,6 +47,9 @@ FoamFile
nFaces 1600;
startFace 101720;
neighbourPatch cyclic_half1;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
}
cyclic_half1
{
@ -54,6 +57,9 @@ FoamFile
nFaces 1600;
startFace 103320;
neighbourPatch cyclic_half0;
transform rotational;
rotationAxis (0 0 1);
rotationCentre (0 0 0);
}
)

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleSRFFoam;
application SRFSimpleFoam;
startFrom startTime;

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial run functions

View File

@ -19,7 +19,7 @@ Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( 10 0 0 );
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-3;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-8;
// ************************************************************************* //

View File

@ -8,7 +8,7 @@
FoamFile
{
version 2.0;
format ascii;
format binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;

View File

@ -25,6 +25,8 @@ boundaryField
{
type turbulentMixingLengthDissipationRateInlet;
mixingLength 0.01;
phi phi;
k k;
value uniform 1;
}
outlet1
@ -45,7 +47,7 @@ boundaryField
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
value uniform 1;
}
fan_half0
{

View File

@ -25,6 +25,8 @@ boundaryField
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
U U;
phi phi;
value uniform 1;
}
outlet1
@ -42,7 +44,7 @@ boundaryField
baffles
{
type kqRWallFunction;
value uniform 0;
value uniform 1;
}
fan_half0
{

View File

@ -8,7 +8,7 @@
FoamFile
{
version 2.0;
format ascii;
format binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;

View File

@ -26,8 +26,7 @@ solvers
hFinal
{
solver PCG;
preconditioner DIC;
$h;
tolerance 1e-8;
relTol 0;
}
@ -37,11 +36,18 @@ solvers
solver PBiCG;
preconditioner DILU;
tolerance 1e-6;
relTol 0.1;
}
hUFinal
{
$hU;
tolerance 1e-6;
relTol 0;
}
}
PISO
PIMPLE
{
nOuterCorrectors 3;
nCorrectors 1;

View File

@ -30,8 +30,8 @@ gradSchemes
divSchemes
{
default none;
div(phi,U) Gauss linearUpwind Gauss linear;
div(phi,nuTilda) Gauss linearUpwind Gauss linear;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,nuTilda) Gauss linearUpwind grad(nuTilda);
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

View File

@ -21,433 +21,433 @@ FoamFile
{
type patch;
nFaces 320;
startFace 1027872;
startFace 1028059;
}
inlet
{
type patch;
nFaces 64;
startFace 1028192;
startFace 1028379;
}
outlet
{
type patch;
nFaces 64;
startFace 1028256;
startFace 1028443;
}
lowerWall
{
type wall;
nFaces 5330;
startFace 1028320;
startFace 1028507;
}
upperWall
{
type patch;
nFaces 160;
startFace 1033650;
startFace 1033837;
}
motorBike_frt-fairing:001%1
{
type wall;
nFaces 5416;
startFace 1033810;
nFaces 5410;
startFace 1033997;
}
motorBike_windshield:002%2
{
type wall;
nFaces 50;
startFace 1039226;
startFace 1039407;
}
motorBike_rr-wh-rim:005%5
{
type wall;
nFaces 137;
startFace 1039276;
nFaces 136;
startFace 1039457;
}
motorBike_rr-wh-rim:010%10
{
type wall;
nFaces 340;
startFace 1039413;
startFace 1039593;
}
motorBike_fr-wh-rim:011%11
{
type wall;
nFaces 473;
startFace 1039753;
startFace 1039933;
}
motorBike_fr-wh-brake-disk:012%12
{
type wall;
nFaces 54;
startFace 1040226;
startFace 1040406;
}
motorBike_frame:016-shadow%13
{
type wall;
nFaces 98;
startFace 1040280;
startFace 1040460;
}
motorBike_rear-susp:014%14
{
type wall;
nFaces 844;
startFace 1040378;
nFaces 847;
startFace 1040558;
}
motorBike_rear-susp:014-shadow%15
{
type wall;
nFaces 461;
startFace 1041222;
nFaces 462;
startFace 1041405;
}
motorBike_frame:016%16
{
type wall;
nFaces 67;
startFace 1041683;
nFaces 64;
startFace 1041867;
}
motorBike_rr-wh-rim:005-shadow%17
{
type wall;
nFaces 70;
startFace 1041750;
startFace 1041931;
}
motorBike_rr-wh-chain-hub:022%22
{
type wall;
nFaces 141;
startFace 1041820;
startFace 1042001;
}
motorBike_rearseat%24
{
type wall;
nFaces 430;
startFace 1041961;
startFace 1042142;
}
motorBike_frt-fairing%25
{
type wall;
nFaces 626;
startFace 1042391;
startFace 1042572;
}
motorBike_windshield%26
{
type wall;
nFaces 368;
startFace 1043017;
nFaces 379;
startFace 1043198;
}
motorBike_headlights%27
{
type wall;
nFaces 161;
startFace 1043385;
startFace 1043577;
}
motorBike_driversseat%28
{
type wall;
nFaces 368;
startFace 1043546;
startFace 1043738;
}
motorBike_rear-body%29
{
type wall;
nFaces 2077;
startFace 1043914;
startFace 1044106;
}
motorBike_fuel-tank%30
{
type wall;
nFaces 912;
startFace 1045991;
startFace 1046183;
}
motorBike_exhaust%31
{
type wall;
nFaces 2392;
startFace 1046903;
startFace 1047095;
}
motorBike_rr-wh-rim%32
{
type wall;
nFaces 1430;
startFace 1049295;
startFace 1049487;
}
motorBike_fr-mud-guard%33
{
type wall;
nFaces 624;
startFace 1050725;
nFaces 634;
startFace 1050917;
}
motorBike_fr-wh-rim%34
{
type wall;
nFaces 591;
startFace 1051349;
startFace 1051551;
}
motorBike_fr-wh-brake-disk%35
{
type wall;
nFaces 427;
startFace 1051940;
nFaces 426;
startFace 1052142;
}
motorBike_fr-brake-caliper%36
{
type wall;
nFaces 164;
startFace 1052367;
startFace 1052568;
}
motorBike_fr-wh-tyre%37
{
type wall;
nFaces 1116;
startFace 1052531;
startFace 1052732;
}
motorBike_hbars%38
{
type wall;
nFaces 535;
startFace 1053647;
startFace 1053848;
}
motorBike_fr-forks%39
{
type wall;
nFaces 1140;
startFace 1054182;
startFace 1054383;
}
motorBike_chain%40
{
type wall;
nFaces 474;
startFace 1055322;
startFace 1055523;
}
motorBike_rr-wh-tyre%41
{
type wall;
nFaces 1787;
startFace 1055796;
startFace 1055997;
}
motorBike_square-dial%42
{
type wall;
nFaces 6;
startFace 1057583;
startFace 1057784;
}
motorBike_round-dial%43
{
type wall;
nFaces 17;
startFace 1057589;
startFace 1057790;
}
motorBike_dial-holder%44
{
type wall;
nFaces 87;
startFace 1057606;
startFace 1057807;
}
motorBike_rear-susp%45
{
type wall;
nFaces 1786;
startFace 1057693;
startFace 1057894;
}
motorBike_rear-brake-lights%46
{
type wall;
nFaces 53;
startFace 1059479;
startFace 1059680;
}
motorBike_rear-light-bracket%47
{
type wall;
nFaces 163;
startFace 1059532;
startFace 1059733;
}
motorBike_frame%48
{
type wall;
nFaces 2040;
startFace 1059695;
startFace 1059896;
}
motorBike_rear-mud-guard%49
{
type wall;
nFaces 663;
startFace 1061735;
nFaces 660;
startFace 1061936;
}
motorBike_rear-susp-spring-damp%50
{
type wall;
nFaces 107;
startFace 1062398;
startFace 1062596;
}
motorBike_fairing-inner-plate%51
{
type wall;
nFaces 445;
startFace 1062505;
startFace 1062703;
}
motorBike_clutch-housing%52
{
type wall;
nFaces 970;
startFace 1062950;
startFace 1063148;
}
motorBike_radiator%53
{
type wall;
nFaces 39;
startFace 1063920;
nFaces 40;
startFace 1064118;
}
motorBike_water-pipe%54
{
type wall;
nFaces 104;
startFace 1063959;
startFace 1064158;
}
motorBike_water-pump%55
{
type wall;
nFaces 74;
startFace 1064063;
startFace 1064262;
}
motorBike_engine%56
{
type wall;
nFaces 2389;
startFace 1064137;
startFace 1064336;
}
motorBike_rear-shock-link%57
{
type wall;
nFaces 26;
startFace 1066526;
nFaces 25;
startFace 1066725;
}
motorBike_rear-brake-fluid-pot-bracket%58
{
type wall;
nFaces 44;
startFace 1066552;
nFaces 46;
startFace 1066750;
}
motorBike_rear-brake-fluid-pot%59
{
type wall;
nFaces 53;
startFace 1066596;
startFace 1066796;
}
motorBike_footpeg%60
{
type wall;
nFaces 86;
startFace 1066649;
startFace 1066849;
}
motorBike_rr-wh-chain-hub%61
{
type wall;
nFaces 122;
startFace 1066735;
startFace 1066935;
}
motorBike_rear-brake-caliper%62
{
type wall;
nFaces 142;
startFace 1066857;
startFace 1067057;
}
motorBike_rider-helmet%65
{
type wall;
nFaces 583;
startFace 1066999;
startFace 1067199;
}
motorBike_rider-visor%66
{
type wall;
nFaces 95;
startFace 1067582;
startFace 1067782;
}
motorBike_rider-boots%67
{
type wall;
nFaces 1025;
startFace 1067677;
startFace 1067877;
}
motorBike_rider-gloves%68
{
type wall;
nFaces 319;
startFace 1068702;
startFace 1068902;
}
motorBike_rider-body%69
{
type wall;
nFaces 4555;
startFace 1069021;
startFace 1069221;
}
motorBike_frame:0%70
{
type wall;
nFaces 37;
startFace 1073576;
startFace 1073776;
}
motorBike_frt-fairing:001-shadow%74
{
type wall;
nFaces 3317;
startFace 1073613;
nFaces 3329;
startFace 1073813;
}
motorBike_windshield-shadow%75
{
type wall;
nFaces 236;
startFace 1076930;
nFaces 237;
startFace 1077142;
}
motorBike_fr-mud-guard-shadow%81
{
type wall;
nFaces 350;
startFace 1077166;
nFaces 348;
startFace 1077379;
}
motorBike_fr-wh-brake-disk-shadow%83
{
type wall;
nFaces 186;
startFace 1077516;
nFaces 187;
startFace 1077727;
}
motorBike_rear-mud-guard-shadow%84
{
type wall;
nFaces 388;
startFace 1077702;
nFaces 394;
startFace 1077914;
}
motorBike_rear-susp-spring-damp-shadow%85
{
type wall;
nFaces 41;
startFace 1078090;
startFace 1078308;
}
motorBike_radiator-shadow%86
{
type wall;
nFaces 22;
startFace 1078131;
nFaces 20;
startFace 1078349;
}
motorBike_rear-shock-link-shadow%87
{
type wall;
nFaces 9;
startFace 1078153;
nFaces 10;
startFace 1078369;
}
motorBike_rear-brake-fluid-pot-bracket-shadow%88
{
type wall;
nFaces 22;
startFace 1078162;
nFaces 20;
startFace 1078379;
}
motorBike_rr-wh-chain-hub-shadow%89
{
type wall;
nFaces 53;
startFace 1078184;
startFace 1078399;
}
)

View File

@ -16,7 +16,7 @@ FoamFile
application simpleFoam;
startFrom startTime;
startFrom latestTime;
startTime 0;
@ -36,7 +36,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression off;
writeCompression compressed;
timeFormat general;
@ -52,59 +52,10 @@ libs
functions
{
// Make sure all fields for functionObjects are loaded. Prevents any
// problems running with execFlowFunctionObjects.
readFields
{
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
type readFields;
fields (p U k);
}
streamLines
{
type streamLine;
// Output every
outputControl outputTime;
// outputInterval 10;
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
// Velocity field to use for tracking.
U U;
// 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;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
// Cloud name to use
cloudName particleTracks;
// Seeding method. See the sampleSets in sampleDict.
seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;
uniformCoeffs
{
type uniform;
axis x; //distance;
// Note: tracks slightly offset so as not to be on a face
start (-1.001 1e-7 0.0011);
end (-1.001 1e-7 1.0011);
nPoints 20;
}
}
#include "readFields"
#include "streamLines"
#include "cuttingPlane"
#include "forceCoeffs"
}

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
cuttingPlane
{
type surfaces;
functionObjectLibs ("libsampling.so");
outputControl outputTime;
surfaceFormat vtk;
fields ( p U );
interpolationScheme cellPoint;
surfaces
(
yNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
basePoint (0 0 0);
normalVector (0 1 0);
}
interpolate true;
}
);
}
// ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches ( "motorBike.*" );
pName p;
UName U;
rhoName rhoInf; // Indicates incompressible
log true;
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
}
// ************************************************************************* //

View File

@ -5,19 +5,17 @@
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
// Make sure all fields for functionObjects are loaded. Prevents any
// problems running with execFlowFunctionObjects.
readFields
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldFunctionObjects.so");
type readFields;
fields (p U k);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value (0 0 -9.81);
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
streamLines
{
type streamLine;
// Output every
outputControl outputTime;
// outputInterval 10;
setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
// Velocity field to use for tracking.
U U;
// 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;
// Number of steps per cell (estimate). Set to 1 to disable subcycling.
nSubCycle 5;
// Cloud name to use
cloudName particleTracks;
// Seeding method. See the sampleSets in sampleDict.
seedSampleSet uniform; //cloud;//triSurfaceMeshPointSet;
uniformCoeffs
{
type uniform;
axis x; //distance;
// Note: tracks slightly offset so as not to be on a face
start (-1.001 1e-7 0.0011);
end (-1.001 1e-7 1.0011);
nPoints 20;
}
}
// ************************************************************************* //

View File

@ -47,21 +47,6 @@ runTimeModifiable true;
functions
{
convergenceChecks
{
type residualControl;
functionObjectLibs ("libjobControl.so");
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}
streamLines
{
type streamLine;

View File

@ -69,6 +69,13 @@ solvers
SIMPLE
{
nNonOrthogonalCorrectors 0;
residualControl
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -47,21 +47,6 @@ runTimeModifiable true;
functions
{
convergenceChecks
{
type residualControl;
functionObjectLibs ("libjobControl.so");
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}
streamLines
{
type streamLine;

View File

@ -69,6 +69,13 @@ solvers
SIMPLE
{
nNonOrthogonalCorrectors 0;
residualControl
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}
relaxationFactors

View File

@ -1,3 +0,0 @@
simpleSRFFoam.C
EXE = $(FOAM_USER_APPBIN)/simpleSRFFoam

View File

@ -1,12 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel
EXE_LIBS = \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools

View File

@ -1,16 +0,0 @@
// Relative momentum predictor
tmp<fvVectorMatrix> UrelEqn
(
fvm::div(phi, Urel)
+ turbulence->divDevReff(Urel)
+ SRF->Su()
);
UrelEqn().relax();
eqnResidual = solve
(
UrelEqn() == -fvc::grad(p)
).initialResidual();
maxResidual = max(eqnResidual, maxResidual);

View File

@ -1,9 +0,0 @@
// check convergence
if (maxResidual < convergenceCriterion)
{
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
runTime.writeAndEnd();
Info<< "latestTime = " << runTime.timeName() << endl;
}

View File

@ -1,58 +0,0 @@
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field Urel\n" << endl;
volVectorField Urel
(
IOobject
(
"Urel",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading/calculating face flux field phi\n" << endl;
surfaceScalarField phi
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(Urel) & mesh.Sf()
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
singlePhaseTransportModel laminarTransport(Urel, phi);
autoPtr<incompressible::RASModel> turbulence
(
incompressible::RASModel::New(Urel, phi, laminarTransport)
);
Info<< "Creating SRF model\n" << endl;
autoPtr<SRF::SRFModel> SRF
(
SRF::SRFModel::New(Urel)
);

View File

@ -1,7 +0,0 @@
// initialize values for convergence checks
scalar eqnResidual = 1, maxResidual = 0;
scalar convergenceCriterion = 0;
simple.readIfPresent("convergence", convergenceCriterion);

View File

@ -1,34 +0,0 @@
{
p.boundaryField().updateCoeffs();
volScalarField AUrel = UrelEqn().A();
Urel = UrelEqn().H()/AUrel;
UrelEqn.clear();
phi = fvc::interpolate(Urel) & mesh.Sf();
adjustPhi(phi, Urel, p);
// Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::laplacian(1.0/AUrel, p) == fvc::div(phi)
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi -= pEqn.flux();
}
}
# include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector
p.relax();
// Momentum corrector
Urel -= fvc::grad(p)/AUrel;
Urel.correctBoundaryConditions();
}

View File

@ -1,100 +0,0 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
simpleSRFFoam
Description
Steady-state solver for incompressible, turbulent flow of non-Newtonian
fluids in a single rotating frame.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "RASModel.H"
#include "SRFModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "initContinuityErrs.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readSIMPLEControls.H"
#include "initConvergenceCheck.H"
p.storePrevIter();
// Pressure-velocity SIMPLE corrector
{
#include "UrelEqn.H"
#include "pEqn.H"
}
turbulence->correct();
if (runTime.outputTime())
{
volVectorField Uabs
(
IOobject
(
"Uabs",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
Urel + SRF->U()
);
runTime.write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
#include "convergenceCheck.H"
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
simpleWindFoam.C
EXE = $(FOAM_APPBIN)/simpleWindFoam

View File

@ -1,13 +0,0 @@
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lincompressibleRASModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools

View File

@ -1,19 +0,0 @@
// Solve the Momentum equation
tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
);
UEqn().relax();
// Add resistance on the actuation disks
actuationDisks.addSu(UEqn());
eqnResidual = solve
(
UEqn() == -fvc::grad(p)
).initialResidual();
maxResidual = max(eqnResidual, maxResidual);

View File

@ -1,6 +0,0 @@
if (maxResidual < convergenceCriterion)
{
Info<< "reached convergence criterion: " << convergenceCriterion << endl;
runTime.writeAndEnd();
Info<< "latestTime = " << runTime.timeName() << endl;
}

Some files were not shown because too many files have changed in this diff Show More