From 757a539e36bc04292796da808d64c9867616aafe Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 7 Mar 2013 17:23:26 +0000 Subject: [PATCH 1/5] compressibleTwoPhaseEulerFoam/fluidisedBed: updated schemes for solving internal energy --- .../compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes index c69e87c4fb..7073eebd7f 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes @@ -38,7 +38,7 @@ divSchemes "div\(phid.,p\)" Gauss upwind; "div\(alphaPhi.,(h|e).\)" Gauss limitedLinear 1; - "div\(alphaPhi.,K.\)" Gauss limitedLinear 1; + "div\(alphaPhi.,(K.|p)\)" Gauss limitedLinear 1; div(alphaPhi2,k) Gauss limitedLinear 1; div(alphaPhi2,epsilon) Gauss limitedLinear 1; From d05e256dcd13e30131c67c0237ec6083317b82f3 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 9 Mar 2013 16:15:29 +0000 Subject: [PATCH 2/5] src/transportModels: split twoPhaseMixture from twoPhaseProperties as a separate library --- applications/solvers/multiphase/cavitatingFoam/Make/options | 2 +- .../multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options | 2 +- .../solvers/multiphase/compressibleInterFoam/Make/options | 3 ++- .../compressibleInterDyMFoam/Make/options | 3 ++- .../compressibleInterFoam/twoPhaseMixtureThermo/Make/options | 4 ++-- .../solvers/multiphase/interFoam/LTSInterFoam/Make/options | 3 ++- .../solvers/multiphase/interFoam/MRFInterFoam/Make/options | 3 ++- applications/solvers/multiphase/interFoam/Make/options | 3 ++- .../solvers/multiphase/interFoam/interDyMFoam/Make/options | 3 ++- .../multiphase/interFoam/interMixingFoam/Make/options | 3 ++- .../multiphase/interFoam/porousInterFoam/Make/options | 3 ++- .../solvers/multiphase/interPhaseChangeFoam/Make/options | 3 ++- .../solvers/multiphase/twoLiquidMixingFoam/Make/options | 4 ++-- src/transportModels/Allwmake | 1 + src/transportModels/incompressible/Make/options | 4 ++-- src/transportModels/interfaceProperties/Make/options | 5 ++++- src/transportModels/twoPhaseMixture/Make/files | 3 +++ src/transportModels/twoPhaseMixture/Make/options | 5 +++++ .../twoPhaseMixture/twoPhaseMixture.C | 0 .../twoPhaseMixture/twoPhaseMixture.H | 0 src/transportModels/twoPhaseProperties/Make/files | 2 -- src/transportModels/twoPhaseProperties/Make/options | 2 ++ 22 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 src/transportModels/twoPhaseMixture/Make/files create mode 100644 src/transportModels/twoPhaseMixture/Make/options rename src/transportModels/{twoPhaseProperties => twoPhaseMixture}/twoPhaseMixture/twoPhaseMixture.C (100%) rename src/transportModels/{twoPhaseProperties => twoPhaseMixture}/twoPhaseMixture/twoPhaseMixture.H (100%) diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options index 2689ed5ab6..5efeeb355d 100644 --- a/applications/solvers/multiphase/cavitatingFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options index a195aa6774..34590e930b 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -I.. \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/Make/options index 147bf40e5b..035116d2d5 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/Make/options @@ -1,7 +1,7 @@ EXE_INC = \ -ItwoPhaseMixtureThermo \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/finiteVolume/lnInclude @@ -10,6 +10,7 @@ EXE_LIBS = \ -ltwoPhaseMixtureThermo \ -lfluidThermophysicalModels \ -lspecie \ + -ltwoPhaseMixture \ -ltwoPhaseProperties \ -linterfaceProperties \ -lcompressibleTurbulenceModel \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options index 3ee1e97f92..cf9a1d85ec 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/Make/options @@ -2,7 +2,7 @@ EXE_INC = \ -I.. \ -I../twoPhaseMixtureThermo \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ @@ -14,6 +14,7 @@ EXE_LIBS = \ -ltwoPhaseMixtureThermo \ -lfluidThermophysicalModels \ -lspecie \ + -ltwoPhaseMixture \ -ltwoPhaseProperties \ -linterfaceProperties \ -lcompressibleTurbulenceModel \ diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options index e2c67263b8..8dbf02aa06 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/Make/options @@ -1,10 +1,10 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ -lfluidThermophysicalModels \ -lspecie \ - -ltwoPhaseProperties \ + -ltwoPhaseMixture \ -lfiniteVolume diff --git a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options index 6c173b8fd1..33560b54e6 100644 --- a/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/LTSInterFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -12,6 +12,7 @@ EXE_INC = \ EXE_LIBS = \ -linterfaceProperties \ + -ltwoPhaseMixture \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ diff --git a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options index 6c173b8fd1..db2e1736ee 100644 --- a/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/MRFInterFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -11,6 +11,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -ltwoPhaseMixture \ -linterfaceProperties \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ diff --git a/applications/solvers/multiphase/interFoam/Make/options b/applications/solvers/multiphase/interFoam/Make/options index 4ea908240d..b1cfcac9bd 100644 --- a/applications/solvers/multiphase/interFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -10,6 +10,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -ltwoPhaseMixture \ -linterfaceProperties \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ diff --git a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options index c8d0b93e4d..2a5429f7a8 100644 --- a/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interDyMFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -13,6 +13,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -ltwoPhaseMixture \ -linterfaceProperties \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options index 7630bc9b51..cc09aeb2f3 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -IincompressibleThreePhaseMixture \ -IthreePhaseInterfaceProperties \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -13,6 +13,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -ltwoPhaseMixture \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ diff --git a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options index 6c173b8fd1..db2e1736ee 100644 --- a/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options +++ b/applications/solvers/multiphase/interFoam/porousInterFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I.. \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -11,6 +11,7 @@ EXE_INC = \ -I$(LIB_SRC)/sampling/lnInclude EXE_LIBS = \ + -ltwoPhaseMixture \ -linterfaceProperties \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options index 2d2a968f16..58b340781f 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/options +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/options @@ -1,5 +1,5 @@ EXE_INC = \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -8,6 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ + -ltwoPhaseMixture \ -linterfaceProperties \ -ltwoPhaseProperties \ -lincompressibleTransportModels \ diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options index 9a33b331cc..53ea250a16 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ -I../interFoam \ - -I$(LIB_SRC)/transportModels/twoPhaseProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ @@ -8,7 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -ltwoPhaseProperties \ + -ltwoPhaseMixture \ -lincompressibleTransportModels \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/src/transportModels/Allwmake b/src/transportModels/Allwmake index 60db98b2d8..120dfae74a 100755 --- a/src/transportModels/Allwmake +++ b/src/transportModels/Allwmake @@ -3,6 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory makeType=${1:-libso} set -x +wmake $makeType twoPhaseMixture wmake $makeType interfaceProperties wmake $makeType twoPhaseProperties wmake $makeType incompressible diff --git a/src/transportModels/incompressible/Make/options b/src/transportModels/incompressible/Make/options index 2ae73705d2..82c7568a59 100644 --- a/src/transportModels/incompressible/Make/options +++ b/src/transportModels/incompressible/Make/options @@ -1,8 +1,8 @@ EXE_INC = \ -I.. \ - -I../twoPhaseProperties/lnInclude \ + -I../twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ - -ltwoPhaseProperties \ + -ltwoPhaseMixture \ -lfiniteVolume diff --git a/src/transportModels/interfaceProperties/Make/options b/src/transportModels/interfaceProperties/Make/options index 4636e26540..cc63db7dcc 100644 --- a/src/transportModels/interfaceProperties/Make/options +++ b/src/transportModels/interfaceProperties/Make/options @@ -1,5 +1,8 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/twoPhaseProperties/alphaContactAngle/alphaContactAngle \ -I$(LIB_SRC)/finiteVolume/lnInclude -LIB_LIBS = -lfiniteVolume +LIB_LIBS = \ + -ltwoPhaseMixture \ + -lfiniteVolume diff --git a/src/transportModels/twoPhaseMixture/Make/files b/src/transportModels/twoPhaseMixture/Make/files new file mode 100644 index 0000000000..0854ea148b --- /dev/null +++ b/src/transportModels/twoPhaseMixture/Make/files @@ -0,0 +1,3 @@ +twoPhaseMixture/twoPhaseMixture.C + +LIB = $(FOAM_LIBBIN)/libtwoPhaseMixture diff --git a/src/transportModels/twoPhaseMixture/Make/options b/src/transportModels/twoPhaseMixture/Make/options new file mode 100644 index 0000000000..71b7873964 --- /dev/null +++ b/src/transportModels/twoPhaseMixture/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +LIB_LIBS = \ + -lfiniteVolume diff --git a/src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.C b/src/transportModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.C similarity index 100% rename from src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.C rename to src/transportModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.C diff --git a/src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.H b/src/transportModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.H similarity index 100% rename from src/transportModels/twoPhaseProperties/twoPhaseMixture/twoPhaseMixture.H rename to src/transportModels/twoPhaseMixture/twoPhaseMixture/twoPhaseMixture.H diff --git a/src/transportModels/twoPhaseProperties/Make/files b/src/transportModels/twoPhaseProperties/Make/files index e7f6e04872..5457dcde52 100644 --- a/src/transportModels/twoPhaseProperties/Make/files +++ b/src/transportModels/twoPhaseProperties/Make/files @@ -1,5 +1,3 @@ -twoPhaseMixture/twoPhaseMixture.C - alphaContactAngle/alphaContactAngle/alphaContactAngleFvPatchScalarField.C alphaContactAngle/constantAlphaContactAngle/constantAlphaContactAngleFvPatchScalarField.C alphaContactAngle/dynamicAlphaContactAngle/dynamicAlphaContactAngleFvPatchScalarField.C diff --git a/src/transportModels/twoPhaseProperties/Make/options b/src/transportModels/twoPhaseProperties/Make/options index 95f34b2845..32ce36b959 100644 --- a/src/transportModels/twoPhaseProperties/Make/options +++ b/src/transportModels/twoPhaseProperties/Make/options @@ -1,7 +1,9 @@ EXE_INC = \ + -I$(LIB_SRC)/transportModels/twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS = \ + -ltwoPhaseMixture \ -linterfaceProperties \ -lfiniteVolume From b2c397d45901d7a4a142bcff9fe76c3c568bc481 Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 9 Mar 2013 16:16:38 +0000 Subject: [PATCH 3/5] fvMesh: Do not register geometric object in the objectRegistry This avoids them being mapped during mesh motion --- src/finiteVolume/fvMesh/fvMesh.C | 12 +++++++---- src/finiteVolume/fvMesh/fvMeshGeometry.C | 6 ++++-- .../surfaceInterpolation.C | 20 +++++++++++++++---- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index fb78a0838c..8185c2a084 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -171,7 +171,8 @@ Foam::fvMesh::fvMesh(const IOobject& io) time().timeName(), *this, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ), *this ); @@ -191,7 +192,8 @@ Foam::fvMesh::fvMesh(const IOobject& io) time().timeName(), *this, IOobject::MUST_READ, - IOobject::AUTO_WRITE + IOobject::AUTO_WRITE, + false ), *this ); @@ -564,7 +566,8 @@ Foam::tmp Foam::fvMesh::movePoints(const pointField& p) time().timeName(), *this, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ), V() ); @@ -585,7 +588,8 @@ Foam::tmp Foam::fvMesh::movePoints(const pointField& p) this->time().timeName(), *this, IOobject::NO_READ, - IOobject::AUTO_WRITE + IOobject::AUTO_WRITE, + false ), *this, dimVolume/dimTime diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index ddd395a722..550e5093bd 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -208,7 +208,8 @@ const volScalarField::DimensionedInternalField& fvMesh::V() const time().timeName(), *this, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ), *this, dimVolume, @@ -258,7 +259,8 @@ const volScalarField::DimensionedInternalField& fvMesh::V00() const time().timeName(), *this, IOobject::NO_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ), V0() ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C index 4386716a17..34e624fba6 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C @@ -148,7 +148,10 @@ void Foam::surfaceInterpolation::makeWeights() const ( "weights", mesh_.pointsInstance(), - mesh_ + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false // Do not register ), mesh_, dimless @@ -217,7 +220,10 @@ void Foam::surfaceInterpolation::makeDeltaCoeffs() const ( "deltaCoeffs", mesh_.pointsInstance(), - mesh_ + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false // Do not register ), mesh_, dimless/dimLength @@ -262,7 +268,10 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const ( "nonOrthDeltaCoeffs", mesh_.pointsInstance(), - mesh_ + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false // Do not register ), mesh_, dimless/dimLength @@ -320,7 +329,10 @@ void Foam::surfaceInterpolation::makeNonOrthCorrectionVectors() const ( "nonOrthCorrectionVectors", mesh_.pointsInstance(), - mesh_ + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false // Do not register ), mesh_, dimless From 0eced354593107cb9abe4fca979cd4d7b52c24b2 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 11 Mar 2013 17:15:02 +0000 Subject: [PATCH 4/5] STYLE: targetVolumeToCell: extraneous code --- .../targetVolumeToCell/targetVolumeToCell.C | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C index a80688a184..dde6c52c4e 100644 --- a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C +++ b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,7 +139,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const const boundBox& bb = mesh_.bounds(); pointField points(bb.points()); - label minPointI = -1; + //label minPointI = -1; label maxPointI = -1; forAll(points, pointI) { @@ -152,7 +152,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const else if (c < minComp) { minComp = c; - minPointI = pointI; + //minPointI = pointI; } } @@ -179,7 +179,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const PackedBoolList selected(mesh_.nCells()); label nSelected = -1; scalar selectedVol = 0.0; - scalar selectedComp = 0.0; + //scalar selectedComp = 0.0; scalar low = minComp; @@ -228,7 +228,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const if (selectedVol < vol_) { - selectedComp = high; + //selectedComp = high; } else { @@ -237,7 +237,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const if (selectedVol < vol_) { - selectedComp = low; + //selectedComp = low; } else { From 3ce7681a59ec10cfef849b0e0c5f5bf0dc33593c Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 11 Mar 2013 17:15:41 +0000 Subject: [PATCH 5/5] ENH: dictionary: allow variable as dictionary keyword --- src/OpenFOAM/db/dictionary/entry/entryIO.C | 50 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/entry/entryIO.C b/src/OpenFOAM/db/dictionary/entry/entryIO.C index bc0ffb9c09..9dd60fdebf 100644 --- a/src/OpenFOAM/db/dictionary/entry/entryIO.C +++ b/src/OpenFOAM/db/dictionary/entry/entryIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,6 +30,8 @@ License #include "inputModeEntry.H" #include "stringOps.H" +#include "IOstreams.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // bool Foam::entry::getKeyword(keyType& keyword, Istream& is) @@ -114,6 +116,9 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) && keyword[0] == '$' ) // ... Substitution entry { + token nextToken(is); + is.putBack(nextToken); + if (keyword.size() > 2 && keyword[1] == token::BEGIN_BLOCK) { // Recursive substitution mode. Replace between {} with @@ -125,7 +130,48 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) stringOps::inplaceExpand(s, parentDict, true, false); keyword.std::string::replace(1, keyword.size()-1, s); } - parentDict.substituteScopedKeyword(keyword); + + if (nextToken == token::BEGIN_BLOCK) + { + word varName = keyword(1, keyword.size()-1); + + // lookup the variable name in the given dictionary + const entry* ePtr = parentDict.lookupScopedEntryPtr + ( + varName, + true, + true + ); + + if (ePtr) + { + // Read as primitiveEntry + const word newKeyword(ePtr->stream()); + + return parentDict.add + ( + new dictionaryEntry(newKeyword, parentDict, is), + false + ); + } + else + { + FatalIOErrorIn + ( + "entry::New(const dictionary& parentDict, Istream&)", + is + ) + << "Attempt to use undefined variable " << varName + << " as keyword" + << exit(FatalIOError); + return false; + } + } + else + { + parentDict.substituteScopedKeyword(keyword); + } + return true; } else if