diff --git a/.gitignore b/.gitignore index 3cc18eb468..a964dd7570 100644 --- a/.gitignore +++ b/.gitignore @@ -75,4 +75,8 @@ doc/[Dd]oxygen/man # ignore .tags in the main directory /.tags +# ignore eclipse project files in the main directory +/.cproject +/.project + # end-of-file diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index fdddddfbfe..821eb5adb0 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,9 +121,8 @@ PDRkEpsilon::PDRkEpsilon IOobject::MUST_READ, IOobject::AUTO_WRITE ), - mesh_ + autoCreateK("k", mesh_) ), - epsilon_ ( IOobject @@ -134,9 +133,8 @@ PDRkEpsilon::PDRkEpsilon IOobject::MUST_READ, IOobject::AUTO_WRITE ), - mesh_ + autoCreateEpsilon("epsilon", mesh_) ), - mut_ ( IOobject @@ -147,9 +145,8 @@ PDRkEpsilon::PDRkEpsilon IOobject::NO_READ, IOobject::NO_WRITE ), - Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_) + autoCreateMut("mut", mesh_) ), - alphat_ ( IOobject @@ -163,7 +160,9 @@ PDRkEpsilon::PDRkEpsilon autoCreateAlphat("alphat", mesh_) ) { - mut_ = Cmu_*rho_*sqr(k_)/(epsilon_ + epsilonSmall_); + bound(epsilon_, epsilonMin_); + + mut_ = Cmu_*rho_*sqr(k_)/epsilon_; mut_.correctBoundaryConditions(); alphat_ = mut_/Prt_; @@ -250,7 +249,7 @@ void PDRkEpsilon::correct() if (!turbulence_) { // Re-calculate viscosity - mut_ = rho_*Cmu_*sqr(k_)/(epsilon_ + epsilonSmall_); + mut_ = rho_*Cmu_*sqr(k_)/epsilon_; mut_.correctBoundaryConditions(); // Re-calculate thermal diffusivity @@ -302,7 +301,7 @@ void PDRkEpsilon::correct() epsEqn().boundaryManipulate(epsilon_.boundaryField()); solve(epsEqn); - bound(epsilon_, epsilon0_); + bound(epsilon_, epsilonMin_); // Turbulent kinetic energy equation @@ -320,7 +319,7 @@ void PDRkEpsilon::correct() kEqn().relax(); solve(kEqn); - bound(k_, k0_); + bound(k_, kMin_); // Re-calculate viscosity mut_ = rho_*Cmu_*sqr(k_)/epsilon_; diff --git a/applications/solvers/multiphase/settlingFoam/kEpsilon.H b/applications/solvers/multiphase/settlingFoam/kEpsilon.H index 522a9afac7..e27594ffed 100644 --- a/applications/solvers/multiphase/settlingFoam/kEpsilon.H +++ b/applications/solvers/multiphase/settlingFoam/kEpsilon.H @@ -5,8 +5,8 @@ if (turbulence) y.correct(); } - dimensionedScalar k0("k0", k.dimensions(), SMALL); - dimensionedScalar epsilon0("epsilon0", epsilon.dimensions(), SMALL); + dimensionedScalar kMin("kMin", k.dimensions(), SMALL); + dimensionedScalar epsilonMin("epsilonMin", epsilon.dimensions(), SMALL); volScalarField divU = fvc::div(phi/fvc::interpolate(rho)); @@ -15,7 +15,7 @@ if (turbulence) tgradU.clear(); volScalarField Gcoef = - Cmu*k/sigmak*(g & fvc::grad(rho))/(epsilon + epsilon0); + Cmu*k/sigmak*(g & fvc::grad(rho))/(epsilon + epsilonMin); #include "wallFunctions.H" @@ -40,7 +40,7 @@ if (turbulence) epsEqn.relax(); epsEqn.solve(); - bound(epsilon, epsilon0); + bound(epsilon, epsilonMin); // Turbulent kinetic energy equation @@ -60,11 +60,13 @@ if (turbulence) - fvm::Sp(rho*epsilon/k, k) ); - bound(k, k0); + //FIXME: why no kEqn.relax()? + + bound(k, kMin); //- Re-calculate viscosity - mut = rho*Cmu*sqr(k)/(epsilon + epsilon0); + mut = rho*Cmu*sqr(k)/(epsilon + epsilonMin); #include "wallViscosity.H" } diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index dab2d1d064..31a841b80f 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -327,14 +327,17 @@ meshQualityControls // Set to 180 to disable. maxConcave 80; - //- Minimum projected area v.s. actual area. Set to -1 to disable. - minFlatness 0.5; - //- Minimum pyramid volume. Is absolute volume of cell pyramid. // Set to a sensible fraction of the smallest cell volume expected. // Set to very negative number (e.g. -1E30) to disable. minVol 1e-13; + //- Minimum tet volume. Is absolute volume of the tet formed by the + // face-centre decomposition triangle and the cell centre. + // Set to a sensible fraction of the smallest cell volume expected. + // Set to very negative number (e.g. -1E30) to disable. + minTetVol 1e-20; + //- Minimum face area. Set to <0 to disable. minArea -1; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 44ad601a02..e16d90bbbd 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -159,6 +159,25 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry) } } + { + faceSet faces(mesh, "wrongOrientedTriangleFaces", mesh.nFaces()/100 + 1); + if (mesh.checkFaceTets(true, 0, &faces)) + { + noFailedChecks++; + + label nFaces = returnReduce(faces.size(), sumOp