diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 8159ee73aa67906e0c54937a76f12cb3cea3562e..be23570078094e5d3233047ebc0f7b8ce1ac4ff1 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 845aa9f424ff2486cbf664622530f97c66fc4885..03625d89682013229f1e17bfa9dce325504fba7d 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 afebd9a9bf6d5a7df8b2029db0655627311b6795..d0e7bf6ce2eaf3239f9ded3b57f909ecd152ecad 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 2c54bfa3218478eef96fce9e9bbc8f23612add83..8b080006674b8874606ded342451a96c4de8ac26 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 8044426582eacdd44b4277674eb8d715c0365ed0..cc883614b895212e67e6456ef21ad024c99857ca 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 9d221b5ca93b98f9525f016ad1c07efa191d2bc3..208e1c03b28eecbea9ee5c0ea544ec208754c3dd 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 054a8dbbd476033444d1385bb60d61e1339b7bed..437d8c57f3258e709b00dc43dec1b3ff94d3a42c 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 b9db6b25ec1764454afd5cd52a87ddc2e814e6dc..8950d265b0ada4c15abcd359698407a25c01ee01 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 054a8dbbd476033444d1385bb60d61e1339b7bed..437d8c57f3258e709b00dc43dec1b3ff94d3a42c 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 c26df020198f92f72ca3f3f8a871600b5b2d8c61..50f0e4fb91df1b05f1d77b417be25dfd3d04b13b 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 1f4f0bbbebc4998d21a8b713f5d54147ce3bcceb..086f39cc3ac2c6fc84102eb677322c7f88359764 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 599567b54d6e61601facfd7544956d20a59dcbf6..3791297ea0fcf9fc903b704e1ac46c9286fa2ac5 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 68765262dbad5fe9d18156fad26d8bf839eabb3e..17f31e6fc64ef0b0af664779455adb0eb67e9ff7 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 ba60cb1981bc2ca8c4bd080f49ac83f1ccb86e2c..b01465ff8c7047ee8139a48c73bc4022a8c5cbd7 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 ee927345097f187f019731bb06933517ef6b1782..7304a7841f6560897992b80a6b2b02ce79908877 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 5b089550c56d488461757556102f0812350a809e..84519dbcdd85115907eb2c2c862bf0d55a556521 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 69eb0964ceabe41911c0593daead4271b68a341f..0cca9e81e5fd46f148319720d39a4224b5d6c08b 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 488cd77e56dca265db6dab1b98933df8fe9ae72a..f179f42761fe59e4e586a450e565080c1bb43d53 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 cb135724cf03d61326b5f2dbe095900c545b904b..aeaf998111eeea7c5eed92cf04a183cf2420a810 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 45ada1f7174d580b9d4f35a08f85ea0800d67c9d..06e1da1ae49004eb5a3c97ea0020d0a61755b383 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 60543dc826266392c2738dbfcad79de0442e9f57..ae024d48077acef48cc527366f496ab56f1fd80e 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 62b837b640223f70258486492a0fe15b5e344005..4d8ead85ce9ec719b737a0fecb28454106b0f141 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 ba21579f303cbf9915d0c52f47c9ab215e54c7b8..67743ad2e084bdd54fcebb45de9190c62375e904 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 33647cd28d13ba19070dd86158ccd7f8dff2853d..dcb314025dfb631b1f0a450dbf6c41b7498c9850 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 b969ade3f3a1e86ebd6d9f2ee44b3488ed7db914..e16f83bd2e8cd79ba3a112dc4763085e4a0c1e8c 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 39e33575b764284d70c2a4b618ac83313de64a91..0653ab0a2065be1d98b1d32fa53bd4b8aedf8cf9 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 53c2161f97897aaf8c6562e906c735b7e6725b54..83341e02469ff2ae3a2f3ace6f6af6c12a6aef86 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 6fc987453bc7b4e0240f4e5f106bf6541df2326f..437d8c57f3258e709b00dc43dec1b3ff94d3a42c 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 155c0527b7338035d444a03f97cf52cef2924e3b..e6e58b35e3c4bf4fd56aca8263f674cef450c117 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 795b7c14a1f42b47372a48fe029222e4a853f134..f32d6f3e6d991dbeb12bd6da9ab72820865a4fa3 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 a7db08ba719d8874002146adcc73a9cf78849bef..eea69b7e51caea0a517b0db5b83495dd19f871b8 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 c682da6701b9ae4b565c26de283387a86ba04899..f5dabf60770a244550405980a9ab250b74b5f6e7 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 6b530e3cb983ced77140e6acf635abb4a239898d..a2c33cfb8e7935f4087738e0f18935f833bd5cf1 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 b6cd30092d003479858521863b3c1bf3461c6d58..1a0c45ba2d9985cdc78c2b1f7fd90d76b8da41f8 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 d146684e9a8f9d4b529fec702921a31556e230e1..f077631ac890c00e43ef0ee89126b2b35f831516 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 55208034a17659f7e023b7ad980f38cb131332ec..03072a6f02c42326d9209f6e33baebb7691c7dae 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 0e588f1b738f2fb72bfdd4cc270b23136dfca49f..df8fc2aec14ab378d81e1e8c16fbbe57bb8f5461 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 0a70bee91878110cdb904e25c3dedb34eb3a0ca9..e945d5d7663359a736bfb60ff9e58316538235c7 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 59b37b88d9839341794e31a85f82d0d8d775e3f7..855093035793e29816d44c997e68f4655b6b02fc 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 56d2fdd6571ddea32ad5e68aec647f5e6f584026..87fa7d8dd29adb60515c2b9985ef95154d6542ac 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 c31f1ab2d4087c75b966a38c6b6f37d80b7c2bae..53ba1f37d3405b2580b93098584c0827f5c29f4d 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 a27e1ef6e7fd8b384e76a31147e52e6a3e54e063..01b2e526c6a2c1e21959f709072cf7f7ff569c64 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 b1eb0b0098eac07c00fe1f130da91090a953599e..ff1057cb24fddd1c63f97280fbad0857a7c6a9e0 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 cd3effd77da20aefd10daa30d005f22dc6a4e204..66dbcce3df7e2ec2f4b9ca450174320a772236e6 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<nFaces; face++) + for (register label facei=0; facei<nFaces; facei++) { - register label u = uPtr[face]; - rAPtr[u] -= rDPtr[u]*upperPtr[face]*rAPtr[lPtr[face]]; + register label u = uPtr[facei]; + rAPtr[u] -= rDPtr[u]*upperPtr[facei]*rAPtr[lPtr[facei]]; } register label nFacesM1 = nFaces - 1; - for (register label face=nFacesM1; 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 0000000000000000000000000000000000000000..0896d013075a1776a351faa850728f92e7d31cf3 --- /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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "FDICSmoother.H" +#include "FDICPreconditioner.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(FDICSmoother, 0); + + lduMatrix::smoother::addsymMatrixConstructorToTable<FDICSmoother> + addFDICSmootherSymMatrixConstructorToTable_; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::FDICSmoother::FDICSmoother +( + const word& fieldName, + const lduMatrix& matrix, + const FieldField<Field, scalar>& interfaceBouCoeffs, + const FieldField<Field, scalar>& 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<nFaces; face++) + { + rDPtr[uPtr[face]] -= sqr(upperPtr[face])/rDPtr[lPtr[face]]; + } + + // Generate reciprocal FDIC + for (register label cell=0; cell<nCells; cell++) + { + rDPtr[cell] = 1.0/rDPtr[cell]; + } + + for (register label face=0; face<nFaces; face++) + { + rDuUpperPtr[face] = rDPtr[uPtr[face]]*upperPtr[face]; + rDlUpperPtr[face] = rDPtr[lPtr[face]]*upperPtr[face]; + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::FDICSmoother::smooth +( + scalarField& psi, + const scalarField& source, + const direction cmpt, + const label nSweeps +) const +{ + const scalar* const __restrict__ rDuUpperPtr = rDuUpper_.begin(); + const scalar* const __restrict__ rDlUpperPtr = rDlUpper_.begin(); + + const label* const __restrict__ uPtr = + matrix_.lduAddr().upperAddr().begin(); + const label* const __restrict__ lPtr = + matrix_.lduAddr().lowerAddr().begin(); + + // Temporary storage for the residual + scalarField rA(rD_.size()); + scalar* __restrict__ rAPtr = rA.begin(); + + for (label sweep=0; sweep<nSweeps; sweep++) + { + matrix_.residual + ( + rA, + psi, + source, + interfaceBouCoeffs_, + interfaces_, + cmpt + ); + + rA *= rD_; + + register label nFaces = matrix_.upper().size(); + for (register label face=0; face<nFaces; face++) + { + rAPtr[uPtr[face]] -= rDuUpperPtr[face]*rAPtr[lPtr[face]]; + } + + register label nFacesM1 = nFaces - 1; + for (register label face=nFacesM1; 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 0000000000000000000000000000000000000000..674f4963ccb6de3cee1d6ba44e5574b8658605a2 --- /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 <http://www.gnu.org/licenses/>. + +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<Field, scalar>& interfaceBouCoeffs, + const FieldField<Field, scalar>& 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 b0cb88ed6eb00338428fb3e841c86a5eba452f55..42bbea8c9cf74c3b5f3ae9b0413936a6848e6eca 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<Field, scalar> mBouCoeffs(interfaceBouCoeffs_.size()); - // - //forAll(mBouCoeffs, patchi) - //{ - // if (interfaces_.set(patchi)) - // { - // mBouCoeffs.set(patchi, -interfaceBouCoeffs_[patchi]); - // } - //} FieldField<Field, scalar>& mBouCoeffs = const_cast<FieldField<Field, scalar>&> ( 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<nCells; cellI++) + for (register label celli=0; celli<nCells; celli++) { // Start and end of this row fStart = fEnd; - fEnd = ownStartPtr[cellI + 1]; + fEnd = ownStartPtr[celli + 1]; // Get the accumulated neighbour side - curPsi = bPrimePtr[cellI]; + psii = bPrimePtr[celli]; // Accumulate the owner product side - for (register label curFace=fStart; curFace<fEnd; curFace++) + for (register label facei=fStart; facei<fEnd; facei++) { - curPsi -= upperPtr[curFace]*psiPtr[uPtr[curFace]]; + psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; } - // Finish current psi - curPsi /= diagPtr[cellI]; + // Finish psi for this cell + psii /= diagPtr[celli]; - // Distribute the neighbour side using current psi - for (register label curFace=fStart; curFace<fEnd; curFace++) + // Distribute the neighbour side using psi for this cell + for (register label facei=fStart; facei<fEnd; facei++) { - bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi; + bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii; } - psiPtr[cellI] = curPsi; + psiPtr[celli] = psii; } } diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.C new file mode 100644 index 0000000000000000000000000000000000000000..c8794ba5d6bba74c7d7a4c94f6b0066bd140f1e8 --- /dev/null +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.C @@ -0,0 +1,241 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "symGaussSeidelSmoother.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(symGaussSeidelSmoother, 0); + + lduMatrix::smoother::addsymMatrixConstructorToTable<symGaussSeidelSmoother> + addsymGaussSeidelSmootherSymMatrixConstructorToTable_; + + lduMatrix::smoother::addasymMatrixConstructorToTable<symGaussSeidelSmoother> + addsymGaussSeidelSmootherAsymMatrixConstructorToTable_; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::symGaussSeidelSmoother::symGaussSeidelSmoother +( + const word& fieldName, + const lduMatrix& matrix, + const FieldField<Field, scalar>& interfaceBouCoeffs, + const FieldField<Field, scalar>& 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<Field, scalar>& 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<Field, scalar>& mBouCoeffs = + const_cast<FieldField<Field, scalar>&> + ( + interfaceBouCoeffs_ + ); + + forAll(mBouCoeffs, patchi) + { + if (interfaces_.set(patchi)) + { + mBouCoeffs[patchi].negate(); + } + } + + + for (label sweep=0; sweep<nSweeps; sweep++) + { + bPrime = source; + + matrix_.initMatrixInterfaces + ( + mBouCoeffs, + interfaces_, + psi, + bPrime, + cmpt + ); + + matrix_.updateMatrixInterfaces + ( + mBouCoeffs, + interfaces_, + psi, + bPrime, + cmpt + ); + + register scalar psii; + register label fStart; + register label fEnd = ownStartPtr[0]; + + for (register label celli=0; celli<nCells; celli++) + { + // Start and end of this row + fStart = fEnd; + fEnd = ownStartPtr[celli + 1]; + + // Get the accumulated neighbour side + psii = bPrimePtr[celli]; + + // Accumulate the owner product side + for (register label facei=fStart; facei<fEnd; facei++) + { + psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; + } + + // Finish current psi + psii /= diagPtr[celli]; + + // Distribute the neighbour side using current psi + for (register label facei=fStart; facei<fEnd; facei++) + { + bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii; + } + + psiPtr[celli] = psii; + } + + fStart = ownStartPtr[nCells]; + + for (register label celli=nCells-1; celli>=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<fEnd; facei++) + { + psii -= upperPtr[facei]*psiPtr[uPtr[facei]]; + } + + // Finish psi for this cell + psii /= diagPtr[celli]; + + // Distribute the neighbour side using psi for this cell + for (register label facei=fStart; facei<fEnd; facei++) + { + bPrimePtr[uPtr[facei]] -= lowerPtr[facei]*psii; + } + + psiPtr[celli] = psii; + } + } + + // Restore interfaceBouCoeffs_ + forAll(mBouCoeffs, patchi) + { + if (interfaces_.set(patchi)) + { + mBouCoeffs[patchi].negate(); + } + } +} + + +void Foam::symGaussSeidelSmoother::smooth +( + scalarField& psi, + const scalarField& source, + const direction cmpt, + const label nSweeps +) const +{ + smooth + ( + fieldName_, + psi, + matrix_, + source, + interfaceBouCoeffs_, + interfaces_, + cmpt, + nSweeps + ); +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.H b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.H new file mode 100644 index 0000000000000000000000000000000000000000..a9a25e651fb1ac3d0e742600242f44069778f59d --- /dev/null +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/symGaussSeidel/symGaussSeidelSmoother.H @@ -0,0 +1,108 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 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 <http://www.gnu.org/licenses/>. + +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<Field, scalar>& interfaceBouCoeffs, + const FieldField<Field, scalar>& 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<Field, scalar>& 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 c29e17554c79c10b78d5628c2b8783347d7db682..168d43c3422b989d17313c5d27715b26defe4c73 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 f0c353d5df40a7c3c407ef6ca5da8075db613e15..9a9821b5337034313782e808b98ed550a31bf5b9 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 ce0d1017c79f4c52266b6ddd6b61ae8b1b6175f1..4c3fc062035f158c78892ab4714cd18bc9cdfd04 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 e288a62ac6560ab865c6aceaf3e8827946dd1d1d..d309e8e501f8c4bed7696984bcebb42997e82a02 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 0523301b8f51897e81dbad949d43183471d0c142..99dc18762a42c9037eac59bc318f9d097277b007 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 627aced76a0bbc075566ef6c66ab48f80d243339..d9b95491154f5fd06c3c43b1816171beaa3fed6b 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 d3d623dddbd21525a33e8ad14e76543548a6a00b..e238154f98d47f306f9475a941becaa33d6571a6 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 28bae4939c97462b96cf6d46163e547feb52529d..36f78d8b1e38a3a7dce1ef81d275b5cb757480ad 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 4c13182f1438a65af62998e0276309b702631e7c..0968c71ca387f47a8ba98110468fc1d33ffbebea 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 d740c9614382a0c41517e8aba97cec9dfef9e310..15528c02ba73cd170658d4f73c47f3a71b1a7cb1 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 7cf1aad63b70a09caf4dee369604b79748ff170a..3f2de6d09095d2559329b1f03383fcfc531ea957 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 1a0dc8e4df29b3ae2812719366d46420783b32ac..07eaba880da82dd0c7b158ce971c1227a497aa6f 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 a0216ac322849144daee39299ab7618677cd8609..22f2b9eb8dbf0c9e50ca0c41ca4ad4e4fe311a88 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 b5d4379c605f5004bc7c7639c80cc5076ec931de..8b3c1d9a9d87ecc5a104d2d566454ebce491fc28 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 93d70e85378b3494e475c4c339347db70d7d4aaf..a354bd038c1e2633e19966057f979db8e2cd8342 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 3138da65f83380ec6237bdf825798f6c43b07742..cad297e7d5cf7921951feb57a896d5246781092d 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 a7224e9a6c08bcf12ac72fa4e4e1b63908ff17c5..51396de122409bb94fe09dbd7e48cea0ac22a297 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 f53442df8e6a06f4af3082a70817ff45d8d49366..7d14db67faef883415c9e061ac15be209d3177a3 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 a4a64c22d43776b6645ebee9698bb7c705371ddb..eb80ace5c9cff330bc758cbe18a1bdb622c3b725 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 4913c16457700d9b4892b00080d548dc24e42eb8..dd9f68ec669c161758b2a0ef0c49a0f9c16a9702 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<fvMatrix<Type> > gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected ( const surfaceScalarField& gammaMagSf, + const surfaceScalarField& deltaCoeffs, const GeometricField<Type, fvPatchField, volMesh>& vf ) { - tmp<surfaceScalarField> tdeltaCoeffs = - this->tsnGradScheme_().deltaCoeffs(vf); - const surfaceScalarField& deltaCoeffs = tdeltaCoeffs(); - tmp<fvMatrix<Type> > tfvm ( new fvMatrix<Type> @@ -66,14 +63,14 @@ gaussLaplacianScheme<Type, GType>::fvmLaplacianUncorrected fvm.upper() = deltaCoeffs.internalField()*gammaMagSf.internalField(); fvm.negSumDiag(); - forAll(vf.boundaryField(), patchI) + forAll(vf.boundaryField(), patchi) { - const fvPatchField<Type>& psf = vf.boundaryField()[patchI]; + const fvPatchField<Type>& 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<Type, GType>::fvmLaplacian ); const surfaceVectorField SfGammaCorr(SfGamma - SfGammaSn*Sn); - tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected(SfGammaSn, vf); + tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected + ( + SfGammaSn, + this->tsnGradScheme_().deltaCoeffs(vf), + vf + ); fvMatrix<Type>& fvm = tfvm(); tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tfaceFluxCorrection diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianScheme.H index dfd35f6f862350b2aa9b0e09f148165a3a028e83..1ff2a71843acd374681072a3ca7e7f99fc9f5b5a 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<fvMatrix<Type> > fvmLaplacianUncorrected - ( - const surfaceScalarField& gammaMagSf, - const GeometricField<Type, fvPatchField, volMesh>& - ); - tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > gammaSnGradCorr ( const surfaceVectorField& SfGammaCorr, @@ -116,6 +110,13 @@ public: // Member Functions + static tmp<fvMatrix<Type> > fvmLaplacianUncorrected + ( + const surfaceScalarField& gammaMagSf, + const surfaceScalarField& deltaCoeffs, + const GeometricField<Type, fvPatchField, volMesh>& + ); + tmp<GeometricField<Type, fvPatchField, volMesh> > fvcLaplacian ( const GeometricField<Type, fvPatchField, volMesh>& diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C b/src/finiteVolume/finiteVolume/laplacianSchemes/gaussLaplacianScheme/gaussLaplacianSchemes.C index 74f9a66b371d183a8e3c8b930f0d0435571e6181..fd983f3751e77d06b0364e74cbcaaf4d2bc6abaf 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<Foam::Type, Foam::scalar>::fvmLaplacian \ gamma*mesh.magSf() \ ); \ \ - tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected(gammaMagSf, vf); \ + tmp<fvMatrix<Type> > tfvm = fvmLaplacianUncorrected \ + ( \ + gammaMagSf, \ + this->tsnGradScheme_().deltaCoeffs(vf), \ + vf \ + ); \ fvMatrix<Type>& 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 f7e513cfffdf4f9cf1d7792471ef169b8cc8c0af..a88ca9dad7cc3b0e502b45ae268d60524314dd06 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<Type>::snGrad const fvMesh& mesh = vf.mesh(); // construct GeometricField<Type, fvsPatchField, surfaceMesh> - tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tssf + tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf ( new GeometricField<Type, fvsPatchField, surfaceMesh> ( @@ -127,7 +127,7 @@ snGradScheme<Type>::snGrad vf.dimensions()*tdeltaCoeffs().dimensions() ) ); - GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tssf(); + GeometricField<Type, fvsPatchField, surfaceMesh>& ssf = tsf(); // set reference to difference factors array const scalarField& deltaCoeffs = tdeltaCoeffs().internalField(); @@ -136,18 +136,30 @@ snGradScheme<Type>::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<class Type> +tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > +snGradScheme<Type>::sndGrad +( + const GeometricField<Type, fvPatchField, volMesh>& vf, + const word& sndGradName +) +{ + return snGrad(vf, vf.mesh().nonOrthDeltaCoeffs(), sndGradName); } @@ -161,7 +173,9 @@ snGradScheme<Type>::snGrad ) const { tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tsf - = snGrad(vf, deltaCoeffs(vf)); + ( + snGrad(vf, deltaCoeffs(vf)) + ); if (corrected()) { @@ -181,10 +195,13 @@ snGradScheme<Type>::snGrad const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf ) const { - tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tinterpVf - = snGrad(tvf()); - tvf.clear(); - return tinterpVf; + tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > 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 9003ebc775dafb572abe2d150fa9d34739a61d26..8452a907acecbd520f94d8ee83da1d162e958ec7 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<GeometricField<Type, fvsPatchField, surfaceMesh> > + sndGrad + ( + const GeometricField<Type, fvPatchField, volMesh>&, + const word& snGradName = "sndGrad" + ); + //- Return the interpolation weighting factors for the given field virtual tmp<surfaceScalarField> deltaCoeffs ( diff --git a/src/meshTools/AMIInterpolation/patches/cyclic/cyclicAMIPolyPatch/cyclicAMIPolyPatchI.H b/src/meshTools/AMIInterpolation/patches/cyclic/cyclicAMIPolyPatch/cyclicAMIPolyPatchI.H index 88d2ac02b6ccf2fe95b57a2e6c0acd3873531c16..6d726e9df7a679208168c58f3feb6683693bacf1 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 72ffa9b2c765fd6e9ba952d45c05e7e816f2d75e..0ef785383ba27d03ac8c22d84be37cdd0192ea80 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 592c24fb7bcab6ee23d95b3c08669ba5e80daea1..1a8d82e5f6c3e83346c1a461d1809698cef20447 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 6a41b103faffd19587728053472a607859310e63..3503308e422347620127daecb09212fa12e32175 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 9e33384c0dd6f604739c03f43344451cfb72e906..40e5c5d7110ff3fe5a5c5a79cdd6b72c2c66e73e 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 6e925365d840ac3f26ea13b258c625ffef580949..3231dd95cd36104c06616ad0fa831a457c1f3baf 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 409ac0dbf555c9ca7e78f4769c1d02fd3af2e712..0bb570e4806b5ee41ae936bd12d05aa6381a39d7 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 5a2ef08242d0bcecb3650597894b8b397eea92c1..cc64844d0df9b9da1844ecae8e94057901dbde2c 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 97774e587fa4a74da173565e537cac6d8c7f5ac5..671f3785f6be6a8d77e0c3d4deeffe13c97e559e 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 88d665ea1487ff94348c74579f640f00bfcf3717..5f3e98af90d52edb319a805e95b9bbd9cf4491e2 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 187541c1569291403b67d3f64635e6527afda61d..5d46f8ad4b5128e3d6748e2a8d3009042a6d8ab0 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 b93acdb74587a72446deb8eb18c4aa9ed744611f..53e677eaa656ce4adcf6b5b8c8119bd55f0f441d 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 0e3b6625bf125260d2f27a65af53f52420239dc8..c169a98ca16106a7515fed0212aeab7b218b4347 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 3eddc44e93dda100053da41202d99cd38427304d..d4bdfb3dff2a7f740ba82ef1a1a3e6ed80723682 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 5bfc37a8623eea846dd94fa7412721b385f8f72e..030bcbe4008458e21b07295919f71a9438c031c4 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 313dcceba1abd7b93d57320c4c674f1734692506..43b78ef4111bd17a26b37dd07818415f04eac737 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 9b8e73ecfd9cd5aa8d8300034ab96dc76e98ad78..123fc6be271cf0b98d8ab3ac8dff9ed781fb9d26 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 313dcceba1abd7b93d57320c4c674f1734692506..43b78ef4111bd17a26b37dd07818415f04eac737 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 cbbcc3aebf1d66be973620bc24c7b867d2b14c96..5a75819a1282a444688a63d94cdde2030a788cf2 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 443a3a5794d3858d18108117113c4d73264bc7fe..ad81499bb61a98f3c7a7583dd0bcbc28aebffe6a 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 c3da61bd8ccedea26df22b891bcf5d95f322dd66..f37b2684f5f06a9a08cb9824cdf5565ef8530dfa 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 0000000000000000000000000000000000000000..fc9136aea51b1f0ea208ef462afc59dbbb9b3693 --- /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 0000000000000000000000000000000000000000..75b5887193055fc87ce8120145c5e72d0c335399 --- /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 90634c33c1e1062bf0d37d557799eeecdc5a9651..c37109987b9f66122fdddb9d394a3ccaea0e059a 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 c1fa13b51446b5542510ea79508d471443fa0ce2..6e0ae20fd8fd38dab56c824a87642acadfa018b0 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;