diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index eeae7c0a5a10952d4e38d077ab0c50d4f2627fc4..4bb8d53de6843a473d3c789778251a809b0b9f1f 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 bb80044cba74dcc6b91dd5f2e6a6014b67294741..877160b30ed84f1dccb54231788862aa15102657 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 393e3833cce274ac5cced531207a5e4cdf3bcb78..402128e5fe69ea684d20d9d31979f2ac1332ed31 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<scalar>("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 2cca1267defb64099c9f07f92106ea775d4217d2..19dcb48ba79968420045be7e35382daa1665b9cb 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 9752bb957c41ce86473cd00e3ee1c63e511e70ee..ee1f26eec47ce3e9db4810c16f828332665ebeb4 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 23a07249b6ac1375ee61af98602ae8a9bbd6a0dd..879d2b6b3c624d9acff4f796556f4438121a3691 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 fc86fee41df3d05fe3820de9a292e986959c9f9f..03accb0e5ebe25a2630b6e70b6ba544ddf50638c 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 0d45a8c47d2833327180c4fe51590a54f2f23be7..89f741bf626725002579d851db274a48ccd310d2 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 75aa523581cd5053b6bb20935783efa132999154..06deeeeb360a4ac09fc6970366e2327e6885c32a 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 a244d8c9623fa4572e61e9f0799f27fcfa267258..66809c2a937cc56eef235fccb20412b27e1182bb 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