diff --git a/.gitignore b/.gitignore index 1b8ce3cde3..e2c6f9b41f 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,8 @@ doc/[Dd]oxygen/man # untracked configuration files /etc/prefs.csh /etc/prefs.sh +/etc/config/*.csh +/etc/config/*.sh # source packages - anywhere *.tar.bz2 diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev index 9ba620e2dc..5f25edc276 100644 --- a/ReleaseNotes-dev +++ b/ReleaseNotes-dev @@ -266,8 +266,6 @@ internal field instead of boundary field. + =ensight=: new output format for all sampledSurfaces. + Function objects: - + =residualControl=: new function object to allow users to terminate steady - state calculations when the defined residual levels are achieved + =abortCalculation=: watches for presence of the named file in the $FOAM_CASE directory and aborts the calculation if it is present + =timeActivatedFileUpdate=: performs a file copy/replacement once a diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C index c58339940e..4817928910 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index ed860d9ca9..d97dd54463 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/reactingFoam/chemistry.H b/applications/solvers/combustion/reactingFoam/chemistry.H index 3a36aaac52..99f418af6f 100644 --- a/applications/solvers/combustion/reactingFoam/chemistry.H +++ b/applications/solvers/combustion/reactingFoam/chemistry.H @@ -1,3 +1,4 @@ +if (chemistry.chemistry()) { Info<< "Solving chemistry" << endl; @@ -10,17 +11,29 @@ // turbulent time scale if (turbulentReaction) { - volScalarField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - volScalarField tc - ( - chemistry.tc() - ); + tmp tepsilon(turbulence->epsilon()); + const volScalarField& epsilon = tepsilon(); + tmp tmuEff(turbulence->muEff()); + const volScalarField& muEff = tmuEff(); + tmp ttc(chemistry.tc()); + const volScalarField& tc = ttc(); - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); + forAll(epsilon, i) + { + if (epsilon[i] > 0) + { + // Chalmers PaSR model + scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]); + kappa[i] = + (runTime.deltaTValue() + tc[i]) + /(runTime.deltaTValue() + tc[i] + tk); + } + else + { + // Return to laminar combustion + kappa[i] = 1.0; + } + } } else { diff --git a/applications/solvers/combustion/rhoReactingFoam/Make/options b/applications/solvers/combustion/rhoReactingFoam/Make/options index 6386af8c55..d6306816fd 100644 --- a/applications/solvers/combustion/rhoReactingFoam/Make/options +++ b/applications/solvers/combustion/rhoReactingFoam/Make/options @@ -5,7 +5,9 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(FOAM_SOLVERS)/combustion/reactingFoam + EXE_LIBS = \ -lcompressibleTurbulenceModel \ diff --git a/applications/solvers/combustion/rhoReactingFoam/chemistry.H b/applications/solvers/combustion/rhoReactingFoam/chemistry.H deleted file mode 100644 index 841b434a71..0000000000 --- a/applications/solvers/combustion/rhoReactingFoam/chemistry.H +++ /dev/null @@ -1,28 +0,0 @@ -{ - Info<< "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - if (turbulentReaction) - { - volScalarField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - volScalarField tc(chemistry.tc()); - - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); - } - else - { - kappa = 1.0; - } - - chemistrySh = kappa*chemistry.Sh()(); -} diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C index a0b356578b..262b9da61f 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupledDerivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options index 1ff1aaa612..91ee4a594d 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/Make/options @@ -19,7 +19,8 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -lfiniteVolume \ @@ -42,4 +43,5 @@ EXE_LIBS = \ -lradiationModels \ -lODE \ -lregionModels \ - -lsurfaceFilmModels + -lsurfaceFilmModels \ + -lsampling diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/readTimeControls.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/readTimeControls.H index 5513848c64..b73efd593e 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/readTimeControls.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/readTimeControls.H @@ -27,13 +27,16 @@ License scalar maxCo(readScalar(pimple.dict().lookup("maxCo"))); // Maximum time scale -scalar maxDeltaT = readScalar(pimple.dict().lookup("maxDeltaT")); +scalar maxDeltaT(pimple.dict().lookupOrDefault("maxDeltaT", GREAT)); // Smoothing parameter (0-1) when smoothing iterations > 0 -scalar alphaTauSmooth(pimple.dict().lookupOrDefault("alphaTauSmooth", 0.1)); +scalar rDeltaTSmoothingCoeff +( + pimple.dict().lookupOrDefault("rDeltaTSmoothingCoeff", 0.1) +); // Maximum change in cell temperature per iteration (relative to previous value) -scalar alphaTauTemp(pimple.dict().lookupOrDefault("alphaTauTemp", 0.05)); +scalar alphaTemp(pimple.dict().lookupOrDefault("alphaTemp", 0.05)); // ************************************************************************* // diff --git a/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H b/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H index d93b5a40ed..e6d0fa85c4 100644 --- a/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H +++ b/applications/solvers/lagrangian/LTSReactingParcelFoam/timeScales.H @@ -82,7 +82,7 @@ Info<< "Time scales min/max:" << endl; /rho ); - tau = alphaTauTemp*thermo.Cp()*T/(tau + ROOTVSMALL); + tau = alphaTemp*thermo.Cp()*T/(tau + ROOTVSMALL); Info<< " Temperature = " << min(maxDeltaT, gMin(tau)) << ", " << min(maxDeltaT, gMax(tau)) << endl; @@ -105,7 +105,7 @@ Info<< "Time scales min/max:" << endl; // Spatially smooth the time scale field // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - fvc::smooth(rDeltaT, alphaTauSmooth); + fvc::smooth(rDeltaT, rDeltaTSmoothingCoeff); Info<< " Overall = " << min(1/rDeltaT).value() << ", " << max(1/rDeltaT).value() << nl << endl; diff --git a/applications/solvers/lagrangian/coalChemistryFoam/Make/options b/applications/solvers/lagrangian/coalChemistryFoam/Make/options index ab0bd2c08a..f2f8d1e758 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/Make/options +++ b/applications/solvers/lagrangian/coalChemistryFoam/Make/options @@ -19,7 +19,10 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(FOAM_SOLVERS)/combustion/reactingFoam + EXE_LIBS = \ -lfiniteVolume \ @@ -43,4 +46,5 @@ EXE_LIBS = \ -lradiationModels \ -lregionModels \ -lsurfaceFilmModels \ - -lODE + -lODE \ + -lsampling diff --git a/applications/solvers/lagrangian/coalChemistryFoam/chemistry.H b/applications/solvers/lagrangian/coalChemistryFoam/chemistry.H deleted file mode 100644 index a1a5cb39ba..0000000000 --- a/applications/solvers/lagrangian/coalChemistryFoam/chemistry.H +++ /dev/null @@ -1,32 +0,0 @@ -if (chemistry.chemistry()) -{ - Info<< "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - if (turbulentReaction) - { - DimensionedField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - DimensionedField tc - ( - chemistry.tc()().dimensionedInternalField() - ); - - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); - } - else - { - kappa = 1.0; - } - - chemistrySh = kappa*chemistry.Sh()(); -} diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options index f7bb7d2f2d..0786933541 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelDyMFoam/Make/options @@ -14,7 +14,8 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ @@ -33,4 +34,5 @@ EXE_LIBS = \ -lsurfaceFilmModels \ -ldynamicMesh \ -ldynamicFvMesh \ - -ltopoChangerFvMesh + -ltopoChangerFvMesh \ + -lsampling diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options index 1de2ec74de..58d80278f8 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/Make/options @@ -12,6 +12,7 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -llagrangian \ @@ -26,4 +27,5 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lregionModels \ - -lsurfaceFilmModels + -lsurfaceFilmModels \ + -lsampling diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options index 1ff1aaa612..f2dffe2998 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/Make/options @@ -19,7 +19,10 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(FOAM_SOLVERS)/combustion/reactingFoam + EXE_LIBS = \ -lfiniteVolume \ @@ -42,4 +45,5 @@ EXE_LIBS = \ -lradiationModels \ -lODE \ -lregionModels \ - -lsurfaceFilmModels + -lsurfaceFilmModels \ + -lsampling diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/chemistry.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/chemistry.H deleted file mode 100644 index 1690487b45..0000000000 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/chemistry.H +++ /dev/null @@ -1,31 +0,0 @@ -{ - Info<< "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - if (turbulentReaction) - { - DimensionedField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - DimensionedField tc - ( - chemistry.tc()().dimensionedInternalField() - ); - - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); - } - else - { - kappa = 1.0; - } - - chemistrySh = kappa*chemistry.Sh()(); -} diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options index 1efc598b5b..6e225cc092 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options @@ -18,7 +18,10 @@ EXE_INC = \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/intermediate/lnInclude \ - -I$(LIB_SRC)/ODE/lnInclude + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(FOAM_SOLVERS)/combustion/reactingFoam + EXE_LIBS = \ -lfiniteVolume \ @@ -37,4 +40,5 @@ EXE_LIBS = \ -lradiationModels \ -lsurfaceFilmModels \ -llagrangianIntermediate \ - -lODE + -lODE \ + -lsampling diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/chemistry.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/chemistry.H deleted file mode 100644 index ce36fa0d1b..0000000000 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/chemistry.H +++ /dev/null @@ -1,32 +0,0 @@ -if (chemistry.chemistry()) -{ - Info << "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - if (turbulentReaction) - { - DimensionedField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - DimensionedField tc - ( - chemistry.tc()().dimensionedInternalField() - ); - - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); - } - else - { - kappa = 1.0; - } - - chemistrySh = kappa*chemistry.Sh()(); -} diff --git a/applications/solvers/lagrangian/reactingParcelFoam/Make/options b/applications/solvers/lagrangian/reactingParcelFoam/Make/options index fb54b88e26..fc312bb5fa 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/Make/options +++ b/applications/solvers/lagrangian/reactingParcelFoam/Make/options @@ -18,7 +18,10 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(FOAM_SOLVERS)/combustion/reactingFoam + EXE_LIBS = \ -lfiniteVolume \ @@ -41,4 +44,5 @@ EXE_LIBS = \ -lradiationModels \ -lODE \ -lregionModels \ - -lsurfaceFilmModels + -lsurfaceFilmModels \ + -lsampling diff --git a/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H b/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H deleted file mode 100644 index 1690487b45..0000000000 --- a/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H +++ /dev/null @@ -1,31 +0,0 @@ -{ - Info<< "Solving chemistry" << endl; - - chemistry.solve - ( - runTime.value() - runTime.deltaTValue(), - runTime.deltaTValue() - ); - - // turbulent time scale - if (turbulentReaction) - { - DimensionedField tk - ( - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()) - ); - DimensionedField tc - ( - chemistry.tc()().dimensionedInternalField() - ); - - // Chalmers PaSR model - kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); - } - else - { - kappa = 1.0; - } - - chemistrySh = kappa*chemistry.Sh()(); -} diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options index d302015a31..7a7ddc0432 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/Make/options @@ -9,7 +9,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ -llagrangian \ @@ -24,4 +25,5 @@ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lregionModels \ - -lsurfaceFilmModels + -lsurfaceFilmModels \ + -lsampling diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C index 74cffd7495..10ea651604 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/LTSInterFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C index b28d976832..c8beecc361 100644 --- a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C +++ b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,12 +28,33 @@ Description Read the dictionary provided as an argument, expand the macros etc. and write the resulting dictionary to standard output. +Usage + - expandDictionary inputDict [OPTION] + + \param -list \n + Report the #include/#includeIfPresent to stdout only. + +Note + The \c -list option can be useful when determining which files + are actually included by a directory. It can also be used to + determine which files may need to be copied when transferring + simulation to another environment. The following code snippet + could be a useful basis for such cases: + + \verbatim + for i in . 0 constant system + do + find $i -maxdepth 1 -type f -exec expandDictionary -list '{}' \; + done | sed -ne '/^"\//!{ s/^"//; s/"$//; p }' | sort | uniq + \endverbatim + \*---------------------------------------------------------------------------*/ #include "argList.H" #include "IFstream.H" #include "IOobject.H" #include "dictionary.H" +#include "includeEntry.H" using namespace Foam; @@ -48,6 +69,12 @@ int main(int argc, char *argv[]) "the resulting dictionary to standard output." ); + argList::addBoolOption + ( + "list", + "Report the #include/#includeIfPresent to stdout only" + ); + argList::noBanner(); argList::noParallel(); argList::validArgs.append("inputDict"); @@ -55,12 +82,22 @@ int main(int argc, char *argv[]) const string dictName = args[1]; - IOobject::writeBanner(Info) - <<"//\n// " << dictName << "\n//\n"; + const bool listOpt = args.optionFound("list"); - dictionary(IFstream(dictName)(), true).write(Info, false); + if (listOpt) + { + Foam::functionEntries::includeEntry::report = true; + } - IOobject::writeDivider(Info); + dictionary dict(IFstream(dictName)(), true); + + if (!listOpt) + { + IOobject::writeBanner(Info) + <<"//\n// " << dictName << "\n//\n"; + dict.write(Info, false); + IOobject::writeDivider(Info); + } return 0; } diff --git a/applications/utilities/surface/surfaceMeshInfo/Make/files b/applications/utilities/surface/surfaceMeshInfo/Make/files new file mode 100644 index 0000000000..a008b33fd2 --- /dev/null +++ b/applications/utilities/surface/surfaceMeshInfo/Make/files @@ -0,0 +1,3 @@ +surfaceMeshInfo.C + +EXE = $(FOAM_APPBIN)/surfaceMeshInfo diff --git a/applications/utilities/surface/surfaceMeshInfo/Make/options b/applications/utilities/surface/surfaceMeshInfo/Make/options new file mode 100644 index 0000000000..42b30c8652 --- /dev/null +++ b/applications/utilities/surface/surfaceMeshInfo/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/surfMesh/lnInclude + +EXE_LIBS = -lmeshTools -lsurfMesh diff --git a/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C b/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C new file mode 100644 index 0000000000..0e08e333fd --- /dev/null +++ b/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C @@ -0,0 +1,177 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\/ 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 . + +Application + surfaceMeshInfo + +Description + Miscellaneous information about surface meshes + +Usage + - surfaceMeshInfo surfaceFile [OPTION] + + \param -areas \n + Report area for each face. + + \param -scale \ \n + Specify a scaling factor when reading files. + + \param -xml \n + Write output in XML format. + +Note + The filename extensions are used to determine the file format type. + + The XML-like output can be useful for extraction with other tools, + but either output format can be easily extracted with a simple sed + command: + \verbatim + surfaceMeshInfo surfaceFile -areas | \ + sed -ne '/areas/,/:/{ /:/!p }' + + surfaceMeshInfo surfaceFile -areas -xml | \ + sed -ne '/::canRead(importName, true)) + { + return 1; + } + + const bool writeXML = args.optionFound("xml"); + const bool writeAreas = args.optionFound("areas"); + + + // use UnsortedMeshedSurface, not MeshedSurface to maintain ordering + UnsortedMeshedSurface surf(importName); + + scalar scaling = 0; + if (args.optionReadIfPresent("scale", scaling) && scaling > 0) + { + Info<< " -scale " << scaling << endl; + surf.scalePoints(scaling); + } + + scalar areaTotal = 0; + + if (writeXML) + { + Info<<"" << nl + <<"" << nl + << "" << surf.nPoints() << "" << nl + << "" << surf.size() << "" << nl; + + if (writeAreas) + { + Info<<"" << nl; + } + } + else + { + Info<< "nPoints : " << surf.nPoints() << nl + << "nFaces : " << surf.size() << nl; + + if (writeAreas) + { + Info<< "areas : " << nl; + } + } + + forAll(surf, faceI) + { + const scalar fArea(surf[faceI].mag(surf.points())); + areaTotal += fArea; + + if (writeAreas) + { + Info<< fArea << nl; + } + } + + if (writeXML) + { + if (writeAreas) + { + Info<<"" << nl; + } + + Info<< "" << areaTotal << "" << nl + << "" << nl; + } + else + { + Info<< "area : " << areaTotal << nl; + } + + return 0; +} + +// ************************************************************************* // diff --git a/bin/foamEtcFile b/bin/foamEtcFile index a6859b6ae5..8a1f5d97e6 100755 --- a/bin/foamEtcFile +++ b/bin/foamEtcFile @@ -38,9 +38,13 @@ # && _foamSource $foamPrefs # \endcode # +# Note +# This script must exist in /OpenFOAM-/bin/ +# or /openfoam/bin/ (for the debian version) +# #------------------------------------------------------------------------------- usage() { - [ "$quietOpt" = true ] && exit 1 + [ "${quietOpt:-$silentOpt}" = true ] && exit 1 exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -53,6 +57,7 @@ options: -mode any combination of u(user), g(group), o(other) -prefix specify an alternative installation prefix -quiet suppress all normal output + -silent suppress all stderr output -version specify an alternative OpenFOAM version in the form Maj.Min.Rev (eg, 1.7.0) -help print the usage @@ -72,13 +77,9 @@ USAGE exit 1 } -# -# This script must exist in /OpenFOAM-/bin/ -# or /openfoam/bin/ (for the debian version) -# #------------------------------------------------------------------------------- -# the bindir: +# the bin dir: binDir="${0%/*}" # the project dir: @@ -128,7 +129,7 @@ esac # default mode is 'ugo' mode=ugo -unset listOpt quietOpt +unset listOpt quietOpt silentOpt # parse options while [ "$#" -gt 0 ] @@ -162,6 +163,9 @@ do -q | -quiet) quietOpt=true ;; + -s | -silent) + silentOpt=true + ;; -v | -version) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" version="$2" @@ -241,7 +245,7 @@ then # list directories, or potential file locations [ "$nArgs" -le 1 ] || usage - # a silly combination, but -quiet has precedence + # a silly combination, but -quiet does have precedence [ "$quietOpt" = true ] && exit 0 for dir diff --git a/bin/foamExec b/bin/foamExec index 26ad311349..fba65934cc 100755 --- a/bin/foamExec +++ b/bin/foamExec @@ -31,12 +31,21 @@ # Runs the version of executable # with the rest of the arguments. # -# Can also be used for parallel runs e.g. -# mpirun -np \ -# foamExec -v ... -parallel +# Can also be used for parallel runs. For example, +# \code +# mpirun -np \ +# foamExec -version ... -parallel +# \endcode +# +# Note +# This script must exist in /OpenFOAM-/bin/ +# or /openfoam/bin/ (for the debian version) +# +# foamEtcFile must be found in the same directory as this script # # SeeAlso # foamEtcFile +# #------------------------------------------------------------------------------ usage() { exec 1>&2 @@ -46,9 +55,11 @@ usage() { Usage: ${0##*/} [OPTION] ... options: + -prefix specify an alternative installation prefix + pass through to foamEtcFile and set as FOAM_INST_DIR -version specify an alternative OpenFOAM version pass through to foamEtcFile - -help this usage + -help print the usage * run a particular OpenFOAM version of @@ -56,13 +67,21 @@ USAGE exit 1 } -# -# This script must exist in /OpenFOAM-/bin/ -# or /openfoam/bin/ (for the debian version) -# -# foamEtcFile must be found in the same directory as this script #------------------------------------------------------------------------------- +# the bin dir: +binDir="${0%/*}" + +# the project dir: +projectDir="${binDir%/bin}" + +# the prefix dir (same as foamInstall): +prefixDir="${projectDir%/*}" + +# # the name used for the project directory +# projectDirName="${projectDir##*/}" + + unset etcOpts version # parse options while [ "$#" -gt 0 ] @@ -71,15 +90,21 @@ do -h | -help) usage ;; - -v | -version) + -m | -mode) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - version="$2" etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile shift ;; - -m | -mode | -p | -prefix) + -p | -prefix) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile + prefixDir="$2" + shift + ;; + -v | -version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + etcOpts="$etcOpts $1 $2" # pass-thru to foamEtcFile + version="$2" shift ;; --) @@ -96,22 +121,21 @@ do shift done - # # Find and source OpenFOAM settings (bashrc) # placed in function to preserve command-line arguments # sourceRc() { - # default is the current version - : ${version:=${WM_PROJECT_VERSION:-unknown}} - - foamDotFile="$(${0%/*}/foamEtcFile $etcOpts bashrc)" || { - echo "Error : bashrc file could not be found for OpenFOAM-$version" 1>&2 + foamDotFile="$($binDir/foamEtcFile $etcOpts bashrc)" || { + echo "Error : bashrc file could not be found for OpenFOAM-${version:-${WM_PROJECT_VERSION:-???}}" 1>&2 exit 1 } - . $foamDotFile + # set to consistent value before sourcing the bashrc + export FOAM_INST_DIR="$prefixDir" + + . $foamDotFile $FOAM_SETTINGS } diff --git a/bin/foamJob b/bin/foamJob index 4380b3e147..70e2c39f28 100755 --- a/bin/foamJob +++ b/bin/foamJob @@ -26,6 +26,8 @@ # foamJob # # Description +# Run an OpenFOAM job in background. +# Redirects the output to 'log' in the case directory. # #------------------------------------------------------------------------------ usage() { @@ -36,9 +38,9 @@ usage() { Usage: ${0##*/} [OPTION] ... options: -case specify alternative case directory, default is the cwd - -p parallel run of processors - -s also sends output to screen - -v specify OpenFOAM version + -parallel parallel run of processors + -screen also sends output to screen + -version specify an alternative OpenFOAM version -help print the usage * run an OpenFOAM job in background. @@ -95,23 +97,22 @@ do usage ;; -case) - [ "$#" -ge 2 ] || usage "'-case' option requires an argument" - caseDir=$2 + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + cd "$2" 2>/dev/null || usage "directory does not exist: '$2'" shift 2 - cd "$caseDir" 2>/dev/null || usage "directory does not exist: '$caseDir'" ;; - -p) + -p | -parallel) parallelOpt=true shift ;; - -s) + -s | -screen) screenOpt=true shift ;; - -v) - shift - version=$1 - shift + -v | -version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + version="$2" + shift 2 ;; --) shift @@ -126,29 +127,32 @@ do esac done -if [ "$#" -lt 1 ] -then - usage "No application specified" -fi +[ "$#" -ge 1 ] || usage "No application specified" -# use foamExec for a specified version and for remote (parallel) runs + +# use foamExec for a specified version +# also need foamExec for remote (parallel) runs if [ -n "$version" -o "$parallelOpt" = true ] then - APPLICATION=`findExec foamExec` - if [ $? -ne 0 ] + # when possible, determine if application even exists + if [ -z "$version" ] then - usage "'foamExec' not found" + findExec $1 >/dev/null || usage "Application '$1' not found" fi - if [ -n "$version" ] + + # use foamExec for dispatching + APPLICATION=`findExec foamExec` || usage "'foamExec' not found" + + [ -n "$version" ] && APPLICATION="$APPLICATION -version $version" + + # attempt to preserve the installation directory 'FOAM_INST_DIR' + if [ -d "$FOAM_INST_DIR" ] then - APPLICATION="$APPLICATION -v $version" + APPLICATION="$APPLICATION -prefix $FOAM_INST_DIR" fi + else - APPLICATION=`findExec $1` - if [ $? -ne 0 ] - then - usage "Application '$1' executable not found" - fi + APPLICATION=`findExec $1` || usage "Application '$1' not found" echo "Application : $1" shift fi @@ -182,11 +186,7 @@ then # # locate mpirun # - mpirun=`findExec mpirun` - if [ $? -ne 0 ] - then - usage "'mpirun' not found" - fi + mpirun=`findExec mpirun` || usage "'mpirun' not found" mpiopts="-np $NPROCS" # @@ -217,10 +217,10 @@ then # if [ "$screenOpt" = true ] then - echo "Executing: mpirun $mpiopts $APPLICATION $@ -parallel | tee log" - $mpirun $mpiopts $APPLICATION $@ -parallel | tee log + echo "Executing: $mpirun $mpiopts $APPLICATION $@ -parallel | tee log" + $mpirun $mpiopts $APPLICATION $@ -parallel | tee log else - echo "Executing: mpirun $mpiopts $APPLICATION $@ -parallel > log 2>&1" + echo "Executing: $mpirun $mpiopts $APPLICATION $@ -parallel > log 2>&1" $mpirun $mpiopts $APPLICATION $@ -parallel > log 2>&1 & fi diff --git a/doc/changes/inotify.txt b/doc/changes/inotify.txt index 0f91d7c03b..74e2fc7bb4 100644 --- a/doc/changes/inotify.txt +++ b/doc/changes/inotify.txt @@ -55,15 +55,25 @@ timestamps as before or the (linux-specific) 'inotify' system framework - the slave processor directories have no system directory and the constant directory only contains the mesh. - start the job in distributed mode by specifying the slave roots - (so one less than the number of processors) with - the -roots command line option: + (so one fewer than the number of processors) with + the -roots command-line option: - mpirun -np 2 icoFoam -roots '("/tmp")' -parallel + mpirun -np 4 icoFoam -roots '("/tmp" "/tmp" "/tmp")' -parallel - the alternative to the -roots option is to have a cavity/system/decomposeParDict on the master with distributed yes; - roots ("/tmp"); + roots ("/tmp" "/tmp" "/tmp"); + + - as a convenience for cases when the slave roots are identical, + a single root entry is interpreted as being the same for all slaves. + With the -roots command-line option, this can take one of two forms: + + mpirun -np 4 icoFoam -roots '("/tmp")' -parallel + + or simply + + mpirun -np 4 icoFoam -roots '"/tmp"' -parallel Details: diff --git a/etc/apps/paraview3/bashrc b/etc/apps/paraview3/bashrc index e0e6122946..1dd5386829 100644 --- a/etc/apps/paraview3/bashrc +++ b/etc/apps/paraview3/bashrc @@ -56,16 +56,22 @@ export ParaView_MAJOR=detect # Evaluate command-line parameters for ParaView -while [ $# -gt 0 ] -do - case "$1" in - ParaView*=*) - # name=value -> export name=value - eval "export $1" - ;; - esac - shift -done +_foamParaviewEval() +{ + while [ $# -gt 0 ] + do + case "$1" in + ParaView*=*) + # name=value -> export name=value + eval "export $1" + ;; + esac + shift + done +} + +# Evaluate command-line parameters +_foamParaviewEval $@ # set MAJOR version to correspond to VERSION @@ -108,6 +114,7 @@ else fi +unset _foamParaviewEval unset cleaned cmake paraviewInstDir paraviewPython # ----------------------------------------------------------------------------- diff --git a/etc/bashrc b/etc/bashrc index 2de27d0513..d2539c5b50 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -144,6 +144,10 @@ _foamEval() while [ $# -gt 0 ] do case "$1" in + -*) + # stray option (not meant for us here) -> get out + break + ;; *=) # name= -> unset name [ "$FOAM_VERBOSE" -a "$PS1" ] && echo "unset ${1%=}" @@ -160,7 +164,7 @@ _foamEval() then _foamSource "$1" else - _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile "$1"` + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"` fi ;; esac diff --git a/etc/config/compiler.csh-EXAMPLE b/etc/config/compiler.csh-EXAMPLE new file mode 100644 index 0000000000..6d54edbd47 --- /dev/null +++ b/etc/config/compiler.csh-EXAMPLE @@ -0,0 +1,51 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/compiler.csh +# +# Description +# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.csh +# +#------------------------------------------------------------------------------ + +# Modified compiler settings +switch ("$WM_COMPILER") +case Gcc46: +case Gcc46++0x: + set gcc_version=gcc-4.6.0 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 + set mpc_version=mpc-0.8.1 + breaksw +case Gcc45: +case Gcc45++0x: + set gcc_version=gcc-4.5.2 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 + set mpc_version=mpc-0.8.1 + breaksw +endsw + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/config/compiler.sh-EXAMPLE b/etc/config/compiler.sh-EXAMPLE new file mode 100644 index 0000000000..bc6aada36e --- /dev/null +++ b/etc/config/compiler.sh-EXAMPLE @@ -0,0 +1,49 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/compiler.sh +# +# Description +# Fine tuning of ThirdParty compiler settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.sh +# +#------------------------------------------------------------------------------ + +# Modified compiler settings +case "$WM_COMPILER" in +Gcc46 | Gcc46++0x) + gcc_version=gcc-4.6.0 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 + mpc_version=mpc-0.8.1 + ;; +Gcc45 | Gcc45++0x) + gcc_version=gcc-4.5.2 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 + mpc_version=mpc-0.8.1 + ;; +esac + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/config/openmpi.csh-EXAMPLE b/etc/config/openmpi.csh-EXAMPLE new file mode 100644 index 0000000000..94be702e9d --- /dev/null +++ b/etc/config/openmpi.csh-EXAMPLE @@ -0,0 +1,36 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/openmpi.csh +# +# Description +# Fine tuning of openmpi settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.csh +# +#------------------------------------------------------------------------------ + +# Modified openmpi settings +setenv FOAM_MPI openmpi-1.4.3 + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/config/openmpi.sh-EXAMPLE b/etc/config/openmpi.sh-EXAMPLE new file mode 100644 index 0000000000..b7c5035b04 --- /dev/null +++ b/etc/config/openmpi.sh-EXAMPLE @@ -0,0 +1,36 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. +# \\/ 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 . +# +# File +# config/openmpi.sh +# +# Description +# Fine tuning of openmpi settings for OpenFOAM +# Sourced from OpenFOAM-/etc/settings.sh +# +#------------------------------------------------------------------------------ + +# Modified openmpi settings +export FOAM_MPI=openmpi-1.4.3 + +# ----------------------------------------------------------------- end-of-file diff --git a/etc/cshrc b/etc/cshrc index a23a607fff..c2c1b12a9b 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -142,6 +142,10 @@ _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh` setenv FOAM_SETTINGS "${*}" while ( $#argv > 0 ) switch ($argv[1]) + case -*: + # stray option (not meant for us here) -> get out + break + breaksw case *=: # name= -> unsetenv name if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//" @@ -157,7 +161,7 @@ while ( $#argv > 0 ) if ( -f "$1" ) then _foamSource "$1" else - _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile "$1"` + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"` endif breaksw endsw diff --git a/etc/settings.csh b/etc/settings.csh index 5b4c41df82..b3daf1e288 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -248,6 +248,9 @@ case ThirdParty: breaksw endsw + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.csh` + if ( $?gcc_version ) then set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version @@ -367,8 +370,10 @@ unsetenv MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN switch ("$WM_MPLIB") case OPENMPI: - #setenv FOAM_MPI openmpi-1.4.3 setenv FOAM_MPI openmpi-1.5.3 + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.csh` + setenv MPI_ARCH_PATH $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI # Tell OpenMPI where to find its install directory diff --git a/etc/settings.sh b/etc/settings.sh index 84c6fd0bc1..954868dad1 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -265,6 +265,9 @@ OpenFOAM | ThirdParty) ;; esac + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/compiler.sh` + if [ -n "$gcc_version" ] then gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version @@ -387,8 +390,10 @@ unset MPI_ARCH_PATH MPI_HOME FOAM_MPI_LIBBIN case "$WM_MPLIB" in OPENMPI) - #export FOAM_MPI=openmpi-1.4.3 export FOAM_MPI=openmpi-1.5.3 + # optional configuration tweaks: + _foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/openmpi.sh` + export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI # Tell OpenMPI where to find its install directory diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C index ee20e33191..c45ef4f291 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,6 +39,9 @@ const Foam::word Foam::functionEntries::includeEntry::typeName // might include includeEntry int Foam::functionEntries::includeEntry::debug(0); +bool Foam::functionEntries::includeEntry::report(false); + + namespace Foam { namespace functionEntries @@ -89,10 +92,15 @@ bool Foam::functionEntries::includeEntry::execute Istream& is ) { - IFstream ifs(includeFileName(is)); + const fileName fName(includeFileName(is)); + IFstream ifs(fName); if (ifs) { + if (Foam::functionEntries::includeEntry::report) + { + Info<< fName << endl; + } parentDict.read(ifs); return true; } @@ -119,10 +127,15 @@ bool Foam::functionEntries::includeEntry::execute Istream& is ) { - IFstream ifs(includeFileName(is)); + const fileName fName(includeFileName(is)); + IFstream ifs(fName); if (ifs) { + if (Foam::functionEntries::includeEntry::report) + { + Info<< fName << endl; + } entry.read(parentDict, ifs); return true; } diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H index 5145b742ae..be99bf588a 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeEntry/includeEntry.H @@ -82,6 +82,12 @@ protected: public: + // Static data members + + //- Report which file is included to stdout + static bool report; + + //- Runtime type information ClassName("include"); diff --git a/src/OpenFOAM/db/dictionary/functionEntries/includeIfPresentEntry/includeIfPresentEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/includeIfPresentEntry/includeIfPresentEntry.C index 86f1618163..8e1bc9b7f1 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/includeIfPresentEntry/includeIfPresentEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/includeIfPresentEntry/includeIfPresentEntry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,10 +69,15 @@ bool Foam::functionEntries::includeIfPresentEntry::execute Istream& is ) { - IFstream ifs(includeFileName(is)); + const fileName fName(includeFileName(is)); + IFstream ifs(fName); if (ifs) { + if (Foam::functionEntries::includeEntry::report) + { + Info<< fName << endl; + } parentDict.read(ifs); } @@ -87,10 +92,15 @@ bool Foam::functionEntries::includeIfPresentEntry::execute Istream& is ) { - IFstream ifs(includeFileName(is)); + const fileName fName(includeFileName(is)); + IFstream ifs(fName); if (ifs) { + if (Foam::functionEntries::includeEntry::report) + { + Info<< fName << endl; + } entry.read(parentDict, ifs); } diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C index 56402b28e5..78b696fa5a 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H index 61a49e60cd..2d5003a2e5 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . Class Foam::dynamicCode diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C index 93d6ebbdd7..48691501ee 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H index 8ff83b0724..2aa4403137 100644 --- a/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H +++ b/src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCodeContext.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . Class Foam::dynamicCodeContext diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C index f81e6427f1..1a10d52c31 100644 --- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C +++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H index 0133167ee7..c2c3ded50f 100644 --- a/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H +++ b/src/OpenFOAM/db/functionObjects/IOOutputFilter/IOOutputFilter.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C index 4f21fb5afa..37fd27a36d 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H index d0adec4e9c..e4c763005c 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 721f61e949..83859ea173 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H index dc4f144951..c688b6dae1 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index d58eaf4311..937b789c44 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H index 0c1f4f7084..58296fcf60 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C index c119eb33fc..91ae13e70f 100644 --- a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C +++ b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H index 3096ed4f2f..edb260a63c 100644 --- a/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H +++ b/src/OpenFOAM/db/functionObjects/outputFilterOutputControl/outputFilterOutputControl.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H b/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H index fbd2a0b702..7be3353624 100644 --- a/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H +++ b/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldFieldI.H b/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldFieldI.H index c44b854979..f724ca74e8 100644 --- a/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldFieldI.H +++ b/src/OpenFOAM/fields/FieldFields/oneFieldField/oneFieldFieldI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H b/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H index ee9d5996f3..94aa81923b 100644 --- a/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H +++ b/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldFieldI.H b/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldFieldI.H index b813d487bc..69902a18ca 100644 --- a/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldFieldI.H +++ b/src/OpenFOAM/fields/FieldFields/zeroFieldField/zeroFieldFieldI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.C b/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.C index 10466a4b1f..888c5a8966 100644 --- a/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.C +++ b/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.H b/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.H index f94c497f9b..976270e65f 100644 --- a/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.H +++ b/src/OpenFOAM/fields/Fields/labelField/labelFieldIOField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.C b/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.C index 9ac585cba5..07a22b365b 100644 --- a/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.C +++ b/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.H b/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.H index f01fbe4bd6..d67704049e 100644 --- a/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.H +++ b/src/OpenFOAM/fields/Fields/scalarField/scalarFieldIOField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H index db192a1980..76b096cb1e 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H index 240615af96..52409d02a5 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricOneField/geometricOneFieldI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H index 1524f7ac70..ec7c6ff48a 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroFieldI.H b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroFieldI.H index 78a154faa4..eecca2bc0d 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroFieldI.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroFieldI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index f055011bce..a020f3e5bd 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -548,10 +548,14 @@ Foam::argList::argList if (options_.found("roots")) { - source = "'-roots' option"; - IStringStream str(options_["roots"]); - str >> roots; - dictNProcs = roots.size()+1; + source = "-roots"; + IStringStream is(options_["roots"]); + roots = readList(is); + + if (roots.size() != 1) + { + dictNProcs = roots.size()+1; + } } else { @@ -579,6 +583,21 @@ Foam::argList::argList } } + // convenience: + // when a single root is specified, use it for all processes + if (roots.size() == 1) + { + const fileName rootName(roots[0]); + roots.setSize(Pstream::nProcs()-1, rootName); + + // adjust dictNProcs for command-line '-roots' option + if (dictNProcs < 0) + { + dictNProcs = roots.size()+1; + } + } + + // Check number of processors. // nProcs => number of actual procs // dictNProcs => number of procs specified in decompositionDict @@ -602,11 +621,6 @@ Foam::argList::argList // distributed data if (roots.size()) { - forAll(roots, i) - { - roots[i].expand(); - } - if (roots.size() != Pstream::nProcs()-1) { FatalError @@ -617,6 +631,11 @@ Foam::argList::argList << exit(FatalError); } + forAll(roots, i) + { + roots[i].expand(); + } + // Distribute the master's argument list (with new root) bool hadCaseOpt = options_.found("case"); for @@ -626,11 +645,7 @@ Foam::argList::argList slave++ ) { - options_.set - ( - "case", - fileName(roots[slave-1])/globalCase_ - ); + options_.set("case", roots[slave-1]/globalCase_); OPstream toSlave(Pstream::scheduled, slave); toSlave << args_ << options_; diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C index 3e8618c17f..fc500af4aa 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H index 3c823f2e19..30c9e8d9eb 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReader.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::tableReader + Foam::csvTableReader Description Reads an interpolation table from a file - CSV-format @@ -44,7 +44,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class csvTableReader Declaration + Class csvTableReader Declaration \*---------------------------------------------------------------------------*/ template @@ -52,26 +52,30 @@ class csvTableReader : public tableReader { - //- does the file have a header line? - const bool headerLine_; + // Private data - //- column of the time - const label timeColumn_; + //- Does the file have a header line? + const bool headerLine_; - //- labels of the components - const labelList componentColumns_; + //- Column of the time + const label timeColumn_; - //- read the next value from the splitted string - Type readValue(const List&); + //- Labels of the components + const labelList componentColumns_; + + //- Read the next value from the splitted string + Type readValue(const List&); + + //- Separator character + const char separator_; - //- separator character - const char separator_; public: //- Runtime type information TypeName("csv"); + // Constructors //- Construct from dictionary @@ -91,8 +95,7 @@ public: //- Destructor - - virtual ~csvTableReader(); + virtual ~csvTableReader(); // Member Functions @@ -102,7 +105,6 @@ public: //- write the remaining parameters virtual void write(Ostream& os) const; - }; diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReaders.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReaders.C index 5893436dd9..a6ffe258d6 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReaders.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/csv/csvTableReaders.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C index 3ad1a87510..10a04b2bb1 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H index dd04df78d6..8cde06f1a7 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReader.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,13 +22,13 @@ License along with OpenFOAM. If not, see . Class - Foam::tableReader + Foam::openFoamTableReader Description Reads an interpolation table from a file - OpenFOAM-format SourceFiles - tableReader.C + openFoamTableReader.C \*---------------------------------------------------------------------------*/ @@ -43,7 +43,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class openFoamTableReader Declaration + Class openFoamTableReader Declaration \*---------------------------------------------------------------------------*/ template @@ -57,6 +57,7 @@ public: //- Runtime type information TypeName("openFoam"); + // Constructors //- Construct from dictionary @@ -76,15 +77,13 @@ public: //- Destructor - - virtual ~openFoamTableReader(); + virtual ~openFoamTableReader(); // Member functions //- Read the table virtual void operator()(const fileName&, List > &); - }; diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C index 8dd7db0a9f..847ac1dabb 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/openFoam/openFoamTableReaders.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C index bcad2aa965..8f8a5548a6 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H index b85af66c10..9020fbd133 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReader.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class tableReader Declaration + Class tableReader Declaration \*---------------------------------------------------------------------------*/ template @@ -91,8 +91,7 @@ public: //- Destructor - - virtual ~tableReader(); + virtual ~tableReader(); // Member functions @@ -106,7 +105,6 @@ public: //- Write additional information virtual void write(Ostream& os) const; - }; diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C index a28c83218f..2500070484 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H index 9507ac2bfb..8e1c8a0561 100644 --- a/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H +++ b/src/OpenFOAM/interpolations/interpolationTable/tableReaders/tableReaders.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/memory/Xfer/Xfer.H b/src/OpenFOAM/memory/Xfer/Xfer.H index dbee0e641b..cf49d6559a 100644 --- a/src/OpenFOAM/memory/Xfer/Xfer.H +++ b/src/OpenFOAM/memory/Xfer/Xfer.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index 7dbd202335..4060404af7 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -491,51 +491,52 @@ void Foam::face::flip() } -Foam::point Foam::face::centre(const pointField& meshPoints) const +Foam::point Foam::face::centre(const pointField& points) const { // Calculate the centre by breaking the face into triangles and // area-weighted averaging their centres + const label nPoints = size(); + // If the face is a triangle, do a direct calculation - if (size() == 3) + if (nPoints) { return (1.0/3.0) *( - meshPoints[operator[](0)] - + meshPoints[operator[](1)] - + meshPoints[operator[](2)] + points[operator[](0)] + + points[operator[](1)] + + points[operator[](2)] ); } - label nPoints = size(); point centrePoint = point::zero; - for (register label pI=0; pI VSMALL) { - return sumAc/(3*sumA); + return sumAc/(3.0*sumA); } else { @@ -556,6 +557,8 @@ Foam::point Foam::face::centre(const pointField& meshPoints) const Foam::vector Foam::face::normal(const pointField& p) const { + const label nPoints = size(); + // Calculate the normal by summing the face triangle normals. // Changed to deal with small concavity by using a central decomposition // @@ -563,7 +566,7 @@ Foam::vector Foam::face::normal(const pointField& p) const // If the face is a triangle, do a direct calculation to avoid round-off // error-related problems // - if (size() == 3) + if (nPoints == 3) { return triPointRef ( @@ -573,12 +576,10 @@ Foam::vector Foam::face::normal(const pointField& p) const ).normal(); } - label nPoints = size(); - register label pI; point centrePoint = vector::zero; - for (pI = 0; pI < nPoints; pI++) + for (pI = 0; pI < nPoints; ++pI) { centrePoint += p[operator[](pI)]; } @@ -588,7 +589,7 @@ Foam::vector Foam::face::normal(const pointField& p) const point nextPoint = centrePoint; - for (pI = 0; pI < nPoints; pI++) + for (pI = 0; pI < nPoints; ++pI) { if (pI < nPoints - 1) { diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.H b/src/OpenFOAM/meshes/meshShapes/face/face.H index 34a66b8524..723d9bbfb7 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.H +++ b/src/OpenFOAM/meshes/meshShapes/face/face.H @@ -178,7 +178,7 @@ public: void flip(); //- Return the points corresponding to this face - inline pointField points(const pointField& meshPoints) const; + inline pointField points(const pointField&) const; //- Centre point of face point centre(const pointField&) const; @@ -187,7 +187,7 @@ public: template Type average(const pointField&, const Field&) const; - //- Scalar magnitude + //- Magnitude of face area inline scalar mag(const pointField&) const; //- Vector normal; magnitude is equal to area of face @@ -228,8 +228,8 @@ public: //- Return potential intersection with face with a ray starting // at p, direction n (does not need to be normalized) - // Does face-center decomposition and returns triangle intersection - // point closest to p. Face-center is calculated from point average. + // Does face-centre decomposition and returns triangle intersection + // point closest to p. Face-centre is calculated from point average. // For a hit, the distance is signed. Positive number // represents the point in front of triangle // In case of miss the point is the nearest point on the face @@ -242,20 +242,20 @@ public: ( const point& p, const vector& n, - const pointField& meshPoints, + const pointField&, const intersection::algorithm alg = intersection::FULL_RAY, const intersection::direction dir = intersection::VECTOR ) const; //- Fast intersection with a ray. - // Does face-center decomposition and returns triangle intersection + // Does face-centre decomposition and returns triangle intersection // point closest to p. See triangle::intersection for details. pointHit intersection ( const point& p, const vector& q, const point& ctr, - const pointField& meshPoints, + const pointField&, const intersection::algorithm alg, const scalar tol = 0.0 ) const; @@ -264,7 +264,7 @@ public: pointHit nearestPoint ( const point& p, - const pointField& meshPoints + const pointField& ) const; //- Return nearest point to face and classify it: @@ -276,7 +276,7 @@ public: pointHit nearestPointClassify ( const point& p, - const pointField& meshPoints, + const pointField&, label& nearType, label& nearLabel ) const; @@ -286,13 +286,13 @@ public: ( const point& p, const vector& n, - const pointField& meshPoints + const pointField& ) const; //- Return area in contact, given the displacement in vertices scalar areaInContact ( - const pointField& points, + const pointField&, const scalarField& v ) const; diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H index 03e992575f..933cb52239 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFace.H @@ -103,7 +103,7 @@ public: inline void flip(); //- Return the points corresponding to this face - inline pointField points(const pointField& meshPoints) const; + inline pointField points(const pointField&) const; //- Return triangle as a face inline face triFaceFace() const; @@ -118,10 +118,10 @@ public: template Type average(const pointField&, const Field&) const; - //- Return scalar magnitude + //- Magnitude of face area inline scalar mag(const pointField&) const; - //- Return vector normal + //- Vector normal; magnitude is equal to area of face inline vector normal(const pointField&) const; //- Number of triangles after splitting diff --git a/src/OpenFOAM/meshes/meshShapes/triFace/triFaceI.H b/src/OpenFOAM/meshes/meshShapes/triFace/triFaceI.H index e12f175675..af62aa1aa3 100644 --- a/src/OpenFOAM/meshes/meshShapes/triFace/triFaceI.H +++ b/src/OpenFOAM/meshes/meshShapes/triFace/triFaceI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,6 +176,7 @@ inline Foam::scalar Foam::triFace::mag(const pointField& points) const return ::Foam::mag(normal(points)); } + // could also delegate to triPointRef(...).normal() inline Foam::vector Foam::triFace::normal(const pointField& points) const { diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake index 613263d7bc..50ccb5fe1d 100755 --- a/src/Pstream/Allwmake +++ b/src/Pstream/Allwmake @@ -1,8 +1,31 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory makeType=${1:-libso} -set -x + +# +# define how to create an mpi-versioned library of $makeType +# compile into qualified directory +# use sentinel file to handle version changes +# +wmakeMpiLib() +{ + set +x + for libName + do + ( + WM_OPTIONS="$WM_OPTIONS$WM_MPLIB" + whichmpi="$libName/Make/$WM_OPTIONS/using:$FOAM_MPI" + [ -e "$whichmpi" ] || wclean $libName + echo "wmake $makeType $libName" + wmake $makeType $libName + touch "$whichmpi" + ) + done + set -x +} + +set -x wmake $makeType dummy case "$WM_MPLIB" in @@ -11,9 +34,7 @@ case "$WM_MPLIB" in echo echo "Note: ignore spurious warnings about missing mpicxx.h headers" echo - set -x - # force compilation into qualified directory - WM_OPTIONS=${WM_OPTIONS}$WM_MPLIB wmake $makeType mpi + wmakeMpiLib mpi ;; #GAMMA) diff --git a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C index 5b3cea13f4..7cecea2f80 100644 --- a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C +++ b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.H b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.H index 9e7982a7c6..2a5348e5d4 100644 --- a/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.H +++ b/src/edgeMesh/featureEdgeMesh/featureEdgeMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C index e4a92fad80..6611d20b54 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H index d9448400a9..16b8054655 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . Class Foam::directMappedFixedInternalValueFvPatchField diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C index d64936eb2e..256c02d001 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H index 4dfabf7304..7cc5f33013 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFields.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H index a675960604..be25beb05a 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchFieldsFwd.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C index 77b8ea18f0..74d11f63f9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H index 69bdb1a694..519d527fa9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchField.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . Class Foam::directMappedFixedPushedInternalValueFvPatchField diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C index cbbbeb4223..d9692a4fee 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H index bff180bbc2..33224759bc 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFields.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H index faae7f722e..77be3a47aa 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedPushedInternalValue/directMappedFixedPushedInternalValueFvPatchFieldsFwd.H @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C index b96bd4f1ba..f7b42671c9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H index 15e9f36042..960451d22b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C index 427f64183f..c1c05bcece 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H index 5a25f6d431..9122c53315 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformDensityHydrostaticPressure/uniformDensityHydrostaticPressureFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/fvMesh/fvMesh.H b/src/finiteVolume/fvMesh/fvMesh.H index 6a98e07ed2..976c8e46c9 100644 --- a/src/finiteVolume/fvMesh/fvMesh.H +++ b/src/finiteVolume/fvMesh/fvMesh.H @@ -42,16 +42,6 @@ SourceFiles fvMesh.C fvMeshGeometry.C -See Also - hmm - -Usage - oeuoeuoeu - -ToDo - oeuoeuoeu - oeueouoeu - \*---------------------------------------------------------------------------*/ #ifndef fvMesh_H diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C index 335fc05d1c..42bbb3eaaa 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C index 5f08d66b27..4171187963 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H index 018010193f..1c9a1a2e70 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C index 5b10b2fe1e..452006e243 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H index 2884267893..6b57454da7 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H index 3d3b056af8..b64a8d86df 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C index 3d3268185c..6e65dd6903 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/makeInterpolationCellPointWallModified.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.C index d0779945d3..442e0d3e8b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/quadraticUpwind/quadraticUpwind.C @@ -8,10 +8,10 @@ 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 2 of the License, or (at your - option) any later version. + 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see . \*---------------------------------------------------------------------------*/ diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C index 2ef9bccaa9..7587a7be48 100644 --- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H index cf3ab35d58..e918f0f133 100644 --- a/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.C b/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.C index 2048c05dfa..0099d2b106 100644 --- a/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.C +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.H b/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.H index 8082ed9a3a..2a4ea58abd 100644 --- a/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.H +++ b/src/genericPatchFields/genericFvPatchField/genericFvPatchFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C index c794f04520..bb8fe3f6fe 100644 --- a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C +++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H index cb981d9bfa..bd6321f239 100644 --- a/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H +++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.C b/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.C index 4c2631bed6..ca1c8e9ae3 100644 --- a/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.C +++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.H b/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.H index 108f8192b2..d67bb2ffe7 100644 --- a/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.H +++ b/src/genericPatchFields/genericPointPatchField/genericPointPatchFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/src/lagrangian/coalCombustion/Make/options b/src/lagrangian/coalCombustion/Make/options index 640565da2e..7253a9073d 100644 --- a/src/lagrangian/coalCombustion/Make/options +++ b/src/lagrangian/coalCombustion/Make/options @@ -19,7 +19,8 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ - -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude + -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude LIB_LIBS = \ -lfiniteVolume \ diff --git a/src/lagrangian/coalCombustion/coalParcel/makeCoalParcelSubmodels.C b/src/lagrangian/coalCombustion/coalParcel/makeCoalParcelSubmodels.C index 4a6b297c1d..ee17dd7e3c 100644 --- a/src/lagrangian/coalCombustion/coalParcel/makeCoalParcelSubmodels.C +++ b/src/lagrangian/coalCombustion/coalParcel/makeCoalParcelSubmodels.C @@ -25,12 +25,13 @@ License #include "coalCloud.H" +#include "makeParcelCloudFunctionObjects.H" + // Kinematic #include "makeThermoParcelForces.H" // thermo variant #include "makeParcelDispersionModels.H" #include "makeReactingMultiphaseParcelInjectionModels.H" // MP variant #include "makeParcelPatchInteractionModels.H" -#include "makeParcelPostProcessingModels.H" // Thermodynamic #include "makeParcelHeatTransferModels.H" @@ -50,12 +51,13 @@ License namespace Foam { + makeParcelCloudFunctionObjects(coalCloud); + // Kinematic sub-models makeThermoParcelForces(coalCloud); makeParcelDispersionModels(coalCloud); makeReactingMultiphaseParcelInjectionModels(coalCloud); makeParcelPatchInteractionModels(coalCloud); - makeParcelPostProcessingModels(coalCloud); // Thermo sub-models makeParcelHeatTransferModels(coalCloud); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C index 1ac6efe24f..02ef8172b9 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C @@ -44,7 +44,8 @@ Foam::COxidationDiffusionLimitedRate::COxidationDiffusionLimitedRate O2GlobalId_(owner.composition().globalCarrierId("O2")), CO2GlobalId_(owner.composition().globalCarrierId("CO2")), WC_(0.0), - WO2_(0.0) + WO2_(0.0), + HcCO2_(0.0) { // Determine Cs ids label idSolid = owner.composition().idSolid(); @@ -55,6 +56,8 @@ Foam::COxidationDiffusionLimitedRate::COxidationDiffusionLimitedRate const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; + HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); + if (Sb_ < 0) { FatalErrorIn @@ -158,14 +161,11 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate::calculate dMassSRCarrier[CO2GlobalId_] += dmCO2; const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T); - const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T); - // carrier enthalpy transfer handled by change in composition - // const scalar HsO2 = thermo.carrier().Hs(O2GlobalId_, T); - // dhsTrans -= dmO2*HsO2; + // carrier sensible enthalpy exchange handled via change in mass // Heat of reaction [J] - return dmC*HsC - dmCO2*HCO2; + return dmC*HsC - dmCO2*HcCO2_; } diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H index ad388b10f8..73097256e7 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H @@ -86,6 +86,9 @@ class COxidationDiffusionLimitedRate //- Molecular weight of O2 [kg/kmol] scalar WO2_; + //- Formation enthalpy for CO2 [J/kg] + scalar HcCO2_; + public: diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index 5f717530ab..c650687b7e 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -45,7 +45,8 @@ COxidationKineticDiffusionLimitedRate O2GlobalId_(owner.composition().globalCarrierId("O2")), CO2GlobalId_(owner.composition().globalCarrierId("CO2")), WC_(0.0), - WO2_(0.0) + WO2_(0.0), + HcCO2_(0.0) { // Determine Cs ids label idSolid = owner.composition().idSolid(); @@ -56,6 +57,8 @@ COxidationKineticDiffusionLimitedRate const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; + HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); + const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_]; const scalar YSolidTot = owner.composition().YMixture0()[idSolid]; Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl; @@ -161,14 +164,11 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate::calculate dMassSRCarrier[CO2GlobalId_] += dmCO2; const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T); - const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T); - // carrier enthalpy transfer handled by change in composition - // const scalar HsO2 = thermo.carrier().Hs(O2GlobalId_, T); - // dhsTrans -= dmO2*HsO2; + // carrier sensible enthalpy exchange handled via change in mass // Heat of reaction [J] - return dmC*HsC - dmCO2*HCO2; + return dmC*HsC - dmCO2*HcCO2_; } diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H index 3a4b2da2bd..563269b1d6 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H @@ -94,6 +94,9 @@ class COxidationKineticDiffusionLimitedRate //- Molecular weight of O2 [kg/kmol] scalar WO2_; + //- Formation enthalpy for CO2 [J/kg] + scalar HcCO2_; + public: diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C index c2ba2899a7..ea4a5e507a 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C @@ -57,7 +57,8 @@ Foam::COxidationMurphyShaddix::COxidationMurphyShaddix O2GlobalId_(owner.composition().globalCarrierId("O2")), CO2GlobalId_(owner.composition().globalCarrierId("CO2")), WC_(0.0), - WO2_(0.0) + WO2_(0.0), + HcCO2_(0.0) { // Determine Cs ids label idSolid = owner.composition().idSolid(); @@ -68,6 +69,8 @@ Foam::COxidationMurphyShaddix::COxidationMurphyShaddix const scalar WCO2 = owner.thermo().carrier().W(CO2GlobalId_); WC_ = WCO2 - WO2_; + HcCO2_ = owner.thermo().carrier().Hc(CO2GlobalId_); + const scalar YCloc = owner.composition().Y0(idSolid)[CsLocalId_]; const scalar YSolidTot = owner.composition().YMixture0()[idSolid]; Info<< " C(s): particle mass fraction = " << YCloc*YSolidTot << endl; @@ -221,14 +224,11 @@ Foam::scalar Foam::COxidationMurphyShaddix::calculate dMassSolid[CsLocalId_] += dOmega*WC_; const scalar HsC = thermo.solids().properties()[CsLocalId_].Hs(T); - const scalar HCO2 = thermo.carrier().H(CO2GlobalId_, T); - // carrier enthalpy transfer handled by change in composition - // const scalar HsO2 = thermo.carrier().Hs(O2GlobalId_, T); - // dhsTrans -= dmO2*HsO2; + // carrier sensible enthalpy exchange handled via change in mass - // Heat of reaction - return dOmega*(WC_*HsC - (WC_ + WO2_)*HCO2); + // Heat of reaction [J] + return dOmega*(WC_*HsC - (WC_ + WO2_)*HcCO2_); } diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H index 73981e79d1..26c9cf1701 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H @@ -115,6 +115,9 @@ class COxidationMurphyShaddix //- Molecular weight of O2 [kg/kmol] scalar WO2_; + //- Formation enthalpy for CO2 [J/kg] + scalar HcCO2_; + public: diff --git a/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C b/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C index c1a289c719..7e45ef3110 100644 --- a/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C +++ b/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C @@ -232,20 +232,20 @@ void Foam::parcel::setRelaxationTimes tBoilingSurface ); scalar dp = pBoil - pressure; - if ( (dp > 0.0) && (dp0 > 0.0) ) + if ((dp > 0.0) && (dp0 > 0.0)) { tBoilingSurface -= deltaT; } else { - if ( (dp < 0.0) && (dp0 < 0.0) ) + if ((dp < 0.0) && (dp0 < 0.0)) { tBoilingSurface += deltaT; } else { deltaT *= 0.5; - if ( (dp > 0.0) && (dp0 < 0.0) ) + if ((dp > 0.0) && (dp0 < 0.0)) { tBoilingSurface -= deltaT; } diff --git a/src/lagrangian/intermediate/Make/options b/src/lagrangian/intermediate/Make/options index 6290aae9da..951d16cf58 100644 --- a/src/lagrangian/intermediate/Make/options +++ b/src/lagrangian/intermediate/Make/options @@ -19,7 +19,8 @@ EXE_INC = \ -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude + -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude LIB_LIBS = \ -lfiniteVolume \ diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 80ec5ae74c..0ea66723b0 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -31,7 +31,6 @@ License #include "DispersionModel.H" #include "InjectionModel.H" #include "PatchInteractionModel.H" -#include "PostProcessingModel.H" #include "SurfaceFilmModel.H" // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // @@ -66,15 +65,6 @@ void Foam::KinematicCloud::setModels() ).ptr() ); - postProcessingModel_.reset - ( - PostProcessingModel >::New - ( - subModelProperties_, - *this - ).ptr() - ); - surfaceFilmModel_.reset ( SurfaceFilmModel >::New @@ -245,9 +235,10 @@ void Foam::KinematicCloud::postEvolve() } this->dispersion().cacheFields(false); + forces_.cacheFields(false); - this->postProcessing().post(); + functions_.postEvolve(); solution_.nextIter(); } @@ -262,10 +253,11 @@ void Foam::KinematicCloud::cloudReset(KinematicCloud& c) forces_.transfer(c.forces_); + functions_.transfer(c.functions_); + dispersionModel_.reset(c.dispersionModel_.ptr()); injectionModel_.reset(c.injectionModel_.ptr()); patchInteractionModel_.reset(c.patchInteractionModel_.ptr()); - postProcessingModel_.reset(c.postProcessingModel_.ptr()); surfaceFilmModel_.reset(c.surfaceFilmModel_.ptr()); UIntegrator_.reset(c.UIntegrator_.ptr()); @@ -309,7 +301,9 @@ Foam::KinematicCloud::KinematicCloud rndGen_ ( label(0), + solution_.steadyState() ? particleProperties_.lookupOrDefault