forked from UnnamedMoose/BasicOpenFOAMProgrammingTutorials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49d7dff
commit 602041e
Showing
242 changed files
with
33,005 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ boundaryField | |
} | ||
pipe | ||
{ | ||
type fixedValue; | ||
type nutLowReWallFunction; | ||
value uniform 0; | ||
} | ||
"symmetry.*" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ boundaryField | |
} | ||
pipe | ||
{ | ||
type fixedValue; | ||
type nutLowReWallFunction; | ||
value uniform 0; | ||
} | ||
"symmetry.*" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
wclean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
wmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
OFtutorial0.C | ||
|
||
EXE = $(FOAM_USER_APPBIN)/ofTutorial0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
EXE_INC = \ | ||
-I$(LIB_SRC)/finiteVolume/lnInclude \ | ||
-I$(LIB_SRC)/meshTools/lnInclude | ||
|
||
EXE_LIBS = \ | ||
-lfiniteVolume \ | ||
-lmeshTools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*---------------------------------------------------------------------------*\ | ||
========= | | ||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox | ||
\\ / O peration | | ||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation | ||
\\/ 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/>. | ||
\*---------------------------------------------------------------------------*/ | ||
|
||
#include "fvCFD.H" | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
// Checks the basic folder structure, verifies there is a control dict present, etc.; | ||
// also deals with parsing command line arguments and options. | ||
// It works by taking an external piece of code, written in $FOAM_SRC/OpenFOAM/include. | ||
// The contents of the include file actually look like this: | ||
/*Foam::argList args(argc, argv); - deciphers the arguments passed to the program | ||
if (!args.checkRootCase()) - verifies the folder structure | ||
{ | ||
Foam::FatalError.exit(); | ||
}*/ | ||
#include "setRootCase.H" | ||
|
||
// OpenFOAM screen output is very similar to rudimentary C++ with its std::cout, std::nl and std::endl | ||
// being replaced with Foam::Info, Foam::nl, and Foam::endl. | ||
Info << "Hello there, I'm an OpenFOAM program!" << nl | ||
<< "You don't need a mesh or anything to run it, just a bare OpenFOAM case will do." << nl | ||
<< tab << "This is me again, just creating a tabulated new line, move along." << nl << endl; | ||
|
||
Info<< "End\n" << endl; | ||
|
||
return 0; | ||
} | ||
|
||
|
||
// ************************************************************************* // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/*--------------------------------*- C++ -*----------------------------------*\ | ||
| ========= | | | ||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | ||
| \\ / O peration | Version: 3.0.1 | | ||
| \\ / 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 | ||
{ | ||
movingWall | ||
{ | ||
type fixedValue; | ||
value uniform (1 0 0); | ||
} | ||
|
||
fixedWalls | ||
{ | ||
type fixedValue; | ||
value uniform (0 0 0); | ||
} | ||
|
||
frontAndBack | ||
{ | ||
type empty; | ||
} | ||
} | ||
|
||
// ************************************************************************* // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/*--------------------------------*- C++ -*----------------------------------*\ | ||
| ========= | | | ||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | ||
| \\ / O peration | Version: 3.0.1 | | ||
| \\ / 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 | ||
{ | ||
movingWall | ||
{ | ||
type zeroGradient; | ||
} | ||
|
||
fixedWalls | ||
{ | ||
type zeroGradient; | ||
} | ||
|
||
frontAndBack | ||
{ | ||
type empty; | ||
} | ||
} | ||
|
||
// ************************************************************************* // |
3 changes: 3 additions & 0 deletions
3
OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allclean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
rm -r 1* 2* 3* 4* 5* 6* 7* 8* 9* 0.* constant/polyMesh/* processor* log.* 2>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
ofTutorial0 |
21 changes: 21 additions & 0 deletions
21
OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/constant/transportProperties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/*--------------------------------*- C++ -*----------------------------------*\ | ||
| ========= | | | ||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | ||
| \\ / O peration | Version: 3.0.1 | | ||
| \\ / A nd | Web: www.OpenFOAM.org | | ||
| \\/ M anipulation | | | ||
\*---------------------------------------------------------------------------*/ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
location "constant"; | ||
object transportProperties; | ||
} | ||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
nu [0 2 -1 0 0 0 0] 0.01; | ||
|
||
|
||
// ************************************************************************* // |
75 changes: 75 additions & 0 deletions
75
OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/blockMeshDict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/*--------------------------------*- C++ -*----------------------------------*\ | ||
| ========= | | | ||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | ||
| \\ / O peration | Version: 3.0.1 | | ||
| \\ / A nd | Web: www.OpenFOAM.org | | ||
| \\/ M anipulation | | | ||
\*---------------------------------------------------------------------------*/ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
object blockMeshDict; | ||
} | ||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
convertToMeters 0.1; | ||
|
||
vertices | ||
( | ||
(0 0 0) | ||
(1 0 0) | ||
(1 1 0) | ||
(0 1 0) | ||
(0 0 0.1) | ||
(1 0 0.1) | ||
(1 1 0.1) | ||
(0 1 0.1) | ||
); | ||
|
||
blocks | ||
( | ||
hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1) | ||
); | ||
|
||
edges | ||
( | ||
); | ||
|
||
boundary | ||
( | ||
movingWall | ||
{ | ||
type wall; | ||
faces | ||
( | ||
(3 7 6 2) | ||
); | ||
} | ||
fixedWalls | ||
{ | ||
type wall; | ||
faces | ||
( | ||
(0 4 7 3) | ||
(2 6 5 1) | ||
(1 5 4 0) | ||
); | ||
} | ||
frontAndBack | ||
{ | ||
type empty; | ||
faces | ||
( | ||
(0 3 2 1) | ||
(4 5 6 7) | ||
); | ||
} | ||
); | ||
|
||
mergePatchPairs | ||
( | ||
); | ||
|
||
// ************************************************************************* // |
Oops, something went wrong.