diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index eeae7c0a5a..4bb8d53de6 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -33,12 +33,13 @@ It is likely incomplete... - Haakan Nilsson - Niklas Nordin - Mark Olesen -- Vaggelis Papoutsis +- Evangelos Papoutsis-Kiachagias - Juho Peltola - Johan Roenby - Henrik Rusche - Bruno Santos - Henning Scheufler +- Richard Smith - Prashant Sonakar - Hilary Spencer - Gavin Tabor @@ -48,4 +49,3 @@ It is likely incomplete... - Norbert Weber - Henry Weller - Niklas Wikstrom - diff --git a/src/mesh/extrudeModel/Make/options b/src/mesh/extrudeModel/Make/options index bb80044cba..877160b30e 100644 --- a/src/mesh/extrudeModel/Make/options +++ b/src/mesh/extrudeModel/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I$(LIB_SRC)/fileFormats/lnInclude \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/mesh/blockMesh/lnInclude \ + -I$(LIB_SRC)/mesh/blockMesh/lnInclude LIB_LIBS = \ -lfileFormats \ diff --git a/src/mesh/extrudeModel/polyline/polyline.C b/src/mesh/extrudeModel/polyline/polyline.C index 393e3833cc..402128e5fe 100644 --- a/src/mesh/extrudeModel/polyline/polyline.C +++ b/src/mesh/extrudeModel/polyline/polyline.C @@ -58,14 +58,14 @@ polyline::polyline(const dictionary& dict) ), x_(segments_.size() + 1), y_(segments_.size() + 1), - relTol_(coeffDict_.lookupOrDefault("toleranceCheck", SMALL)) + relTol_(coeffDict_.getOrDefault("toleranceCheck", SMALL)) { // Check continuity and smoothness of the supplied polyline - for(label i=1; i < segments_.size(); i++) + for (label i=1; i < segments_.size(); ++i) { // Check continuity - vector x0 = segments_[i-1].position(1); - vector x1 = segments_[i].position(0); + const vector x0 = segments_[i-1].position(1); + const vector x1 = segments_[i].position(0); if (mag(x1-x0) > SMALL) { @@ -75,12 +75,19 @@ polyline::polyline(const dictionary& dict) } // Check smoothness - vector v0 = (segments_[i-1].position(1) - - segments_[i-1].position(1-DELTA)); - v0 /= mag(v0); - vector v1 = (segments_[i].position(DELTA) - - segments_[i].position(0)); - v1 /= mag(v1); + const vector v0 = + normalised + ( + segments_[i-1].position(1) + - segments_[i-1].position(1-DELTA) + ); + + const vector v1 = + normalised + ( + segments_[i].position(DELTA) + - segments_[i].position(0) + ); if ((v1 & v0) < (1 - relTol_)) { @@ -91,9 +98,9 @@ polyline::polyline(const dictionary& dict) } // Calculate cumulative length along polyline - x_[0] = 0.0; - y_[0] = 0.0; - scalar totalLength = 0.0; + x_[0] = 0; + y_[0] = 0; + scalar totalLength = 0; forAll(segments_, i) { totalLength += segments_[i].length(); @@ -109,21 +116,16 @@ polyline::polyline(const dictionary& dict) if (debug) { - Info<< tab << "Polyline start: " << p0_ << nl + Info + << tab << "Polyline start: " << p0_ << nl << tab << "Polyline normal at start: " << n0_ << nl << tab << "Polyline end: " - << segments_[segments_.size()-1].position(1.0) << nl + << segments_.last().position(1) << nl << tab << "Total length: " << totalLength << endl; } } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -polyline::~polyline() -{} - - // * * * * * * * * * * * * * * * * Operators * * * * * * * * * * * * * * * * // point polyline::operator() @@ -160,8 +162,7 @@ point polyline::operator() // Rotate point to align with current normal vector if (cosTheta < (1-SMALL)) { - vector axis = (n0_^n); - axis /= mag(axis); + const vector axis = normalised(n0_ ^ n); dp = quaternion(axis, cosTheta, true).transform(dp); } @@ -193,9 +194,12 @@ void polyline::positionAndDirection // Normal vector at current position // Estimated normal vector using numerical differencing since // blockEdge doesn't include a normal function - n = segments_[i].position(min(s + DELTA, 1)) - - segments_[i].position(max(s - DELTA, 0)); - n /= mag(n); + + n = normalised + ( + segments_[i].position(min(s + DELTA, 1)) + - segments_[i].position(max(s - DELTA, 0)) + ); } diff --git a/src/mesh/extrudeModel/polyline/polyline.H b/src/mesh/extrudeModel/polyline/polyline.H index 2cca1267de..19dcb48ba7 100644 --- a/src/mesh/extrudeModel/polyline/polyline.H +++ b/src/mesh/extrudeModel/polyline/polyline.H @@ -62,7 +62,7 @@ class polyline : public extrudeModel { - // Private data + // Private Data //- Dummy object needed to use blockEdge searchableSurfaces geometry_; @@ -97,14 +97,15 @@ public: //- Runtime type information TypeName("polyline"); + // Constructors //- Construct from dictionary - polyline(const dictionary& dict); + explicit polyline(const dictionary& dict); //- Destructor - virtual ~polyline(); + virtual ~polyline() = default; // Member Operators diff --git a/tutorials/mesh/extrudeMesh/polyline/Allrun b/tutorials/mesh/extrudeMesh/polyline/Allrun index 9752bb957c..ee1f26eec4 100755 --- a/tutorials/mesh/extrudeMesh/polyline/Allrun +++ b/tutorials/mesh/extrudeMesh/polyline/Allrun @@ -4,7 +4,12 @@ cd "${0%/*}" || exit # Run from this directory #------------------------------------------------------------------------------ runApplication extrudeMesh -mkdir 0 + +# For output fields from checkMesh +mkdir -p 1 + runApplication checkMesh -writeAllFields +paraFoam -touch -vtk + #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/extrudeMesh/polyline/system/controlDict b/tutorials/mesh/extrudeMesh/polyline/system/controlDict index 23a07249b6..879d2b6b3c 100644 --- a/tutorials/mesh/extrudeMesh/polyline/system/controlDict +++ b/tutorials/mesh/extrudeMesh/polyline/system/controlDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | -| \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.1 | -| \\ / A nd | Web: http://www.extend-project.de | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -application simpleFoam; +application extrudeMesh; startFrom latestTime; @@ -24,11 +24,11 @@ stopAt endTime; endTime 5; -deltaT 0.0001; +deltaT 0; -writeControl runTime; +writeControl timeStep; -writeInterval 0.1; +writeInterval 1; purgeWrite 0; @@ -36,12 +36,12 @@ writeFormat binary; writePrecision 8; -writeCompression uncompressed; +writeCompression off; timeFormat general; timePrecision 6; -runTimeModifiable yes; +runTimeModifiable true; // ************************************************************************* // diff --git a/tutorials/mesh/extrudeMesh/polyline/system/extrudeMeshDict b/tutorials/mesh/extrudeMesh/polyline/system/extrudeMeshDict index fc86fee41d..03accb0e5e 100644 --- a/tutorials/mesh/extrudeMesh/polyline/system/extrudeMeshDict +++ b/tutorials/mesh/extrudeMesh/polyline/system/extrudeMeshDict @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.2.2 | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / O peration | Version: v2012 | +| \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/mesh/extrudeMesh/polyline/system/fvSchemes b/tutorials/mesh/extrudeMesh/polyline/system/fvSchemes index 0d45a8c47d..89f741bf62 100644 --- a/tutorials/mesh/extrudeMesh/polyline/system/fvSchemes +++ b/tutorials/mesh/extrudeMesh/polyline/system/fvSchemes @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | -| \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.1 | -| \\ / A nd | Web: http://www.extend-project.de | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -15,49 +15,22 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes -{ - default Euler; -} +{} gradSchemes -{ - // default Gauss linear; - default cellMDLimited leastSquares 1.0; -} +{} divSchemes -{ - default none; - div(phi,U) bounded Gauss upwind; - div(phi,k) bounded Gauss upwind; - div(phi,omega) bounded Gauss upwind; - div(phi,epsilon) bounded Gauss upwind; - div((nuEff*dev(grad(U).T()))) Gauss linear; - div((nuEff*dev(T(grad(U))))) Gauss linear; - div(U) Gauss linear; -} +{} laplacianSchemes -{ - // default Gauss linear corrected; - default Gauss linear limited 0.5 corrected; -} +{} interpolationSchemes -{ - default linear; - interpolate(U) linear; -} +{} snGradSchemes -{ - default limited 0.5 corrected; -} +{} -fluxRequired -{ - default no; - p; -} // ************************************************************************* // diff --git a/tutorials/mesh/extrudeMesh/polyline/system/fvSolution b/tutorials/mesh/extrudeMesh/polyline/system/fvSolution index 75aa523581..06deeeeb36 100644 --- a/tutorials/mesh/extrudeMesh/polyline/system/fvSolution +++ b/tutorials/mesh/extrudeMesh/polyline/system/fvSolution @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | -| \\ / F ield | foam-extend: Open Source CFD | -| \\ / O peration | Version: 3.1 | -| \\ / A nd | Web: http://www.extend-project.de | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v2006 | +| \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -14,96 +14,4 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -solvers -{ - "p|pFinal" - { - solver GAMG; - tolerance 1e-7; - relTol 1e-3; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration on; - agglomerator faceAreaPair; - nCellsInCoarsestLevel 10; - mergeLevels 1; - }; - - U - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-8; - relTol 1e-3; - nSweeps 1; - }; - - k - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-8; - relTol 1e-3; - nSweeps 1; - }; - - epsilon - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-8; - relTol 1e-3; - nSweeps 1; - }; - - omega - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-8; - relTol 1e-3; - nSweeps 1; - }; -} - -blockSolver -{ - nNonOrthogonalCorrectors 1; - nCorrectors 2; -} - -SIMPLE -{ - nNonOrthogonalCorrectors 0; -} - -PISO -{ - nCorrectors 3; -} - -PIMPLE -{ - nOuterCorrectors 2; - nCorrectors 2; - nNonOrthogonalCorrectors 0; - pRefCell 0; - pRefValue 0; -} - -potentialFlow -{ - nNonOrthogonalCorrectors 1; -} - -relaxationFactors -{ - p 0.3; - U 0.7; - k 0.7; - omega 0.7; - epsilon 0.7; -} - // ************************************************************************* // diff --git a/tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun b/tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun index a244d8c962..66809c2a93 100755 --- a/tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun +++ b/tutorials/verificationAndValidation/atmosphericModels/atmForestStability/Allrun @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash cd "${0%/*}" || exit # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions