From cbbcfd387892e8307963b15426e7624412cc5c85 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 27 Mar 2012 13:44:11 +0100 Subject: [PATCH 1/9] BUG: deltaTChem field not resized on mesh.changing() in chemistry models --- .../ODEChemistryModel/ODEChemistryModel.C | 4 +++- .../basicChemistryModel/basicChemistryModel.C | 21 +++++++++++++------ .../basicChemistryModel/basicChemistryModel.H | 6 ++++++ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index 117412407c..f0807eb725 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -743,6 +743,8 @@ Foam::scalar Foam::ODEChemistryModel::solve const scalar deltaT ) { + CompType::correct(); + scalar deltaTMin = GREAT; const volScalarField rho diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C index 3b2aafecd8..38efa9e858 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,6 +34,18 @@ namespace Foam defineTypeNameAndDebug(basicChemistryModel, 0); } +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void Foam::basicChemistryModel::correct() +{ + if (mesh_.changing()) + { + deltaTChem_.setSize(mesh_.nCells()); + deltaTChem_ = deltaTChemIni_; + } +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::basicChemistryModel::basicChemistryModel(const fvMesh& mesh) @@ -51,11 +63,8 @@ Foam::basicChemistryModel::basicChemistryModel(const fvMesh& mesh) ), mesh_(mesh), chemistry_(lookup("chemistry")), - deltaTChem_ - ( - mesh.nCells(), - readScalar(lookup("initialChemicalTimeStep")) - ) + deltaTChemIni_(readScalar(lookup("initialChemicalTimeStep"))), + deltaTChem_(mesh.nCells(), deltaTChemIni_) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H index 607133ce7e..2f27d59f70 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/basicChemistryModel/basicChemistryModel.H @@ -76,6 +76,9 @@ protected: //- Chemistry activation switch Switch chemistry_; + //- Initial chemical time step + const scalar deltaTChemIni_; + //- Latest estimation of integration step scalarField deltaTChem_; @@ -86,6 +89,9 @@ protected: // step, e.g. for multi-chemistry model scalarField& deltaTChem(); + //- Correct function - updates due to mesh changes + void correct(); + public: From 5661ae33f6d4c0380c6c3f4d814ad8141d853e7a Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 27 Mar 2012 13:53:49 +0100 Subject: [PATCH 2/9] STYLE: Corrected typo in error message --- src/finiteVolume/fvMesh/fvMeshGeometry.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index 8006caf0a9..0a06ef7364 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -398,7 +398,7 @@ const surfaceScalarField& fvMesh::phi() const if (!phiPtr_) { FatalErrorIn("fvMesh::phi()") - << "mesh flux field does not exists, is the mesh actually moving?" + << "mesh flux field does not exist, is the mesh actually moving?" << exit(FatalError); } @@ -418,7 +418,7 @@ surfaceScalarField& fvMesh::setPhi() if (!phiPtr_) { FatalErrorIn("fvMesh::setPhi()") - << "mesh flux field does not exists, is the mesh actually moving?" + << "mesh flux field does not exist, is the mesh actually moving?" << exit(FatalError); } From 6f459d646c4e9bdf1ccd34a9d5c970023d10e806 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 27 Mar 2012 17:40:02 +0100 Subject: [PATCH 3/9] ENH: Code clean-up and improved messages --- src/combustionModels/PaSR/PaSR.C | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 286b9f3f0c..16720de35b 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,10 +53,15 @@ Foam::combustionModels::PaSR::PaSR dimensionedScalar("kappa", dimless, 0.0) ), useReactionRate_(this->coeffs().lookupOrDefault("useReactionRate", false)) -{} +{ + if (useReactionRate_) + { + Info<< " using reaction rate" << endl; + } +} -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template Foam::combustionModels::PaSR::~PaSR() @@ -79,13 +84,12 @@ void Foam::combustionModels::PaSR::correct() { if (this->active()) { + const scalar t = this->mesh().time().value(); + const scalar dt = this->mesh().time().deltaTValue(); + if (!useReactionRate_) { - this->pChemistry_->solve - ( - this->mesh().time().value()-this->mesh().time().deltaTValue(), - this->mesh().time().deltaTValue() - ); + this->pChemistry_->solve(t - dt, dt); } else { @@ -94,35 +98,35 @@ void Foam::combustionModels::PaSR::correct() if (turbulentReaction_) { + tmp trho(this->rho()); + const volScalarField& rho = trho(); tmp tepsilon(this->turbulence().epsilon()); const volScalarField& epsilon = tepsilon(); tmp tmuEff(this->turbulence().muEff()); const volScalarField& muEff = tmuEff(); + tmp ttc(tc()); const volScalarField& tc = ttc(); + + const dimensionedScalar e0 + ( + "e0", + sqr(dimLength)/pow3(dimTime), + SMALL + ); + forAll(epsilon, i) { if (epsilon[i] > 0) { - const dimensionedScalar e0 - ( - "e0", - sqr(dimLength)/pow3(dimTime), SMALL - ); - scalar tk = Cmix_.value() - *Foam::sqrt - ( - muEff[i]/this->rho()()[i]/(epsilon[i] + e0.value()) - ); + *Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + e0.value())); // Chalmers PaSR model if (!useReactionRate_) { - kappa_[i] = - ( this->mesh().time().deltaTValue() + tc[i]) - /( this->mesh().time().deltaTValue() + tc[i] + tk); + kappa_[i] = (dt + tc[i])/(dt + tc[i] + tk); } else { @@ -148,11 +152,7 @@ template Foam::tmp Foam::combustionModels::PaSR::R(const volScalarField& Y) const { - - tmp tSu - ( - new fvScalarMatrix(Y, dimMass/dimTime) - ); + tmp tSu(new fvScalarMatrix(Y, dimMass/dimTime)); fvScalarMatrix& Su = tSu(); From 7c66d8a2a0341d09208d97f7442bb4818b276dd8 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 29 Mar 2012 18:07:24 +0100 Subject: [PATCH 4/9] STYLE: surfaceFeautreExtract: indentation and comment --- .../surfaceFeatureExtract.C | 2 +- .../surfaceFeatureExtractDict | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index b02c4c815d..2221fd5532 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -486,7 +486,7 @@ int main(int argc, char *argv[]) ( "dict", "word", - "name of dictionary to provide feature extraction information" + "specify alternative dictionary for the feature extraction information" ); # include "setRootCase.H" diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict index 3621d64a29..ef97d13889 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict @@ -24,40 +24,40 @@ surface1.stl // Load from an existing feature edge file featureEdgeFile "constant/triSurface/featureEdges.nas"; } - + trimFeatures { // Remove features with fewer than the specified number of edges minElem 0; - + // Remove features shorter than the specified cumulative length minLen 0.0; - } - + } + subsetFeatures - { + { // Use a plane to select feature edges // (normal)(basePoint) plane (1 0 0)(0 0 0); - + // Select feature edges using a box // (minPt)(maxPt) insideBox (0 0 0)(1 1 1); outsideBox (0 0 0)(1 1 1); - + // Remove any non-manifold (open or > 2 connected faces) edges manifoldEdges no; } - + // Output the curvature of the surface curvature no; - + // Output the proximity of feature points and edges to each other featureProximity no; // The maximum search distance to use when looking for other feature // points and edges maxFeatureProximity 1; - + // Out put the closeness of surface elements to other surface elements. closeness no; From 3c6c6750810ea282ce0120b0b9a1c8435a3d6a88 Mon Sep 17 00:00:00 2001 From: laurence Date: Fri, 30 Mar 2012 08:53:47 +0100 Subject: [PATCH 5/9] STYLE: Remove trailing whitespace --- .../chemFoam/readInitialConditions.H | 2 +- .../test/vectorTools/Test-vectorTools.C | 2 +- .../cv2DControls/cv2DControls.H | 2 +- .../cv2DMesh/insertSurfaceNearPointPairs.C | 2 +- .../uniformValue/uniformValue.H | 2 +- .../patchToPoly2DMesh/patchToPoly2DMesh.C | 2 +- .../patchToPoly2DMesh/patchToPoly2DMesh.H | 2 +- .../manipulation/checkMesh/checkTopology.C | 2 +- .../surfaceFeatureExtract.C | 2 +- .../surfaceFeatureExtractDict | 20 +++++++++---------- .../explicitSource/ExplicitSource.H | 2 +- .../pressureGradientExplicitSource.H | 2 +- .../rotorDiskSource/rotorDiskSource.H | 4 ++-- .../ParticleErosion/ParticleErosion.C | 2 +- .../VoidFraction/VoidFraction.H | 2 +- .../PairCollision/PairCollision.C | 2 +- .../field/turbulenceFields/postProcessingDict | 2 +- .../pressureCoefficient/pressureCoefficient.H | 2 +- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index 3fbb13a0fc..08050be816 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -99,7 +99,7 @@ scalar u0 = hs0 - p0/rho0; scalar R0 = p0/(rho0*T0); Rspecific[0] = R0; - + scalar integratedHeat = 0.0; Info << constProp << " will be held constant." << nl diff --git a/applications/test/vectorTools/Test-vectorTools.C b/applications/test/vectorTools/Test-vectorTools.C index 0c85ac935b..85d18ed989 100644 --- a/applications/test/vectorTools/Test-vectorTools.C +++ b/applications/test/vectorTools/Test-vectorTools.C @@ -8,7 +8,7 @@ using namespace Foam; void test(const vector& a, const vector& b, const scalar tolerance) { - Info<< "Vectors " << a << " and " << b + Info<< "Vectors " << a << " and " << b << " are (to tolerance of " << tolerance << "): "; if (vectorTools::areParallel(a, b, tolerance)) diff --git a/applications/utilities/mesh/generation/cv2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H b/applications/utilities/mesh/generation/cv2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H index 4ab8bdb167..0b3cf0b4f2 100644 --- a/applications/utilities/mesh/generation/cv2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H +++ b/applications/utilities/mesh/generation/cv2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H @@ -252,4 +252,4 @@ public: #endif -// ************************************************************************* // +// ************************************************************************* // diff --git a/applications/utilities/mesh/generation/cv2DMesh/insertSurfaceNearPointPairs.C b/applications/utilities/mesh/generation/cv2DMesh/insertSurfaceNearPointPairs.C index a1d1919f12..3d4ac7cf2a 100644 --- a/applications/utilities/mesh/generation/cv2DMesh/insertSurfaceNearPointPairs.C +++ b/applications/utilities/mesh/generation/cv2DMesh/insertSurfaceNearPointPairs.C @@ -93,7 +93,7 @@ void Foam::CV2D::insertSurfaceNearPointPairs() nNearPoints++; - // Correct the edge iterator for the change in the + // Correct the edge iterator for the change in the // number of edges following the point-pair insertion eit = Finite_edges_iterator ( diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/uniformValue/uniformValue.H b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/uniformValue/uniformValue.H index 9e54e86b48..3677837933 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/uniformValue/uniformValue.H +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/uniformValue/uniformValue.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C index 30c7a0334a..055b910282 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C @@ -330,4 +330,4 @@ void Foam::patchToPoly2DMesh::createMesh() // * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // -// ************************************************************************* // +// ************************************************************************* // diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H index a07f73f0d4..df03ebe4d8 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H @@ -162,4 +162,4 @@ public: #endif -// ************************************************************************* // +// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index a01fa988d2..28930c573f 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C @@ -82,7 +82,7 @@ Foam::label Foam::checkTopology if (cFaces[i] < 0 || cFaces[i] >= mesh.nFaces()) { cells.insert(cellI); - break; + break; } } } diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index b02c4c815d..3856d52ada 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -488,7 +488,7 @@ int main(int argc, char *argv[]) "word", "name of dictionary to provide feature extraction information" ); - + # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict index 3621d64a29..ef97d13889 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict @@ -24,40 +24,40 @@ surface1.stl // Load from an existing feature edge file featureEdgeFile "constant/triSurface/featureEdges.nas"; } - + trimFeatures { // Remove features with fewer than the specified number of edges minElem 0; - + // Remove features shorter than the specified cumulative length minLen 0.0; - } - + } + subsetFeatures - { + { // Use a plane to select feature edges // (normal)(basePoint) plane (1 0 0)(0 0 0); - + // Select feature edges using a box // (minPt)(maxPt) insideBox (0 0 0)(1 1 1); outsideBox (0 0 0)(1 1 1); - + // Remove any non-manifold (open or > 2 connected faces) edges manifoldEdges no; } - + // Output the curvature of the surface curvature no; - + // Output the proximity of feature points and edges to each other featureProximity no; // The maximum search distance to use when looking for other feature // points and edges maxFeatureProximity 1; - + // Out put the closeness of surface elements to other surface elements. closeness no; diff --git a/src/fieldSources/basicSource/explicitSource/ExplicitSource.H b/src/fieldSources/basicSource/explicitSource/ExplicitSource.H index e53e6004be..95e752d17b 100644 --- a/src/fieldSources/basicSource/explicitSource/ExplicitSource.H +++ b/src/fieldSources/basicSource/explicitSource/ExplicitSource.H @@ -39,7 +39,7 @@ Description } } - If volumeMode = + If volumeMode = - absolute: values are given as - specific: values are given as /m3 diff --git a/src/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H b/src/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H index bf760254af..48b4bf2c24 100644 --- a/src/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H +++ b/src/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H @@ -38,7 +38,7 @@ Description gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient flowDir (1 0 0); // flow direction } - + SourceFiles pressureGradientExplicitSource.C diff --git a/src/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H b/src/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H index ae2d8a2a47..946c752999 100644 --- a/src/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H +++ b/src/fieldSources/basicSource/rotorDiskSource/rotorDiskSource.H @@ -202,7 +202,7 @@ protected: //- Maximum radius scalar rMax_; - + // Protected Member Functions //- Check data @@ -247,7 +247,7 @@ public: // Constructors - + //- Construct from components rotorDiskSource ( diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 4d4f4dc3ca..87d03eade7 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -181,7 +181,7 @@ void Foam::ParticleErosion::postPatch // particle direction of travel const vector& U = p.U(); - + // quick reject if particle travelling away from the patch if ((-nw & U) < 0) { diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H index 0b15a6f620..26f0f65018 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H @@ -112,7 +112,7 @@ public: //- Post-move hook virtual void postMove - ( + ( const parcelType& p, const label cellI, const scalar dt diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index 4910faa51c..d5e459ddc0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -285,7 +285,7 @@ void Foam::PairCollision::wallInteraction() ); flatSiteData.append(wSD); - + particleHit = true; } } diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict b/src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict index 6d4b0409fa..bc35e7dc0f 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict +++ b/src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict @@ -26,7 +26,7 @@ functions fields ( - R + R ); } } diff --git a/src/postProcessing/functionObjects/utilities/pressureCoefficient/pressureCoefficient.H b/src/postProcessing/functionObjects/utilities/pressureCoefficient/pressureCoefficient.H index 5f0379aa7f..7d72e3b784 100644 --- a/src/postProcessing/functionObjects/utilities/pressureCoefficient/pressureCoefficient.H +++ b/src/postProcessing/functionObjects/utilities/pressureCoefficient/pressureCoefficient.H @@ -28,7 +28,7 @@ Description Calculates pressure coefficient, c_p c_p = p/p_dyn,inf - + where: p_dyn,inf = 0.5*rho*mag(U_inf)^2 From 29d7526d32d708a5fb3eea31f7e6887bb76b96bc Mon Sep 17 00:00:00 2001 From: laurence Date: Fri, 30 Mar 2012 09:00:01 +0100 Subject: [PATCH 6/9] STYLE: Change header dates --- .../extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C | 2 +- .../extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H | 2 +- .../extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C | 2 +- .../extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H | 2 +- .../utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C index f7c1026542..0bbe7d926a 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H index 0733b5e236..3b6efd267e 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C index 055b910282..7979fa966a 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H index df03ebe4d8..ea27dc6f53 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C index 4bb6b97b16..5381c0b57a 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License From 04bacc14d55436c14857999e0fdd54312b4f911a Mon Sep 17 00:00:00 2001 From: laurence Date: Wed, 28 Mar 2012 08:43:27 +0100 Subject: [PATCH 7/9] ENH: cvMesh blob tutorial updated --- tutorials/mesh/cvMesh/blob/Allrun | 1 - tutorials/mesh/cvMesh/blob/system/cvMeshDict | 11 +++++------ tutorials/mesh/cvMesh/blob/system/decomposeParDict | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tutorials/mesh/cvMesh/blob/Allrun b/tutorials/mesh/cvMesh/blob/Allrun index 1812d8e273..aafdcec484 100755 --- a/tutorials/mesh/cvMesh/blob/Allrun +++ b/tutorials/mesh/cvMesh/blob/Allrun @@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # run from this directory runApplication blockMesh runApplication cvMesh -runApplication collapseEdges 1e-3 45 runApplication snappyHexMesh runApplication checkMesh -constant -allGeometry -allTopology diff --git a/tutorials/mesh/cvMesh/blob/system/cvMeshDict b/tutorials/mesh/cvMesh/blob/system/cvMeshDict index b92aa466de..ca2fd3ccd6 100644 --- a/tutorials/mesh/cvMesh/blob/system/cvMeshDict +++ b/tutorials/mesh/cvMesh/blob/system/cvMeshDict @@ -59,7 +59,6 @@ initialPoints autoDensityCoeffs { - minCellSizeLimit 0.04; minLevels 0; maxSizeRatio 5.0; sampleResolution 5; @@ -150,21 +149,20 @@ motionControl { priority 1; mode bothSides; + surfaceCellSizeFunction uniformValue; uniformValueCoeffs { surfaceCellSize 0.04; } - refinementFactor 1; - cellSizeFunction uniformDistance; + cellSizeFunction uniformDistance; uniformDistanceCoeffs { distance 0.1; } linearDistanceCoeffs { - surfaceCellSize 0.02; distanceCellSize $defaultCellSize; distance 0.1; } @@ -217,14 +215,15 @@ polyMeshFiltering { writeTetDualMesh false; filterSizeCoeff 0.2; - mergeClosenessCoeff 1e-9; + mergeClosenessCoeff 1e-3; + edgeMergeAngle 45; continueFilteringOnBadInitialPolyMesh true; filterErrorReductionCoeff 0.5; filterCountSkipThreshold 4; surfaceStepFaceAngle 80; maxCollapseIterations 25; maxConsecutiveEqualFaceSets 5; - edgeCollapseGuardFraction 0.3; + edgeCollapseGuardFraction 0.1; maxCollapseFaceToPointSideLengthCoeff 0.35; } diff --git a/tutorials/mesh/cvMesh/blob/system/decomposeParDict b/tutorials/mesh/cvMesh/blob/system/decomposeParDict index c347636c49..58cbdde811 100644 --- a/tutorials/mesh/cvMesh/blob/system/decomposeParDict +++ b/tutorials/mesh/cvMesh/blob/system/decomposeParDict @@ -17,8 +17,8 @@ FoamFile numberOfSubdomains 8; -method scotch; -// method ptscotch; +//method scotch; + method ptscotch; // method hierarchical; simpleCoeffs From 160f1b52b63eee26a2aa3c7f84f30ccd5d4c6dea Mon Sep 17 00:00:00 2001 From: laurence Date: Fri, 30 Mar 2012 09:40:26 +0100 Subject: [PATCH 8/9] BUG: cvMesh: Correct removal of out-of-bound shape in octree --- .../conformalVoronoiMeshConformToSurface.C | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 989fe2cf95..bf077cece0 100644 --- a/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -440,6 +440,10 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation existingSurfacePtLocations ); } +// else +// { +// vit->setInternal(); +// } } else if (vit->ppSlave() || vit->referredExternal()) { @@ -477,6 +481,10 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation existingSurfacePtLocations ); } +// else +// { +// vit->setInternal(); +// } } } @@ -2697,7 +2705,7 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits // NEED TO REMOVE FROM THE SURFACE TREE... surfacePtLocationTreePtr_().remove ( - existingSurfacePtLocations.size() + existingSurfacePtLocations.size() - 1 ); } From e684b76771f4038c881546b7c2c892057a43e5ef Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 30 Mar 2012 10:53:14 +0100 Subject: [PATCH 9/9] BUG: Keeping kOmegaSST compressible and incompressible on the same formulation for nut and mut --- src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C index 51120e89d7..e4032d854c 100644 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C +++ b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C @@ -268,7 +268,7 @@ kOmegaSST::kOmegaSST / max ( a1_*omega_, - F2()*sqrt(2.0*magSqr(symm(fvc::grad(U_)))) + F2()*sqrt(2.0)*mag(symm(fvc::grad(U_))) ) ); mut_.correctBoundaryConditions(); @@ -365,7 +365,7 @@ void kOmegaSST::correct() // Re-calculate viscosity mut_ = a1_*rho_*k_ - /max(a1_*omega_, F2()*sqrt(2.0*magSqr(symm(fvc::grad(U_))))); + /max(a1_*omega_, F2()*sqrt(2.0)*mag(symm(fvc::grad(U_)))); mut_.correctBoundaryConditions(); // Re-calculate thermal diffusivity