From 602041e5302cbfc8c3fd85a58248807b193e4f9e Mon Sep 17 00:00:00 2001 From: UnnamedMoose Date: Tue, 9 Jul 2019 08:23:57 +0200 Subject: [PATCH] Update for OpenFOAM 7 compatibility --- .gitignore | 3 +- .../prescribedPipeInletFvPatchVectorField.C | 36 +- .../prescribedPipeInletFvPatchVectorField.H | 17 - OFtutorial08_customBC/testCase/0.org/nut | 2 +- .../testCase/0.org/nut | 2 +- OFtutorial11_modifyingTheMesh/OFtutorial11.C | 2 +- .../OF5and6/OFtutorial00_helloWorld/Allwclean | 3 + .../OF5and6/OFtutorial00_helloWorld/Allwmake | 3 + .../OFtutorial00_helloWorld/Make/files | 3 + .../OFtutorial00_helloWorld/Make/options | 7 + .../OFtutorial00_helloWorld/OFtutorial0.C | 53 + .../OFtutorial00_helloWorld/testCase/0/U | 41 + .../OFtutorial00_helloWorld/testCase/0/p | 39 + .../OFtutorial00_helloWorld/testCase/Allclean | 3 + .../OFtutorial00_helloWorld/testCase/Allrun | 3 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../OFtutorial01_inputOutput/Allwclean | 3 + .../OF5and6/OFtutorial01_inputOutput/Allwmake | 3 + .../OFtutorial01_inputOutput/Make/files | 3 + .../OFtutorial01_inputOutput/Make/options | 7 + .../OFtutorial01_inputOutput/OFtutorial1.C | 118 + .../OFtutorial01_inputOutput/testCase/0/U | 41 + .../OFtutorial01_inputOutput/testCase/0/p | 39 + .../testCase/Allclean | 3 + .../OFtutorial01_inputOutput/testCase/Allrun | 4 + .../testCase/constant/customProperties | 39 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../Allwclean | 3 + .../Allwmake | 3 + .../Make/files | 3 + .../Make/options | 7 + .../OFtutorial2.C | 114 + .../testCase/0/U | 41 + .../testCase/0/p | 39 + .../testCase/Allclean | 3 + .../testCase/Allrun | 3 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../Allwclean | 3 + .../Allwmake | 3 + .../Make/files | 3 + .../Make/options | 7 + .../OFtutorial3.C | 160 + .../testCase/0/U | 41 + .../testCase/0/p | 39 + .../testCase/Allclean | 3 + .../testCase/Allrun | 4 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../Allwclean | 3 + .../Allwmake | 3 + .../Make/files | 3 + .../Make/options | 7 + .../OFtutorial4.C | 184 + .../testCase/0/U | 41 + .../testCase/0/p | 39 + .../testCase/Allclean | 3 + .../testCase/Allrun | 4 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../Allwclean | 3 + .../Allwmake | 3 + .../Make/files | 3 + .../Make/options | 7 + .../OFtutorial5.C | 168 + .../createFields.H | 48 + .../testCase/0/U | 41 + .../testCase/0/p | 39 + .../testCase/Allclean | 3 + .../testCase/Allrun | 6 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/decomposeParDict | 26 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../OFtutorial06_customClasses/Allwclean | 3 + .../OFtutorial06_customClasses/Allwmake | 3 + .../OFtutorial06_customClasses/Make/files | 5 + .../OFtutorial06_customClasses/Make/options | 7 + .../OFtutorial06_customClasses/OFtutorial6.C | 87 + .../OFtutorial06_customClasses/customClass.C | 21 + .../OFtutorial06_customClasses/customClass.H | 30 + .../OFtutorial06_customClasses/derivedClass.C | 36 + .../OFtutorial06_customClasses/derivedClass.H | 20 + .../OFtutorial06_customClasses/testCase/0/U | 41 + .../OFtutorial06_customClasses/testCase/0/p | 39 + .../testCase/Allclean | 3 + .../testCase/Allrun | 4 + .../testCase/constant/transportProperties | 23 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/decomposeParDict | 26 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../OFtutorial07_customLibraries/Allwclean | 4 + .../OFtutorial07_customLibraries/Allwmake | 4 + .../OFtutorial07_customLibraries/Make/files | 3 + .../OFtutorial07_customLibraries/Make/options | 9 + .../OFtutorial7.C | 84 + .../createFields.H | 48 + .../customLibrary/Make/files | 3 + .../customLibrary/Make/options | 7 + .../customLibrary/customLibrary.C | 17 + .../customLibrary/customLibrary.H | 12 + .../OFtutorial07_customLibraries/testCase/0/U | 41 + .../OFtutorial07_customLibraries/testCase/0/p | 39 + .../testCase/Allclean | 3 + .../testCase/Allrun | 4 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/decomposeParDict | 26 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../OF5and6/OFtutorial08_customBC/Allwclean | 5 + .../OF5and6/OFtutorial08_customBC/Allwmake | 5 + .../OF5and6/OFtutorial08_customBC/Make/files | 3 + .../OFtutorial08_customBC/Make/options | 5 + .../prescribedPipeInletFvPatchVectorField.C | 231 + .../prescribedPipeInletFvPatchVectorField.H | 232 + .../OFtutorial08_customBC/testCase/0.org/U | 63 + .../OFtutorial08_customBC/testCase/0.org/k | 48 + .../OFtutorial08_customBC/testCase/0.org/nut | 48 + .../testCase/0.org/omega | 49 + .../OFtutorial08_customBC/testCase/0.org/p | 44 + .../OFtutorial08_customBC/testCase/Allclean | 14 + .../OFtutorial08_customBC/testCase/Allrun | 24 + .../testCase/Allrun.mesh | 44 + .../testCase/constant/transportProperties | 24 + .../testCase/constant/turbulenceProperties | 28 + .../testCase/system/blockMeshDict | 167 + .../testCase/system/controlDict | 51 + .../testCase/system/decomposeParDict | 29 + .../testCase/system/fvSchemes | 56 + .../testCase/system/fvSolution | 92 + .../testCase/system/mirrorMeshDict | 25 + .../testCase/system/runConditions | 53 + .../testCase/system/sampleDict | 259 + .../Allwclean | 3 + .../Allwmake | 3 + .../Make/files | 3 + .../Make/options | 7 + .../pipeCalc.C | 212 + .../pipeCalc.H | 163 + .../testCase/0.org/U | 49 + .../testCase/0.org/k | 48 + .../testCase/0.org/nut | 48 + .../testCase/0.org/omega | 49 + .../testCase/0.org/p | 44 + .../testCase/Allclean | 14 + .../testCase/Allrun | 18 + .../testCase/Allrun.mesh | 44 + .../testCase/constant/transportProperties | 24 + .../testCase/constant/turbulenceProperties | 28 + .../testCase/system/blockMeshDict | 167 + .../testCase/system/controlDict | 64 + .../testCase/system/decomposeParDict | 29 + .../testCase/system/fvSchemes | 56 + .../testCase/system/fvSolution | 92 + .../testCase/system/mirrorMeshDict | 25 + .../testCase/system/runConditions | 53 + .../testCase/system/sampleDict | 259 + .../testCase/system/topoSetDict | 126 + .../OFtutorial10_transportEquation/Allwclean | 3 + .../OFtutorial10_transportEquation/Allwmake | 3 + .../OFtutorial10_transportEquation/Make/files | 3 + .../Make/options | 11 + .../OFtutorial10.C | 143 + .../testCase/0/U | 35 + .../testCase/0/beta | 47 + .../testCase/2DconvectionDiffusion.png | Bin 0 -> 8973 bytes .../testCase/Allclean | 2 + .../testCase/Allrun | 5 + .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 89 + .../testCase/system/controlDict | 47 + .../testCase/system/fvSchemes | 58 + .../testCase/system/fvSolution | 29 + .../testCase/viewData.pvsm | 3065 +++++ .../OFtutorial11_modifyingTheMesh/Allwclean | 3 + .../OFtutorial11_modifyingTheMesh/Allwmake | 3 + .../OFtutorial11_modifyingTheMesh/Make/files | 3 + .../Make/options | 7 + .../OFtutorial11.C | 260 + .../meshPoints.geo | 18 + .../meshPoints.pdf | Bin 0 -> 6917 bytes .../testCase/Allclean | 3 + .../testCase/Allrun | 6 + .../testCase/cellTypes.png | Bin 0 -> 8579 bytes .../testCase/constant/transportProperties | 21 + .../testCase/system/blockMeshDict | 75 + .../testCase/system/controlDict | 49 + .../testCase/system/fvSchemes | 51 + .../testCase/system/fvSolution | 46 + .../testCase/testCase.OpenFOAM | 0 .../testCase/viewGrid.pvsm | 10686 ++++++++++++++++ .../OFtutorial12_momentumSource/Allwclean | 3 + .../OFtutorial12_momentumSource/Allwmake | 3 + .../OFtutorial12_momentumSource/Make/files | 3 + .../OFtutorial12_momentumSource/Make/options | 9 + .../customActuationDiskSource.C | 221 + .../customActuationDiskSource.H | 253 + .../customActuationDiskSourceTemplates.C | 95 + .../OFtutorial12_momentumSource/testCase/0/U | 40 + .../OFtutorial12_momentumSource/testCase/0/k | 42 + .../testCase/0/nut | 42 + .../testCase/0/omega | 42 + .../OFtutorial12_momentumSource/testCase/0/p | 38 + .../testCase/Allclean | 3 + .../testCase/Allrun | 5 + .../testCase/Umagnitude.png | Bin 0 -> 78650 bytes .../testCase/constant/fvOptions | 34 + .../testCase/constant/transportProperties | 22 + .../testCase/constant/turbulenceProperties | 26 + .../testCase/system/blockMeshDict | 104 + .../testCase/system/controlDict | 56 + .../testCase/system/fvSchemes | 64 + .../testCase/system/fvSolution | 86 + .../testCase/viewData.pvsm | 9369 ++++++++++++++ OldReleases/OF5and6/README.md | 245 + OldReleases/OF5and6/testAll | 41 + README.md | 7 +- cleanAll | 17 + testAll | 1 + 242 files changed, 33005 insertions(+), 42 deletions(-) create mode 100755 OldReleases/OF5and6/OFtutorial00_helloWorld/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial00_helloWorld/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/OFtutorial0.C create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial01_inputOutput/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial01_inputOutput/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/OFtutorial1.C create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/customProperties create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/OFtutorial2.C create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/OFtutorial3.C create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/OFtutorial4.C create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/OFtutorial5.C create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/createFields.H create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/system/decomposeParDict create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial05_basicParallelComputing/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial06_customClasses/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial06_customClasses/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/OFtutorial6.C create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/customClass.C create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/customClass.H create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/derivedClass.C create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/derivedClass.H create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/system/decomposeParDict create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial06_customClasses/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial07_customLibraries/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial07_customLibraries/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/OFtutorial7.C create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/createFields.H create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/customLibrary/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/customLibrary/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/customLibrary/customLibrary.C create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/customLibrary/customLibrary.H create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/system/decomposeParDict create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial07_customLibraries/testCase/system/fvSolution create mode 100755 OldReleases/OF5and6/OFtutorial08_customBC/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial08_customBC/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.C create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.H create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/0.org/U create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/0.org/k create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/0.org/nut create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/0.org/omega create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/0.org/p create mode 100755 OldReleases/OF5and6/OFtutorial08_customBC/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial08_customBC/testCase/Allrun create mode 100755 OldReleases/OF5and6/OFtutorial08_customBC/testCase/Allrun.mesh create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/constant/turbulenceProperties create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/decomposeParDict create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/fvSolution create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/mirrorMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/runConditions create mode 100644 OldReleases/OF5and6/OFtutorial08_customBC/testCase/system/sampleDict create mode 100755 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/pipeCalc.C create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/pipeCalc.H create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/U create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/k create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/nut create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/omega create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/p create mode 100755 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/Allrun create mode 100755 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/Allrun.mesh create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/constant/turbulenceProperties create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/decomposeParDict create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/fvSolution create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/mirrorMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/runConditions create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/sampleDict create mode 100644 OldReleases/OF5and6/OFtutorial09_runtimePostprocessingUtility/testCase/system/topoSetDict create mode 100755 OldReleases/OF5and6/OFtutorial10_transportEquation/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial10_transportEquation/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/OFtutorial10.C create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/0/beta create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/2DconvectionDiffusion.png create mode 100755 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/system/fvSolution create mode 100644 OldReleases/OF5and6/OFtutorial10_transportEquation/testCase/viewData.pvsm create mode 100755 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/OFtutorial11.C create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/meshPoints.geo create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/meshPoints.pdf create mode 100755 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/cellTypes.png create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/system/fvSolution create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/testCase.OpenFOAM create mode 100644 OldReleases/OF5and6/OFtutorial11_modifyingTheMesh/testCase/viewGrid.pvsm create mode 100755 OldReleases/OF5and6/OFtutorial12_momentumSource/Allwclean create mode 100755 OldReleases/OF5and6/OFtutorial12_momentumSource/Allwmake create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/Make/files create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/Make/options create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/customActuationDiskSource.C create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/customActuationDiskSource.H create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/customActuationDiskSourceTemplates.C create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/0/U create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/0/k create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/0/nut create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/0/omega create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/0/p create mode 100755 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/Allclean create mode 100755 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/Allrun create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/Umagnitude.png create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/constant/fvOptions create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/constant/transportProperties create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/constant/turbulenceProperties create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/system/blockMeshDict create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/system/controlDict create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/system/fvSchemes create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/system/fvSolution create mode 100644 OldReleases/OF5and6/OFtutorial12_momentumSource/testCase/viewData.pvsm create mode 100644 OldReleases/OF5and6/README.md create mode 100755 OldReleases/OF5and6/testAll create mode 100755 cleanAll diff --git a/.gitignore b/.gitignore index da0aaee..178be05 100644 --- a/.gitignore +++ b/.gitignore @@ -81,5 +81,6 @@ doc/Doxygen/DTAGS /.dir-locals.el /.dropbox -# Ignore the test directory +# Ignore the test directory and unpublished files /tutorialsTest +/TODO diff --git a/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.C b/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.C index 920b6a9..9c2d8b4 100644 --- a/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.C +++ b/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.C @@ -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. @@ -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); } diff --git a/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.H b/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.H index b0e79ee..7f37388 100644 --- a/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.H +++ b/OFtutorial08_customBC/prescribedPipeInletFvPatchVectorField.H @@ -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 diff --git a/OFtutorial08_customBC/testCase/0.org/nut b/OFtutorial08_customBC/testCase/0.org/nut index 3b64e5e..a2d8837 100644 --- a/OFtutorial08_customBC/testCase/0.org/nut +++ b/OFtutorial08_customBC/testCase/0.org/nut @@ -35,7 +35,7 @@ boundaryField } pipe { - type fixedValue; + type nutLowReWallFunction; value uniform 0; } "symmetry.*" diff --git a/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/nut b/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/nut index 3b64e5e..a2d8837 100644 --- a/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/nut +++ b/OFtutorial09_runtimePostprocessingUtility/testCase/0.org/nut @@ -35,7 +35,7 @@ boundaryField } pipe { - type fixedValue; + type nutLowReWallFunction; value uniform 0; } "symmetry.*" diff --git a/OFtutorial11_modifyingTheMesh/OFtutorial11.C b/OFtutorial11_modifyingTheMesh/OFtutorial11.C index 48afc76..ca7cde4 100644 --- a/OFtutorial11_modifyingTheMesh/OFtutorial11.C +++ b/OFtutorial11_modifyingTheMesh/OFtutorial11.C @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) runTime.constant(), runTime ), - xferMove(points), + clone(points), cells, patchFaces, boundaryPatchNames, diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/Allwclean b/OldReleases/OF5and6/OFtutorial00_helloWorld/Allwclean new file mode 100755 index 0000000..54329d4 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/Allwclean @@ -0,0 +1,3 @@ +#!/bin/bash + +wclean diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/Allwmake b/OldReleases/OF5and6/OFtutorial00_helloWorld/Allwmake new file mode 100755 index 0000000..a0b61c2 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/Allwmake @@ -0,0 +1,3 @@ +#!/bin/bash + +wmake diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/Make/files b/OldReleases/OF5and6/OFtutorial00_helloWorld/Make/files new file mode 100644 index 0000000..b684798 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/Make/files @@ -0,0 +1,3 @@ +OFtutorial0.C + +EXE = $(FOAM_USER_APPBIN)/ofTutorial0 diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/Make/options b/OldReleases/OF5and6/OFtutorial00_helloWorld/Make/options new file mode 100644 index 0000000..d27c95d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/OFtutorial0.C b/OldReleases/OF5and6/OFtutorial00_helloWorld/OFtutorial0.C new file mode 100644 index 0000000..6cc31aa --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/OFtutorial0.C @@ -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 . + +\*---------------------------------------------------------------------------*/ + +#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; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/U b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/U new file mode 100644 index 0000000..c744b21 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/U @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/p b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/p new file mode 100644 index 0000000..a43a016 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/0/p @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allclean b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allclean new file mode 100755 index 0000000..4af6610 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allclean @@ -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 diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allrun b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allrun new file mode 100755 index 0000000..c221f82 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/Allrun @@ -0,0 +1,3 @@ +#!/bin/bash + +ofTutorial0 diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/constant/transportProperties b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/constant/transportProperties new file mode 100644 index 0000000..45be63e --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/constant/transportProperties @@ -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; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/blockMeshDict b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/blockMeshDict new file mode 100644 index 0000000..26ced3b --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/blockMeshDict @@ -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 +( +); + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/controlDict b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/controlDict new file mode 100644 index 0000000..f15a135 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSchemes b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSchemes new file mode 100644 index 0000000..ba7afbf --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSolution b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSolution new file mode 100644 index 0000000..ca8410d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial00_helloWorld/testCase/system/fvSolution @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/Allwclean b/OldReleases/OF5and6/OFtutorial01_inputOutput/Allwclean new file mode 100755 index 0000000..54329d4 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/Allwclean @@ -0,0 +1,3 @@ +#!/bin/bash + +wclean diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/Allwmake b/OldReleases/OF5and6/OFtutorial01_inputOutput/Allwmake new file mode 100755 index 0000000..a0b61c2 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/Allwmake @@ -0,0 +1,3 @@ +#!/bin/bash + +wmake diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/Make/files b/OldReleases/OF5and6/OFtutorial01_inputOutput/Make/files new file mode 100644 index 0000000..ec8db56 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/Make/files @@ -0,0 +1,3 @@ +OFtutorial1.C + +EXE = $(FOAM_USER_APPBIN)/ofTutorial1 diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/Make/options b/OldReleases/OF5and6/OFtutorial01_inputOutput/Make/options new file mode 100644 index 0000000..d27c95d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/OFtutorial1.C b/OldReleases/OF5and6/OFtutorial01_inputOutput/OFtutorial1.C new file mode 100644 index 0000000..9377733 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/OFtutorial1.C @@ -0,0 +1,118 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +int main(int argc, char *argv[]) +{ + // Initialise OF case + #include "setRootCase.H" + + // These two create the time system (instance called runTime) and fvMesh (instance called mesh). + #include "createTime.H" + #include "createMesh.H" + + // --- + // Get access to a custom dictionary + dictionary customDict; + const word dictName("customProperties"); + + // Create and input-output object - this holds the path to the dict and its name + IOobject dictIO + ( + dictName, // name of the file + mesh.time().constant(), // path to where the file is + mesh, // reference to the mesh needed by the constructor + IOobject::MUST_READ // indicate that reading this dictionary is compulsory + ); + + // Check the if the dictionary is present and follows the OF format + if (!dictIO.typeHeaderOk(true)) + FatalErrorIn(args.executable()) << "Cannot open specified refinement dictionary " + << dictName << exit(FatalError); + + // Initialise the dictionary object + customDict = IOdictionary(dictIO); + + // --- + // Read various pieces of information from the main part of the dictionary + + // Lookup which does not need to be told what type of variable we're looking for and + // uses the standard C++ stringstream syntax + word someWord; + customDict.lookup("someWord") >> someWord; + + // This template method needs to know the type of the variable and can provide + // a default value if the entry is not found in the dictionary + scalar someScalar( customDict.lookupOrDefault("someScalar", 1.0) ); + + // A switch is a neat feature allowing boolean values to be read from a dict, + // it supports the OpenFOAM yes/on/true/1 and no/off/false/0 values automatically. + bool someBool ( customDict.lookupOrDefault("someBool",true) ); + + // Lists of values may also be read in the same way + List someList ( customDict.lookup("someList") ); + + // This type of container is particularly interesting - it associates entries with + // given key values (here of word type but can be anything); useful when + // associating things by indices in a list is less handy + HashTable someHashTable ( customDict.lookup("someHashTable") ); + + // Summarise what's been read and print in the console + Info << nl << "Read the following:" << nl << nl + << "someWord " << someWord << nl << nl + << "someScalar " << someScalar << nl << nl + << "someList " << someList << nl << nl + << "someHashTable " << someHashTable << nl << nl + << "someBool " << someBool << nl << nl + << endl; + + // --- + // Create a custom directory and write an output file + + // Create the output path directory + fileName outputDir = mesh.time().path()/"postProcessing"; + // Creathe the directory + mkDir(outputDir); + + // File pointer to direct the output to + autoPtr outputFilePtr; + // Open the file in the newly created directory + outputFilePtr.reset(new OFstream(outputDir/"customOutputFile.dat")); + + // Write stuff + outputFilePtr() << "# This is a header" << endl; + outputFilePtr() << "0 1 2 3 4 5" << endl; + + // Append to the imported hash table and wirte it too + someHashTable.insert("newKey", vector(1., 0., 0.)); + outputFilePtr() << someHashTable << endl; + + Info<< "End\n" << endl; + return 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/U b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/U new file mode 100644 index 0000000..c744b21 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/U @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/p b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/p new file mode 100644 index 0000000..a43a016 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/0/p @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allclean b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allclean new file mode 100755 index 0000000..f353d1e --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allclean @@ -0,0 +1,3 @@ +#!/bin/bash + +rm -r 1* 2* 3* 4* 5* 6* 7* 8* 9* 0.* constant/polyMesh/* processor* log.* postProcessing 2>/dev/null diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allrun b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allrun new file mode 100755 index 0000000..5ec248a --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/Allrun @@ -0,0 +1,4 @@ +#!/bin/bash + +blockMesh > log.blockMesh +ofTutorial1 diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/customProperties b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/customProperties new file mode 100644 index 0000000..e98b287 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/customProperties @@ -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 dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +someWord myWord; + +someScalar 0.01; + +someBool on; + +someList +( + 0 + 1 + 2 +); + +someHashTable +( + key0 (0 0 0) + key1 (1 0 0) +); + + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/transportProperties b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/transportProperties new file mode 100644 index 0000000..45be63e --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/constant/transportProperties @@ -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; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/blockMeshDict b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/blockMeshDict new file mode 100644 index 0000000..26ced3b --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/blockMeshDict @@ -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 +( +); + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/controlDict b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/controlDict new file mode 100644 index 0000000..f15a135 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSchemes b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSchemes new file mode 100644 index 0000000..ba7afbf --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSolution b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSolution new file mode 100644 index 0000000..ca8410d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial01_inputOutput/testCase/system/fvSolution @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwclean b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwclean new file mode 100755 index 0000000..54329d4 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwclean @@ -0,0 +1,3 @@ +#!/bin/bash + +wclean diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwmake b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwmake new file mode 100755 index 0000000..a0b61c2 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Allwmake @@ -0,0 +1,3 @@ +#!/bin/bash + +wmake diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/files b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/files new file mode 100644 index 0000000..df14b94 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/files @@ -0,0 +1,3 @@ +OFtutorial2.C + +EXE = $(FOAM_USER_APPBIN)/ofTutorial2 diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/options b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/options new file mode 100644 index 0000000..d27c95d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/OFtutorial2.C b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/OFtutorial2.C new file mode 100644 index 0000000..d8449a1 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/OFtutorial2.C @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +int main(int argc, char *argv[]) +{ + // === + // Define the help message for this application + argList::addNote + ( + "Demonstrates how to handle command line options.\n" + "\n" + "Input arguments:\n" + "----------------\n" + " someWord - does stuff\n" + " someScalar - does more things\n" + ); + + // prepare argument list + argList::noParallel(); + argList::validArgs.append("someWord"); + argList::validArgs.append("someScalar"); + + // prepare options + argList::addOption // string variable + ( + "dict", + "word", + "Path to an additional dictionary (not really used now)" + ); + + argList::addBoolOption // on/off depending on whether option is given or not + ( + "someSwitch", + "Switches from A to B" + ); + + argList::addOption // integer variable + ( + "someInt", + "label", + "Optional integer" + ); + + // === + // create argument list + // This is normally defined inside setRootCase.H + // #include "setRootCase.H" + Foam::argList args(argc, argv); + if (!args.checkRootCase()) + { + Foam::FatalError.exit(); + } + + // === + // read arguments + const word someWord = args[1]; + // NOTE: the built-in method for converting strings to other data types + const scalar someScalar = args.argRead(2); + + Info << "Got argument word " << someWord << " and scalar " << someScalar << endl; + + // === + // read options + // default path to some dictionary + fileName dictPath("./system/defaultDict"); + + // conditional execution based on an option being passed + if (args.optionFound("dict")) + { + args.optionReadIfPresent("dict", dictPath); + Info << "Got an override flag for dictionary path" << endl; + } + Info << "Would read dict from " << dictPath << endl; + + // switch option + const bool someConstBool = args.optionFound("someSwitch"); + Info << "Boolean switch set to " << someConstBool << endl; + + // numeric value option - same as string variables really + label someInt(0); + args.optionReadIfPresent("someInt", someInt); + Info << "Integer option value " << someInt << endl; + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/U b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/U new file mode 100644 index 0000000..c744b21 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/U @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/p b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/p new file mode 100644 index 0000000..a43a016 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/0/p @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allclean b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allclean new file mode 100755 index 0000000..4af6610 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allclean @@ -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 diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allrun b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allrun new file mode 100755 index 0000000..da61b54 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/Allrun @@ -0,0 +1,3 @@ +#!/bin/bash + +ofTutorial2 someWordIPassed 5. -someSwitch -someInt 2 -dict path_to_nowhere_in_particular diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/constant/transportProperties b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/constant/transportProperties new file mode 100644 index 0000000..45be63e --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/constant/transportProperties @@ -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; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/blockMeshDict b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/blockMeshDict new file mode 100644 index 0000000..26ced3b --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/blockMeshDict @@ -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 +( +); + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/controlDict b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/controlDict new file mode 100644 index 0000000..f15a135 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSchemes b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSchemes new file mode 100644 index 0000000..ba7afbf --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSolution b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSolution new file mode 100644 index 0000000..ca8410d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial02_commandLineArgumentsAndOptions/testCase/system/fvSolution @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwclean b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwclean new file mode 100755 index 0000000..54329d4 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwclean @@ -0,0 +1,3 @@ +#!/bin/bash + +wclean diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwmake b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwmake new file mode 100755 index 0000000..a0b61c2 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Allwmake @@ -0,0 +1,3 @@ +#!/bin/bash + +wmake diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/files b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/files new file mode 100644 index 0000000..b3fb13b --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/files @@ -0,0 +1,3 @@ +OFtutorial3.C + +EXE = $(FOAM_USER_APPBIN)/ofTutorial3 diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/options b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/options new file mode 100644 index 0000000..d27c95d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/OFtutorial3.C b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/OFtutorial3.C new file mode 100644 index 0000000..f4299d9 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/OFtutorial3.C @@ -0,0 +1,160 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + // These two create the time system (instance called runTime) and fvMesh (instance called mesh). + #include "createTime.H" + #include "createMesh.H" + + // runTime and mesh are instances of objects (or classes). + // If you are not familiar with what a class or object is, it is HIGHLY RECOMMENDED you visit this + // website and only come back once you've read everything about classes, inheritance and polymorphism: + // http://www.cplusplus.com/doc/tutorial/classes/ + // Note how the next lines call functions .timeName(), .C() and .Cf() implemented in the objects. + // It is also important to realise that mesh.C() and .Cf() return vector fields denoting centres of each + // cell and internal face. + // Calling the mesh.C().size() method therefore yields the total size of the mesh. + Info << "Hello there, the most recent time folder found is " << runTime.timeName() << nl + << "The mesh has " << mesh.C().size() << " cells and " << mesh.Cf().size() + << " internal faces in it. Wubalubadubdub!" << nl << endl; + + // It's possible to iterate over every cell in a standard C++ for loop + for (label cellI = 0; cellI < mesh.C().size(); cellI++) + if (cellI%20 == 0) // only show every twentieth cell not to spam the screen too much + Info << "Cell " << cellI << " with centre at " << mesh.C()[cellI] << endl; + Info << endl; // spacer + + // Each cell is constructed of faces - these may either be internal or constitute a + // boundary, or a patch in OpenFOAM terms; internal faces have an owner cell + // and a neighbour. + for (label faceI = 0; faceI < mesh.owner().size(); faceI++) + if (faceI%40 == 0) + Info << "Internal face " << faceI << " with centre at " << mesh.Cf()[faceI] + << " with owner cell " << mesh.owner()[faceI] + << " and neighbour " << mesh.neighbour()[faceI] << endl; + Info << endl; + + // Boundary conditions may be accessed through the boundaryMesh object. + // In reality, each boundary face is also included in the constant/polyMesh/faces + // description. But, in that file, the internal faces are defined first. + // In addition, the constant/polyMesh/boundary file defines the starting faceI + // indices from which boundary face definitions start. + // OpenFOAM also provides a macro definition for for loops over all entries + // in a field or a list, which saves up on the amount of typing. + forAll(mesh.boundaryMesh(), patchI) + Info << "Patch " << patchI << ": " << mesh.boundary()[patchI].name() << " with " + << mesh.boundary()[patchI].Cf().size() << " faces. Starts at total face " + << mesh.boundary()[patchI].start() << endl; + Info << endl; + + // Faces adjacent to boundaries may be accessed as follows. + // Also, a useful thing to know about a face is its normal vector and face area. + label patchFaceI(0); + forAll(mesh.boundaryMesh(), patchI) + Info << "Patch " << patchI << " has its face " << patchFaceI << " adjacent to cell " + << mesh.boundary()[patchI].patch().faceCells()[patchFaceI] + << ". It has normal vector " << mesh.boundary()[patchI].Sf()[patchFaceI] + << " and surface area " << mag(mesh.boundary()[patchI].Sf()[patchFaceI]) + << endl; + Info << endl; + + // For internal faces, method .Sf() can be called directly on the mesh instance. + // Moreover, there is a shorthand method .magSf() which returns the surface area + // as a scalar. + // For internal faces, the normal vector points from the owner to the neighbour + // and the owner has a smaller cellI index than the neighbour. For boundary faces, + // the normals always point outside of the domain (they have "imaginary" neighbours + // which do not exist). + + // It is possible to look at the points making up each face in more detail. + // First, we define a few shorthands by getting references to the respective + // objects in the mesh. These are defined as constants since we do not aim to + // alter the mesh in any way. + // NOTE: these lists refer to the physical definition of the mesh and thus + // include boundary faces. Use can be made of the mesh.boundary()[patchI].Cf().size() + // and mesh.boundary()[patchI].start() methods to check whether the face is internal + // or lies on a boundary. + const faceList& fcs = mesh.faces(); + const List& pts = mesh.points(); + const List& cents = mesh.faceCentres(); + + forAll(fcs,faceI) + if (faceI%80==0) + { + if (faceI(pp)) + { + // patch patchID is of type "empty". + Info << "You will not see this." << endl; + } + + // Patches may also be retrieved from the mesh using their name. This could be + // useful if the user were to refer to a particular patch from a dictionary + // (like when you do when calculating forces on a particular patch). + word patchName("movingWall"); + patchID = mesh.boundaryMesh().findPatchID(patchName); + Info << "Retrieved patch " << patchName << " at index " << patchID << " using its name only." << nl << endl; + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/U b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/U new file mode 100644 index 0000000..c744b21 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/U @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/p b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/p new file mode 100644 index 0000000..a43a016 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/0/p @@ -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; + } +} + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allclean b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allclean new file mode 100755 index 0000000..4af6610 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allclean @@ -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 diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allrun b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allrun new file mode 100755 index 0000000..95d19e1 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/Allrun @@ -0,0 +1,4 @@ +#!/bin/bash + +blockMesh > log.blockMesh +ofTutorial3 diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/constant/transportProperties b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/constant/transportProperties new file mode 100644 index 0000000..45be63e --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/constant/transportProperties @@ -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; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/blockMeshDict b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/blockMeshDict new file mode 100644 index 0000000..9d4aa7d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/blockMeshDict @@ -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 patch; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/controlDict b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/controlDict new file mode 100644 index 0000000..f15a135 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 0.5; + +deltaT 0.005; + +writeControl timeStep; + +writeInterval 20; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSchemes b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSchemes new file mode 100644 index 0000000..ba7afbf --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSolution b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSolution new file mode 100644 index 0000000..ca8410d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial03_understandingTheMesh/testCase/system/fvSolution @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwclean b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwclean new file mode 100755 index 0000000..54329d4 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwclean @@ -0,0 +1,3 @@ +#!/bin/bash + +wclean diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwmake b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwmake new file mode 100755 index 0000000..a0b61c2 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Allwmake @@ -0,0 +1,3 @@ +#!/bin/bash + +wmake diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/files b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/files new file mode 100644 index 0000000..f867dc6 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/files @@ -0,0 +1,3 @@ +OFtutorial4.C + +EXE = $(FOAM_USER_APPBIN)/ofTutorial4 diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/options b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/options new file mode 100644 index 0000000..d27c95d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/OFtutorial4.C b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/OFtutorial4.C new file mode 100644 index 0000000..2104755 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/OFtutorial4.C @@ -0,0 +1,184 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +// This is a function declaration; this method will calculate some scalar value +// given the current time, location in space x, and a reference point x0. The +// function also accepts a scaling factor, scale. +// The actual implementation, or definition, is below. +scalar calculatePressure(scalar t, vector x, vector x0, scalar scale); + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + + // This reads a dictionary file. + Info << "Reading transportProperties\n" << endl; + + IOdictionary transportProperties + ( + IOobject + ( + "transportProperties", // name of the dictionary + runTime.constant(), // location in the case - this one is in constant + mesh, // needs the mesh object reference to do some voodoo - unimportant now + IOobject::MUST_READ_IF_MODIFIED, // the file will be re-read if it gets modified during time stepping + IOobject::NO_WRITE // read-only + ) + ); + + // Create a scalar constant for kinematic viscosity by reading the value from the dictionary. + dimensionedScalar nu + ( + "nu", // name of the variable + dimViscosity, // dimensions + // TIP: to check how this is defined, run: + // grep -r dimViscosity $FOAM_SRC/OpenFOAM/ + // This returns: + /*/opt/openfoam30/src/OpenFOAM/dimensionSet/dimensionSets.C:const dimensionSet dimViscosity(dimArea/dimTime); + /opt/openfoam30/src/OpenFOAM/dimensionSet/dimensionSets.C:const dimensionSet dimDynamicViscosity(dimDensity*dimViscosity); + /opt/openfoam30/src/OpenFOAM/dimensionSet/dimensionSets.H:extern const dimensionSet dimViscosity;*/ + // So, it becomes apparent we should check dimensionSets.C, which contain: + /*const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0); + const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0); + const dimensionSet dimArea(sqr(dimLength)); + const dimensionSet dimViscosity(dimArea/dimTime);*/ + // This is what gets used here. But, an alternative would be to type in the units directly: + // dimensionSet(0,2,-1,0,0,0,0), + transportProperties.lookup("nu") // this takes the value from the dictionary and returns it, passing it to the object constructor as an argument + ); + + // These read the fields p and U from the time folders, as specified in system/controlDict (i.e. latestTime, startTime, etc.) + Info<< "Reading field p\n" << endl; + volScalarField p // note that pressure is a scalar field + ( + IOobject + ( + "p", // name of the field + runTime.timeName(), // name of the current time, i.e. the time folder to read from + mesh, + IOobject::MUST_READ, // always gets imported, will throw an error if the field is missing + IOobject::AUTO_WRITE // will get saved automatically when the controlDict parameters will request it + ), + mesh // initialises the field to match the size of the mesh with default (0) values + ); + + Info<< "Reading field U\n" << endl; + volVectorField U // note that velocity is a vector field + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + // Let us define a vector whose values will not change over the course of the program execution. + const vector originVector(0.05,0.05,0.005); + + // Calculate the distance from the origin to the cell centre furthest away. + // In Python, this is equivalent to: + // np.sqrt(np.sum((x0-x)**2)) + // The .value() method is called to convert from a dimensionedScalar to a regular scalar. + const scalar rFarCell = max( // find the maximum value from all distances + // compute distance of each cell centre from x0; units of mesh.C() are those of length, as this field + // describes position in the Cartesian reference frame. + mag(dimensionedVector("x0",dimLength,originVector)-mesh.C()) + ).value(); // convert to dim-less scalar + + // This part of the code performs time stepping for as long as is required by the simulation. + Info<< "\nStarting time loop\n" << endl; + + // This will increment the current time automatically + while (runTime.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + + // Loop over all cells in the mesh and calculate the pressure value. + for (label cellI=0; cellI/dev/null diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/Allrun b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/Allrun new file mode 100755 index 0000000..8383990 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/Allrun @@ -0,0 +1,4 @@ +#!/bin/bash + +blockMesh > log.blockMesh +ofTutorial4 diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/constant/transportProperties b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/constant/transportProperties new file mode 100644 index 0000000..45be63e --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/constant/transportProperties @@ -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; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/blockMeshDict b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/blockMeshDict new file mode 100644 index 0000000..26ced3b --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/blockMeshDict @@ -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 +( +); + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/controlDict b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/controlDict new file mode 100644 index 0000000..156a98b --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 0.05; + +writeControl timeStep; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSchemes b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSchemes new file mode 100644 index 0000000..ba7afbf --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear orthogonal; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default orthogonal; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSolution b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSolution new file mode 100644 index 0000000..ca8410d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial04_basicFieldOperations/testCase/system/fvSolution @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } + + U + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-05; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + + +// ************************************************************************* // diff --git a/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwclean b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwclean new file mode 100755 index 0000000..54329d4 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwclean @@ -0,0 +1,3 @@ +#!/bin/bash + +wclean diff --git a/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwmake b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwmake new file mode 100755 index 0000000..a0b61c2 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Allwmake @@ -0,0 +1,3 @@ +#!/bin/bash + +wmake diff --git a/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/files b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/files new file mode 100644 index 0000000..8c536a0 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/files @@ -0,0 +1,3 @@ +OFtutorial5.C + +EXE = $(FOAM_USER_APPBIN)/ofTutorial5 diff --git a/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/options b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/options new file mode 100644 index 0000000..d27c95d --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/Make/options @@ -0,0 +1,7 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools diff --git a/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/OFtutorial5.C b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/OFtutorial5.C new file mode 100644 index 0000000..8597a41 --- /dev/null +++ b/OldReleases/OF5and6/OFtutorial05_basicParallelComputing/OFtutorial5.C @@ -0,0 +1,168 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + + // For a case being run in parallel, the domain is decomposed into several + // processor meshes. Each of them is run in a separate process and holds + // instances of objects like mesh, U or p just as in a single-threaded (serial) + // computation. These will have different sizes, of course, as they hold + // fewer elements than the whole, undecomposed, mesh. + // Pout is a stream to which each processor can write, unlike Info which only + // gets used by the head process (processor0) + Pout << "Hello from processor " << Pstream::myProcNo() << "! I am working on " + << mesh.C().size() << " cells" << endl; + + // To exchange information between processes, special OpenMPI routines need + // to be called. + + // This goes over each cell in the subdomain and integrates their volume. + scalar meshVolume(0.); + forAll(mesh.V(),cellI) + meshVolume += mesh.V()[cellI]; + + // Add the values from all processes together + Pout << "Mesh volume on this processor: " << meshVolume << endl; + reduce(meshVolume, sumOp()); + Info << "Total mesh volume on all processors: " << meshVolume + // Note how the reudction operation may be done in place without defning + // a temporary variable, where appropriate. + << " over " << returnReduce(mesh.C().size(), sumOp