diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 8159ee73aa..be23570078 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -146,3 +146,5 @@ ( additionalControlsDict.lookup("solvePrimaryRegion") ); + + IObasicSourceList sources(mesh); diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H index 845aa9f424..03625d8968 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H index afebd9a9bf..d0e7bf6ce2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interFoam/Allwclean b/applications/solvers/multiphase/interFoam/Allwclean index 2c54bfa321..8b08000667 100755 --- a/applications/solvers/multiphase/interFoam/Allwclean +++ b/applications/solvers/multiphase/interFoam/Allwclean @@ -7,5 +7,6 @@ wclean interDyMFoam wclean MRFInterFoam wclean porousInterFoam wclean LTSInterFoam +wclean interMixingFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/interFoam/Allwmake b/applications/solvers/multiphase/interFoam/Allwmake index 8044426582..cc883614b8 100755 --- a/applications/solvers/multiphase/interFoam/Allwmake +++ b/applications/solvers/multiphase/interFoam/Allwmake @@ -7,5 +7,6 @@ wmake interDyMFoam wmake MRFInterFoam wmake porousInterFoam wmake LTSInterFoam +wmake interMixingFoam # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C index 9d221b5ca9..208e1c03b2 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C @@ -45,6 +45,7 @@ Description #include "turbulenceModel.H" #include "fvcSmooth.H" #include "pimpleControl.H" +#include "IObasicSourceList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options index 054a8dbbd4..437d8c57f3 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options @@ -4,7 +4,10 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -linterfaceProperties \ @@ -13,4 +16,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -lmeshTools \ + -lfieldSources \ + -lsampling diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C b/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C index b9db6b25ec..8950d265b0 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/MRFInterFoam.C @@ -44,6 +44,7 @@ Description #include "turbulenceModel.H" #include "IOMRFZoneList.H" #include "pimpleControl.H" +#include "IObasicSourceList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options index 054a8dbbd4..437d8c57f3 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options @@ -4,7 +4,10 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -linterfaceProperties \ @@ -13,4 +16,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -lmeshTools \ + -lfieldSources \ + -lsampling diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H index c26df02019..50f0e4fb91 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/UEqn.H @@ -12,10 +12,13 @@ - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + == + sources(rho, U) ); - mrfZones.addCoriolis(rho, UEqn); + mrfZones.addCoriolis(rho, UEqn); UEqn.relax(); + sources.constrain(UEqn); if (pimple.momentumPredictor()) { diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H index 1f4f0bbbeb..086f39cc3a 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/pEqn.H @@ -42,6 +42,7 @@ U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); + sources.correct(U); } } diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index 599567b54d..3791297ea0 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -3,7 +3,10 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -linterfaceProperties \ @@ -12,4 +15,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -lmeshTools \ + -lfieldSources \ + -lsampling diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 68765262db..17f31e6fc6 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -131,3 +131,5 @@ ); p_rgh = p - rho*gh; } + + IObasicSourceList sources(mesh); diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options index ba60cb1981..b01465ff8c 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options @@ -6,8 +6,10 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude + -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -linterfaceProperties \ @@ -18,6 +20,8 @@ EXE_LIBS = \ -lincompressibleLESModels \ -lfiniteVolume \ -ldynamicMesh \ - -lmeshTools \ -ldynamicFvMesh \ - -ltopoChangerFvMesh + -ltopoChangerFvMesh \ + -lmeshTools \ + -lfieldSources \ + -lsampling diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C index ee92734509..7304a7841f 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C @@ -40,6 +40,7 @@ Description #include "twoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" +#include "IObasicSourceList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H index 5b089550c5..84519dbcdd 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H @@ -48,6 +48,7 @@ U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); + sources.correct(U); } } diff --git a/applications/solvers/multiphase/interFoam/interFoam.C b/applications/solvers/multiphase/interFoam/interFoam.C index 69eb0964ce..0cca9e81e5 100644 --- a/applications/solvers/multiphase/interFoam/interFoam.C +++ b/applications/solvers/multiphase/interFoam/interFoam.C @@ -44,6 +44,7 @@ Description #include "twoPhaseMixture.H" #include "turbulenceModel.H" #include "pimpleControl.H" +#include "IObasicSourceList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interMixingFoam/Make/files b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/files similarity index 99% rename from applications/solvers/multiphase/interMixingFoam/Make/files rename to applications/solvers/multiphase/interFoam/interMixingFoam/Make/files index 488cd77e56..f179f42761 100644 --- a/applications/solvers/multiphase/interMixingFoam/Make/files +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/files @@ -3,4 +3,3 @@ threePhaseInterfaceProperties/threePhaseInterfaceProperties.C interMixingFoam.C EXE = $(FOAM_APPBIN)/interMixingFoam - diff --git a/applications/solvers/multiphase/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options similarity index 69% rename from applications/solvers/multiphase/interMixingFoam/Make/options rename to applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index cb135724cf..aeaf998111 100644 --- a/applications/solvers/multiphase/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -1,14 +1,15 @@ -INTERFOAM = $(FOAM_SOLVERS)/multiphase/interFoam - EXE_INC = \ - -I$(INTERFOAM) \ + -I.. \ -IincompressibleThreePhaseMixture \ -IthreePhaseInterfaceProperties \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseInterfaceProperties/alphaContactAngle/alphaContactAngle \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -ltwoPhaseInterfaceProperties \ @@ -16,4 +17,7 @@ EXE_LIBS = \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -lmeshTools \ + -lfieldSources \ + -lsampling diff --git a/applications/solvers/multiphase/interMixingFoam/alphaCourantNo.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaCourantNo.H similarity index 96% rename from applications/solvers/multiphase/interMixingFoam/alphaCourantNo.H rename to applications/solvers/multiphase/interFoam/interMixingFoam/alphaCourantNo.H index 45ada1f717..06e1da1ae4 100644 --- a/applications/solvers/multiphase/interMixingFoam/alphaCourantNo.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaCourantNo.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interMixingFoam/alphaEqns.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqns.H similarity index 100% rename from applications/solvers/multiphase/interMixingFoam/alphaEqns.H rename to applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqns.H diff --git a/applications/solvers/multiphase/interMixingFoam/alphaEqnsSubCycle.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnsSubCycle.H similarity index 100% rename from applications/solvers/multiphase/interMixingFoam/alphaEqnsSubCycle.H rename to applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnsSubCycle.H diff --git a/applications/solvers/multiphase/interMixingFoam/createFields.H b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H similarity index 98% rename from applications/solvers/multiphase/interMixingFoam/createFields.H rename to applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H index 60543dc826..ae024d4807 100644 --- a/applications/solvers/multiphase/interMixingFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/createFields.H @@ -165,3 +165,5 @@ ); p_rgh = p - rho*gh; } + + IObasicSourceList sources(mesh); diff --git a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C similarity index 98% rename from applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C rename to applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C index 62b837b640..4d8ead85ce 100644 --- a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.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 diff --git a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H similarity index 98% rename from applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H rename to applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H index ba21579f30..67743ad2e0 100644 --- a/applications/solvers/multiphase/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/threePhaseMixture.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interMixingFoam/interMixingFoam.C b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C similarity index 99% rename from applications/solvers/multiphase/interMixingFoam/interMixingFoam.C rename to applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C index 33647cd28d..dcb314025d 100644 --- a/applications/solvers/multiphase/interMixingFoam/interMixingFoam.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/interMixingFoam.C @@ -37,6 +37,7 @@ Description #include "threePhaseInterfaceProperties.H" #include "turbulenceModel.H" #include "pimpleControl.H" +#include "IObasicSourceList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/multiphase/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C similarity index 98% rename from applications/solvers/multiphase/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C rename to applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C index b969ade3f3..e16f83bd2e 100644 --- a/applications/solvers/multiphase/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.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 diff --git a/applications/solvers/multiphase/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H similarity index 98% rename from applications/solvers/multiphase/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H rename to applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H index 39e33575b7..0653ab0a20 100644 --- a/applications/solvers/multiphase/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H index 53c2161f97..83341e0246 100644 --- a/applications/solvers/multiphase/interFoam/pEqn.H +++ b/applications/solvers/multiphase/interFoam/pEqn.H @@ -42,6 +42,7 @@ U = HbyA + rAU*fvc::reconstruct((phig - p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); + sources.correct(U); } } diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options index 6fc987453b..437d8c57f3 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options @@ -5,7 +5,9 @@ EXE_INC = \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fieldSources/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -linterfaceProperties \ @@ -15,4 +17,6 @@ EXE_LIBS = \ -lincompressibleRASModels \ -lincompressibleLESModels \ -lfiniteVolume \ - -lmeshTools + -lmeshTools \ + -lfieldSources \ + -lsampling diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H index 155c0527b7..e6e58b35e3 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/UEqn.H @@ -16,11 +16,13 @@ - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + == + sources(rho, U) ); UEqn.relax(); - pZones.addResistance(UEqn); + sources.constrain(UEqn); if (pimple.momentumPredictor()) { diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C index 795b7c14a1..f32d6f3e6d 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/porousInterFoam.C @@ -46,6 +46,7 @@ Description #include "turbulenceModel.H" #include "IOporosityModelList.H" #include "pimpleControl.H" +#include "IObasicSourceList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index a7db08ba71..eea69b7e51 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.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 diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index c682da6701..f5dabf6077 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.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 diff --git a/bin/foamRunTutorials b/bin/foamRunTutorials index 6b530e3cb9..a2c33cfb8e 100755 --- a/bin/foamRunTutorials +++ b/bin/foamRunTutorials @@ -37,6 +37,8 @@ # normally use "make" make="make" +runTests=false +skipFirst=false ## set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set #if [ -z "$WM_NCOMPPROCS" -a -n "$WM_HOSTS" -a -n "$WM_SCHEDULER" ] @@ -73,8 +75,32 @@ then thisScript="$PWD/$thisScript" fi + +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -t | -test) + runTests=true + shift + ;; + -s | -skipFirst) + skipFirst=true + shift + ;; + *) + break + ;; + esac +done + + # If an argument is supplied do not execute ./Allrun to avoid recursion -if [ $# = 0 -a -f "./Allrun" ] +if ! $skipFirst && $runTests && [ -f "./Alltest" ] +then + # Run a special test script. + ./Alltest +elif ! $skipFirst && [ -f "./Allrun" ] then # Specialised script. ./Allrun @@ -104,7 +130,10 @@ else #done FOAM_TARGETS=$(for d in *; do [ -d "$d" ] && echo "$d"; done | xargs) #$make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$WM_SCHEDULER $thisScript" - $make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$thisScript" + + passArgs=$(if $runTests; then echo "-test"; fi) + + $make -k -f $WM_PROJECT_DIR/bin/tools/MakefileDirs FOAM_TARGETS="$FOAM_TARGETS" FOAM_APP="$thisScript" FOAM_ARGS="$passArgs" fi #------------------------------------------------------------------------------ diff --git a/bin/tools/MakefileDirs b/bin/tools/MakefileDirs index b6cd30092d..1a0c45ba2d 100644 --- a/bin/tools/MakefileDirs +++ b/bin/tools/MakefileDirs @@ -36,7 +36,7 @@ application: $(FOAM_TARGETS) $(FOAM_TARGETS): - +@(cd $@ && $(FOAM_APP)) + +@(cd $@ && $(FOAM_APP) $(FOAM_ARGS)) #------------------------------------------------------------------------------ diff --git a/etc/bashrc b/etc/bashrc index d146684e9a..f077631ac8 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -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 diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 55208034a1..03072a6f02 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -255,8 +255,10 @@ $(lduMatrix)/solvers/ICCG/ICCG.C $(lduMatrix)/solvers/BICCG/BICCG.C $(lduMatrix)/smoothers/GaussSeidel/GaussSeidelSmoother.C +$(lduMatrix)/smoothers/symGaussSeidel/symGaussSeidelSmoother.C $(lduMatrix)/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C $(lduMatrix)/smoothers/DIC/DICSmoother.C +$(lduMatrix)/smoothers/FDIC/FDICSmoother.C $(lduMatrix)/smoothers/DICGaussSeidel/DICGaussSeidelSmoother.C $(lduMatrix)/smoothers/DILU/DILUSmoother.C $(lduMatrix)/smoothers/DILUGaussSeidel/DILUGaussSeidelSmoother.C diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index 0e588f1b73..df8fc2aec1 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.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 diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H index 0a70bee918..e945d5d766 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.H +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/Fields/fieldTypes.H b/src/OpenFOAM/fields/Fields/fieldTypes.H index 59b37b88d9..8550930357 100644 --- a/src/OpenFOAM/fields/Fields/fieldTypes.H +++ b/src/OpenFOAM/fields/Fields/fieldTypes.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/Fields/triadField/triadField.C b/src/OpenFOAM/fields/Fields/triadField/triadField.C index 56d2fdd657..87fa7d8dd2 100644 --- a/src/OpenFOAM/fields/Fields/triadField/triadField.C +++ b/src/OpenFOAM/fields/Fields/triadField/triadField.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 diff --git a/src/OpenFOAM/fields/Fields/triadField/triadField.H b/src/OpenFOAM/fields/Fields/triadField/triadField.H index c31f1ab2d4..53ba1f37d3 100644 --- a/src/OpenFOAM/fields/Fields/triadField/triadField.H +++ b/src/OpenFOAM/fields/Fields/triadField/triadField.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/Fields/triadField/triadIOField.C b/src/OpenFOAM/fields/Fields/triadField/triadIOField.C index a27e1ef6e7..01b2e526c6 100644 --- a/src/OpenFOAM/fields/Fields/triadField/triadIOField.C +++ b/src/OpenFOAM/fields/Fields/triadField/triadIOField.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 diff --git a/src/OpenFOAM/fields/Fields/triadField/triadIOField.H b/src/OpenFOAM/fields/Fields/triadField/triadIOField.H index b1eb0b0098..ff1057cb24 100644 --- a/src/OpenFOAM/fields/Fields/triadField/triadIOField.H +++ b/src/OpenFOAM/fields/Fields/triadField/triadIOField.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.C index cd3effd77d..66dbcce3df 100644 --- a/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/DIC/DICSmoother.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 @@ -98,17 +98,17 @@ void Foam::DICSmoother::smooth rA *= rD_; register label nFaces = matrix_.upper().size(); - for (register label face=0; face=0; face--) + for (register label facei=nFacesM1; facei>=0; facei--) { - register label l = lPtr[face]; - rAPtr[l] -= rDPtr[l]*upperPtr[face]*rAPtr[uPtr[face]]; + register label l = lPtr[facei]; + rAPtr[l] -= rDPtr[l]*upperPtr[facei]*rAPtr[uPtr[facei]]; } psi += rA; diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C new file mode 100644 index 0000000000..0896d01307 --- /dev/null +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.C @@ -0,0 +1,149 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "FDICSmoother.H" +#include "FDICPreconditioner.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(FDICSmoother, 0); + + lduMatrix::smoother::addsymMatrixConstructorToTable + addFDICSmootherSymMatrixConstructorToTable_; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::FDICSmoother::FDICSmoother +( + const word& fieldName, + const lduMatrix& matrix, + const FieldField& interfaceBouCoeffs, + const FieldField& interfaceIntCoeffs, + const lduInterfaceFieldPtrsList& interfaces +) +: + lduMatrix::smoother + ( + fieldName, + matrix, + interfaceBouCoeffs, + interfaceIntCoeffs, + interfaces + ), + rD_(matrix_.diag()), + rDuUpper_(matrix_.upper().size()), + rDlUpper_(matrix_.upper().size()) +{ + scalar* __restrict__ rDPtr = rD_.begin(); + scalar* __restrict__ rDuUpperPtr = rDuUpper_.begin(); + scalar* __restrict__ rDlUpperPtr = rDlUpper_.begin(); + + const label* const __restrict__ uPtr = + matrix_.lduAddr().upperAddr().begin(); + const label* const __restrict__ lPtr = + matrix_.lduAddr().lowerAddr().begin(); + const scalar* const __restrict__ upperPtr = + matrix_.upper().begin(); + + register label nCells = rD_.size(); + register label nFaces = matrix_.upper().size(); + + for (register label face=0; face=0; face--) + { + rAPtr[lPtr[face]] -= rDlUpperPtr[face]*rAPtr[uPtr[face]]; + } + + psi += rA; + } +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.H new file mode 100644 index 0000000000..674f4963cc --- /dev/null +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/FDIC/FDICSmoother.H @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::FDICSmoother + +Description + Simplified diagonal-based incomplete Cholesky smoother for symmetric + matrices. + + To improve efficiency, the residual is evaluated after every nSweeps + sweeps. + +SourceFiles + FDICSmoother.C + +\*---------------------------------------------------------------------------*/ + +#ifndef FDICSmoother_H +#define FDICSmoother_H + +#include "lduMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class FDICSmoother Declaration +\*---------------------------------------------------------------------------*/ + +class FDICSmoother +: + public lduMatrix::smoother +{ + // Private data + + //- The reciprocal preconditioned diagonal + scalarField rD_; + scalarField rDuUpper_; + scalarField rDlUpper_; + + +public: + + //- Runtime type information + TypeName("FDIC"); + + + // Constructors + + //- Construct from matrix components + FDICSmoother + ( + const word& fieldName, + const lduMatrix& matrix, + const FieldField& interfaceBouCoeffs, + const FieldField& interfaceIntCoeffs, + const lduInterfaceFieldPtrsList& interfaces + ); + + + // Member Functions + + //- Smooth the solution for a given number of sweeps + void smooth + ( + scalarField& psi, + const scalarField& source, + const direction cmpt, + const label nSweeps + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C index b0cb88ed6e..42bbea8c9c 100644 --- a/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/GaussSeidel/GaussSeidelSmoother.C @@ -107,20 +107,12 @@ void Foam::GaussSeidelSmoother::smooth // To compensate for this, it is necessary to turn the // sign of the contribution. - //FieldField mBouCoeffs(interfaceBouCoeffs_.size()); - // - //forAll(mBouCoeffs, patchi) - //{ - // if (interfaces_.set(patchi)) - // { - // mBouCoeffs.set(patchi, -interfaceBouCoeffs_[patchi]); - // } - //} FieldField& mBouCoeffs = const_cast&> ( interfaceBouCoeffs_ ); + forAll(mBouCoeffs, patchi) { if (interfaces_.set(patchi)) @@ -152,35 +144,35 @@ void Foam::GaussSeidelSmoother::smooth cmpt ); - register scalar curPsi; + register scalar psii; register label fStart; register label fEnd = ownStartPtr[0]; - for (register label cellI=0; cellI. + +\*---------------------------------------------------------------------------*/ + +#include "symGaussSeidelSmoother.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(symGaussSeidelSmoother, 0); + + lduMatrix::smoother::addsymMatrixConstructorToTable + addsymGaussSeidelSmootherSymMatrixConstructorToTable_; + + lduMatrix::smoother::addasymMatrixConstructorToTable + addsymGaussSeidelSmootherAsymMatrixConstructorToTable_; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::symGaussSeidelSmoother::symGaussSeidelSmoother +( + const word& fieldName, + const lduMatrix& matrix, + const FieldField& interfaceBouCoeffs, + const FieldField& interfaceIntCoeffs, + const lduInterfaceFieldPtrsList& interfaces +) +: + lduMatrix::smoother + ( + fieldName, + matrix, + interfaceBouCoeffs, + interfaceIntCoeffs, + interfaces + ) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::symGaussSeidelSmoother::smooth +( + const word& fieldName_, + scalarField& psi, + const lduMatrix& matrix_, + const scalarField& source, + const FieldField& interfaceBouCoeffs_, + const lduInterfaceFieldPtrsList& interfaces_, + const direction cmpt, + const label nSweeps +) +{ + register scalar* __restrict__ psiPtr = psi.begin(); + + register const label nCells = psi.size(); + + scalarField bPrime(nCells); + register scalar* __restrict__ bPrimePtr = bPrime.begin(); + + register const scalar* const __restrict__ diagPtr = matrix_.diag().begin(); + register const scalar* const __restrict__ upperPtr = + matrix_.upper().begin(); + register const scalar* const __restrict__ lowerPtr = + matrix_.lower().begin(); + + register const label* const __restrict__ uPtr = + matrix_.lduAddr().upperAddr().begin(); + + register const label* const __restrict__ ownStartPtr = + matrix_.lduAddr().ownerStartAddr().begin(); + + + // Parallel boundary initialisation. The parallel boundary is treated + // as an effective jacobi interface in the boundary. + // Note: there is a change of sign in the coupled + // interface update. The reason for this is that the + // internal coefficients are all located at the l.h.s. of + // the matrix whereas the "implicit" coefficients on the + // coupled boundaries are all created as if the + // coefficient contribution is of a source-kind (i.e. they + // have a sign as if they are on the r.h.s. of the matrix. + // To compensate for this, it is necessary to turn the + // sign of the contribution. + + FieldField& mBouCoeffs = + const_cast&> + ( + interfaceBouCoeffs_ + ); + + forAll(mBouCoeffs, patchi) + { + if (interfaces_.set(patchi)) + { + mBouCoeffs[patchi].negate(); + } + } + + + for (label sweep=0; sweep=0; celli--) + { + // Start and end of this row + fEnd = fStart; + fStart = ownStartPtr[celli]; + + // Get the accumulated neighbour side + psii = bPrimePtr[celli]; + + // Accumulate the owner product side + for (register label facei=fStart; facei. + +Class + Foam::symGaussSeidelSmoother + +Description + A lduMatrix::smoother for symmetric Gauss-Seidel + +SourceFiles + symGaussSeidelSmoother.C + +\*---------------------------------------------------------------------------*/ + +#ifndef symGaussSeidelSmoother_H +#define symGaussSeidelSmoother_H + +#include "lduMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class symGaussSeidelSmoother Declaration +\*---------------------------------------------------------------------------*/ + +class symGaussSeidelSmoother +: + public lduMatrix::smoother +{ + +public: + + //- Runtime type information + TypeName("symGaussSeidel"); + + + // Constructors + + //- Construct from components + symGaussSeidelSmoother + ( + const word& fieldName, + const lduMatrix& matrix, + const FieldField& interfaceBouCoeffs, + const FieldField& interfaceIntCoeffs, + const lduInterfaceFieldPtrsList& interfaces + ); + + + // Member Functions + + //- Smooth for the given number of sweeps + static void smooth + ( + const word& fieldName, + scalarField& psi, + const lduMatrix& matrix, + const scalarField& source, + const FieldField& interfaceBouCoeffs, + const lduInterfaceFieldPtrsList& interfaces, + const direction cmpt, + const label nSweeps + ); + + + //- Smooth the solution for a given number of sweeps + virtual void smooth + ( + scalarField& psi, + const scalarField& Source, + const direction cmpt, + const label nSweeps + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.C b/src/OpenFOAM/meshes/boundBox/boundBox.C index c29e17554c..168d43c342 100644 --- a/src/OpenFOAM/meshes/boundBox/boundBox.C +++ b/src/OpenFOAM/meshes/boundBox/boundBox.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 diff --git a/src/OpenFOAM/meshes/boundBox/boundBox.H b/src/OpenFOAM/meshes/boundBox/boundBox.H index f0c353d5df..9a9821b533 100644 --- a/src/OpenFOAM/meshes/boundBox/boundBox.H +++ b/src/OpenFOAM/meshes/boundBox/boundBox.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/meshes/boundBox/boundBoxI.H b/src/OpenFOAM/meshes/boundBox/boundBoxI.H index ce0d1017c7..4c3fc06203 100644 --- a/src/OpenFOAM/meshes/boundBox/boundBoxI.H +++ b/src/OpenFOAM/meshes/boundBox/boundBoxI.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/meshes/meshTools/matchPoints.C b/src/OpenFOAM/meshes/meshTools/matchPoints.C index e288a62ac6..d309e8e501 100644 --- a/src/OpenFOAM/meshes/meshTools/matchPoints.C +++ b/src/OpenFOAM/meshes/meshTools/matchPoints.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 diff --git a/src/OpenFOAM/meshes/meshTools/matchPoints.H b/src/OpenFOAM/meshes/meshTools/matchPoints.H index 0523301b8f..99dc18762a 100644 --- a/src/OpenFOAM/meshes/meshTools/matchPoints.H +++ b/src/OpenFOAM/meshes/meshTools/matchPoints.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index 627aced76a..d9b9549115 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.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 diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.H index d3d623dddb..e238154f98 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C index 28bae4939c..36f78d8b1e 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.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 diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C index 4c13182f14..0968c71ca3 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.C +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.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 diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H index d740c96143..15528c02ba 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/Pair/Pair.H b/src/OpenFOAM/primitives/Pair/Pair.H index 7cf1aad63b..3f2de6d090 100644 --- a/src/OpenFOAM/primitives/Pair/Pair.H +++ b/src/OpenFOAM/primitives/Pair/Pair.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H index 1a0dc8e4df..07eaba880d 100644 --- a/src/OpenFOAM/primitives/SymmTensor/SymmTensor.H +++ b/src/OpenFOAM/primitives/SymmTensor/SymmTensor.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.C b/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.C index a0216ac322..22f2b9eb8d 100644 --- a/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.C +++ b/src/OpenFOAM/primitives/SymmTensor/symmTensor/symmTensor.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 diff --git a/src/OpenFOAM/primitives/Tensor/Tensor.H b/src/OpenFOAM/primitives/Tensor/Tensor.H index b5d4379c60..8b3c1d9a9d 100644 --- a/src/OpenFOAM/primitives/Tensor/Tensor.H +++ b/src/OpenFOAM/primitives/Tensor/Tensor.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H index 93d70e8537..a354bd038c 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2D.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2D.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.H b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.H index 3138da65f8..cad297e7d5 100644 --- a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.H +++ b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshI.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/fieldSources/basicSource/basicSourceList.C b/src/fieldSources/basicSource/basicSourceList.C index a7224e9a6c..51396de122 100644 --- a/src/fieldSources/basicSource/basicSourceList.C +++ b/src/fieldSources/basicSource/basicSourceList.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 diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C index f53442df8e..7d14db67fa 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.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 diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C index a4a64c22d4..eb80ace5c9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.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 diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C index 4913c16457..dd9f68ec66 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.C +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.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 @@ -46,13 +46,10 @@ tmp > gaussLaplacianScheme::fvmLaplacianUncorrected ( const surfaceScalarField& gammaMagSf, + const surfaceScalarField& deltaCoeffs, const GeometricField& vf ) { - tmp tdeltaCoeffs = - this->tsnGradScheme_().deltaCoeffs(vf); - const surfaceScalarField& deltaCoeffs = tdeltaCoeffs(); - tmp > tfvm ( new fvMatrix @@ -66,14 +63,14 @@ gaussLaplacianScheme::fvmLaplacianUncorrected fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalField(); fvm.negSumDiag(); - forAll(vf.boundaryField(), patchI) + forAll(vf.boundaryField(), patchi) { - const fvPatchField& psf = vf.boundaryField()[patchI]; + const fvPatchField& psf = vf.boundaryField()[patchi]; const fvsPatchScalarField& patchGamma = - gammaMagSf.boundaryField()[patchI]; + gammaMagSf.boundaryField()[patchi]; - fvm.internalCoeffs()[patchI] = patchGamma*psf.gradientInternalCoeffs(); - fvm.boundaryCoeffs()[patchI] = -patchGamma*psf.gradientBoundaryCoeffs(); + fvm.internalCoeffs()[patchi] = patchGamma*psf.gradientInternalCoeffs(); + fvm.boundaryCoeffs()[patchi] = -patchGamma*psf.gradientBoundaryCoeffs(); } return tfvm; @@ -162,7 +159,12 @@ gaussLaplacianScheme::fvmLaplacian ); const surfaceVectorField SfGammaCorr(SfGamma - SfGammaSn*Sn); - tmp > tfvm = fvmLaplacianUncorrected(SfGammaSn, vf); + tmp > tfvm = fvmLaplacianUncorrected + ( + SfGammaSn, + this->tsnGradScheme_().deltaCoeffs(vf), + vf + ); fvMatrix& fvm = tfvm(); tmp > tfaceFluxCorrection diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H index dfd35f6f86..1ff2a71843 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,12 +58,6 @@ class gaussLaplacianScheme { // Private Member Functions - tmp > fvmLaplacianUncorrected - ( - const surfaceScalarField& gammaMagSf, - const GeometricField& - ); - tmp > gammaSnGradCorr ( const surfaceVectorField& SfGammaCorr, @@ -116,6 +110,13 @@ public: // Member Functions + static tmp > fvmLaplacianUncorrected + ( + const surfaceScalarField& gammaMagSf, + const surfaceScalarField& deltaCoeffs, + const GeometricField& + ); + tmp > fvcLaplacian ( const GeometricField& diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C index 74f9a66b37..fd983f3751 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.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,7 +53,12 @@ Foam::fv::gaussLaplacianScheme::fvmLaplacian \ gamma*mesh.magSf() \ ); \ \ - tmp > tfvm = fvmLaplacianUncorrected(gammaMagSf, vf); \ + tmp > tfvm = fvmLaplacianUncorrected \ + ( \ + gammaMagSf, \ + this->tsnGradScheme_().deltaCoeffs(vf), \ + vf \ + ); \ fvMatrix& fvm = tfvm(); \ \ if (this->tsnGradScheme_().corrected()) \ diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C index f7e513cfff..a88ca9dad7 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.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 @@ -111,7 +111,7 @@ snGradScheme::snGrad const fvMesh& mesh = vf.mesh(); // construct GeometricField - tmp > tssf + tmp > tsf ( new GeometricField ( @@ -127,7 +127,7 @@ snGradScheme::snGrad vf.dimensions()*tdeltaCoeffs().dimensions() ) ); - GeometricField& ssf = tssf(); + GeometricField& ssf = tsf(); // set reference to difference factors array const scalarField& deltaCoeffs = tdeltaCoeffs().internalField(); @@ -136,18 +136,30 @@ snGradScheme::snGrad const labelUList& owner = mesh.owner(); const labelUList& neighbour = mesh.neighbour(); - forAll(owner, faceI) + forAll(owner, facei) { - ssf[faceI] = - deltaCoeffs[faceI]*(vf[neighbour[faceI]] - vf[owner[faceI]]); + ssf[facei] = + deltaCoeffs[facei]*(vf[neighbour[facei]] - vf[owner[facei]]); } - forAll(vf.boundaryField(), patchI) + forAll(vf.boundaryField(), patchi) { - ssf.boundaryField()[patchI] = vf.boundaryField()[patchI].snGrad(); + ssf.boundaryField()[patchi] = vf.boundaryField()[patchi].snGrad(); } - return tssf; + return tsf; +} + + +template +tmp > +snGradScheme::sndGrad +( + const GeometricField& vf, + const word& sndGradName +) +{ + return snGrad(vf, vf.mesh().nonOrthDeltaCoeffs(), sndGradName); } @@ -161,7 +173,9 @@ snGradScheme::snGrad ) const { tmp > tsf - = snGrad(vf, deltaCoeffs(vf)); + ( + snGrad(vf, deltaCoeffs(vf)) + ); if (corrected()) { @@ -181,10 +195,13 @@ snGradScheme::snGrad const tmp >& tvf ) const { - tmp > tinterpVf - = snGrad(tvf()); - tvf.clear(); - return tinterpVf; + tmp > tsf + ( + snGrad(tvf()) + ); + + tsf.clear(); + return tsf; } diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H index 9003ebc775..8452a907ac 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.H +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -133,6 +133,14 @@ public: const word& snGradName = "snGrad" ); + //- Return the sndGrad of the given cell field + static tmp > + sndGrad + ( + const GeometricField&, + const word& snGradName = "sndGrad" + ); + //- Return the interpolation weighting factors for the given field virtual tmp deltaCoeffs ( diff --git a/src/meshTools/AMIInterpolation/patches/cyclic/cyclicAMIPolyPatch/cyclicAMIPolyPatchI.H b/src/meshTools/AMIInterpolation/patches/cyclic/cyclicAMIPolyPatch/cyclicAMIPolyPatchI.H index 88d2ac02b6..6d726e9df7 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclic/cyclicAMIPolyPatch/cyclicAMIPolyPatchI.H +++ b/src/meshTools/AMIInterpolation/patches/cyclic/cyclicAMIPolyPatch/cyclicAMIPolyPatchI.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C index 72ffa9b2c7..0ef785383b 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C +++ b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.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 diff --git a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.H b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.H index 592c24fb7b..1a8d82e5f6 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/searchableSurface/searchableBox.C b/src/meshTools/searchableSurface/searchableBox.C index 6a41b103fa..3503308e42 100644 --- a/src/meshTools/searchableSurface/searchableBox.C +++ b/src/meshTools/searchableSurface/searchableBox.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 diff --git a/src/meshTools/searchableSurface/searchableBox.H b/src/meshTools/searchableSurface/searchableBox.H index 9e33384c0d..40e5c5d711 100644 --- a/src/meshTools/searchableSurface/searchableBox.H +++ b/src/meshTools/searchableSurface/searchableBox.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/searchableSurface/searchableCylinder.C b/src/meshTools/searchableSurface/searchableCylinder.C index 6e925365d8..3231dd95cd 100644 --- a/src/meshTools/searchableSurface/searchableCylinder.C +++ b/src/meshTools/searchableSurface/searchableCylinder.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 diff --git a/src/meshTools/searchableSurface/searchableCylinder.H b/src/meshTools/searchableSurface/searchableCylinder.H index 409ac0dbf5..0bb570e480 100644 --- a/src/meshTools/searchableSurface/searchableCylinder.H +++ b/src/meshTools/searchableSurface/searchableCylinder.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/searchableSurface/searchablePlane.H b/src/meshTools/searchableSurface/searchablePlane.H index 5a2ef08242..cc64844d0d 100644 --- a/src/meshTools/searchableSurface/searchablePlane.H +++ b/src/meshTools/searchableSurface/searchablePlane.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/searchableSurface/searchablePlate.H b/src/meshTools/searchableSurface/searchablePlate.H index 97774e587f..671f3785f6 100644 --- a/src/meshTools/searchableSurface/searchablePlate.H +++ b/src/meshTools/searchableSurface/searchablePlate.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/searchableSurface/searchableSphere.C b/src/meshTools/searchableSurface/searchableSphere.C index 88d665ea14..5f3e98af90 100644 --- a/src/meshTools/searchableSurface/searchableSphere.C +++ b/src/meshTools/searchableSurface/searchableSphere.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 diff --git a/src/meshTools/searchableSurface/searchableSphere.H b/src/meshTools/searchableSurface/searchableSphere.H index 187541c156..5d46f8ad4b 100644 --- a/src/meshTools/searchableSurface/searchableSphere.H +++ b/src/meshTools/searchableSurface/searchableSphere.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/searchableSurface/searchableSurfaceCollection.H b/src/meshTools/searchableSurface/searchableSurfaceCollection.H index b93acdb745..53e677eaa6 100644 --- a/src/meshTools/searchableSurface/searchableSurfaceCollection.H +++ b/src/meshTools/searchableSurface/searchableSurfaceCollection.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H index 0e3b6625bf..c169a98ca1 100644 --- a/src/meshTools/searchableSurface/searchableSurfaceWithGaps.H +++ b/src/meshTools/searchableSurface/searchableSurfaceWithGaps.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) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/tutorials/Allrun b/tutorials/Allrun index 3eddc44e93..d4bdfb3dff 100755 --- a/tutorials/Allrun +++ b/tutorials/Allrun @@ -68,7 +68,7 @@ logReport() # Recursively run all tutorials -foamRunTutorials cases +foamRunTutorials -test -skipFirst # Analyse all log files diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Running_Notes b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Running_Notes index 5bfc37a862..030bcbe400 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Running_Notes +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/Running_Notes @@ -3,6 +3,6 @@ nacaAirfoil * large domain with airfoil section near centre * extremely non-orthogonal, highly skew mesh refined around the airfoil * running at Mach 1.78 -* limited 0.5 on all laplacianSchemes because the mesh is so poor +* limited corrected 0.5 on all laplacianSchemes because the mesh is so poor * run to t = 0.02 with nextWrite; change to stopAt endTime to continue running * deltaT can be increased later in the run to 2e-07 diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary b/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary index 313dcceba1..43b78ef411 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary @@ -44,6 +44,7 @@ FoamFile frontAndBack { type empty; + inGroups 1(empty); nFaces 24450; startFace 24730; } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary index 9b8e73ecfd..123fc6be27 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary @@ -32,22 +32,24 @@ FoamFile side1 { type cyclicAMI; + inGroups 1(cyclicAMI); nFaces 400; startFace 4478; matchTolerance 0.0001; - neighbourPatch side2; transform rotational; + neighbourPatch side2; rotationAxis (1 0 0); rotationCentre (0 0 0); } side2 { type cyclicAMI; + inGroups 1(cyclicAMI); nFaces 250; startFace 4878; matchTolerance 0.0001; - neighbourPatch side1; transform rotational; + neighbourPatch side1; rotationAxis (1 0 0); rotationCentre (0 0 0); } diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/pitzDaily/constant/polyMesh/boundary index 313dcceba1..43b78ef411 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/incompressible/simpleFoam/pitzDaily/constant/polyMesh/boundary @@ -44,6 +44,7 @@ FoamFile frontAndBack { type empty; + inGroups 1(empty); nFaces 24450; startFace 24730; } diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon index cbbcc3aebf..5a75819a12 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon +++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/epsilon @@ -33,10 +33,14 @@ boundaryField E 9.8; value $internalField; } + outlet { - type zeroGradient; + type inletOutlet; + inletValue uniform $turbulentEpsilon; + value $internalField; } + inlet { type atmBoundaryLayerInletEpsilon; diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k index 443a3a5794..ad81499bb6 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k +++ b/tutorials/incompressible/simpleFoam/turbineSiting/0.org/k @@ -27,14 +27,16 @@ boundaryField outlet { type inletOutlet; - inletValue uniform 0.0; + inletValue uniform $turbulentKE; value $internalField; } + inlet { type uniformFixedValue; uniformValue constant $turbulentKE; } + "terrain_.*" { type kqRWallFunction; diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/turbineSiting/constant/polyMesh/boundary index c3da61bd8c..f37b2684f5 100644 --- a/tutorials/incompressible/simpleFoam/turbineSiting/constant/polyMesh/boundary +++ b/tutorials/incompressible/simpleFoam/turbineSiting/constant/polyMesh/boundary @@ -15,43 +15,37 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -6 +5 ( outlet { type patch; - nFaces 922; - startFace 364825; + nFaces 600; + startFace 51900; } sides { type patch; - nFaces 1834; - startFace 365747; + nFaces 1200; + startFace 52500; } inlet { type patch; - nFaces 923; - startFace 367581; + nFaces 600; + startFace 53700; } ground { type wall; - nFaces 0; - startFace 368504; + nFaces 900; + startFace 54300; } top { type patch; nFaces 900; - startFace 368504; - } - terrain_patch0 - { - type wall; - nFaces 14400; - startFace 369404; + startFace 55200; } ) diff --git a/tutorials/mesh/cvMesh/blob/Alltest b/tutorials/mesh/cvMesh/blob/Alltest new file mode 100755 index 0000000000..fc9136aea5 --- /dev/null +++ b/tutorials/mesh/cvMesh/blob/Alltest @@ -0,0 +1,18 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication cvMesh + +# Change collapseEdges to only do one iteration +cp system/collapseDict system/collapseDict.org + +sed -e s/"\(maximumIterations[ \t]*\)\([0-9]*\);"/"\1 1;"/g \ +system/collapseDict.org > system/collapseDict + +runApplication collapseEdges -latestTime -collapseFaces + + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/mesh/cvMesh/flange/Alltest b/tutorials/mesh/cvMesh/flange/Alltest new file mode 100755 index 0000000000..75b5887193 --- /dev/null +++ b/tutorials/mesh/cvMesh/flange/Alltest @@ -0,0 +1,21 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication surfaceFeatureExtract + +# Create tight-fitting background mesh +runApplication blockMesh +runApplication cvMesh + +# Change collapseEdges to only do one iteration +cp system/collapseDict system/collapseDict.org + +sed -e s/"\(maximumIterations[ \t]*\)\([0-9]*\);"/"\1 1;"/g \ +system/collapseDict.org > system/collapseDict + +runApplication collapseEdges -latestTime -collapseFaces + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/mesh/cvMesh/simpleShapes/Allrun b/tutorials/mesh/cvMesh/simpleShapes/Allrun index 90634c33c1..c37109987b 100755 --- a/tutorials/mesh/cvMesh/simpleShapes/Allrun +++ b/tutorials/mesh/cvMesh/simpleShapes/Allrun @@ -38,6 +38,6 @@ runApplication surfaceFeatureExtract runApplication cvMesh # Generate some sets for a bit of mesh inspection -runApplication topoSet -constant -time 0:100 +runApplication topoSet -time 0:100 # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 index c1fa13b514..6e0ae20fd8 100644 --- a/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 +++ b/tutorials/multiphase/interFoam/ras/damBreakPorousBaffle/0/alpha1 @@ -39,6 +39,14 @@ boundaryField inletValue uniform 0; value uniform 0; } + porous_half0 + { + type cyclic; + } + porous_half1 + { + type cyclic; + } defaultFaces { type empty;