Skip to content

Commit

Permalink
Update for OpenFOAM 7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
UnnamedMoose committed Jul 9, 2019
1 parent 49d7dff commit 602041e
Show file tree
Hide file tree
Showing 242 changed files with 33,005 additions and 42 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,6 @@ doc/Doxygen/DTAGS
/.dir-locals.el
/.dropbox

# Ignore the test directory
# Ignore the test directory and unpublished files
/tutorialsTest
/TODO
36 changes: 18 additions & 18 deletions OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.C
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,23 @@ Foam::prescribedPipeInletFvPatchVectorField::prescribedPipeInletFvPatchVectorFie

// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

void Foam::prescribedPipeInletFvPatchVectorField::autoMap
(
const fvPatchFieldMapper& m
)
{
vectorField::autoMap(m);
}


void Foam::prescribedPipeInletFvPatchVectorField::rmap
(
const fvPatchVectorField& ptf,
const labelList& addr
)
{
fixedValueFvPatchVectorField::rmap(ptf, addr);
}
// void Foam::prescribedPipeInletFvPatchVectorField::autoMap
// (
// const fvPatchFieldMapper& m
// )
// {
// vectorField::autoMap(m);
// }
//
//
// void Foam::prescribedPipeInletFvPatchVectorField::rmap
// (
// const fvPatchVectorField& ptf,
// const labelList& addr
// )
// {
// fixedValueFvPatchVectorField::rmap(ptf, addr);
// }

// NOTE: this is the key method which implements the actual maths for calculating
// the inlet profiles.
Expand Down Expand Up @@ -213,7 +213,7 @@ void Foam::prescribedPipeInletFvPatchVectorField::write(Ostream& os) const
os.writeKeyword("centrepoint") << centrepoint_ << token::END_STATEMENT << nl;
os.writeKeyword("R") << R_ << token::END_STATEMENT << nl;
os.writeKeyword("lambda") << lambda_ << token::END_STATEMENT << nl;
writeEntry("value", os);
writeEntry(os, "value", *this);
}


Expand Down
17 changes: 0 additions & 17 deletions OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.H
Original file line number Diff line number Diff line change
Expand Up @@ -192,23 +192,6 @@ public:

// Member functions

// Access

// Mapping functions

//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);

//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const fvPatchVectorField&,
const labelList&
);

// Evaluation functions

//- Update the coefficients associated with the patch field
Expand Down
2 changes: 1 addition & 1 deletion OFtutorial08_customBC/testCase/0.org/nut
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ boundaryField
}
pipe
{
type fixedValue;
type nutLowReWallFunction;
value uniform 0;
}
"symmetry.*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ boundaryField
}
pipe
{
type fixedValue;
type nutLowReWallFunction;
value uniform 0;
}
"symmetry.*"
Expand Down
2 changes: 1 addition & 1 deletion OFtutorial11_modifyingTheMesh/OFtutorial11.C
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ int main(int argc, char *argv[])
runTime.constant(),
runTime
),
xferMove(points),
clone(points),
cells,
patchFaces,
boundaryPatchNames,
Expand Down
3 changes: 3 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/Allwclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

wclean
3 changes: 3 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/Allwmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

wmake
3 changes: 3 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/Make/files
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
OFtutorial0.C

EXE = $(FOAM_USER_APPBIN)/ofTutorial0
7 changes: 7 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/Make/options
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
53 changes: 53 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/OFtutorial0.C
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;
}


// ************************************************************************* //
41 changes: 41 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/U
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;
}
}

// ************************************************************************* //
39 changes: 39 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/p
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 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allclean
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
3 changes: 3 additions & 0 deletions OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allrun
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ofTutorial0
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;


// ************************************************************************* //
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
(
);

// ************************************************************************* //
Loading

0 comments on commit 602041e

Please sign in to comment.