Skip to content

Commit 0d01207

Browse files
committed
Merge branch 'feature'
2 parents 98c6b30 + bd8be4d commit 0d01207

Some content is hidden

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

98 files changed

+4972
-1
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.gz
2+
log.*
3+
postProcessing
4+
*~
5+
processor*
6+
[0-9]*
7+
[0-9]*.[0-9]*
8+
!0.org
9+
!0.orig
10+
*.eMesh
11+
polyMesh/
12+
*.OpenFOAM
13+
dynamicCode
-18.8 KB
Binary file not shown.

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,25 @@
1-
# OpenFOAM
1+
# OpenFOAM Tutorials Plus
2+
This repository contains several OpenFOAM cases and notes related to my blog [OpenFOAM Studio [in Chinese]](https://zhuanlan.zhihu.com/openfoam).
3+
4+
Here's a brief description:
5+
* **linuxCheatSheet**
6+
7+
OpenFOAM Linux Cheat Sheet.
8+
9+
* **flatPlate**
10+
11+
A simple 2D geometry is used to show the development of a turbulent boundary layer. It's an exercise of [Flow over a flat plate - YouTube](https://youtu.be/69Nna1UjICI).
12+
13+
* **abruptContraction**
14+
15+
Abrupt contraction of a rectangular channel where cavitation occures. The *blockMeshDict* is written with variables. *interPhaseChangeFoam*, *pisoFoam* and *pimpleFoam* are used.
16+
17+
* **abruptContractionPar**
18+
19+
Parallel edition of abruptContraction.
20+
21+
* **waterChannel**
22+
23+
Two-phase open channel flow. It's a fork of the original interFoam tutorial *waterChannel*. The *surfaces* function is configured to generate water surfaces (namely, the isosurfaces where *alpha.water* is equal to 0.5).
24+
25+
Pull requests are welcome! Happy foaming!
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.0 |
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+
location "0";
14+
object Phi;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
dimensions [0 2 -1 0 0];
19+
20+
internalField uniform 0;
21+
22+
boundaryField
23+
{
24+
inlet
25+
{
26+
type zeroGradient;
27+
}
28+
29+
outlet
30+
{
31+
type fixedValue;
32+
value $internalField;
33+
}
34+
35+
walls
36+
{
37+
type zeroGradient;
38+
}
39+
symmetry
40+
{
41+
type zeroGradient;
42+
}
43+
side
44+
{
45+
type zeroGradient;
46+
}
47+
}
48+
49+
// ************************************************************************* //
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 4.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+
location "0";
14+
object U;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
dimensions [0 1 -1 0 0 0 0];
19+
20+
internalField uniform (0 0 0);
21+
22+
boundaryField
23+
{
24+
inlet
25+
{
26+
type fixedValue;
27+
value uniform (5 0 0);
28+
}
29+
outlet
30+
{
31+
type zeroGradient;
32+
}
33+
side
34+
{
35+
type noSlip;
36+
}
37+
walls
38+
{
39+
type noSlip;
40+
}
41+
symmetry
42+
{
43+
type noSlip;
44+
}
45+
}
46+
47+
48+
// ************************************************************************* //
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 3.0.0 |
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+
location "0";
14+
object alpha.water;
15+
}
16+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17+
18+
dimensions [0 0 0 0 0];
19+
20+
internalField uniform 1;
21+
22+
boundaryField
23+
{
24+
inlet
25+
{
26+
type fixedValue;
27+
value 1;
28+
}
29+
outlet
30+
{
31+
type inletOutlet;
32+
inletValue $internalField;
33+
}
34+
side
35+
{
36+
type zeroGradient;
37+
}
38+
walls
39+
{
40+
type zeroGradient;
41+
}
42+
symmetry
43+
{
44+
type zeroGradient;
45+
}
46+
}
47+
48+
// ************************************************************************* //
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 4.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 k;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
dimensions [0 2 -2 0 0 0 0];
18+
19+
internalField uniform 0;
20+
21+
boundaryField
22+
{
23+
inlet
24+
{
25+
type fixedValue;
26+
value uniform 2e-05;
27+
}
28+
29+
outlet
30+
{
31+
type inletOutlet;
32+
inletValue uniform 0;
33+
value uniform 0;
34+
}
35+
36+
side
37+
{
38+
type fixedValue;
39+
value uniform 0;
40+
}
41+
42+
walls
43+
{
44+
type fixedValue;
45+
value uniform 0;
46+
}
47+
48+
symmetry
49+
{
50+
type fixedValue;
51+
value uniform 0;
52+
}
53+
}
54+
55+
// ************************************************************************* //
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
| ========= | |
3+
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4+
| \\ / O peration | Version: 4.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 nuTilda;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
dimensions [0 2 -1 0 0 0 0];
18+
19+
internalField uniform 0;
20+
21+
boundaryField
22+
{
23+
inlet
24+
{
25+
type fixedValue;
26+
value uniform 0;
27+
}
28+
29+
outlet
30+
{
31+
type inletOutlet;
32+
inletValue uniform 0;
33+
value uniform 0;
34+
}
35+
36+
side
37+
{
38+
type fixedValue;
39+
value uniform 0;
40+
}
41+
42+
walls
43+
{
44+
type fixedValue;
45+
value uniform 0;
46+
}
47+
48+
symmetry
49+
{
50+
type fixedValue;
51+
value uniform 0;
52+
}
53+
}
54+
55+
// ************************************************************************* //
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: 4.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 nut;
14+
}
15+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16+
17+
dimensions [0 2 -1 0 0 0 0];
18+
19+
internalField uniform 0;
20+
21+
boundaryField
22+
{
23+
inlet
24+
{
25+
type zeroGradient;
26+
}
27+
28+
outlet
29+
{
30+
type zeroGradient;
31+
}
32+
33+
side
34+
{
35+
type zeroGradient;
36+
}
37+
38+
walls
39+
{
40+
type zeroGradient;
41+
}
42+
43+
symmetry
44+
{
45+
type zeroGradient;
46+
}
47+
}
48+
49+
// ************************************************************************* //

0 commit comments

Comments
 (0)