diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index 3fbb13a0fce4df0e5c59c344ffcf6148b4723660..08050be81628c0e3cf4596ba684e325a23131022 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 0c85ac935bcfbe7aaa654be653ecb9635cdaa356..85d18ed98957073b2ab7130534cc21f0828740cf 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 4ab8bdb167b961466e0f557f805cde003e593031..0b3cf0b4f2f99ea8d6f9c4097fa492ed941799ab 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 a1d1919f124db2960ce16d9eaac2b825d63ab5f1..3d4ac7cf2a4051b09b5e20c0c811f5844862dcc5 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 9e54e86b48af51f1e6b5dfa8ed8a7ef2bef177a5..36778379332e25a5efa8d78adaee94409824442f 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/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/cvMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 989fe2cf95c42f70514e866d3b50bcb4f8d03898..bf077cece095f6a67a376d29d569da3b1aab5717 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 ); } diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C index f7c1026542cb8919340c8b6336ecad4a62e1f0ec..0bbe7d926a16733c25ff9b63d58ffea347a39642 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 0733b5e236b3bece57412e1bb9f88208b1d86975..3b6efd267efbcc44be597de5edac863b554c616d 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 30c7a0334afb1ff5e6499e32458a56575fa7ce1c..7979fa966a5e193a58a0f24807245953fdcfb122 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 @@ -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 a07f73f0d4b8dfd0bea1dfac851cb748bbce0618..ea27dc6f53cf60c1bce164ca8a8f4308365dfc9d 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 @@ -162,4 +162,4 @@ public: #endif -// ************************************************************************* // +// ************************************************************************* // diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C index 4bb6b97b1616b5d11b86c5ee99e878d423efcfe3..5381c0b57afb01302dcee21f067928da4a292a40 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 diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index a01fa988d237a3af390626a8eeed6a0f163c5c7f..28930c573ffef6deb5b3822b6e447ecdbcc4e6d6 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 b02c4c815d77ab492ed5c57d745ae0416a95dcf7..5b2e78ca967f882ce3b91aabc93e95e07008cdbe 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -486,9 +486,9 @@ 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" # include "createTime.H" diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtractDict index 3621d64a293ffa8a1a2daf3be441818036555e92..ef97d13889bc54c5634a5885f3d16de271fc355e 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/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 286b9f3f0c0b5d566de0983068443b79907c862f..16720de35b93f78792fb0ea77af5f23729bcab2b 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<CombThermoType>::PaSR dimensionedScalar("kappa", dimless, 0.0) ), useReactionRate_(this->coeffs().lookupOrDefault("useReactionRate", false)) -{} +{ + if (useReactionRate_) + { + Info<< " using reaction rate" << endl; + } +} -// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class CombThermoType> Foam::combustionModels::PaSR<CombThermoType>::~PaSR() @@ -79,13 +84,12 @@ void Foam::combustionModels::PaSR<CombThermoType>::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<CombThermoType>::correct() if (turbulentReaction_) { + tmp<volScalarField> trho(this->rho()); + const volScalarField& rho = trho(); tmp<volScalarField> tepsilon(this->turbulence().epsilon()); const volScalarField& epsilon = tepsilon(); tmp<volScalarField> tmuEff(this->turbulence().muEff()); const volScalarField& muEff = tmuEff(); + tmp<volScalarField> 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<class CombThermoType> Foam::tmp<Foam::fvScalarMatrix> Foam::combustionModels::PaSR<CombThermoType>::R(const volScalarField& Y) const { - - tmp<fvScalarMatrix> tSu - ( - new fvScalarMatrix(Y, dimMass/dimTime) - ); + tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime)); fvScalarMatrix& Su = tSu(); diff --git a/src/fieldSources/basicSource/explicitSource/ExplicitSource.H b/src/fieldSources/basicSource/explicitSource/ExplicitSource.H index e53e6004be65d807467c72d25934f22b626ae637..95e752d17bbae9bcb8bddab7632b929b9da39e6e 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 <quantity> - specific: values are given as <quantity>/m3 diff --git a/src/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H b/src/fieldSources/basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.H index bf760254afb888a6a80fc8039dad9fc1b028f7ff..48b4bf2c24e0f2657033a85e49ac46b9cd7cf963 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 ae2d8a2a479365129917bd7dc85d17a473856361..946c7529993015b5888fef7adbaf2432bdc73c56 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/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index 8006caf0a90052d3709d363ed599921be03356e4..0a06ef7364e0edbbf862fdd7040dc9a3a645e9fe 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); } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 4d4f4dc3ca30266b6d7413b8d02451370fc90d9f..87d03eade785c3ce62699a5681415138416c7a8e 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<CloudType>::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 0b15a6f620737598cd5a218440e4087654d0c009..26f0f65018cdf63c876d3f7f0fb25b73d2e57e1e 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 4910faa51c44cd64e4d8c5e577de1c4791a7269c..d5e459ddc0520b7873dee1e52dccd5fb552171c4 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<CloudType>::wallInteraction() ); flatSiteData.append(wSD); - + particleHit = true; } } diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict b/src/postProcessing/functionObjects/field/turbulenceFields/postProcessingDict index 6d4b0409fa5f30c3a939f6cd86c237d499b37a93..bc35e7dc0f847fd07265cff0e39054d34bd430fa 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 5f0379aa7f520c95c163385a2690bc3091522d29..7d72e3b7842fa36eb4d7622230188261696c481b 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 diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index 117412407c5f1b242328c33bb41dc5a23544cb4e..f0807eb725093cd3bf1c4e3836b049642afdfc57 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<CompType, ThermoType>::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 3b2aafecd8a696ab45a11419d934367cd01aa279..38efa9e858e89cbbad80eeaa4cc36e00e882f8ff 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 607133ce7e7beced87fd548b7efc17e4a97623d5..2f27d59f7081468c645a53191de4e335f8c67664 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: diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.C index 51120e89d7b65d030732f7bb27a6828919d2ed27..e4032d854c6ad8587c2e05537189076186ea29b2 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 diff --git a/tutorials/mesh/cvMesh/blob/Allrun b/tutorials/mesh/cvMesh/blob/Allrun index 1812d8e2732c6eb930fb88bd27b5488e5f98743b..aafdcec48440ed649b2a0742a52e8e2fcea02d0a 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 b92aa466de64acae264035528a6bda91b46ecb7c..ca2fd3ccd6207c6e00dc0c0b80bbdc2b3c780c74 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 c347636c496df7c953fc842eb904f65b8017b294..58cbdde81165c889472eed6e0cf22ae520fec424 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