From 1f665836a9f17449f45ea9ac44915bc0d9561273 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 24 Jul 2012 21:28:39 +0100 Subject: [PATCH 01/63] END: createPatchDict: improved comment --- .../utilities/mesh/manipulation/createPatch/createPatchDict | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatchDict b/applications/utilities/mesh/manipulation/createPatch/createPatchDict index 35e0b86926..f731f78df9 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatchDict +++ b/applications/utilities/mesh/manipulation/createPatch/createPatchDict @@ -20,6 +20,7 @@ FoamFile // - always: order faces on coupled patches such that they are opposite. This // is done for all coupled faces, not just for any patches created. // - optional: synchronise points on coupled patches. +// - always: remove zero-sized (non-coupled) patches (that were not added) // 1. Create cyclic: // - specify where the faces should come from From 5418228533fab5df8970f9a08313629e0bbb08a1 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 24 Jul 2012 21:29:10 +0100 Subject: [PATCH 02/63] ENH: timeSelector: improved comment --- src/OpenFOAM/db/Time/timeSelector.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/Time/timeSelector.C b/src/OpenFOAM/db/Time/timeSelector.C index 865f3ee911..60b589a347 100644 --- a/src/OpenFOAM/db/Time/timeSelector.C +++ b/src/OpenFOAM/db/Time/timeSelector.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 @@ -147,7 +147,7 @@ void Foam::timeSelector::addOptions ( "time", "ranges", - "comma-separated time ranges - eg, ':10,20,40-70,1000:'" + "comma-separated time ranges - eg, ':10,20,40:70,1000:'" ); } From 0cd39f900da9059611f18d79edd3a3039ef71751 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 24 Jul 2012 21:29:35 +0100 Subject: [PATCH 03/63] BUG: AMIInterpolation: reference to temp --- .../AMIInterpolation/AMIInterpolation/AMIInterpolation.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 5781ef9911..9db5dc0e12 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -713,7 +713,7 @@ Foam::label Foam::AMIInterpolation::findTargetFace const pointField& srcPts = srcPatch.points(); const face& srcFace = srcPatch[srcFaceI]; - const point& srcPt = srcFace.centre(srcPts); + const point srcPt = srcFace.centre(srcPts); const scalar srcFaceArea = srcMagSf_[srcFaceI]; // pointIndexHit sample = treePtr_->findNearest(srcPt, sqr(0.1*bb.mag())); From 4b1b443fd768b7b794d13ef2653067a753131abd Mon Sep 17 00:00:00 2001 From: sergio Date: Wed, 25 Jul 2012 10:12:37 +0100 Subject: [PATCH 04/63] BUG: Fixing omega generation term. Made consistent with k production term --- .../incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C index 5e6890d016..2ab771ac73 100644 --- a/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/turbulenceModels/incompressible/LES/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -388,7 +388,7 @@ void kOmegaSSTSAS::correct(const tmp& gradU) - fvm::Sp(fvc::div(phi()), omega_) - fvm::laplacian(DomegaEff(F1), omega_) == - gamma(F1)*0.5*S2 + gamma(F1)*S2 - fvm::Sp(beta(F1)*omega_, omega_) - fvm::SuSp // cross diffusion term ( From c6359c087bf574132a375ee1f50ca7af66fff0a8 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 25 Jul 2012 12:04:09 +0100 Subject: [PATCH 05/63] compressibleTwoPhaseEulerFoam/pEqn.H: Corrected handling of the kinetic theory drag in the pressure equation --- .../compressibleTwoPhaseEulerFoam/pEqn.H | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index 67717b0738..709d30c398 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -22,27 +22,29 @@ volVectorField HbyA2("HbyA2", U2); HbyA2 = rAU2*U2Eqn.H(); + surfaceScalarField ppDrag("ppDrag", 0.0*phi1); + + if (g0.value() > 0.0) + { + ppDrag -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf(); + } + + if (kineticTheory.on()) + { + ppDrag -= + fvc::interpolate(1.0/rho1)*rAlphaAU1f + *fvc::snGrad(kineticTheory.pa())*mesh.magSf(); + } + surfaceScalarField phiHbyA1 ( "phiHbyA1", (fvc::interpolate(HbyA1) & mesh.Sf()) + fvc::ddtPhiCorr(rAU1, alpha1, U1, phi1) + fvc::interpolate((1.0/rho1)*rAU1*dragCoeff)*phi2 + + ppDrag + rAlphaAU1f*(g & mesh.Sf()) ); - - if (g0.value() > 0.0) - { - phiHbyA1 -= ppMagf*fvc::snGrad(alpha1)*mesh.magSf(); - } - - if (kineticTheory.on()) - { - phiHbyA1 -= - fvc::interpolate((1.0/rho1)*rAU1) - *fvc::snGrad(kineticTheory.pa())*mesh.magSf(); - } - mrfZones.relativeFlux(phiHbyA1); surfaceScalarField phiHbyA2 @@ -135,7 +137,8 @@ U1 = HbyA1 + fvc::reconstruct ( - rAlphaAU1f + ppDrag + + rAlphaAU1f *( (g & mesh.Sf()) + mSfGradp/fvc::interpolate(rho1) From 83b357ab6ef8ccba520549d798dba1cd60ff0971 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 25 Jul 2012 12:09:09 +0100 Subject: [PATCH 06/63] ENH: AMIInterpolation: use stable guess for staritng seed. Add restart (under debug flag) --- .../AMIInterpolation/AMIInterpolation.C | 241 +++++++++++++++--- .../AMIInterpolation/AMIInterpolation.H | 25 ++ .../faceAreaIntersect/faceAreaIntersect.C | 10 +- .../faceAreaIntersect/faceAreaIntersect.H | 10 +- .../faceAreaIntersect/faceAreaIntersectI.H | 12 +- 5 files changed, 260 insertions(+), 38 deletions(-) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 9db5dc0e12..0b0e3800f7 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -782,6 +782,62 @@ void Foam::AMIInterpolation::appendNbrFaces } +template +bool Foam::AMIInterpolation::processSourceFace +( + const SourcePatch& srcPatch, + const TargetPatch& tgtPatch, + const label srcFaceI, + const label tgtStartFaceI, + + // list of tgt face neighbour faces + DynamicList