Skip to content

Commit c8692c3

Browse files
committed
Added old release for OF301, now discontinued
1 parent 5bfb5df commit c8692c3

File tree

163 files changed

+7654
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+7654
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
OFtutorial0.C
2+
3+
EXE = $(FOAM_USER_APPBIN)/ofTutorial0
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
EXE_INC = \
2+
-I$(LIB_SRC)/finiteVolume/lnInclude \
3+
-I$(LIB_SRC)/meshTools/lnInclude
4+
5+
EXE_LIBS = \
6+
-lfiniteVolume \
7+
-lmeshTools
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*---------------------------------------------------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration |
5+
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6+
\\/ M anipulation |
7+
-------------------------------------------------------------------------------
8+
License
9+
This file is part of OpenFOAM.
10+
11+
OpenFOAM is free software: you can redistribute it and/or modify it
12+
under the terms of the GNU General Public License as published by
13+
the Free Software Foundation, either version 3 of the License, or
14+
(at your option) any later version.
15+
16+
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19+
for more details.
20+
21+
You should have received a copy of the GNU General Public License
22+
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23+
24+
\*---------------------------------------------------------------------------*/
25+
26+
#include "fvCFD.H"
27+
28+
int main(int argc, char *argv[])
29+
{
30+
// Checks the basic folder structure, verifies there is a control dict present, etc.;
31+
// also deals with parsing command line arguments and options.
32+
// It works by taking an external piece of code, written in $FOAM_SRC/OpenFOAM/include.
33+
// The contents of the include file actually look like this:
34+
/*Foam::argList args(argc, argv); - deciphers the arguments passed to the program
35+
if (!args.checkRootCase()) - verifies the folder structure
36+
{
37+
Foam::FatalError.exit();
38+
}*/
39+
#include "setRootCase.H"
40+
41+
// OpenFOAM screen output is very similar to rudimentary C++ with its std::cout, std::nl and std::endl
42+
// being replaced with Foam::Info, Foam::nl, and Foam::endl.
43+
Info << "Hello there, I'm an OpenFOAM program!" << nl
44+
<< "You don't need a mesh or anything to run it, just a bare OpenFOAM case will do." << nl
45+
<< tab << "This is me again, just creating a tabulated new line, move along." << nl << endl;
46+
47+
Info<< "End\n" << endl;
48+
49+
return 0;
50+
}
51+
52+
53+
// ************************************************************************* //
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 3.0.1 |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class volVectorField;
13+
object U;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
dimensions [0 1 -1 0 0 0 0];
18+
19+
internalField uniform (0 0 0);
20+
21+
boundaryField
22+
{
23+
movingWall
24+
{
25+
type fixedValue;
26+
value uniform (1 0 0);
27+
}
28+
29+
fixedWalls
30+
{
31+
type fixedValue;
32+
value uniform (0 0 0);
33+
}
34+
35+
frontAndBack
36+
{
37+
type empty;
38+
}
39+
}
40+
41+
// ************************************************************************* //
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 3.0.1 |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class volScalarField;
13+
object p;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
dimensions [0 2 -2 0 0 0 0];
18+
19+
internalField uniform 0;
20+
21+
boundaryField
22+
{
23+
movingWall
24+
{
25+
type zeroGradient;
26+
}
27+
28+
fixedWalls
29+
{
30+
type zeroGradient;
31+
}
32+
33+
frontAndBack
34+
{
35+
type empty;
36+
}
37+
}
38+
39+
// ************************************************************************* //
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
rm -r 1* 2* 3* 4* 5* 6* 7* 8* 9* 0.* constant/polyMesh/* processor* log.* 2>/dev/null
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
ofTutorial0
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 3.0.1 |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
location "constant";
14+
object transportProperties;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
nu [0 2 -1 0 0 0 0] 0.01;
19+
20+
21+
// ************************************************************************* //
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 3.0.1 |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
object blockMeshDict;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
convertToMeters 0.1;
18+
19+
vertices
20+
(
21+
(0 0 0)
22+
(1 0 0)
23+
(1 1 0)
24+
(0 1 0)
25+
(0 0 0.1)
26+
(1 0 0.1)
27+
(1 1 0.1)
28+
(0 1 0.1)
29+
);
30+
31+
blocks
32+
(
33+
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
34+
);
35+
36+
edges
37+
(
38+
);
39+
40+
boundary
41+
(
42+
movingWall
43+
{
44+
type wall;
45+
faces
46+
(
47+
(3 7 6 2)
48+
);
49+
}
50+
fixedWalls
51+
{
52+
type wall;
53+
faces
54+
(
55+
(0 4 7 3)
56+
(2 6 5 1)
57+
(1 5 4 0)
58+
);
59+
}
60+
frontAndBack
61+
{
62+
type empty;
63+
faces
64+
(
65+
(0 3 2 1)
66+
(4 5 6 7)
67+
);
68+
}
69+
);
70+
71+
mergePatchPairs
72+
(
73+
);
74+
75+
// ************************************************************************* //
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 3.0.1 |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
location "system";
14+
object controlDict;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
application icoFoam;
19+
20+
startFrom startTime;
21+
22+
startTime 0;
23+
24+
stopAt endTime;
25+
26+
endTime 0.5;
27+
28+
deltaT 0.005;
29+
30+
writeControl timeStep;
31+
32+
writeInterval 20;
33+
34+
purgeWrite 0;
35+
36+
writeFormat ascii;
37+
38+
writePrecision 6;
39+
40+
writeCompression off;
41+
42+
timeFormat general;
43+
44+
timePrecision 6;
45+
46+
runTimeModifiable true;
47+
48+
49+
// ************************************************************************* //
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 3.0.1 |
5+
| \\ / A nd | Web: www.OpenFOAM.org |
6+
| \\/ M anipulation | |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
version 2.0;
11+
format ascii;
12+
class dictionary;
13+
location "system";
14+
object fvSchemes;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
ddtSchemes
19+
{
20+
default Euler;
21+
}
22+
23+
gradSchemes
24+
{
25+
default Gauss linear;
26+
grad(p) Gauss linear;
27+
}
28+
29+
divSchemes
30+
{
31+
default none;
32+
div(phi,U) Gauss linear;
33+
}
34+
35+
laplacianSchemes
36+
{
37+
default Gauss linear orthogonal;
38+
}
39+
40+
interpolationSchemes
41+
{
42+
default linear;
43+
}
44+
45+
snGradSchemes
46+
{
47+
default orthogonal;
48+
}
49+
50+
51+
// ************************************************************************* //

0 commit comments

Comments
 (0)