From efce737693acffd248d4594fed83761aca996530 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 29 Jul 2009 09:59:16 +0200 Subject: [PATCH 01/46] Add provisioning for gcc-4.4.1 - compile into linux64Gcc44, linuxGcc44 to avoid clashes during testing - continue to use gmp-4.2.4 since gmp-4.3.x might be miscompiled with a system gcc-4.3.2 --- etc/settings.csh | 5 +++++ etc/settings.sh | 5 +++++ wmake/rules/linux64Gcc/cOpt | 2 +- wmake/rules/linux64Gcc/mplib | 6 +++--- wmake/rules/linux64Gcc/mplibGAMMA | 2 +- wmake/rules/linux64Gcc/mplibMPICH | 2 +- wmake/rules/linux64Gcc42/c++Opt | 2 +- wmake/rules/linux64Gcc42/cOpt | 2 +- wmake/rules/linux64Gcc42/mplib | 6 +++--- wmake/rules/linux64Gcc42/mplibGAMMA | 2 +- wmake/rules/linux64Gcc42/mplibMPICH | 2 +- wmake/rules/linux64Gcc43/c++Opt | 2 +- wmake/rules/linux64Gcc43/cOpt | 2 +- wmake/rules/linux64Gcc43/mplib | 6 +++--- wmake/rules/linux64Gcc43/mplibGAMMA | 2 +- wmake/rules/linux64Gcc43/mplibMPICH | 2 +- wmake/rules/linux64Gcc44/X | 3 +++ wmake/rules/linux64Gcc44/c | 16 ++++++++++++++++ wmake/rules/linux64Gcc44/c++ | 21 +++++++++++++++++++++ wmake/rules/linux64Gcc44/c++Debug | 2 ++ wmake/rules/linux64Gcc44/c++Opt | 4 ++++ wmake/rules/linux64Gcc44/c++Prof | 2 ++ wmake/rules/linux64Gcc44/cDebug | 2 ++ wmake/rules/linux64Gcc44/cOpt | 2 ++ wmake/rules/linux64Gcc44/cProf | 2 ++ wmake/rules/linux64Gcc44/general | 10 ++++++++++ wmake/rules/linux64Gcc44/mplib | 3 +++ wmake/rules/linux64Gcc44/mplibGAMMA | 3 +++ wmake/rules/linux64Gcc44/mplibHPMPI | 3 +++ wmake/rules/linux64Gcc44/mplibMPICH | 3 +++ wmake/rules/linux64Gcc44/mplibMPICH-GM | 3 +++ wmake/rules/linux64Gcc44/mplibOPENMPI | 3 +++ wmake/rules/linux64Gcc44/mplibQSMPI | 4 ++++ wmake/rules/linuxGcc/c++Opt | 2 +- wmake/rules/linuxGcc/cOpt | 2 +- wmake/rules/linuxGcc/mplib | 6 +++--- wmake/rules/linuxGcc/mplibGAMMA | 2 +- wmake/rules/linuxGcc/mplibMPICH | 2 +- wmake/rules/linuxGcc42/c++Opt | 2 +- wmake/rules/linuxGcc42/cOpt | 2 +- wmake/rules/linuxGcc42/mplib | 6 +++--- wmake/rules/linuxGcc42/mplibGAMMA | 2 +- wmake/rules/linuxGcc42/mplibMPICH | 2 +- wmake/rules/linuxGcc43/c++Opt | 2 +- wmake/rules/linuxGcc43/cOpt | 2 +- wmake/rules/linuxGcc43/mplib | 6 +++--- wmake/rules/linuxGcc43/mplibGAMMA | 2 +- wmake/rules/linuxGcc43/mplibMPICH | 2 +- wmake/rules/linuxGcc44/X | 3 +++ wmake/rules/linuxGcc44/c | 16 ++++++++++++++++ wmake/rules/linuxGcc44/c++ | 21 +++++++++++++++++++++ wmake/rules/linuxGcc44/c++Debug | 2 ++ wmake/rules/linuxGcc44/c++Opt | 2 ++ wmake/rules/linuxGcc44/c++Prof | 2 ++ wmake/rules/linuxGcc44/cDebug | 2 ++ wmake/rules/linuxGcc44/cOpt | 2 ++ wmake/rules/linuxGcc44/cProf | 2 ++ wmake/rules/linuxGcc44/general | 10 ++++++++++ wmake/rules/linuxGcc44/mplib | 3 +++ wmake/rules/linuxGcc44/mplibGAMMA | 3 +++ wmake/rules/linuxGcc44/mplibHPMPI | 3 +++ wmake/rules/linuxGcc44/mplibMPICH | 3 +++ wmake/rules/linuxGcc44/mplibMPICH-GM | 3 +++ wmake/rules/linuxGcc44/mplibOPENMPI | 3 +++ 64 files changed, 217 insertions(+), 41 deletions(-) create mode 100644 wmake/rules/linux64Gcc44/X create mode 100644 wmake/rules/linux64Gcc44/c create mode 100644 wmake/rules/linux64Gcc44/c++ create mode 100644 wmake/rules/linux64Gcc44/c++Debug create mode 100644 wmake/rules/linux64Gcc44/c++Opt create mode 100644 wmake/rules/linux64Gcc44/c++Prof create mode 100644 wmake/rules/linux64Gcc44/cDebug create mode 100644 wmake/rules/linux64Gcc44/cOpt create mode 100644 wmake/rules/linux64Gcc44/cProf create mode 100644 wmake/rules/linux64Gcc44/general create mode 100644 wmake/rules/linux64Gcc44/mplib create mode 100644 wmake/rules/linux64Gcc44/mplibGAMMA create mode 100644 wmake/rules/linux64Gcc44/mplibHPMPI create mode 100644 wmake/rules/linux64Gcc44/mplibMPICH create mode 100644 wmake/rules/linux64Gcc44/mplibMPICH-GM create mode 100644 wmake/rules/linux64Gcc44/mplibOPENMPI create mode 100644 wmake/rules/linux64Gcc44/mplibQSMPI create mode 100644 wmake/rules/linuxGcc44/X create mode 100644 wmake/rules/linuxGcc44/c create mode 100644 wmake/rules/linuxGcc44/c++ create mode 100644 wmake/rules/linuxGcc44/c++Debug create mode 100644 wmake/rules/linuxGcc44/c++Opt create mode 100644 wmake/rules/linuxGcc44/c++Prof create mode 100644 wmake/rules/linuxGcc44/cDebug create mode 100644 wmake/rules/linuxGcc44/cOpt create mode 100644 wmake/rules/linuxGcc44/cProf create mode 100644 wmake/rules/linuxGcc44/general create mode 100644 wmake/rules/linuxGcc44/mplib create mode 100644 wmake/rules/linuxGcc44/mplibGAMMA create mode 100644 wmake/rules/linuxGcc44/mplibHPMPI create mode 100644 wmake/rules/linuxGcc44/mplibMPICH create mode 100644 wmake/rules/linuxGcc44/mplibMPICH-GM create mode 100644 wmake/rules/linuxGcc44/mplibOPENMPI diff --git a/etc/settings.csh b/etc/settings.csh index 4370744be4..ad327c5e57 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -89,6 +89,11 @@ case OpenFOAM: _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib breaksw + case Gcc44: + setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH + _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + breaksw case Gcc43: setenv WM_COMPILER_DIR $WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib diff --git a/etc/settings.sh b/etc/settings.sh index 9d39e1eb86..074a21bb17 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -105,6 +105,11 @@ OpenFOAM) _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib ;; + Gcc44) + export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH + _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + _foamAddLib $WM_THIRD_PARTY_DIR/gmp-4.2.4/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib + ;; Gcc43) export WM_COMPILER_DIR=$WM_THIRD_PARTY_DIR/gcc-4.3.3/platforms/$WM_ARCH$WM_COMPILER_ARCH _foamAddLib $WM_THIRD_PARTY_DIR/mpfr-2.4.1/platforms/$WM_ARCH$WM_COMPILER_ARCH/lib diff --git a/wmake/rules/linux64Gcc/cOpt b/wmake/rules/linux64Gcc/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linux64Gcc/cOpt +++ b/wmake/rules/linux64Gcc/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linux64Gcc/mplib b/wmake/rules/linux64Gcc/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linux64Gcc/mplib +++ b/wmake/rules/linux64Gcc/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc/mplibGAMMA b/wmake/rules/linux64Gcc/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linux64Gcc/mplibGAMMA +++ b/wmake/rules/linux64Gcc/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc/mplibMPICH b/wmake/rules/linux64Gcc/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linux64Gcc/mplibMPICH +++ b/wmake/rules/linux64Gcc/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc42/c++Opt b/wmake/rules/linux64Gcc42/c++Opt index 8ac07d2124..3446f7f58c 100644 --- a/wmake/rules/linux64Gcc42/c++Opt +++ b/wmake/rules/linux64Gcc42/c++Opt @@ -1,4 +1,4 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 #c++OPT = -march=nocona -O3 # -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc42/cOpt b/wmake/rules/linux64Gcc42/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linux64Gcc42/cOpt +++ b/wmake/rules/linux64Gcc42/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linux64Gcc42/mplib b/wmake/rules/linux64Gcc42/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linux64Gcc42/mplib +++ b/wmake/rules/linux64Gcc42/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc42/mplibGAMMA b/wmake/rules/linux64Gcc42/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linux64Gcc42/mplibGAMMA +++ b/wmake/rules/linux64Gcc42/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc42/mplibMPICH b/wmake/rules/linux64Gcc42/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linux64Gcc42/mplibMPICH +++ b/wmake/rules/linux64Gcc42/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc43/c++Opt b/wmake/rules/linux64Gcc43/c++Opt index 8ac07d2124..3446f7f58c 100644 --- a/wmake/rules/linux64Gcc43/c++Opt +++ b/wmake/rules/linux64Gcc43/c++Opt @@ -1,4 +1,4 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 #c++OPT = -march=nocona -O3 # -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc43/cOpt b/wmake/rules/linux64Gcc43/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linux64Gcc43/cOpt +++ b/wmake/rules/linux64Gcc43/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linux64Gcc43/mplib b/wmake/rules/linux64Gcc43/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linux64Gcc43/mplib +++ b/wmake/rules/linux64Gcc43/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc43/mplibGAMMA b/wmake/rules/linux64Gcc43/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linux64Gcc43/mplibGAMMA +++ b/wmake/rules/linux64Gcc43/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc43/mplibMPICH b/wmake/rules/linux64Gcc43/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linux64Gcc43/mplibMPICH +++ b/wmake/rules/linux64Gcc43/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc44/X b/wmake/rules/linux64Gcc44/X new file mode 100644 index 0000000000..5d1f9c5cc5 --- /dev/null +++ b/wmake/rules/linux64Gcc44/X @@ -0,0 +1,3 @@ +XFLAGS = +XINC = $(XFLAGS) -I/usr/X11R6/include +XLIBS = -L/usr/X11R6/lib64 -lXext -lX11 diff --git a/wmake/rules/linux64Gcc44/c b/wmake/rules/linux64Gcc44/c new file mode 100644 index 0000000000..80bb80f32f --- /dev/null +++ b/wmake/rules/linux64Gcc44/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m64 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linux64Gcc44/c++ b/wmake/rules/linux64Gcc44/c++ new file mode 100644 index 0000000000..36b5c29b20 --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m64 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-40 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) diff --git a/wmake/rules/linux64Gcc44/c++Debug b/wmake/rules/linux64Gcc44/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linux64Gcc44/c++Opt b/wmake/rules/linux64Gcc44/c++Opt new file mode 100644 index 0000000000..3446f7f58c --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++Opt @@ -0,0 +1,4 @@ +c++DBUG = +c++OPT = -O3 +#c++OPT = -march=nocona -O3 +# -ftree-vectorize -ftree-vectorizer-verbose=3 diff --git a/wmake/rules/linux64Gcc44/c++Prof b/wmake/rules/linux64Gcc44/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linux64Gcc44/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linux64Gcc44/cDebug b/wmake/rules/linux64Gcc44/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linux64Gcc44/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linux64Gcc44/cOpt b/wmake/rules/linux64Gcc44/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linux64Gcc44/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linux64Gcc44/cProf b/wmake/rules/linux64Gcc44/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linux64Gcc44/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linux64Gcc44/general b/wmake/rules/linux64Gcc44/general new file mode 100644 index 0000000000..10237bd1b6 --- /dev/null +++ b/wmake/rules/linux64Gcc44/general @@ -0,0 +1,10 @@ +CPP = /lib/cpp $(GFLAGS) +LD = ld + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linux64Gcc44/mplib b/wmake/rules/linux64Gcc44/mplib new file mode 100644 index 0000000000..294bd86150 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplib @@ -0,0 +1,3 @@ +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linux64Gcc44/mplibGAMMA b/wmake/rules/linux64Gcc44/mplibGAMMA new file mode 100644 index 0000000000..11606f2984 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibGAMMA @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linux64Gcc44/mplibHPMPI b/wmake/rules/linux64Gcc44/mplibHPMPI new file mode 100644 index 0000000000..574492a236 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_amd64 -lmpi diff --git a/wmake/rules/linux64Gcc44/mplibMPICH b/wmake/rules/linux64Gcc44/mplibMPICH new file mode 100644 index 0000000000..cb628e1117 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibMPICH @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linux64Gcc44/mplibMPICH-GM b/wmake/rules/linux64Gcc44/mplibMPICH-GM new file mode 100644 index 0000000000..88493ebc70 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibMPICH-GM @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm diff --git a/wmake/rules/linux64Gcc44/mplibOPENMPI b/wmake/rules/linux64Gcc44/mplibOPENMPI new file mode 100644 index 0000000000..834d2d3e22 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibOPENMPI @@ -0,0 +1,3 @@ +PFLAGS = -DOMPI_SKIP_MPICXX +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi diff --git a/wmake/rules/linux64Gcc44/mplibQSMPI b/wmake/rules/linux64Gcc44/mplibQSMPI new file mode 100644 index 0000000000..95ea327379 --- /dev/null +++ b/wmake/rules/linux64Gcc44/mplibQSMPI @@ -0,0 +1,4 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi + diff --git a/wmake/rules/linuxGcc/c++Opt b/wmake/rules/linuxGcc/c++Opt index 4cb95b5b3a..2aedabd628 100644 --- a/wmake/rules/linuxGcc/c++Opt +++ b/wmake/rules/linuxGcc/c++Opt @@ -1,2 +1,2 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 diff --git a/wmake/rules/linuxGcc/cOpt b/wmake/rules/linuxGcc/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linuxGcc/cOpt +++ b/wmake/rules/linuxGcc/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linuxGcc/mplib b/wmake/rules/linuxGcc/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linuxGcc/mplib +++ b/wmake/rules/linuxGcc/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc/mplibGAMMA b/wmake/rules/linuxGcc/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linuxGcc/mplibGAMMA +++ b/wmake/rules/linuxGcc/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc/mplibMPICH b/wmake/rules/linuxGcc/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linuxGcc/mplibMPICH +++ b/wmake/rules/linuxGcc/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc42/c++Opt b/wmake/rules/linuxGcc42/c++Opt index 4cb95b5b3a..2aedabd628 100644 --- a/wmake/rules/linuxGcc42/c++Opt +++ b/wmake/rules/linuxGcc42/c++Opt @@ -1,2 +1,2 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 diff --git a/wmake/rules/linuxGcc42/cOpt b/wmake/rules/linuxGcc42/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linuxGcc42/cOpt +++ b/wmake/rules/linuxGcc42/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linuxGcc42/mplib b/wmake/rules/linuxGcc42/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linuxGcc42/mplib +++ b/wmake/rules/linuxGcc42/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc42/mplibGAMMA b/wmake/rules/linuxGcc42/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linuxGcc42/mplibGAMMA +++ b/wmake/rules/linuxGcc42/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc42/mplibMPICH b/wmake/rules/linuxGcc42/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linuxGcc42/mplibMPICH +++ b/wmake/rules/linuxGcc42/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc43/c++Opt b/wmake/rules/linuxGcc43/c++Opt index 4cb95b5b3a..2aedabd628 100644 --- a/wmake/rules/linuxGcc43/c++Opt +++ b/wmake/rules/linuxGcc43/c++Opt @@ -1,2 +1,2 @@ -c++DBUG = +c++DBUG = c++OPT = -O3 diff --git a/wmake/rules/linuxGcc43/cOpt b/wmake/rules/linuxGcc43/cOpt index a8b0635478..17318709f1 100644 --- a/wmake/rules/linuxGcc43/cOpt +++ b/wmake/rules/linuxGcc43/cOpt @@ -1,2 +1,2 @@ -cDBUG = +cDBUG = cOPT = -O3 diff --git a/wmake/rules/linuxGcc43/mplib b/wmake/rules/linuxGcc43/mplib index 8a84b40146..294bd86150 100644 --- a/wmake/rules/linuxGcc43/mplib +++ b/wmake/rules/linuxGcc43/mplib @@ -1,3 +1,3 @@ -PFLAGS = -PINC = -PLIBS = +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc43/mplibGAMMA b/wmake/rules/linuxGcc43/mplibGAMMA index d62c6250ff..11606f2984 100644 --- a/wmake/rules/linuxGcc43/mplibGAMMA +++ b/wmake/rules/linuxGcc43/mplibGAMMA @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc43/mplibMPICH b/wmake/rules/linuxGcc43/mplibMPICH index ac17f7c1d2..cb628e1117 100644 --- a/wmake/rules/linuxGcc43/mplibMPICH +++ b/wmake/rules/linuxGcc43/mplibMPICH @@ -1,3 +1,3 @@ -PFLAGS = +PFLAGS = PINC = -I$(MPI_ARCH_PATH)/include PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc44/X b/wmake/rules/linuxGcc44/X new file mode 100644 index 0000000000..bed8bfeddf --- /dev/null +++ b/wmake/rules/linuxGcc44/X @@ -0,0 +1,3 @@ +XFLAGS = +XINC = $(XFLAGS) -I/usr/X11R6/include +XLIBS = -L/usr/X11R6/lib -lXext -lX11 diff --git a/wmake/rules/linuxGcc44/c b/wmake/rules/linuxGcc44/c new file mode 100644 index 0000000000..8db5da1047 --- /dev/null +++ b/wmake/rules/linuxGcc44/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m32 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxGcc44/c++ b/wmake/rules/linuxGcc44/c++ new file mode 100644 index 0000000000..64d6797573 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m32 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-40 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared +LINKEXE = $(CC) $(c++FLAGS) diff --git a/wmake/rules/linuxGcc44/c++Debug b/wmake/rules/linuxGcc44/c++Debug new file mode 100644 index 0000000000..19bdb9c334 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxGcc44/c++Opt b/wmake/rules/linuxGcc44/c++Opt new file mode 100644 index 0000000000..2aedabd628 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linuxGcc44/c++Prof b/wmake/rules/linuxGcc44/c++Prof new file mode 100644 index 0000000000..3bda4dad55 --- /dev/null +++ b/wmake/rules/linuxGcc44/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxGcc44/cDebug b/wmake/rules/linuxGcc44/cDebug new file mode 100644 index 0000000000..72b638f458 --- /dev/null +++ b/wmake/rules/linuxGcc44/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxGcc44/cOpt b/wmake/rules/linuxGcc44/cOpt new file mode 100644 index 0000000000..17318709f1 --- /dev/null +++ b/wmake/rules/linuxGcc44/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxGcc44/cProf b/wmake/rules/linuxGcc44/cProf new file mode 100644 index 0000000000..ca3ac9bf5f --- /dev/null +++ b/wmake/rules/linuxGcc44/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxGcc44/general b/wmake/rules/linuxGcc44/general new file mode 100644 index 0000000000..02ad6973ff --- /dev/null +++ b/wmake/rules/linuxGcc44/general @@ -0,0 +1,10 @@ +CPP = /lib/cpp $(GFLAGS) +LD = ld -melf_i386 + +PROJECT_LIBS = -l$(WM_PROJECT) -liberty -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc44/mplib b/wmake/rules/linuxGcc44/mplib new file mode 100644 index 0000000000..294bd86150 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplib @@ -0,0 +1,3 @@ +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc44/mplibGAMMA b/wmake/rules/linuxGcc44/mplibGAMMA new file mode 100644 index 0000000000..11606f2984 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibGAMMA @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc44/mplibHPMPI b/wmake/rules/linuxGcc44/mplibHPMPI new file mode 100644 index 0000000000..8aff40632b --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi diff --git a/wmake/rules/linuxGcc44/mplibMPICH b/wmake/rules/linuxGcc44/mplibMPICH new file mode 100644 index 0000000000..cb628e1117 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibMPICH @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc44/mplibMPICH-GM b/wmake/rules/linuxGcc44/mplibMPICH-GM new file mode 100644 index 0000000000..88493ebc70 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibMPICH-GM @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm diff --git a/wmake/rules/linuxGcc44/mplibOPENMPI b/wmake/rules/linuxGcc44/mplibOPENMPI new file mode 100644 index 0000000000..834d2d3e22 --- /dev/null +++ b/wmake/rules/linuxGcc44/mplibOPENMPI @@ -0,0 +1,3 @@ +PFLAGS = -DOMPI_SKIP_MPICXX +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi From 1089bbc69c02d5b86cd7ffcb522e48d10930f22a Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 29 Jul 2009 11:52:42 +0100 Subject: [PATCH 02/46] Corrected omega wall-function BCs. --- .../incompressible/simpleFoam/motorBike/0/k | 25 +++++++++++++- .../simpleFoam/motorBike/0/omega | 25 +++++++++++++- .../motorBike/0/turbulentBoundaryField | 33 ------------------- .../motorBike/constant/polyMesh/boundary | 2 +- 4 files changed, 49 insertions(+), 36 deletions(-) delete mode 100644 tutorials/incompressible/simpleFoam/motorBike/0/turbulentBoundaryField diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/k b/tutorials/incompressible/simpleFoam/motorBike/0/k index 257b472da8..457efefed2 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/k +++ b/tutorials/incompressible/simpleFoam/motorBike/0/k @@ -20,6 +20,29 @@ dimensions [0 2 -2 0 0 0 0]; internalField uniform $turbulentKE; -#include "turbulentBoundaryField" +boundaryField +{ + #include "fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + lowerWall + { + type kqRWallFunction; + } + + "motorBike_.*" + { + type kqRWallFunction; + } + + #include "frontBackUpperPatches" +} + // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/omega b/tutorials/incompressible/simpleFoam/motorBike/0/omega index 94cbf590c2..16424f9bb3 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0/omega +++ b/tutorials/incompressible/simpleFoam/motorBike/0/omega @@ -20,6 +20,29 @@ dimensions [0 0 -1 0 0 0 0]; internalField uniform $turbulentOmega; -#include "turbulentBoundaryField" +boundaryField +{ + #include "fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + lowerWall + { + type omegaWallFunction; + } + + "motorBike_.*" + { + type omegaWallFunction; + } + + #include "frontBackUpperPatches" +} + // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/0/turbulentBoundaryField b/tutorials/incompressible/simpleFoam/motorBike/0/turbulentBoundaryField deleted file mode 100644 index aa4e5eded9..0000000000 --- a/tutorials/incompressible/simpleFoam/motorBike/0/turbulentBoundaryField +++ /dev/null @@ -1,33 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ - -boundaryField -{ - #include "fixedInlet" - - outlet - { - type inletOutlet; - inletValue $internalField; - value $internalField; - } - - lowerWall - { - type kqRWallFunction; - } - - "motorBike_.*" - { - type kqRWallFunction; - } - - #include "frontBackUpperPatches" -} - -// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary index e96b062da6..b79c6ad432 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary +++ b/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ From 2d58cdf8ca26ef884eb7afb264005687b4011965 Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 29 Jul 2009 12:52:06 +0100 Subject: [PATCH 03/46] Added a consistency check for the location of the installation. --- Allwmake | 8 ++++++++ applications/Allwmake | 9 +++++++++ src/Allwmake | 9 +++++++++ 3 files changed, 26 insertions(+) diff --git a/Allwmake b/Allwmake index c01c6c0d1a..ee6f075a0e 100755 --- a/Allwmake +++ b/Allwmake @@ -1,6 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory +if [ "$PWD" != "$WM_PROJECT_DIR" ] +then + echo "Error: Current directory in not \$WM_PROJECT_DIR" + echo " The environment variable are not consistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + # wmake is required for subsequent targets ( cd wmake/src && make ) diff --git a/applications/Allwmake b/applications/Allwmake index 2a7eeae124..82a2ec0df4 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -1,5 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory + +if [ "$PWD" != "$WM_PROJECT_DIR/applications" ] +then + echo "Error: Current directory in not \$WM_PROJECT_DIR/applications" + echo " The environment variable are not consistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + set -x wmake all solvers diff --git a/src/Allwmake b/src/Allwmake index f2b2adf037..5473238ed3 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -1,5 +1,14 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory + +if [ "$PWD" != "$WM_PROJECT_DIR/src" ] +then + echo "Error: Current directory in not \$WM_PROJECT_DIR/src" + echo " The environment variable are not consistent with the installation." + echo " Check the OpenFOAM entries in your dot-files and source them." + exit 1 +fi + set -x # update OpenFOAM version strings if required From f763b00d0850bba3321b55ea684ac03d2bbe8612 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 30 Jul 2009 11:51:58 +0200 Subject: [PATCH 04/46] spelling/grammar in Allwmake consistency checks --- Allwmake | 4 ++-- applications/Allwmake | 4 ++-- src/Allwmake | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Allwmake b/Allwmake index ee6f075a0e..2e570c89a5 100755 --- a/Allwmake +++ b/Allwmake @@ -3,8 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory if [ "$PWD" != "$WM_PROJECT_DIR" ] then - echo "Error: Current directory in not \$WM_PROJECT_DIR" - echo " The environment variable are not consistent with the installation." + echo "Error: Current directory is not \$WM_PROJECT_DIR" + echo " The environment variables are inconsistent with the installation." echo " Check the OpenFOAM entries in your dot-files and source them." exit 1 fi diff --git a/applications/Allwmake b/applications/Allwmake index 82a2ec0df4..ddb5b116fc 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -3,8 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory if [ "$PWD" != "$WM_PROJECT_DIR/applications" ] then - echo "Error: Current directory in not \$WM_PROJECT_DIR/applications" - echo " The environment variable are not consistent with the installation." + echo "Error: Current directory is not \$WM_PROJECT_DIR/applications" + echo " The environment variables are inconsistent with the installation." echo " Check the OpenFOAM entries in your dot-files and source them." exit 1 fi diff --git a/src/Allwmake b/src/Allwmake index 5473238ed3..b1b166e234 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -3,8 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory if [ "$PWD" != "$WM_PROJECT_DIR/src" ] then - echo "Error: Current directory in not \$WM_PROJECT_DIR/src" - echo " The environment variable are not consistent with the installation." + echo "Error: Current directory is not \$WM_PROJECT_DIR/src" + echo " The environment variables are inconsistent with the installation." echo " Check the OpenFOAM entries in your dot-files and source them." exit 1 fi From c33e084d09ba7e5c3be363be62cc2126c9067065 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 30 Jul 2009 13:56:30 +0200 Subject: [PATCH 05/46] added file/line diagnostics when functionEntry fails - got hit by spacing error and it took too long to pinpoint the problem: #include "XXX" <- okay # include "XXX" <- wrong! --- .../functionEntries/functionEntry/functionEntry.C | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C index e386a30f20..b116494157 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C @@ -81,7 +81,8 @@ bool Foam::functionEntry::execute ( "functionEntry::execute" "(const word& functionName, dictionary& parentDict, Istream&)" - ) << "Unknown functionEntry " << functionName + ) << "Unknown functionEntry '" << functionName + << "' in " << is.name() << " near line " << is.lineNumber() << endl << endl << "Valid functionEntries are :" << endl << executedictionaryIstreamMemberFunctionTablePtr_->toc() @@ -126,7 +127,8 @@ bool Foam::functionEntry::execute ( "functionEntry::execute" "(const word&, const dictionary&, primitiveEntry&, Istream&)" - ) << "Unknown functionEntry " << functionName + ) << "Unknown functionEntry '" << functionName + << "' in " << is.name() << " near line " << is.lineNumber() << endl << endl << "Valid functionEntries are :" << endl << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc() From 4e6dbf573063621c69e5b92534f00c10c08285bd Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 30 Jul 2009 12:58:03 +0100 Subject: [PATCH 06/46] Force construction of mesh.deltaCoeffs() which may be needed for the wall-function BCs. --- src/turbulenceModels/compressible/LES/LESModel/LESModel.C | 4 ++++ src/turbulenceModels/compressible/RAS/RASModel/RASModel.C | 6 +++++- src/turbulenceModels/incompressible/LES/LESModel/LESModel.C | 4 ++++ .../nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C | 4 +++- src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C | 6 +++++- .../pisoFoam/les/pitzDaily/constant/polyMesh/boundary | 2 +- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 5602e44d7f..dd166f2693 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -84,6 +84,10 @@ LESModel::LESModel delta_(LESdelta::New("delta", U.mesh(), *this)) { readIfPresent("k0", k0_); + + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); } diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 8d18cec8c5..b390bca5e5 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -88,7 +88,11 @@ RASModel::RASModel omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL), y_(mesh_) -{} +{ + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); +} // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 3e3c952ffc..3458e03c6b 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -82,6 +82,10 @@ LESModel::LESModel delta_(LESdelta::New("delta", U.mesh(), *this)) { readIfPresent("k0", k0_); + + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); } diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C index 5555fd3086..1d66afbc65 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C @@ -133,8 +133,8 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate const scalarField& nuw = patch().lookupPatchField(nuName_); - scalarField& nuSgsw = *this; + scalarField& nuSgsw = *this; scalarField magFaceGradU = mag(U.snGrad()); @@ -178,6 +178,8 @@ void nuSgsWallFunctionFvPatchScalarField::evaluate nuSgsw[facei] = 0; } } + + fixedValueFvPatchScalarField::evaluate(); } diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 6b300390c9..d3366d8206 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -87,7 +87,11 @@ RASModel::RASModel omegaSmall_("omegaSmall", omega0_.dimensions(), SMALL), y_(mesh_) -{} +{ + // Force the construction of the mesh deltaCoeffs which may be needed + // for the construction of the derived models and BCs + mesh_.deltaCoeffs(); +} // * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary b/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary index eb4a4e461d..313dcceba1 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ From e38822ad1a9cde6f38b38a4e9937c266fd26cc61 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 30 Jul 2009 15:25:32 +0200 Subject: [PATCH 07/46] expandDictionary - write as top-level dictionary --- .../expandDictionary/expandDictionary.C | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C index cd48777de1..02d0e1e956 100644 --- a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C +++ b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C @@ -33,6 +33,7 @@ Description #include "argList.H" #include "IFstream.H" +#include "IOobject.H" #include "dictionary.H" using namespace Foam; @@ -42,13 +43,19 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::noBanner(); + argList::noParallel(); argList::validArgs.clear(); argList::validArgs.append("inputDict"); argList args(argc, argv); - IFstream dictStream(args.additionalArgs()[0]); - dictionary inputDict(dictStream); - Info<< inputDict << endl; + const string& dictName = args.additionalArgs()[0]; + + Info<<"//\n// expansion of dictionary " << dictName << "\n//\n"; + + dictionary(IFstream(dictName)()).write(Info, false); + + IOobject::writeDivider(Info); return 0; } From 54a734670e0880571cb1f47a5d680fc5a1772aa5 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 30 Jul 2009 15:59:30 +0100 Subject: [PATCH 08/46] Change to the ThirdParty directory before building. --- Allwmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Allwmake b/Allwmake index ee6f075a0e..8680f31d99 100755 --- a/Allwmake +++ b/Allwmake @@ -13,7 +13,7 @@ fi ( cd wmake/src && make ) # build ThirdParty sources -$WM_THIRD_PARTY_DIR/Allwmake +( cd $WM_THIRD_PARTY_DIR && ./Allwmake ) # build OpenFOAM libraries and applications src/Allwmake From 9c04f3118c60c7a36b3187098ac23080108f938d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 31 Jul 2009 12:50:03 +0200 Subject: [PATCH 09/46] The #remove directive can now take a wordRe type --- .../functionEntries/removeEntry/removeEntry.C | 19 +++++-------------- .../functionEntries/removeEntry/removeEntry.H | 9 ++++++--- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C index 32f6660465..223b251c43 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.C @@ -26,6 +26,7 @@ License #include "removeEntry.H" #include "dictionary.H" +#include "stringListOps.H" #include "IStringStream.H" #include "OStringStream.H" #include "addToMemberFunctionSelectionTable.H" @@ -64,22 +65,12 @@ bool Foam::functionEntries::removeEntry::execute Istream& is ) { - token currToken(is); - is.putBack(currToken); + wordList dictKeys = parentDict.toc(); + labelList indices = findStrings(readList(is), dictKeys); - if (currToken == token::BEGIN_LIST) + forAll(indices, indexI) { - wordList keys(is); - - forAll(keys, keyI) - { - parentDict.remove(keys[keyI]); - } - } - else - { - word key(is); - parentDict.remove(key); + parentDict.remove(dictKeys[indices[indexI]]); } return true; diff --git a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H index b98da86e67..148f8e260e 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H +++ b/src/OpenFOAM/db/dictionary/functionEntries/removeEntry/removeEntry.H @@ -28,13 +28,16 @@ Class Description Remove a dictionary entry. - The @c \#remove directive takes a word or a list of words. For example, + The @c \#remove directive takes a list or a single wordRe. + For example, @verbatim #remove entry0 - #remove ( entry1 entry2 entry3 ) + #remove ( entry1 entry2 entry3 otherEntry ) + #remove "entry[1-3]" + #remove ( "entry[1-3]" otherEntry ) @endverbatim - The removable only occurs in the current context. + The removal only occurs in the current context. Removing sub-entries or parent entries is not supported. SourceFiles From 8f95d4ea3ddc2ce04dff69717dcf4de3daf5f110 Mon Sep 17 00:00:00 2001 From: henry Date: Fri, 31 Jul 2009 12:51:40 +0100 Subject: [PATCH 10/46] Changed to correspond to Mark's changes to the scripts in ThirdParty. --- Allwmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Allwmake b/Allwmake index 8680f31d99..ee6f075a0e 100755 --- a/Allwmake +++ b/Allwmake @@ -13,7 +13,7 @@ fi ( cd wmake/src && make ) # build ThirdParty sources -( cd $WM_THIRD_PARTY_DIR && ./Allwmake ) +$WM_THIRD_PARTY_DIR/Allwmake # build OpenFOAM libraries and applications src/Allwmake From ad287d9d178a0c2497525f7213ebce8972f8b8d8 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 31 Jul 2009 16:57:59 +0200 Subject: [PATCH 11/46] skip writing default values of Cmu/Prt etc for turbulent bcs --- .../alphaSgsJayatillekeWallFunctionFvPatchScalarField.C | 8 +++++--- .../muSgsWallFunctionFvPatchScalarField.C | 6 ++++-- .../turbulentHeatFluxTemperatureFvPatchScalarField.C | 4 +++- ...urbulentMixingLengthFrequencyInletFvPatchScalarField.C | 4 +++- .../alphatWallFunctionFvPatchScalarField.C | 2 +- .../epsilonWallFunctionFvPatchScalarField.C | 8 +++++--- .../mutWallFunction/mutWallFunctionFvPatchScalarField.C | 6 +++--- .../omegaWallFunctionFvPatchScalarField.C | 8 +++++--- .../nuSgsWallFunctionFvPatchScalarField.C | 6 ++++-- ...urbulentMixingLengthFrequencyInletFvPatchScalarField.C | 6 +++--- .../epsilonWallFunctionFvPatchScalarField.C | 8 +++++--- .../nutWallFunction/nutWallFunctionFvPatchScalarField.C | 6 +++--- .../omegaWallFunctionFvPatchScalarField.C | 8 +++++--- 13 files changed, 49 insertions(+), 31 deletions(-) diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C index 461a0b90f1..624bf819d8 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -310,9 +310,11 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::evaluate void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "Prt", 0.85, Prt_); + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C index c31ac8815c..3f3c56c4cd 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C @@ -196,8 +196,10 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "U", "U", UName_); writeEntryIfDifferent(os, "rho", "rho", rhoName_); writeEntryIfDifferent(os, "mu", "mu", muName_); - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C index 2f54baf7c2..4860bc8a2f 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C @@ -178,7 +178,9 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::write { fvPatchScalarField::write(os); q_.writeEntry("q", os); - os.writeKeyword("rho") << rhoName_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "rho", "rho", rhoName_); + gradient().writeEntry("gradient", os); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 5893f2072e..27f2ee8cc8 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -137,7 +137,9 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write fvPatchField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "k", "k", kName_); + writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index ad2115cdb1..c06ae66c71 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -122,7 +122,7 @@ void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeEntryIfDifferent(os, "mut", "mut", mutName_); - os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl; + writeEntryIfDifferent(os, "Prt", 0.85, Prt_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index dc6f2a3644..f68c7db44a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -246,9 +246,11 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "rho", "rho", rhoName_); writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C index 18ea20963c..3413844d44 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -107,9 +107,9 @@ tmp mutWallFunctionFvPatchScalarField::calcMut() const void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index f377694b21..950dd45938 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -235,9 +235,11 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "G", "RASModel::G", GName_); writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C index 1d66afbc65..6b65ce3275 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C @@ -188,8 +188,10 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const fvPatchField::write(os); writeEntryIfDifferent(os, "U", "U", UName_); writeEntryIfDifferent(os, "nu", "nu", nuName_); - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index dac5ccb0f1..e59e51125c 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -48,8 +48,8 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField ) : fixedValueFvPatchField(p, iF), - mixingLength_(0.0), - kName_("undefined-k") + mixingLength_(0.001), + kName_("k") {} turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -137,7 +137,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write fvPatchField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; + writeEntryIfDifferent(os, "k", "k", kName_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 93cad8188c..a6e221842f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -234,9 +234,11 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "G", "RASModel::G", GName_); writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index aef4df68b3..af131ecb9e 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -106,9 +106,9 @@ tmp nutWallFunctionFvPatchScalarField::calcNut() const void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 300b0aaf4f..1c41104c37 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -224,9 +224,11 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "G", "RASModel::G", GName_); writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; - os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl; - os.writeKeyword("E") << E_ << token::END_STATEMENT << nl; + + writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); + writeEntryIfDifferent(os, "kappa", 0.41, kappa_); + writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntry("value", os); } From e2968b6a36c636c7f1a90209640aad2a4f06714b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 31 Jul 2009 17:34:49 +0200 Subject: [PATCH 12/46] file-scoped (static const) variables for default turbulence parameters - avoids raw values sprinkled about the code eg, 'defaultKappa_' vs. '0.41' --- ...ayatillekeWallFunctionFvPatchScalarField.C | 25 +++++++++++------- .../muSgsWallFunctionFvPatchScalarField.C | 20 +++++++++----- ...ngLengthFrequencyInletFvPatchScalarField.C | 10 +++++-- .../alphatWallFunctionFvPatchScalarField.C | 12 ++++++--- .../epsilonWallFunctionFvPatchScalarField.C | 26 ++++++++++++------- .../mutWallFunctionFvPatchScalarField.C | 26 ++++++++++++------- .../omegaWallFunctionFvPatchScalarField.C | 26 ++++++++++++------- .../nuSgsWallFunctionFvPatchScalarField.C | 19 +++++++++----- ...ngLengthFrequencyInletFvPatchScalarField.C | 10 +++++-- .../epsilonWallFunctionFvPatchScalarField.C | 26 ++++++++++++------- .../nutWallFunctionFvPatchScalarField.C | 26 ++++++++++++------- .../omegaWallFunctionFvPatchScalarField.C | 26 ++++++++++++------- 12 files changed, 170 insertions(+), 82 deletions(-) diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C index 624bf819d8..66fb1ae6e8 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -46,6 +46,13 @@ scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0; scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01; label alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10; +//! @cond fileScope +static const scalar defaultPrt_(0.85); +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void alphaSgsJayatillekeWallFunctionFvPatchScalarField::checkType() @@ -114,9 +121,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Prt_(0.85), - kappa_(0.41), - E_(9.8) + Prt_(defaultPrt_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -147,9 +154,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", 0.85)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) + Prt_(dict.lookupOrDefault("Prt", defaultPrt_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -311,9 +318,9 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - writeEntryIfDifferent(os, "Prt", 0.85, Prt_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "Prt", defaultPrt_, Prt_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C index 3f3c56c4cd..e6c779a105 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C @@ -39,6 +39,14 @@ namespace compressible namespace LESModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField @@ -51,8 +59,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_("U"), rhoName_("rho"), muName_("mu"), - kappa_(0.41), - E_(9.8) + kappa_(defaultKappa_), + E_(defaultE_) {} @@ -84,8 +92,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_(dict.lookupOrDefault("U", "U")), rhoName_(dict.lookupOrDefault("rho", "rho")), muName_(dict.lookupOrDefault("mu", "mu")), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) {} @@ -197,8 +205,8 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "rho", "rho", rhoName_); writeEntryIfDifferent(os, "mu", "mu", muName_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 27f2ee8cc8..1beb48840a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,6 +38,12 @@ namespace Foam namespace compressible { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +//! @endcond fileScope + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -48,7 +54,7 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField ) : fixedValueFvPatchField(p, iF), - mixingLength_(0.0), + mixingLength_(0.001), kName_("k") {} @@ -116,7 +122,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() const RASModel& rasModel = db().lookupObject("RASProperties"); const scalar Cmu = - rasModel.coeffDict().lookupOrDefault("Cmu", 0.09); + rasModel.coeffDict().lookupOrDefault("Cmu", defaultCmu_); const scalar Cmu25 = pow(Cmu, 0.25); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index c06ae66c71..676850c3cd 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -38,6 +38,12 @@ namespace compressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultPrt_(0.85); +//! @endcond fileScope + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // alphatWallFunctionFvPatchScalarField:: @@ -49,7 +55,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), mutName_("mut"), - Prt_(0.85) + Prt_(defaultPrt_) {} @@ -78,7 +84,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF, dict), mutName_(dict.lookupOrDefault("mut", "mut")), - Prt_(dict.lookupOrDefault("Prt", 0.85)) + Prt_(dict.lookupOrDefault("Prt", defaultPrt_)) {} @@ -122,7 +128,7 @@ void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Prt", 0.85, Prt_); + writeEntryIfDifferent(os, "Prt", defaultPrt_, Prt_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index f68c7db44a..bafabf5943 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ namespace compressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void epsilonWallFunctionFvPatchScalarField::checkType() @@ -71,9 +79,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_("rho"), muName_("mu"), mutName_("mut"), - Cmu_(0.09), - kappa_(0.41), - E_(9.8) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -116,9 +124,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_(dict.lookupOrDefault("rho", "rho")), muName_(dict.lookupOrDefault("mu", "mu")), mutName_(dict.lookupOrDefault("mut", "mut")), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -247,9 +255,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C index 3413844d44..701a74291c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ namespace compressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void mutWallFunctionFvPatchScalarField::checkType() @@ -107,9 +115,9 @@ tmp mutWallFunctionFvPatchScalarField::calcMut() const void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); } @@ -122,9 +130,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_), yPlusLam_(calcYPlusLam(kappa_, E_)) {} @@ -153,9 +161,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)), + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)), yPlusLam_(calcYPlusLam(kappa_, E_)) {} diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 950dd45938..01489c3917 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ namespace compressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void omegaWallFunctionFvPatchScalarField::checkType() @@ -71,9 +79,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), muName_("mu"), mutName_("mut"), - Cmu_(0.09), - kappa_(0.41), - E_(9.8) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -116,9 +124,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), muName_(dict.lookupOrDefault("mu", "mu")), mutName_(dict.lookupOrDefault("mut", "mut")), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -236,9 +244,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C index 6b65ce3275..aeabcca8a2 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C @@ -38,6 +38,13 @@ namespace incompressible namespace LESModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // nuSgsWallFunctionFvPatchScalarField:: @@ -50,8 +57,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF), UName_("U"), nuName_("nu"), - kappa_(0.41), - E_(9.8) + kappa_(defaultKappa_), + E_(defaultE_) {} @@ -83,8 +90,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), UName_(dict.lookupOrDefault("U", "U")), nuName_(dict.lookupOrDefault("nu", "nu")), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) {} @@ -189,8 +196,8 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "U", "U", UName_); writeEntryIfDifferent(os, "nu", "nu", nuName_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index e59e51125c..e4b7c01b06 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,6 +38,12 @@ namespace Foam namespace incompressible { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +//! @endcond fileScope + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -116,7 +122,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() const RASModel& rasModel = db().lookupObject("RASProperties"); const scalar Cmu = - rasModel.coeffDict().lookupOrDefault("Cmu", 0.09); + rasModel.coeffDict().lookupOrDefault("Cmu", defaultCmu_); const scalar Cmu25 = pow(Cmu, 0.25); @@ -137,7 +143,7 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write fvPatchField::write(os); os.writeKeyword("mixingLength") << mixingLength_ << token::END_STATEMENT << nl; - writeEntryIfDifferent(os, "k", "k", kName_); + writeEntryIfDifferent(os, "k", "k", kName_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index a6e221842f..e1786de417 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ namespace incompressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void epsilonWallFunctionFvPatchScalarField::checkType() @@ -70,9 +78,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(0.09), - kappa_(0.41), - E_(9.8) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -113,9 +121,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), nuName_(dict.lookupOrDefault("nu", "nu")), nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -235,9 +243,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index af131ecb9e..466ce5580c 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ namespace incompressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void nutWallFunctionFvPatchScalarField::checkType() @@ -106,9 +114,9 @@ tmp nutWallFunctionFvPatchScalarField::calcNut() const void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); } @@ -121,9 +129,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(0.09), - kappa_(0.41), - E_(9.8), + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_), yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); @@ -156,9 +164,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)), + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)), yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 1c41104c37..1ba2d3d0db 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,6 +40,14 @@ namespace incompressible namespace RASModels { +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +//! @cond fileScope +static const scalar defaultCmu_(0.09); +static const scalar defaultKappa_(0.41); +static const scalar defaultE_(9.8); +//! @endcond fileScope + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void omegaWallFunctionFvPatchScalarField::checkType() @@ -70,9 +78,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(0.09), - kappa_(0.41), - E_(9.8) + Cmu_(defaultCmu_), + kappa_(defaultKappa_), + E_(defaultE_) { checkType(); } @@ -113,9 +121,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), nuName_(dict.lookupOrDefault("nu", "nu")), nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", 0.09)), - kappa_(dict.lookupOrDefault("kappa", 0.41)), - E_(dict.lookupOrDefault("E", 9.8)) + Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), + kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), + E_(dict.lookupOrDefault("E", defaultE_)) { checkType(); } @@ -225,9 +233,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - writeEntryIfDifferent(os, "Cmu", 0.09, Cmu_); - writeEntryIfDifferent(os, "kappa", 0.41, kappa_); - writeEntryIfDifferent(os, "E", 9.8, E_); + writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); + writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); + writeEntryIfDifferent(os, "E", defaultE_, E_); writeEntry("value", os); } From 827e3659b97b0bbe118879e595dda222eba9c0e0 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 31 Jul 2009 18:15:54 +0200 Subject: [PATCH 13/46] consistency update: kappa=0.41, E=9.8 - this would be an argument for providing default values at the top-level compressible/incompressible turbulenceModel --- .../multiphase/bubbleFoam/createRASTurbulence.H | 4 ++-- .../solvers/multiphase/settlingFoam/createFields.H | 4 ++-- .../applyBoundaryLayer/applyBoundaryLayer.C | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H b/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H index f9794a914f..1ae6219fd6 100644 --- a/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H +++ b/applications/solvers/multiphase/bubbleFoam/createRASTurbulence.H @@ -82,7 +82,7 @@ ( "kappa", wallFunctionDict, - 0.4187 + 0.41 ) ); @@ -92,7 +92,7 @@ ( "E", wallFunctionDict, - 9.0 + 9.8 ) ); diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index 9f0ca00596..6acb19994a 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -304,7 +304,7 @@ ( "kappa", wallFunctionDict, - 0.4187 + 0.41 ) ); @@ -314,7 +314,7 @@ ( "E", wallFunctionDict, - 9.0 + 9.8 ) ); diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index 8aae7e124c..5714cccbff 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -41,6 +41,11 @@ Description // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// turbulence constants - file-scope +static const scalar Cmu(0.09); +static const scalar kappa(0.41); + + int main(int argc, char *argv[]) { argList::validOptions.insert("ybl", "scalar"); @@ -48,7 +53,6 @@ int main(int argc, char *argv[]) argList::validOptions.insert("writenut", ""); # include "setRootCase.H" - # include "createTime.H" # include "createMesh.H" @@ -117,10 +121,6 @@ int main(int argc, char *argv[]) phi = fvc::interpolate(U) & mesh.Sf(); phi.write(); - // Set turbulence constants - dimensionedScalar kappa("kappa", dimless, 0.4187); - dimensionedScalar Cmu("Cmu", dimless, 0.09); - // Read and modify turbulence fields if present IOobject epsilonHeader @@ -182,11 +182,11 @@ int main(int argc, char *argv[]) Info<< "Reading field epsilon\n" << endl; volScalarField epsilon(epsilonHeader, mesh); - scalar ck0 = ::pow(Cmu.value(), 0.25)*kappa.value(); + scalar ck0 = ::pow(Cmu, 0.25)*kappa; k = sqr(nut/(ck0*min(y, ybl))); k.correctBoundaryConditions(); - scalar ce0 = ::pow(Cmu.value(), 0.75)/kappa.value(); + scalar ce0 = ::pow(Cmu, 0.75)/kappa; epsilon = ce0*k*sqrt(k)/min(y, ybl); epsilon.correctBoundaryConditions(); From 54a8b6a152f9c26cc99390215fa85663bbb29d12 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sat, 1 Aug 2009 09:36:34 +0200 Subject: [PATCH 14/46] define values for standardCmu, standardKappa, standardE in turbulenceModel.H --- .../turbulence/PDRkEpsilon/PDRkEpsilon.H | 6 ++--- .../solvers/multiphase/bubbleFoam/kEpsilon.H | 2 +- .../createTurbulenceFields.C | 6 +++-- ...ayatillekeWallFunctionFvPatchScalarField.C | 24 +++++++---------- ...ayatillekeWallFunctionFvPatchScalarField.H | 6 +++++ .../alphaSgsWallFunctionFvPatchScalarField.C | 4 +-- .../alphaSgsWallFunctionFvPatchScalarField.H | 6 +++++ .../muSgsWallFunctionFvPatchScalarField.C | 20 +++++--------- .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C | 12 ++++----- .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H | 4 +-- .../RAS/LaunderSharmaKE/LaunderSharmaKE.H | 1 + ...thDissipationRateInletFvPatchScalarField.C | 7 +++-- ...ngLengthFrequencyInletFvPatchScalarField.C | 13 ++++------ .../alphatWallFunctionFvPatchScalarField.C | 12 +++------ .../alphatWallFunctionFvPatchScalarField.H | 7 +++++ .../epsilonWallFunctionFvPatchScalarField.C | 26 +++++++------------ .../mutWallFunctionFvPatchScalarField.C | 26 +++++++------------ .../omegaWallFunctionFvPatchScalarField.C | 26 +++++++------------ .../turbulenceModel/turbulenceModel.H | 12 +++++++++ .../nuSgsWallFunctionFvPatchScalarField.C | 20 +++++--------- ...ngLengthFrequencyInletFvPatchScalarField.C | 13 ++++------ .../epsilonWallFunctionFvPatchScalarField.C | 26 +++++++------------ .../nutWallFunctionFvPatchScalarField.C | 26 +++++++------------ .../omegaWallFunctionFvPatchScalarField.C | 26 +++++++------------ .../turbulenceModel/turbulenceModel.H | 12 +++++++++ 25 files changed, 156 insertions(+), 187 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index 5e919efcc4..92615f765d 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -27,7 +27,7 @@ Class Description Standard k-epsilon turbulence model with additional source terms - corresponding to PDR basic drag model (\link basic.H \endlink) + corresponding to PDR basic drag model (@link basic.H @endlink) The default model coefficients correspond to the following: @verbatim @@ -47,10 +47,10 @@ Description \f$ \kappa-\epsilon \f$ equation for the generation of turbulence due to interaction with unresolved obstacles. - In the \f$ \epsilon \f$ equation \f$ C_{1} G_{R} \f$ is added as a source + In the \f$ \epsilon \f$ equation, \f$ C_{1} G_{R} \f$ is added as a source term. - In the \f$ \kappa \f$ equation \f$ G_{R} \f$ is added as a source term. + In the \f$ \kappa \f$ equation, \f$ G_{R} \f$ is added as a source term. SourceFiles PDRkEpsilon.C diff --git a/applications/solvers/multiphase/bubbleFoam/kEpsilon.H b/applications/solvers/multiphase/bubbleFoam/kEpsilon.H index 576e3253ab..84dadd7acb 100644 --- a/applications/solvers/multiphase/bubbleFoam/kEpsilon.H +++ b/applications/solvers/multiphase/bubbleFoam/kEpsilon.H @@ -1,4 +1,4 @@ -if(turbulence) +if (turbulence) { if (mesh.changing()) { diff --git a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C index 02a8cbd3ab..f094418ecc 100644 --- a/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C +++ b/applications/utilities/postProcessing/turbulence/createTurbulenceFields/createTurbulenceFields.C @@ -41,6 +41,10 @@ Source files: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// turbulence constants - file-scope +static const scalar Cmu(0.09); + + int main(int argc, char *argv[]) { timeSelector::addOptions(); @@ -104,8 +108,6 @@ int main(int argc, char *argv[]) if (!IOobject("omega", runTime.timeName(), mesh).headerOk()) { - const scalar Cmu = 0.09; - Info<< "creating omega" << endl; volScalarField omega ( diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C index 66fb1ae6e8..c972574631 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -46,12 +46,6 @@ scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxExp_ = 50.0; scalar alphaSgsJayatillekeWallFunctionFvPatchScalarField::tolerance_ = 0.01; label alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10; -//! @cond fileScope -static const scalar defaultPrt_(0.85); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -121,9 +115,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Prt_(defaultPrt_), - kappa_(defaultKappa_), - E_(defaultE_) + Prt_(standardPrt), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -154,9 +148,9 @@ alphaSgsJayatillekeWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", defaultPrt_)), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)) + Prt_(dict.lookupOrDefault("Prt", standardPrt)), + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) { checkType(); } @@ -318,9 +312,9 @@ void alphaSgsJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - writeEntryIfDifferent(os, "Prt", defaultPrt_, Prt_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "Prt", standardPrt, Prt_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H index e7f6184d81..40e81e7feb 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.H @@ -93,6 +93,12 @@ class alphaSgsJayatillekeWallFunctionFvPatchScalarField public: + // Public data + + //- Standard value for turbulent Prandtl number %Prt + static const scalar standardPrt = 0.85; + + //- Runtime type information TypeName("alphaSgsJayatillekeWallFunction"); diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C index f2c944220a..8786eb996d 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C @@ -67,7 +67,7 @@ alphaSgsWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Prt_(0.85) + Prt_(standardPrt) { checkType(); } @@ -96,7 +96,7 @@ alphaSgsWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Prt_(dict.lookupOrDefault("Prt", 0.85)) + Prt_(dict.lookupOrDefault("Prt", standardPrt)) { checkType(); } diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H index fb738498e7..c178f2455f 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.H @@ -70,6 +70,12 @@ class alphaSgsWallFunctionFvPatchScalarField public: + // Public data + + //- Standard value for turbulent Prandtl number %Prt + static const scalar standardPrt = 0.85; + + //- Runtime type information TypeName("alphaSgsWallFunction"); diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C index e6c779a105..c8f2dbb14b 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/muSgsWallFunctions/muSgsWallFunction/muSgsWallFunctionFvPatchScalarField.C @@ -39,14 +39,6 @@ namespace compressible namespace LESModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField @@ -59,8 +51,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_("U"), rhoName_("rho"), muName_("mu"), - kappa_(defaultKappa_), - E_(defaultE_) + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) {} @@ -92,8 +84,8 @@ muSgsWallFunctionFvPatchScalarField::muSgsWallFunctionFvPatchScalarField UName_(dict.lookupOrDefault("U", "U")), rhoName_(dict.lookupOrDefault("rho", "rho")), muName_(dict.lookupOrDefault("mu", "mu")), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)) + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) {} @@ -205,8 +197,8 @@ void muSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "rho", "rho", rhoName_); writeEntryIfDifferent(os, "mu", "mu", muName_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 6d8e659336..a592a44970 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -183,7 +183,7 @@ LaunderGibsonRSTM::LaunderGibsonRSTM ) ), - y_(mesh_), + yr_(mesh_), R_ ( @@ -371,7 +371,7 @@ void LaunderGibsonRSTM::correct() if (mesh_.changing()) { - y_.correct(); + yr_.correct(); } volSymmTensorField P = -twoSymm(R_ & fvc::grad(U_)); @@ -436,10 +436,10 @@ void LaunderGibsonRSTM::correct() // wall reflection terms + symm ( - I*((y_.n() & reflect) & y_.n()) - - 1.5*(y_.n()*(reflect & y_.n()) - + (y_.n() & reflect)*y_.n()) - )*pow(Cmu_, 0.75)*rho_*pow(k_, 1.5)/(kappa_*y_*epsilon_) + I*((yr_.n() & reflect) & yr_.n()) + - 1.5*(yr_.n()*(reflect & yr_.n()) + + (yr_.n() & reflect)*yr_.n()) + )*pow(Cmu_, 0.75)*rho_*pow(k_, 1.5)/(kappa_*yr_*epsilon_) ); REqn().relax(); diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 00db2c304f..426f964d6a 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -42,10 +42,10 @@ Description C2Ref 0.3; Cs 0.25; Ceps 0.15; - sigmah 1.0; // only for compressible sigmaEps 1.3; sigmaR 0.81967; couplingFactor 0.0; + Prt 1.0; // only for compressible } @endverbatim @@ -105,7 +105,7 @@ class LaunderGibsonRSTM // Fields - wallDistReflection y_; + wallDistReflection yr_; volSymmTensorField R_; volScalarField k_; diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index b7c972a662..c70b558f1b 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -40,6 +40,7 @@ Description alphah 1.0; // only for compressible alphahk 1.0; // only for compressible alphaEps 0.76923; + Prt 1.0; // only for compressible } @endverbatim diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C index d83cd7bfc2..df420b90b2 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C @@ -110,8 +110,11 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar Cmu = - rasModel.coeffDict().lookupOrDefault("Cmu", 0.09); + const scalar Cmu = rasModel.coeffDict().lookupOrDefault + ( + "Cmu", + turbulenceModel::standardCmu + ); const scalar Cmu75 = pow(Cmu, 0.75); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 1beb48840a..ebe9f7a8bc 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,12 +38,6 @@ namespace Foam namespace compressible { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -121,8 +115,11 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar Cmu = - rasModel.coeffDict().lookupOrDefault("Cmu", defaultCmu_); + const scalar Cmu = rasModel.coeffDict().lookupOrDefault + ( + "Cmu", + turbulenceModel::standardCmu + ); const scalar Cmu25 = pow(Cmu, 0.25); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C index 676850c3cd..b4ca0d0299 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.C @@ -38,12 +38,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultPrt_(0.85); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // alphatWallFunctionFvPatchScalarField:: @@ -55,7 +49,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), mutName_("mut"), - Prt_(defaultPrt_) + Prt_(standardPrt) {} @@ -84,7 +78,7 @@ alphatWallFunctionFvPatchScalarField : fixedValueFvPatchScalarField(p, iF, dict), mutName_(dict.lookupOrDefault("mut", "mut")), - Prt_(dict.lookupOrDefault("Prt", defaultPrt_)) + Prt_(dict.lookupOrDefault("Prt", standardPrt)) {} @@ -128,7 +122,7 @@ void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Prt", defaultPrt_, Prt_); + writeEntryIfDifferent(os, "Prt", standardPrt, Prt_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H index 4f21ba6472..1c1be04d54 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatWallFunction/alphatWallFunctionFvPatchScalarField.H @@ -28,6 +28,7 @@ Class Description Boundary condition for turbulent thermal diffusivity when using wall functions + - replicates OpenFOAM v1.5 (and earlier) behaviour - Turbulent Prandtl number defaults to 0.85 if unspecified @@ -69,6 +70,12 @@ class alphatWallFunctionFvPatchScalarField public: + // Public data + + //- Standard value for turbulent Prandtl number %Prt + static const scalar standardPrt = 0.85; + + //- Runtime type information TypeName("compressible::alphatWallFunction"); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index bafabf5943..4106462d16 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void epsilonWallFunctionFvPatchScalarField::checkType() @@ -79,9 +71,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_("rho"), muName_("mu"), mutName_("mut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -124,9 +116,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField rhoName_(dict.lookupOrDefault("rho", "rho")), muName_(dict.lookupOrDefault("mu", "mu")), mutName_(dict.lookupOrDefault("mut", "mut")), - Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)) + Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) { checkType(); } @@ -255,9 +247,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C index 701a74291c..7475fabada 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void mutWallFunctionFvPatchScalarField::checkType() @@ -115,9 +107,9 @@ tmp mutWallFunctionFvPatchScalarField::calcMut() const void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); } @@ -130,9 +122,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_), + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE), yPlusLam_(calcYPlusLam(kappa_, E_)) {} @@ -161,9 +153,9 @@ mutWallFunctionFvPatchScalarField::mutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)), + Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)), yPlusLam_(calcYPlusLam(kappa_, E_)) {} diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 01489c3917..467b537740 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace compressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void omegaWallFunctionFvPatchScalarField::checkType() @@ -79,9 +71,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), muName_("mu"), mutName_("mut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -124,9 +116,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), muName_(dict.lookupOrDefault("mu", "mu")), mutName_(dict.lookupOrDefault("mut", "mut")), - Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)) + Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) { checkType(); } @@ -244,9 +236,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "mu", "mu", muName_); writeEntryIfDifferent(os, "mut", "mut", mutName_); - writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 97638e5e49..13f7d821c4 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -98,6 +98,18 @@ private: public: + // Public data + + //- Standard value for turbulence constant %Cmu + static const scalar standardCmu = 0.09; + + //- Standard value for turbulence constant %kappa + static const scalar standardKappa = 0.41; + + //- Standard value for turbulence constant %E + static const scalar standardE = 9.8; + + //- Runtime type information TypeName("turbulenceModel"); diff --git a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C index aeabcca8a2..50a5e17958 100644 --- a/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/LES/derivedFvPatchFields/wallFunctions/nuSgsWallFunctions/nuSgsWallFunction/nuSgsWallFunctionFvPatchScalarField.C @@ -25,6 +25,7 @@ License \*---------------------------------------------------------------------------*/ #include "nuSgsWallFunctionFvPatchScalarField.H" +#include "LESModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" @@ -38,13 +39,6 @@ namespace incompressible namespace LESModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // nuSgsWallFunctionFvPatchScalarField:: @@ -57,8 +51,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF), UName_("U"), nuName_("nu"), - kappa_(defaultKappa_), - E_(defaultE_) + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) {} @@ -90,8 +84,8 @@ nuSgsWallFunctionFvPatchScalarField fixedValueFvPatchScalarField(p, iF, dict), UName_(dict.lookupOrDefault("U", "U")), nuName_(dict.lookupOrDefault("nu", "nu")), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)) + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) {} @@ -196,8 +190,8 @@ void nuSgsWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "U", "U", UName_); writeEntryIfDifferent(os, "nu", "nu", nuName_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index e4b7c01b06..cdd6282d32 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -38,12 +38,6 @@ namespace Foam namespace incompressible { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -//! @endcond fileScope - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // turbulentMixingLengthFrequencyInletFvPatchScalarField:: @@ -121,8 +115,11 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() // Lookup Cmu corresponding to the turbulence model selected const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalar Cmu = - rasModel.coeffDict().lookupOrDefault("Cmu", defaultCmu_); + const scalar Cmu = rasModel.coeffDict().lookupOrDefault + ( + "Cmu", + turbulenceModel::standardCmu + ); const scalar Cmu25 = pow(Cmu, 0.25); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index e1786de417..c94355d0df 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void epsilonWallFunctionFvPatchScalarField::checkType() @@ -78,9 +70,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -121,9 +113,9 @@ epsilonWallFunctionFvPatchScalarField::epsilonWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), nuName_(dict.lookupOrDefault("nu", "nu")), nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)) + Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) { checkType(); } @@ -243,9 +235,9 @@ void epsilonWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C index 466ce5580c..2821580a37 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void nutWallFunctionFvPatchScalarField::checkType() @@ -114,9 +106,9 @@ tmp nutWallFunctionFvPatchScalarField::calcNut() const void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const { - writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); } @@ -129,9 +121,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_), + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE), yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); @@ -164,9 +156,9 @@ nutWallFunctionFvPatchScalarField::nutWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)), + Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)), yPlusLam_(calcYPlusLam(kappa_, E_)) { checkType(); diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 1ba2d3d0db..27434d4408 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -40,14 +40,6 @@ namespace incompressible namespace RASModels { -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -//! @cond fileScope -static const scalar defaultCmu_(0.09); -static const scalar defaultKappa_(0.41); -static const scalar defaultE_(9.8); -//! @endcond fileScope - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void omegaWallFunctionFvPatchScalarField::checkType() @@ -78,9 +70,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_("RASModel::G"), nuName_("nu"), nutName_("nut"), - Cmu_(defaultCmu_), - kappa_(defaultKappa_), - E_(defaultE_) + Cmu_(turbulenceModel::standardCmu), + kappa_(turbulenceModel::standardKappa), + E_(turbulenceModel::standardE) { checkType(); } @@ -121,9 +113,9 @@ omegaWallFunctionFvPatchScalarField::omegaWallFunctionFvPatchScalarField GName_(dict.lookupOrDefault("G", "RASModel::G")), nuName_(dict.lookupOrDefault("nu", "nu")), nutName_(dict.lookupOrDefault("nut", "nut")), - Cmu_(dict.lookupOrDefault("Cmu", defaultCmu_)), - kappa_(dict.lookupOrDefault("kappa", defaultKappa_)), - E_(dict.lookupOrDefault("E", defaultE_)) + Cmu_(dict.lookupOrDefault("Cmu", turbulenceModel::standardCmu)), + kappa_(dict.lookupOrDefault("kappa", turbulenceModel::standardKappa)), + E_(dict.lookupOrDefault("E", turbulenceModel::standardE)) { checkType(); } @@ -233,9 +225,9 @@ void omegaWallFunctionFvPatchScalarField::write(Ostream& os) const writeEntryIfDifferent(os, "nu", "nu", nuName_); writeEntryIfDifferent(os, "nut", "nut", nutName_); - writeEntryIfDifferent(os, "Cmu", defaultCmu_, Cmu_); - writeEntryIfDifferent(os, "kappa", defaultKappa_, kappa_); - writeEntryIfDifferent(os, "E", defaultE_, E_); + writeEntryIfDifferent(os, "Cmu", turbulenceModel::standardCmu, Cmu_); + writeEntryIfDifferent(os, "kappa", turbulenceModel::standardKappa, kappa_); + writeEntryIfDifferent(os, "E", turbulenceModel::standardE, E_); writeEntry("value", os); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index 1474e5dfa3..7b769998b8 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -96,6 +96,18 @@ private: public: + // Public data + + //- Standard value for turbulence constant %Cmu + static const scalar standardCmu = 0.09; + + //- Standard value for turbulence constant %kappa + static const scalar standardKappa = 0.41; + + //- Standard value for turbulence constant %E + static const scalar standardE = 9.8; + + //- Runtime type information TypeName("turbulenceModel"); From b8c4e1f49e89e6915313f51c34e8020a6e13215c Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sat, 1 Aug 2009 13:03:49 +0200 Subject: [PATCH 15/46] added proof-of-concept test/fvSolutionCombine - could also move to utilities/miscellaneous - the dictionary compare contents might be useful enough to move into dictionary code. - usage example (w/o -rewrite): for i in $(find -name fvSolution) do fvSolutionCombine -case "${i%/system/fvSolution}" done --- .../test/fvSolutionCombine/Make/files | 3 + .../test/fvSolutionCombine/Make/options | 5 + .../fvSolutionCombine/fvSolutionCombine.C | 229 ++++++++++++++++++ 3 files changed, 237 insertions(+) create mode 100644 applications/test/fvSolutionCombine/Make/files create mode 100644 applications/test/fvSolutionCombine/Make/options create mode 100644 applications/test/fvSolutionCombine/fvSolutionCombine.C diff --git a/applications/test/fvSolutionCombine/Make/files b/applications/test/fvSolutionCombine/Make/files new file mode 100644 index 0000000000..e16d69f14d --- /dev/null +++ b/applications/test/fvSolutionCombine/Make/files @@ -0,0 +1,3 @@ +fvSolutionCombine.C + +EXE = $(FOAM_USER_APPBIN)/fvSolutionCombine diff --git a/applications/test/fvSolutionCombine/Make/options b/applications/test/fvSolutionCombine/Make/options new file mode 100644 index 0000000000..fa15f12452 --- /dev/null +++ b/applications/test/fvSolutionCombine/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume diff --git a/applications/test/fvSolutionCombine/fvSolutionCombine.C b/applications/test/fvSolutionCombine/fvSolutionCombine.C new file mode 100644 index 0000000000..1d9f1017c0 --- /dev/null +++ b/applications/test/fvSolutionCombine/fvSolutionCombine.C @@ -0,0 +1,229 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + fvSolutionCombine + +Description + Simple utility for combining fvSolution solution entries. + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Time.H" +#include "wordRe.H" +#include "OSspecific.H" + +using namespace Foam; + +// check for identical dictionary content, regardless of the order +bool checkDictionaryContent(const dictionary& dict1, const dictionary& dict2) +{ + // trivial cases first + if (&dict1 == &dict2) + { + return true; + } + else if (dict1.size() != dict2.size()) + { + return false; + } + + + forAllConstIter(dictionary, dict1, iter1) + { + const entry* entryPtr = dict2.lookupEntryPtr + ( + iter1().keyword(), + false, + false + ); + + if (!entryPtr) + { + return false; + } + + const entry& entry1 = iter1(); + const entry& entry2 = *entryPtr; + + bool ok = false; + if (entry1.isDict()) + { + if (entry2.isDict()) + { + ok = checkDictionaryContent(entry1.dict(), entry2.dict()); + } + } + else + { + ok = (entry1 == entry2); + } + + + if (!ok) + { + return false; + } + } + + return true; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + argList::noParallel(); + argList::validOptions.insert("rewrite", ""); + argList::validOptions.insert("show", ""); + argList args(argc, argv); + + Time runTime(args.rootPath(), args.caseName()); + + const word dictName("fvSolution"); + + bool optRewrite = args.optionFound("rewrite"); + bool optShow = args.optionFound("show"); + + IOdictionary solutionDict + ( + IOobject + ( + dictName, + "system", + runTime, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ); + + if (!solutionDict.found("solvers")) + { + Info<<"no solvers entry found in : " << dictName << endl; + return 2; + } + + if (optRewrite && solutionDict.instance() != "system") + { + Info<<"instance is not 'system' " + "- disabling rewrite for this file" << nl; + optRewrite = false; + } + + dictionary& solverDict = solutionDict.subDict("solvers"); + + wordList names = solverDict.toc(); + wordList oldNames = names; + + bool changed = false; + for (label orig = 0; orig < names.size()-1; ++orig) + { + // skip patterns or entries that have already been done + if (names[orig].empty() || wordRe::isPattern(names[orig])) + { + continue; + } + + const dictionary& dict1 = solverDict.subDict(names[orig]); + + for (label check = orig+1; check < names.size(); ++check) + { + // skip patterns or entries that have already been done + if (names[check].empty() || wordRe::isPattern(names[check])) + { + continue; + } + + const dictionary& dict2 = solverDict.subDict(names[check]); + + // check for identical content + if (checkDictionaryContent(dict1, dict2)) + { + names[orig] += "|" + names[check]; + names[check].clear(); + changed = true; + } + } + } + + if (changed) + { + forAll(names, nameI) + { + if (names[nameI].empty()) + { + solverDict.remove(oldNames[nameI]); + Info<<" #remove " << oldNames[nameI]; + } + else + { + Info<< " " << oldNames[nameI]; + + if (names[nameI] != oldNames[nameI]) + { + // make "(abc|def)" pattern + keyType renamed( "(" + names[nameI] + ")", true); + + solverDict.changeKeyword(oldNames[nameI], renamed); + + Info<< " -> " << renamed; + } + } + Info<< endl; + } + + if (optRewrite) + { + mvBak(solutionDict.objectPath(), "orig"); + Info<< "Backup to .orig" << nl + << "Writing " << solutionDict.objectPath() << nl << endl; + + solutionDict.regIOobject::write(); + } + else if (optShow) + { + IOobject::writeDivider(Info); + solutionDict.dictionary::write(Info, false); + } + else + { + Info<< "\nFile not rewritten" << endl; + } + } + else + { + Info<< "no changes" << endl; + } + + Info<< "Done\n" << endl; + + return changed ? 0 : 1; +} + + +// ************************************************************************* // From 8d7897864566958bce8259b258b95dd103191534 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sat, 1 Aug 2009 13:31:50 +0200 Subject: [PATCH 16/46] fixed bad fvSolution entries for tutorial cases - rhoCentralFoam --- .../LadenburgJet60psi/system/fvSolution | 21 +++++-------------- .../biconic25-55Run35/system/fvSolution | 20 ++++-------------- .../forwardStep/system/fvSolution | 21 +++++-------------- .../obliqueShock/system/fvSolution | 21 +++++-------------- .../shockTube/system/fvSolution | 21 +++++-------------- .../wedge15Ma5/system/fvSolution | 21 +++++-------------- 6 files changed, 29 insertions(+), 96 deletions(-) diff --git a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution index 09395b92a3..94f758fbe1 100644 --- a/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/LadenburgJet60psi/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers e { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution index 1b0e6d8a3e..e552d56d07 100644 --- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,8 @@ solvers e { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-09 relTol 0.1; + $U; + relTol 0.1; } } diff --git a/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution b/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution index 48811594f1..5c6a40dae6 100644 --- a/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/forwardStep/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution b/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution index 48811594f1..5c6a40dae6 100644 --- a/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/obliqueShock/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution b/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution index 48811594f1..5c6a40dae6 100644 --- a/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/shockTube/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } diff --git a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution index 48811594f1..5c6a40dae6 100644 --- a/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution +++ b/tutorials/compressible/rhoCentralFoam/wedge15Ma5/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,17 +17,7 @@ FoamFile solvers { - rho - { - solver diagonal; - } - - rhoU - { - solver diagonal; - } - - rhoE + "(rho|rhoU|rhoE)" { solver diagonal; } @@ -43,10 +33,9 @@ solvers h { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-10 relTol 0; + $U; + tolerance 1e-10; + relTol 0; } } From d749aac04defba04fc4cbd5d3fd36302721d780f Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sat, 1 Aug 2009 14:51:59 +0200 Subject: [PATCH 17/46] adjust tutorial fvSolution to use regular expressions and $variable --- .../XiFoam/les/pitzDaily/system/fvSolution | 90 +------------- .../XiFoam/les/pitzDaily3D/system/fvSolution | 89 +------------- .../moriyoshiHomogeneous/system/fvSolution | 89 +------------- .../dieselFoam/aachenBomb/system/fvSolution | 44 +------ .../engineFoam/kivaTest/system/fvSolution | 89 +------------- .../angledDuct/system/fvSolution | 93 ++++---------- .../les/pitzDaily/system/fvSolution | 41 +------ .../rhoPisoFoam/ras/cavity/system/fvSolution | 49 +------- .../angledDuctExplicit/system/fvSolution | 20 +-- .../angledDuctImplicit/system/fvSolution | 18 +-- .../forwardStep/system/fvSolution | 28 +---- .../rhoSonicFoam/shockTube/system/fvSolution | 28 +---- .../rhopSonicFoam/shockTube/system/fvSolution | 28 +---- .../wedge15Ma5/system/fvSolution | 28 +---- .../laminar/forwardStep/system/fvSolution | 15 +-- .../laminar/shockTube/system/fvSolution | 20 +-- .../ras/nacaAirfoil/system/fvSolution | 39 +----- .../sonicFoam/ras/prism/system/fvSolution | 35 +----- .../decompressionTank/system/fvSolution | 5 +- .../mhdFoam/hartmann/system/fvSolution | 29 ++--- .../hotRoom/system/fvSolution | 39 +----- .../hotRoom/system/fvSolution | 40 +----- .../iglooWithFridges/system/fvSolution | 40 +----- .../buoyantPisoFoam/hotRoom/system/fvSolution | 39 +----- .../hotRoom/system/fvSolution | 42 +------ .../hotRadiationRoom/system/fvSolution | 38 +----- .../hotRadiationRoomFvDOM/system/fvSolution | 45 +------ .../system/bottomAir/fvSolution | 55 ++------- .../system/heater/fvSolution | 2 +- .../system/leftSolid/fvSolution | 2 +- .../system/rightSolid/fvSolution | 2 +- .../system/topAir/fvSolution | 53 ++------ .../system/bottomAir/fvSolution | 54 ++------- .../system/heater/fvSolution | 2 +- .../system/leftSolid/fvSolution | 2 +- .../system/rightSolid/fvSolution | 2 +- .../system/topAir/fvSolution | 53 ++------ .../mixerVessel2D/system/fvSolution | 25 +--- .../boundaryLaunderSharma/system/fvSolution | 32 +---- .../boundaryWallFunctions/system/fvSolution | 32 +---- .../channelFoam/channel395/system/fvSolution | 31 +---- .../movingCone/system/fvSolution | 33 +++-- .../pimpleFoam/t-junction/system/fvSolution | 33 +---- .../pisoFoam/les/pitzDaily/system/fvSolution | 31 +---- .../pitzDailyDirectMapped/system/fvSolution | 31 +---- .../pisoFoam/ras/cavity/system/fvSolution | 39 +----- .../squareBump/system/fvSolution | 7 +- .../simpleFoam/airFoil2D/system/fvSolution | 13 +- .../simpleFoam/motorBike/system/fvSolution | 59 ++++----- .../simpleFoam/pitzDaily/system/fvSolution | 40 +----- .../pitzDailyExptInlet/system/fvSolution | 40 +----- .../simpleSRFFoam/mixer/system/fvSolution | 49 +------- .../simplifiedSiwek/system/fvSolution | 105 ++-------------- .../filter/system/fvSolution | 114 ++++-------------- .../evaporationTest/system/fvSolution | 60 ++------- .../simplifiedSiwek/system/fvSolution | 112 +---------------- .../SnakeRiverCanyon/system/fvSolution | 46 +++---- .../bubbleFoam/bubbleColumn/system/fvSolution | 38 +----- .../les/throttle/system/fvSolution | 39 +----- .../les/throttle3D/system/fvSolution | 39 +----- .../ras/throttle/system/fvSolution | 37 +----- .../les/depthCharge2D/system/fvSolution | 22 +--- .../les/depthCharge3D/system/fvSolution | 22 +--- .../damBreakWithObstacle/system/fvSolution | 27 +---- .../mixerVessel2D/system/fvSolution | 3 +- .../laminar/damBreak/system/fvSolution | 3 +- .../les/nozzleFlow2D/system/fvSolution | 22 +--- .../interFoam/ras/damBreak/system/fvSolution | 34 +----- .../laminar/damBreak4phase/system/fvSolution | 15 +-- .../damBreak4phaseFine/system/fvSolution | 15 +-- .../settlingFoam/ras/dahl/system/fvSolution | 38 +----- .../settlingFoam/ras/tank3D/system/fvSolution | 38 +----- .../twoPhaseEulerFoam/bed/system/fvSolution | 48 +------- .../twoPhaseEulerFoam/bed2/system/fvSolution | 49 +------- .../bubbleColumn/system/fvSolution | 46 +------ .../plateHole/system/fvSolution | 16 +-- .../beamEndLoad/system/fvSolution | 18 +-- 77 files changed, 377 insertions(+), 2511 deletions(-) diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution index 6213437696..1f4e90f580 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,13 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; - relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution index 6213437696..6fe4799640 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,14 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution index d7814dd904..f9fbedc096 100644 --- a/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution +++ b/tutorials/combustion/XiFoam/ras/moriyoshiHomogeneous/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,14 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution index 0d7e29c2b5..d5b1de2e9a 100644 --- a/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution +++ b/tutorials/combustion/dieselFoam/aachenBomb/system/fvSolution @@ -1,14 +1,14 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - p { solver PCG; @@ -41,31 +25,13 @@ solvers relTol 0; } - Yi + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-06; - relTol 0; } - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - epsilon + "(U|Yi|h|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution index 1891fe83bf..6184f55f0c 100644 --- a/tutorials/combustion/engineFoam/kivaTest/system/fvSolution +++ b/tutorials/combustion/engineFoam/kivaTest/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,79 +25,14 @@ solvers relTol 0; } - ft + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - fu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - b - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Xi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - Su - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - hu - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon + "(U|ft|fu|b|Xi|Su|h|hu|R|k|epsilon)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution b/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution index 583c3637aa..2db2f5c065 100644 --- a/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution +++ b/tutorials/compressible/rhoPimpleFoam/angledDuct/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,10 +17,24 @@ FoamFile solvers { - rho + p { solver PCG; preconditioner DIC; + tolerance 1e-06; + relTol 0.01; + } + + pFinal + { + $p; + tolerance 1e-06; + relTol 0; + } + + rho + { + $p; tolerance 1e-05; relTol 0; } @@ -33,77 +47,15 @@ solvers relTol 0.1; } - UFinal + h { $U; } + + "(UFinal|hFinal|R|k|epsilon|omega)" { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-05; relTol 0; } - p - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0.01; - } - - pFinal - { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PIMPLE @@ -117,12 +69,11 @@ PIMPLE relaxationFactors { - U 0.7; p 0.3; rho 0.05; + U 0.7; h 0.7; - k 0.7; - omega 0.7; + "(k|epsilon|omega)" 0.7; } diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution index a945332784..01450c89ea 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,7 +17,7 @@ FoamFile solvers { - rho + "(p|rho)" { solver PCG; preconditioner DIC; @@ -33,42 +33,9 @@ solvers relTol 0; } - p + "(U|k|B|nuTilda)" { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - nuTilda - { - solver PBiCG; - preconditioner DILU; + $h; tolerance 1e-05; relTol 0; } diff --git a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution b/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution index 72b829ca39..fd30592f44 100644 --- a/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution +++ b/tutorials/compressible/rhoPisoFoam/ras/cavity/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,22 +17,6 @@ FoamFile solvers { - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PCG; @@ -41,39 +25,14 @@ solvers relTol 0; } - h + rho { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - omega + "(U|h|R|k|epsilon|omega)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution index 844c55c57c..9dac9d2fb0 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctExplicit/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -46,20 +46,9 @@ solvers relTol 0.1; } - k + "(k|epsilon)" { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-07; - relTol 0.1; - } - - epsilon - { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; + $U; tolerance 1e-07; relTol 0.1; } @@ -76,8 +65,7 @@ relaxationFactors p 0.3; rho 0.05; U 0.7; - k 0.7; - epsilon 0.7; + "(k|epsilon)" 0.7; h 0.5; } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution index 334b1287bd..69ed2df45a 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/system/fvSolution @@ -1,14 +1,14 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -37,16 +37,7 @@ solvers relTol 0.1; } - k - { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-07; - relTol 0.1; - } - - epsilon + "(k|epsilon)" { solver smoothSolver; smoother GaussSeidel; @@ -68,8 +59,7 @@ relaxationFactors p 0.3; rho 1; U 0.7; - k 0.9; - epsilon 0.9; + "(k|epsilon)" 0.9; h 0.9; } diff --git a/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution b/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution index 9a29517e84..53a811563e 100644 --- a/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution +++ b/tutorials/compressible/rhoSonicFoam/forwardStep/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,31 +17,7 @@ FoamFile solvers { - p - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE + "(p|rho|rhoU|rhoE)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution b/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution index 9a29517e84..53a811563e 100644 --- a/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution +++ b/tutorials/compressible/rhoSonicFoam/shockTube/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,31 +17,7 @@ FoamFile solvers { - p - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE + "(p|rho|rhoU|rhoE)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution b/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution index 202961f804..aad563c1fd 100644 --- a/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution +++ b/tutorials/compressible/rhopSonicFoam/shockTube/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,31 +25,7 @@ solvers relTol 0; } - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoH + "(rho|rhoU|rhoE|rhoH)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution b/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution index 296ffb3319..a7d876eeb2 100644 --- a/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution +++ b/tutorials/compressible/rhopSonicFoam/wedge15Ma5/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,31 +25,7 @@ solvers relTol 0; } - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoU - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoE - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - rhoH + "(rho|rhoU|rhoE|rhoH)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution index 93b01a8285..45bb949628 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,10 +25,9 @@ solvers relTol 0; } - U + "(U|e)" { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } @@ -40,14 +39,6 @@ solvers tolerance 1e-05; relTol 0; } - - e - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution index 58c5fb5202..b894099c4c 100644 --- a/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution +++ b/tutorials/compressible/sonicFoam/laminar/shockTube/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,15 +17,7 @@ FoamFile solvers { - p - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } - - U + "(p|U|e)" { solver PBiCG; preconditioner DILU; @@ -40,14 +32,6 @@ solvers tolerance 1e-15; relTol 0; } - - e - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-15; - relTol 0; - } } PISO diff --git a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution index b7e967eeb2..7c31faeadb 100644 --- a/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/nacaAirfoil/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -33,42 +33,9 @@ solvers relTol 0; } - U + "(U|e|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - e - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-08; relTol 0; } diff --git a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution index 20afd845a0..fc9fc84695 100644 --- a/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution +++ b/tutorials/compressible/sonicFoam/ras/prism/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -33,45 +33,20 @@ solvers relTol 0; } - U + "(U|e|R)" { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } - e + "(k|epsilon)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-08; relTol 0; } - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution index 0b8bc2b1c3..f63bb3a65b 100644 --- a/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution +++ b/tutorials/compressible/sonicLiquidFoam/decompressionTank/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -27,8 +27,7 @@ solvers U { - solver PBiCG; - preconditioner DILU; + $p; tolerance 1e-05; relTol 0; } diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution index 177af26b52..8e277b7c41 100644 --- a/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution +++ b/tutorials/electromagnetics/mhdFoam/hartmann/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,26 +25,17 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - pB { - solver PCG; - preconditioner DIC; + $p; + tolerance 1e-05; + relTol 0; + } + + "(U|B)" + { + solver PBiCG; + preconditioner DILU; tolerance 1e-05; relTol 0; } diff --git a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution index 39cc9a45f4..f0a55b12f3 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqPisoFoam/hotRoom/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -27,45 +27,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - T - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R + "(U|T|k|epsilon|R)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution index 8524660a6a..60b3f8c4c8 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,39 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - T - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - R + "(U|T|k|epsilon|R)" { solver PBiCG; preconditioner DILU; @@ -79,9 +47,7 @@ relaxationFactors p 0.7; U 0.2; T 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; } diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution index f24144294e..cb7432a54a 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,39 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - T - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - R + "(U|T|k|epsilon|R)" { solver PBiCG; preconditioner DILU; @@ -79,9 +47,7 @@ relaxationFactors p 0.3; U 0.7; T 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; } diff --git a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution index 2d5e8be034..3fb15a9cba 100644 --- a/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantPisoFoam/hotRoom/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -35,45 +35,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-06; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R + "(U|h|k|epsilon|R)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution index 8d67100cf8..50c1592526 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,39 +25,7 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R + "(U|h|k|epsilon|R)" { solver PBiCG; preconditioner DILU; @@ -70,7 +38,7 @@ SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; - pRefValue 1e5; + pRefValue 100000; } relaxationFactors @@ -79,9 +47,7 @@ relaxationFactors p 0.7; U 0.2; h 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution index b450f1eb75..048416fff6 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoom/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,31 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -59,8 +35,7 @@ solvers G { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-05; relTol 0.1; } @@ -69,8 +44,8 @@ solvers SIMPLE { nNonOrthogonalCorrectors 0; - pRefCell 0; - pRefValue 0; + pRefCell 0; + pRefValue 0; } relaxationFactors @@ -79,8 +54,7 @@ relaxationFactors p 0.3; U 0.7; h 0.7; - k 0.7; - epsilon 0.7; + "(k|epsilon)" 0.7; G 0.7; } diff --git a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution index 14ade54123..1fa2231e58 100644 --- a/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleRadiationFoam/hotRadiationRoomFvDOM/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -29,39 +29,7 @@ solvers mergeLevels 1; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - Ii + "(U|h|k|epsilon|Ii)" { solver PBiCG; preconditioner DILU; @@ -73,18 +41,17 @@ solvers SIMPLE { nNonOrthogonalCorrectors 0; - pRefCell 0; - pRefValue 0; + pRefCell 0; + pRefValue 0; } relaxationFactors { - rho 1.0; + rho 1; p 0.3; U 0.7; h 0.7; - k 0.7; - epsilon 0.7; + "(k|epsilon)" 0.7; "ILambda.*" 0.7; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution index 3248e05562..16947842af 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -31,68 +32,38 @@ solvers smoother GaussSeidel; - cacheAgglomeration true; + cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/heater/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution index 3248e05562..27f5cfb1dd 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/system/topAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -35,64 +36,34 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution index 3248e05562..a2f76a21ca 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/bottomAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -35,64 +36,35 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/heater/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/leftSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution index be20334b74..19370a0e39 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/rightSolid/fvSolution @@ -22,7 +22,7 @@ solvers preconditioner DIC; tolerance 1E-06; relTol 0; - }; + } } PISO diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution index 3248e05562..27f5cfb1dd 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/topAir/fvSolution @@ -22,7 +22,8 @@ solvers preconditioner DIC; tolerance 1e-8; relTol 0; - }; + } + p { solver GAMG; @@ -35,64 +36,34 @@ solvers nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; + } + pFinal { - solver GAMG; + $p; tolerance 1e-8; relTol 0; + } - smoother GaussSeidel; - - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; U { solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; - }; + } h { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0.1; - }; - hFinal - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + } - k + "(hFinal|k|epsilon|R)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; + $U; + } } PISO diff --git a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/fvSolution b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/fvSolution index 45a1d6fdeb..7aa408cd0e 100644 --- a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/fvSolution +++ b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -29,25 +29,7 @@ solvers mergeLevels 1; } - U - { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-07; - relTol 0.1; - } - - k - { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-07; - relTol 0.1; - } - - epsilon + "(U|k|epsilon)" { solver smoothSolver; smoother GaussSeidel; @@ -68,8 +50,7 @@ relaxationFactors { p 0.3; U 0.5; - k 0.5; - epsilon 0.5; + "(k|epsilon)" 0.5; } diff --git a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSolution b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSolution index 25a2d8138d..0eb08d2b49 100644 --- a/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSolution +++ b/tutorials/incompressible/boundaryFoam/boundaryLaunderSharma/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,31 +25,7 @@ solvers relTol 0; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - nuTilda + "(k|epsilon|R|nuTilda)" { solver PBiCG; preconditioner DILU; @@ -67,9 +43,7 @@ PISO relaxationFactors { U 0.5; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; nuTilda 0.7; } diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSolution b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSolution index a165f8313b..a8d9091ac9 100644 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSolution +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctions/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,31 +25,7 @@ solvers relTol 0; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - nuTilda + "(k|epsilon|R|nuTilda)" { solver PBiCG; preconditioner DILU; @@ -69,9 +45,7 @@ PISO relaxationFactors { U 0.5; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; nuTilda 0.7; } diff --git a/tutorials/incompressible/channelFoam/channel395/system/fvSolution b/tutorials/incompressible/channelFoam/channel395/system/fvSolution index 09f4077520..75827c6adc 100644 --- a/tutorials/incompressible/channelFoam/channel395/system/fvSolution +++ b/tutorials/incompressible/channelFoam/channel395/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -27,37 +27,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-06; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - nuTilda + "(U|k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution index 98831f2c8f..5e3959e489 100644 --- a/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution +++ b/tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution @@ -17,14 +17,6 @@ FoamFile solvers { - pcorr - { - solver PCG; - preconditioner DIC; - tolerance 0.01; - relTol 0; - } - p { solver PCG; @@ -33,14 +25,27 @@ solvers relTol 0.05; } + pcorr + { + $p; + tolerance 0.01; + relTol 0; + } + pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-06; relTol 0; } + cellMotionUx + { + $p; + tolerance 1e-08; + relTol 0; + } + U { solver PBiCG; @@ -48,14 +53,6 @@ solvers tolerance 1e-05; relTol 0; } - - cellMotionUx - { - solver PCG; - preconditioner DIC; - tolerance 1e-08; - relTol 0; - } } PIMPLE diff --git a/tutorials/incompressible/pimpleFoam/t-junction/system/fvSolution b/tutorials/incompressible/pimpleFoam/t-junction/system/fvSolution index 5a9f970576..ee386897ef 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/system/fvSolution +++ b/tutorials/incompressible/pimpleFoam/t-junction/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -31,14 +31,9 @@ solvers pFinal { - solver GAMG; + $p; tolerance 1e-06; relTol 0; - smoother GaussSeidel; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } U @@ -49,26 +44,9 @@ solvers relTol 0.1; } - UFinal + "(UFinal|k|epsilon)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-05; relTol 0; } @@ -86,8 +64,7 @@ PIMPLE relaxationFactors { U 1; - k 1; - epsilon 1; + "(k|epsilon)" 1; } diff --git a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSolution b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSolution index 80345d9518..cc3d066237 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/incompressible/pisoFoam/les/pitzDaily/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -27,37 +27,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-06; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - nuTilda + "(U|k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/system/fvSolution b/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/system/fvSolution index 80345d9518..cc3d066237 100644 --- a/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/system/fvSolution +++ b/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -27,37 +27,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-06; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - nuTilda + "(U|k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution index aeb8d20166..1441d37bd8 100644 --- a/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution +++ b/tutorials/incompressible/pisoFoam/ras/cavity/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -27,45 +27,12 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-06; relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - nuTilda + "(U|k|epsilon|R|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution index 8bc3472e95..1f0138d380 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSolution @@ -22,15 +22,14 @@ solvers preconditioner DIC; tolerance 1e-6; relTol 0.01; - }; + } hFinal { - solver PCG; - preconditioner DIC; + $h; tolerance 1e-8; relTol 0; - }; + } hU { diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSolution b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSolution index 8088687562..27efb646e8 100644 --- a/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/airFoil2D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -31,16 +31,7 @@ solvers mergeLevels 1; } - U - { - solver smoothSolver; - smoother GaussSeidel; - nSweeps 2; - tolerance 1e-08; - relTol 0.1; - } - - nuTilda + "(U|nuTilda)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution index 2dcaef0c14..e93978fccf 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution @@ -1,8 +1,8 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -10,6 +10,7 @@ FoamFile version 2.0; format ascii; class dictionary; + location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -18,44 +19,26 @@ solvers { p { - solver GAMG; - tolerance 1e-7; - relTol 0.1; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; + solver GAMG; + tolerance 1e-07; + relTol 0.1; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; cacheAgglomeration on; - agglomerator faceAreaPair; + agglomerator faceAreaPair; nCellsInCoarsestLevel 10; - mergeLevels 1; - }; + mergeLevels 1; + } - U + "(U|k|omega)" { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-8; - relTol 0.1; - nSweeps 1; - }; - - k - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-8; - relTol 0.1; - nSweeps 1; - }; - - omega - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-8; - relTol 0.1; - nSweeps 1; - }; + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-08; + relTol 0.1; + nSweeps 1; + } } SIMPLE @@ -67,8 +50,8 @@ relaxationFactors { p 0.3; U 0.7; - k 0.7; - omega 0.7; + "(k|omega)" 0.7; } + // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSolution b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSolution index b0b6699e0d..72642670c3 100644 --- a/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/pitzDaily/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,39 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - nuTilda + "(U|k|epsilon|R|nuTilda)" { solver PBiCG; preconditioner DILU; @@ -75,9 +43,7 @@ relaxationFactors { p 0.3; U 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; nuTilda 0.7; } diff --git a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSolution b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSolution index b0b6699e0d..72642670c3 100644 --- a/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/pitzDailyExptInlet/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,39 +25,7 @@ solvers relTol 0.01; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - nuTilda + "(U|k|epsilon|R|nuTilda)" { solver PBiCG; preconditioner DILU; @@ -75,9 +43,7 @@ relaxationFactors { p 0.3; U 0.7; - k 0.7; - epsilon 0.7; - R 0.7; + "(k|epsilon|R)" 0.7; nuTilda 0.7; } diff --git a/tutorials/incompressible/simpleSRFFoam/mixer/system/fvSolution b/tutorials/incompressible/simpleSRFFoam/mixer/system/fvSolution index a74ada8eae..eb1821dab7 100644 --- a/tutorials/incompressible/simpleSRFFoam/mixer/system/fvSolution +++ b/tutorials/incompressible/simpleSRFFoam/mixer/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,47 +25,7 @@ solvers relTol 0.01; } - Urel - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0.1; - } - - nuTilda + "(Urel|k|epsilon|omega|R|nuTilda)" { solver PBiCG; preconditioner DILU; @@ -83,10 +43,7 @@ relaxationFactors { p 0.3; Urel 0.7; - k 0.7; - epsilon 0.7; - omega 0.7; - R 0.7; + "(k|epsilon|omega|R)" 0.7; nuTilda 0.7; } diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution index 5e1041dd83..9649868ce8 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,118 +17,37 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; tolerance 1e-05; relTol 0; - }; - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + } + p { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; - }; - G - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - }; - Yi - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - CO2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - CH4 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - H2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - CO - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - h + } + + "(U|h|R|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; - }; - R + } + + "(Yi|CO2|O2|N2|CH4|H2|H2O|CO)" { solver PBiCG; preconditioner DILU; - tolerance 1e-05; + tolerance 1e-06; relTol 0; - }; - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + } } PISO diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution index cdefcfb103..ea76163b1f 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,108 +17,50 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; tolerance 1e-05; relTol 0; - }; - U + } + + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; - }; + } + p { - solver GAMG; - tolerance 0; - relTol 0.1; - - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - + solver GAMG; + tolerance 0; + relTol 0.1; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; + agglomerator faceAreaPair; + mergeLevels 1; + } + pFinal { - solver GAMG; - tolerance 1e-6; - relTol 0; + $p; + tolerance 1e-06; + relTol 0; + } - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - - cacheAgglomeration true; - - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; - G - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - }; - Yi + "(Yi|O2|N2|H2O)" { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; - }; - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - }; - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + } } PISO @@ -128,7 +70,6 @@ PISO nCorrectors 2; nNonOrthogonalCorrectors 0; momentumPredictor yes; -// nUCorrectors 2; } additional @@ -140,14 +81,7 @@ additional relaxationFactors { -/* - U 1; - k 1; - kepsilon 1; - h 1; - rho 1; - p 1; -*/ } + // ************************************************************************* // diff --git a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution index f0ef609117..6c2c92da9f 100644 --- a/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution +++ b/tutorials/lagrangian/reactingParcelFoam/evaporationTest/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,20 +17,22 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; tolerance 1e-05; relTol 0; } - U + + "(U|h|k|epsilon)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; } + p { solver PCG; @@ -38,62 +40,14 @@ solvers tolerance 1e-06; relTol 0; } - G - { - solver PCG; - preconditioner DIC; - tolerance 1e-05; - relTol 0; - } - Yi + + "(Yi|O2|N2|H2O)" { solver PBiCG; preconditioner DILU; tolerance 1e-06; relTol 0; } - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution index 9b1a12fa2b..944868efc4 100644 --- a/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution +++ b/tutorials/lagrangian/rhoPisoTwinParcelFoam/simplifiedSiwek/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,7 +17,7 @@ FoamFile solvers { - rho + "(rho|G)" { solver PCG; preconditioner DIC; @@ -25,14 +25,6 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - p { solver PBiCG; @@ -41,108 +33,16 @@ solvers relTol 0; } - G + "(U|h|R|k|epsilon)" { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-05; relTol 0; } - Yi + "(Yi|CO2|O2|N2|CH4|H2|H2O|CO)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - CO2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - O2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - N2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - CH4 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - H2 - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - H2O - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - CO - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-06; - relTol 0; - } - - h - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; + $p; } } diff --git a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution index eab8882126..898ec2420b 100644 --- a/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution +++ b/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -19,44 +19,38 @@ solvers { p { - solver PCG; - preconditioner DIC; - tolerance 1e-06; - relTol 0; - }; + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } U { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - }; + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + cellDisplacement { solver GAMG; - tolerance 1e-8; + tolerance 1e-08; relTol 0; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; - }; - cellMotionU + } + + "(cellMotionU|cellMotionUz)" { - solver PCG; - preconditioner DIC; - tolerance 1e-08; - relTol 0; - }; - cellMotionUz - { - solver PCG; - preconditioner DIC; - tolerance 1e-08; - relTol 0; - }; + $p; + tolerance 1e-08; + relTol 0; + } } diff --git a/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution b/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution index d59f49c6ca..8b5c05a6d2 100644 --- a/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution +++ b/tutorials/multiphase/bubbleFoam/bubbleColumn/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,7 +25,7 @@ solvers relTol 0; } - Ua + "(Ua|Ub|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -33,45 +33,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution index ae28961258..faf3b65941 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/fvSolution @@ -1,14 +1,14 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -17,31 +17,7 @@ FoamFile solvers { - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - U + "(rho|U|k|omega)" { solver PBiCG; preconditioner DILU; @@ -65,16 +41,9 @@ solvers pFinal { - solver GAMG; + $p; tolerance 1e-08; relTol 0; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } } diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution index ae28961258..faf3b65941 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/fvSolution @@ -1,14 +1,14 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -17,31 +17,7 @@ FoamFile solvers { - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - U + "(rho|U|k|omega)" { solver PBiCG; preconditioner DILU; @@ -65,16 +41,9 @@ solvers pFinal { - solver GAMG; + $p; tolerance 1e-08; relTol 0; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } } diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution index 188e593e19..7ab713bdc0 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,31 +17,7 @@ FoamFile solvers { - omega - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - rho - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - U + "(rho|U|k|omega)" { solver PBiCG; preconditioner DILU; @@ -65,16 +41,9 @@ solvers pFinal { - solver GAMG; + $p; tolerance 1e-08; relTol 0; - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - cacheAgglomeration true; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; } } diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution index 872b88e305..9a128b27fd 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge2D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -78,7 +77,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; @@ -93,23 +91,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution index 872b88e305..9a128b27fd 100644 --- a/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution +++ b/tutorials/multiphase/compressibleInterFoam/les/depthCharge3D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -78,7 +77,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; @@ -93,23 +91,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution index 577db9c0f6..0ca3851b34 100644 --- a/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution +++ b/tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 0.0001; relTol 0; maxIter 100; @@ -73,7 +72,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-08; relTol 0; maxIter 20; @@ -88,23 +86,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; @@ -121,9 +103,8 @@ PISO nAlphaCorr 1; nAlphaSubCycles 3; cAlpha 1; - - pRefPoint (0.51 0.51 0.51); - pRefValue 0; + pRefPoint ( 0.51 0.51 0.51 ); + pRefValue 0; } diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution index b9b4490f4c..53033e72f4 100644 --- a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/fvSolution @@ -35,8 +35,7 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution index fe91ceb9b0..a4167c7f07 100644 --- a/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution +++ b/tutorials/multiphase/interFoam/laminar/damBreak/system/fvSolution @@ -35,8 +35,7 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution index 296fc3df64..9aa23c131a 100644 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -73,7 +72,6 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; @@ -88,23 +86,7 @@ solvers nSweeps 1; } - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - B - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda + "(k|B|nuTilda)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution index 921889c586..322cb00b5a 100644 --- a/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution +++ b/tutorials/multiphase/interFoam/ras/damBreak/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -35,8 +35,7 @@ solvers pFinal { - solver PCG; - preconditioner DIC; + $p; tolerance 1e-07; relTol 0; } @@ -49,34 +48,9 @@ solvers relTol 0; } - k + "(k|epsilon|R|nuTilda)" { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - R - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-08; - relTol 0; - } - - nuTilda - { - solver PBiCG; - preconditioner DILU; + $U; tolerance 1e-08; relTol 0; } diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution index 9f6930eccf..a423ce36b6 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 2; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -73,22 +72,12 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; } - U - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-08; - relTol 0; - nSweeps 1; - } - - alpha + "(U|alpha)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution index 9f6930eccf..a423ce36b6 100644 --- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution +++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -34,7 +34,6 @@ solvers agglomerator faceAreaPair; mergeLevels 2; } - tolerance 1e-05; relTol 0; maxIter 100; @@ -73,22 +72,12 @@ solvers agglomerator faceAreaPair; mergeLevels 1; } - tolerance 1e-07; relTol 0; maxIter 20; } - U - { - solver smoothSolver; - smoother GaussSeidel; - tolerance 1e-08; - relTol 0; - nSweeps 1; - } - - alpha + "(U|alpha)" { solver smoothSolver; smoother GaussSeidel; diff --git a/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution b/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution index 148cdcddc5..ba4fe0665d 100644 --- a/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution +++ b/tutorials/multiphase/settlingFoam/ras/dahl/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,7 +17,7 @@ FoamFile solvers { - p + "(p|rho)" { solver PCG; preconditioner DIC; @@ -25,39 +25,7 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-07; - relTol 0; - } - - Alpha + "(U|k|epsilon|Alpha)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution b/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution index 148cdcddc5..ba4fe0665d 100644 --- a/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution +++ b/tutorials/multiphase/settlingFoam/ras/tank3D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,7 +17,7 @@ FoamFile solvers { - p + "(p|rho)" { solver PCG; preconditioner DIC; @@ -25,39 +25,7 @@ solvers relTol 0; } - U - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-07; - relTol 0; - } - - rho - { - solver PCG; - preconditioner DIC; - tolerance 1e-07; - relTol 0; - } - - Alpha + "(U|k|epsilon|Alpha)" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution index 0589345336..d346fa4ee0 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution @@ -1,14 +1,14 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object fvSolution; @@ -32,7 +32,7 @@ solvers mergeLevels 1; } - Ua + "(Ua|Ub|Theta|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,53 +40,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - Theta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution index 733ad77e71..698e72f16d 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bed2/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -32,7 +32,7 @@ solvers mergeLevels 1; } - Ua + "(Ua|Ub|Theta|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,53 +40,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - Theta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO @@ -106,8 +66,7 @@ relaxationFactors alpha 1; beta 1; Theta 1; - k 1; - epsilon 1; + "(k|epsilon)" 1; } diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution index efb0cb6b6a..5844dc4fef 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bubbleColumn/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -32,7 +32,7 @@ solvers mergeLevels 1; } - Ua + "(Ua|Ub|Theta|k|epsilon)" { solver PBiCG; preconditioner DILU; @@ -40,53 +40,13 @@ solvers relTol 0; } - Ub - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - alpha + "(alpha|beta)" { solver PBiCG; preconditioner DILU; tolerance 1e-10; relTol 0; } - - beta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-10; - relTol 0; - } - - Theta - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - k - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } - - epsilon - { - solver PBiCG; - preconditioner DILU; - tolerance 1e-05; - relTol 0; - } } PISO diff --git a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution index e921d9233a..94b968c1c9 100644 --- a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution +++ b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,19 +17,7 @@ FoamFile solvers { - D - { - solver GAMG; - tolerance 1e-06; - relTol 0.9; - smoother GaussSeidel; - cacheAgglomeration true; - nCellsInCoarsestLevel 20; - agglomerator faceAreaPair; - mergeLevels 1; - } - - T + "(D|T)" { solver GAMG; tolerance 1e-06; diff --git a/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution b/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution index fd610d55c5..8dabfdac0a 100644 --- a/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution +++ b/tutorials/stressAnalysis/solidEquilibriumDisplacementFoam/beamEndLoad/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,25 +17,13 @@ FoamFile solvers { - D + "(D|Dcorr)" { solver GAMG; tolerance 1e-06; relTol 0.99; smoother GaussSeidel; - cacheAgglomeration true; - nCellsInCoarsestLevel 6; - agglomerator faceAreaPair; - mergeLevels 1; - } - - Dcorr - { - solver GAMG; - tolerance 1e-06; - relTol 0.99; - smoother GaussSeidel; - cacheAgglomeration true; + cacheAgglomeration true; nCellsInCoarsestLevel 6; agglomerator faceAreaPair; mergeLevels 1; From ff5137e459530d2bbdf73752d55b6e4d3e7c941e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 2 Aug 2009 09:44:00 +0200 Subject: [PATCH 18/46] more consistent naming convention for aliases - old-style (left untouched for now): app, lib, run, sol, tut, util - new-style: foamApps, foamLib, foamRun, foamSol, foamTut, foamUtils - additional aliases: userApps, whichFoam NB: ideally we'd have 'foamSrc' instead of 'src'. Do we really need 'foamsrc' and 'foamfv' anyhow? --- bin/foamCleanPath | 53 +++++++++++++++++++++++++++++------------------ etc/aliases.csh | 28 ++++++++++++++++++------- etc/aliases.sh | 28 ++++++++++++++++++------- 3 files changed, 73 insertions(+), 36 deletions(-) diff --git a/bin/foamCleanPath b/bin/foamCleanPath index dca96f490e..225aa0e943 100755 --- a/bin/foamCleanPath +++ b/bin/foamCleanPath @@ -32,35 +32,48 @@ # Prints its argument (which should be a ':' separated path) # without all # - duplicate elements -# - (if '-strip') non-accessible directories # - elements whose start matches a wildcard +# - inaccessible directories (with the -strip option) # # Note: # - this routine will fail when directories have embedded spaces # - false matches possible if a wildcard contains '.' (sed regex) #------------------------------------------------------------------------------ -if [ "$#" -lt 1 -o "$1" = "-h" -o "$1" = "-help" ] -then - cat <&2 -Usage: ${0##*/} [-strip] path [wildcard] .. [wildcard] +usage() { + cat <&2 +usage: ${0##*/} [-strip] path [wildcard] .. [wildcard] + + Prints its argument (which should be a ':' separated list) cleansed from + - duplicate elements + - elements whose start matches one of the wildcard(s) + - inaccessible directories (with the -strip option) - Prints its argument (which should be a ':' separated list) cleansed from - - duplicate elements - - elements whose start matches one of the wildcard(s) - - (if '-strip') non-accessible directories USAGE - exit 1 -fi + exit 1 +} -strip='' -if [ "$1" = "-strip" ] -then - strip=true - shift -fi +unset strip +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -strip) + strip=true + shift + ;; + *) + break + ;; + esac +done +[ "$#" -ge 1 ] || usage + dirList="$1" shift @@ -79,7 +92,7 @@ do wildcard=$1 shift ##DEBUG echo "remove>$wildcard<" 1>&2 - dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"` + dirList=$(echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g") done # split on ':' (and on space as well to avoid any surprises) @@ -97,13 +110,13 @@ do if [ -e "$dir" ] then #- no duplicate dirs - duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"` + duplicate=$(echo " $dirList " | sed -ne "s@ $dir @DUP@p") if [ ! "$duplicate" ] then dirList="$dirList $dir" fi - elif [ "$strip" != "true" ] + elif [ "$strip" != true ] then # Print non-existing directories if not in 'strip' mode. dirList="$dirList $dir" diff --git a/etc/aliases.csh b/etc/aliases.csh index fd7f183a36..28d4a13975 100644 --- a/etc/aliases.csh +++ b/etc/aliases.csh @@ -46,16 +46,28 @@ alias wmSchedOFF 'unsetenv WM_SCHEDULER' # Change directory aliases # ~~~~~~~~~~~~~~~~~~~~~~~~ -alias src 'cd $FOAM_SRC' -alias lib 'cd $FOAM_LIB' -alias run 'cd $FOAM_RUN' alias foam 'cd $WM_PROJECT_DIR' -alias foamsrc 'cd $FOAM_SRC/$WM_PROJECT' +alias src 'cd $FOAM_SRC' +alias foamsrc 'cd $FOAM_SRC/OpenFOAM' alias foamfv 'cd $FOAM_SRC/finiteVolume' -alias app 'cd $FOAM_APP' -alias util 'cd $FOAM_UTILITIES' -alias sol 'cd $FOAM_SOLVERS' -alias tut 'cd $FOAM_TUTORIALS' alias foam3rdParty 'cd $WM_THIRD_PARTY_DIR' +alias app 'cd $FOAM_APP' +alias lib 'cd $FOAM_LIB' +alias run 'cd $FOAM_RUN' +alias sol 'cd $FOAM_SOLVERS' +alias tut 'cd $FOAM_TUTORIALS' +alias util 'cd $FOAM_UTILITIES' + +# more consistent naming convention +alias foamApps 'cd $FOAM_APP' +alias foamLib 'cd $FOAM_LIB' +alias foamRun 'cd $FOAM_RUN' +alias foamSol 'cd $FOAM_SOLVERS' +alias foamTut 'cd $FOAM_TUTORIALS' +alias foamUtils 'cd $FOAM_UTILITIES' + +alias userApps 'cd $WM_PROJECT_USER_DIR/applications' +alias whichFoam 'echo $WM_PROJECT_DIR' + # ----------------------------------------------------------------------------- diff --git a/etc/aliases.sh b/etc/aliases.sh index b193802246..3eb87fbc0c 100644 --- a/etc/aliases.sh +++ b/etc/aliases.sh @@ -46,16 +46,28 @@ alias wmSchedOFF='unset WM_SCHEDULER' # Change directory aliases # ~~~~~~~~~~~~~~~~~~~~~~~~ -alias src='cd $FOAM_SRC' -alias lib='cd $FOAM_LIB' -alias run='cd $FOAM_RUN' alias foam='cd $WM_PROJECT_DIR' -alias foamsrc='cd $FOAM_SRC/$WM_PROJECT' +alias src='cd $FOAM_SRC' +alias foamsrc='cd $FOAM_SRC/OpenFOAM' alias foamfv='cd $FOAM_SRC/finiteVolume' -alias app='cd $FOAM_APP' -alias util='cd $FOAM_UTILITIES' -alias sol='cd $FOAM_SOLVERS' -alias tut='cd $FOAM_TUTORIALS' alias foam3rdParty='cd $WM_THIRD_PARTY_DIR' +alias app='cd $FOAM_APP' +alias lib='cd $FOAM_LIB' +alias run='cd $FOAM_RUN' +alias sol='cd $FOAM_SOLVERS' +alias tut='cd $FOAM_TUTORIALS' +alias util='cd $FOAM_UTILITIES' + +# more consistent naming convention +alias foamApps='cd $FOAM_APP' +alias foamLib='cd $FOAM_LIB' +alias foamRun='cd $FOAM_RUN' +alias foamSol='cd $FOAM_SOLVERS' +alias foamTut='cd $FOAM_TUTORIALS' +alias foamUtils='cd $FOAM_UTILITIES' + +alias userApps='cd $WM_PROJECT_USER_DIR/applications' +alias whichFoam='echo $WM_PROJECT_DIR' + # ----------------------------------------------------------------------------- From 41b196ffeb4d704c821074fca5ef7e1024fb543a Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 2 Aug 2009 10:04:17 +0200 Subject: [PATCH 19/46] drop support for paraview 2.x reader --- .../graphics/PVFoamReader/Allwmake | 21 - .../PVFoamReader/PVFoamReader/CMakeLists.txt | 79 --- .../PVFoamReader/Make/PVFoamReader.pvsm | 154 ---- .../PVFoamReader/Make/PVFoamReader.xml | 71 -- .../PVFoamReader/PVFoamReader.pvsm.in | 154 ---- .../PVFoamReader/PVFoamReader.xml.in | 71 -- .../PVFoamReader/PVFoamReaderConfigure.h.in | 18 - .../PVFoamReader/PVFoamReader/vtkFoamData.cxx | 49 -- .../PVFoamReader/PVFoamReader/vtkFoamData.h | 70 -- .../PVFoamReader/vtkFoamReader.cxx | 411 ----------- .../PVFoamReader/PVFoamReader/vtkFoamReader.h | 200 ------ .../PVFoamReader/vtkPVFoamSelectTimeSet.cxx | 531 -------------- .../PVFoamReader/vtkPVFoamSelectTimeSet.h | 164 ----- .../vtkPVFoamServerSelectTimeSet.cxx | 85 --- .../vtkPVFoamServerSelectTimeSet.h | 49 -- .../graphics/PVFoamReader/vtkFoam/Make/files | 5 - .../PVFoamReader/vtkFoam/Make/options | 8 - .../vtkFoam/vtkDataArrayTemplateImplicit.txx | 0 .../graphics/PVFoamReader/vtkFoam/vtkFoam.C | 665 ------------------ .../graphics/PVFoamReader/vtkFoam/vtkFoam.H | 256 ------- .../PVFoamReader/vtkFoam/vtkFoamAddFields.H | 60 -- .../vtkFoam/vtkFoamAddInternalMesh.C | 299 -------- .../PVFoamReader/vtkFoam/vtkFoamAddPatch.C | 115 --- .../vtkFoam/vtkFoamConvertFields.H | 235 ------- .../vtkFoam/vtkFoamConvertPatchFaceField.H | 106 --- .../vtkFoam/vtkFoamConvertPatchPointField.H | 105 --- .../vtkFoam/vtkFoamConvertPointField.H | 163 ----- .../vtkFoam/vtkFoamConvertVolField.H | 102 --- .../vtkFoam/vtkFoamInsertNextPoint.H | 49 -- bin/paraFoam | 34 +- bin/tools/paraFoam.pvs | 12 - etc/apps/paraview/bashrc | 67 -- etc/apps/paraview/cshrc | 63 -- 33 files changed, 10 insertions(+), 4461 deletions(-) delete mode 100755 applications/utilities/postProcessing/graphics/PVFoamReader/Allwmake delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/CMakeLists.txt delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.xml.in delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.cxx delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.cxx delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/files delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkDataArrayTemplateImplicit.txx delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.H delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddFields.H delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddPatch.C delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertFields.H delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPatchFaceField.H delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPatchPointField.H delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPointField.H delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertVolField.H delete mode 100644 applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamInsertNextPoint.H delete mode 100644 bin/tools/paraFoam.pvs delete mode 100644 etc/apps/paraview/bashrc delete mode 100644 etc/apps/paraview/cshrc diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PVFoamReader/Allwmake deleted file mode 100755 index b1106aa608..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/Allwmake +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # run from this directory -set -x - -if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] -then - case "$ParaView_VERSION" in - 2*) - wmake libso vtkFoam - ( - cd PVFoamReader - mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 - cd Make/$WM_OPTIONS - cmake ../.. - make - ) - ;; - esac -fi - -# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/CMakeLists.txt deleted file mode 100644 index 1c88efbbff..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/CMakeLists.txt +++ /dev/null @@ -1,79 +0,0 @@ -# Set the project/library name here. Classes should be declared as -# "class VTK_FoamReader_EXPORT vtkFoo", where PVFoamReader is the name of the -# project set here. -PROJECT(PVFoamReader) - -# Set your list of sources here. Do not change the name of the -# PVFoamReader_SRCS variable. -SET(PVFoamReader_SRCS - vtkFoamReader.cxx - vtkFoamData.cxx -) - -# List the kits from VTK that are needed by this project. Do not -# change the name of the PVFoamReader_LIBS variable. -SET(PVFoamReader_LIBS - vtkGraphics -) - -INCLUDE_DIRECTORIES( - $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude - $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude - $ENV{ParaView_INST_DIR}/include - ../vtkFoam/lnInclude -) -ADD_DEFINITIONS(-DWM_$ENV{WM_PRECISION_OPTION}) - -#----------------------------------------------------------------------------- -# Most users should not need to change anything below this line. - -# Need to include class headers and the configuration header. -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}) -INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR}) - -# Import ParaView build settings. -FIND_PACKAGE(ParaView) -IF(NOT ParaView_FOUND) - MESSAGE(FATAL_ERROR "ParaView is required. Set ParaView_DIR.") -ENDIF(NOT ParaView_FOUND) -IF(NOT PARAVIEW_BUILD_SHARED_LIBS) - MESSAGE(FATAL_ERROR "ParaView must be built with BUILD_SHARED_LIBS ON.") -ENDIF(NOT PARAVIEW_BUILD_SHARED_LIBS) -INCLUDE(${PARAVIEW_USE_FILE}) - -# Configure output directories. -SET (LIBRARY_OUTPUT_PATH $ENV{FOAM_LIBBIN} CACHE INTERNAL - "Single output directory for building all libraries.") -SET (EXECUTABLE_OUTPUT_PATH $ENV{FOAM_APPBIN} CACHE INTERNAL - "Single output directory for building all executables.") - -# Create the configuration header. -CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PVFoamReaderConfigure.h.in - ${PROJECT_BINARY_DIR}/vtk${PROJECT_NAME}Configure.h - @ONLY IMMEDIATE) - -# Must be defined before ADD_LIBRARY for cmake version 2.3.4-20060317 -LINK_DIRECTORIES($ENV{FOAM_LIBBIN}) -LINK_DIRECTORIES($ENV{FOAM_USER_LIBBIN}) - -# Create vtk client/server wrappers for the classes. -VTK_WRAP_ClientServer(${PROJECT_NAME} PVFoamReaderCS_SRCS "${PVFoamReader_SRCS}") - -# Build the package as a plugin for ParaView. -ADD_LIBRARY(${PROJECT_NAME} MODULE ${PVFoamReader_SRCS} ${PVFoamReaderCS_SRCS}) -LINK_DIRECTORIES($ENV{ParaView_INST_DIR}/lib) -TARGET_LINK_LIBRARIES(${PROJECT_NAME} vtkClientServer) -FOREACH(c ${PVFoamReader_LIBS}) - TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${c}CS) -ENDFOREACH(c) - -# Place the package configuration file into the build tree. -CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PVFoamReader.xml.in - ${PROJECT_BINARY_DIR}/../${PROJECT_NAME}.xml @ONLY IMMEDIATE) - -# Place the package configuration file into the build tree. -CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PVFoamReader.pvsm.in - ${PROJECT_BINARY_DIR}/../${PROJECT_NAME}.pvsm @ONLY IMMEDIATE) - -TARGET_LINK_LIBRARIES(${PROJECT_NAME} OpenFOAM finiteVolume vtkFoam) -#----------------------------------------------------------------------------- diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm deleted file mode 100644 index e3a097219e..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml deleted file mode 100644 index 91e00b78d6..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - ParaView Foam reader module - - - - diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in deleted file mode 100644 index e3a097219e..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.xml.in b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.xml.in deleted file mode 100644 index 5eb2a4a8e8..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.xml.in +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - ParaView Foam reader module - - - - diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in deleted file mode 100644 index aae4a079a2..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in +++ /dev/null @@ -1,18 +0,0 @@ -/*========================================================================= -This source has no copyright. It is intended to be copied by users -wishing to create their own ParaView plugin classes locally. -=========================================================================*/ -#ifndef __vtk@PROJECT_NAME@_h -#define __vtk@PROJECT_NAME@_h - -#if defined(_WIN32) -# if defined(@PROJECT_NAME@_EXPORTS) -# define VTK_@PROJECT_NAME@_EXPORT __declspec(dllexport) -# else -# define VTK_@PROJECT_NAME@_EXPORT __declspec(dllimport) -# endif -#else -# define VTK_@PROJECT_NAME@_EXPORT -#endif - -#endif diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.cxx b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.cxx deleted file mode 100644 index 4f89b6e25d..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.cxx +++ /dev/null @@ -1,49 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Description - -\*---------------------------------------------------------------------------*/ - -#include - -#include "vtkFoamData.h" -#include "vtkObjectFactory.h" - -vtkCxxRevisionMacro(vtkFoamData, "$Revision: 1.20 $"); -vtkStandardNewMacro(vtkFoamData); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -vtkFoamData::vtkFoamData() -{} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -vtkFoamData::~vtkFoamData() -{} - - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h deleted file mode 100644 index ebb0a7ad81..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h +++ /dev/null @@ -1,70 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - vtkFoamData - -Description - -SourceFiles - vtkFoamData.cxx - -\*---------------------------------------------------------------------------*/ - -#ifndef vtkFoamData_h -#define vtkFoamData_h - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "vtkDataSetSource.h" - -/*---------------------------------------------------------------------------*\ - Class vtkFoamData Declaration -\*---------------------------------------------------------------------------*/ - -class VTK_IO_EXPORT vtkFoamData -: - public vtkDataSetSource -{ - -public: - - static vtkFoamData *New(); - vtkTypeRevisionMacro(vtkFoamData,vtkDataSetSource); - - vtkFoamData(); - ~vtkFoamData(); - - void SetNthOutput(int num, vtkDataObject *output) - { - vtkDataSetSource::SetNthOutput(num, output); - } -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.cxx b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.cxx deleted file mode 100644 index d977104ce2..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.cxx +++ /dev/null @@ -1,411 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Description - -\*---------------------------------------------------------------------------*/ - -#include - -#include "vtkFoamReader.h" - -#include "vtkCallbackCommand.h" -#include "vtkDataArraySelection.h" -#include "vtkDataArrayCollection.h" -#include "vtkObjectFactory.h" -#include "vtkDataSet.h" -#include "vtkErrorCode.h" -#include "vtkUnstructuredGrid.h" - -#include "vtkFoam.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -vtkCxxRevisionMacro(vtkFoamReader, "$Revision: 1.20 $"); -vtkStandardNewMacro(vtkFoamReader); - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -vtkFoamReader::vtkFoamReader() -{ - StoredOutputs = NULL; - - FileName = NULL; - foamData_ = NULL; - - CacheMesh = 0; - - UpdateGUI = 1; - UpdateGUIOld = 1; - TimeStep = 0; - TimeStepRange[0] = 0; - TimeStepRange[1] = 0; - - TimeStepLimits[0] = 2; - TimeStepLimits[1] = 5; - - TimeSelection = vtkDataArraySelection::New(); - RegionSelection = vtkDataArraySelection::New(); - VolFieldSelection = vtkDataArraySelection::New(); - PointFieldSelection = vtkDataArraySelection::New(); - - // Setup the selection callback to modify this object when an array - // selection is changed. - SelectionObserver = vtkCallbackCommand::New(); - SelectionObserver->SetCallback(&vtkFoamReader::SelectionModifiedCallback); - SelectionObserver->SetClientData(this); - - TimeSelection->AddObserver - ( - vtkCommand::ModifiedEvent, - this->SelectionObserver - ); - RegionSelection->AddObserver - ( - vtkCommand::ModifiedEvent, - this->SelectionObserver - ); - VolFieldSelection->AddObserver - ( - vtkCommand::ModifiedEvent, - this->SelectionObserver - ); - PointFieldSelection->AddObserver - ( - vtkCommand::ModifiedEvent, - this->SelectionObserver - ); - - // This is needed by ParaView 2.?.? - this->SetNumberOfOutputPorts(0); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -vtkFoamReader::~vtkFoamReader() -{ - if (foamData_) - { - delete foamData_; - } - - if (StoredOutputs) - { - StoredOutputs->Delete(); - } - - if (FileName) - { - delete [] FileName; - } - - TimeSelection->RemoveObserver(this->SelectionObserver); - RegionSelection->RemoveObserver(this->SelectionObserver); - VolFieldSelection->RemoveObserver(this->SelectionObserver); - PointFieldSelection->RemoveObserver(this->SelectionObserver); - SelectionObserver->Delete(); - - TimeSelection->Delete(); - RegionSelection->Delete(); - VolFieldSelection->Delete(); - PointFieldSelection->Delete(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void vtkFoamReader::ExecuteInformation() -{ - if (!foamData_) - { - vtkDebugMacro( << "Reading Foam case" << FileName); - foamData_ = new Foam::vtkFoam(FileName, this); - } - else - { - foamData_->UpdateInformation(); - } - - vtkDebugMacro( << "end of ExecuteInformation\n"); -} - - -void vtkFoamReader::Execute() -{ - if (!StoredOutputs) - { - foamData_->Update(); - - StoredOutputs = vtkFoamData::New(); - - for (int i = 0; i < GetNumberOfOutputs(); i++) - { - vtkDataObject* tmp = GetOutput(i); - vtkDataObject* output = tmp->NewInstance(); - output->ShallowCopy(tmp); - StoredOutputs->SetNthOutput(i, output); - output->Delete(); - } - } - else - { - for (int i = 0; i < GetNumberOfOutputs(); i++) - { - vtkDataObject* output = GetOutput(i); - int tempExtent[6]; - output->GetUpdateExtent(tempExtent); - output->ShallowCopy(StoredOutputs->GetOutput(i)); - output->SetUpdateExtent(tempExtent); - } - - if (UpdateGUIOld == GetUpdateGUI()) - { - foamData_->Update(); - - for (int i = 0; i < GetNumberOfOutputs(); i++) - { - vtkDataObject* tmp = GetOutput(i); - vtkDataObject* output = tmp->NewInstance(); - output->ShallowCopy(tmp); - StoredOutputs->SetNthOutput(i, output); - output->Delete(); - } - } - } - - UpdateGUIOld = GetUpdateGUI(); -} - - -void vtkFoamReader::SetFileName(const char *name) -{ - if (name && !FileName || (FileName && !strcmp(FileName,name))) - { - if (!FileName) - { - FileName = new char[strlen(name) + 1]; - strcpy(FileName, name); - } - } - else - { - vtkErrorMacro("Changing case is not currently supported.\nPlease delete reader and create a new one for the new case."); - return; - } - - /* - if ( FileName && name && (!strcmp(FileName,name))) - { - return; - } - - if (!name && !FileName) - { - return; - } - - if (FileName) - { - delete [] FileName; - } - - FileName = new char[strlen(name) + 1]; - strcpy(FileName, name); - - if (foamData_) - { - delete foamData_; - foamData_ = NULL; - - if (StoredOutputs) - { - StoredOutputs->Delete(); - StoredOutputs = NULL; - } - } - - Modified(); - */ -} - - -void vtkFoamReader::PrintSelf(ostream& os, vtkIndent indent) -{ - Superclass::PrintSelf(os,indent); - - os << indent << "File Name: " - << (FileName ? FileName : "(none)") << "\n"; -} - - -vtkDataArraySelection* vtkFoamReader::GetTimeSelection() -{ - return TimeSelection; -} - -int vtkFoamReader::GetNumberOfTimeArrays() -{ - return TimeSelection->GetNumberOfArrays(); -} - -const char* vtkFoamReader::GetTimeArrayName(int index) -{ - return TimeSelection->GetArrayName(index); -} - -int vtkFoamReader::GetTimeArrayStatus(const char* name) -{ - return TimeSelection->ArrayIsEnabled(name); -} - -void vtkFoamReader::SetTimeArrayStatus(const char* name, int status) -{ - if(status) - { - TimeSelection->EnableArray(name); - } - else - { - TimeSelection->DisableArray(name); - } -} - -vtkDataArraySelection* vtkFoamReader::GetRegionSelection() -{ - return RegionSelection; -} - -int vtkFoamReader::GetNumberOfRegionArrays() -{ - return RegionSelection->GetNumberOfArrays(); -} - -const char* vtkFoamReader::GetRegionArrayName(int index) -{ - return RegionSelection->GetArrayName(index); -} - -int vtkFoamReader::GetRegionArrayStatus(const char* name) -{ - return RegionSelection->ArrayIsEnabled(name); -} - -void vtkFoamReader::SetRegionArrayStatus(const char* name, int status) -{ - if(status) - { - RegionSelection->EnableArray(name); - } - else - { - RegionSelection->DisableArray(name); - } -} - - -vtkDataArraySelection* vtkFoamReader::GetVolFieldSelection() -{ - return VolFieldSelection; -} - -int vtkFoamReader::GetNumberOfVolFieldArrays() -{ - return VolFieldSelection->GetNumberOfArrays(); -} - -const char* vtkFoamReader::GetVolFieldArrayName(int index) -{ - return VolFieldSelection->GetArrayName(index); -} - -int vtkFoamReader::GetVolFieldArrayStatus(const char* name) -{ - return VolFieldSelection->ArrayIsEnabled(name); -} - -void vtkFoamReader::SetVolFieldArrayStatus(const char* name, int status) -{ - if(status) - { - VolFieldSelection->EnableArray(name); - } - else - { - VolFieldSelection->DisableArray(name); - } -} - - -vtkDataArraySelection* vtkFoamReader::GetPointFieldSelection() -{ - return PointFieldSelection; -} - -int vtkFoamReader::GetNumberOfPointFieldArrays() -{ - return PointFieldSelection->GetNumberOfArrays(); -} - -const char* vtkFoamReader::GetPointFieldArrayName(int index) -{ - return PointFieldSelection->GetArrayName(index); -} - -int vtkFoamReader::GetPointFieldArrayStatus(const char* name) -{ - return PointFieldSelection->ArrayIsEnabled(name); -} - -void vtkFoamReader::SetPointFieldArrayStatus(const char* name, int status) -{ - if(status) - { - PointFieldSelection->EnableArray(name); - } - else - { - PointFieldSelection->DisableArray(name); - } -} - - -void vtkFoamReader::SelectionModifiedCallback -( - vtkObject*, - unsigned long, - void* clientdata, - void* -) -{ - static_cast(clientdata)->SelectionModified(); -} - -void vtkFoamReader::SelectionModified() -{ - Modified(); -} - - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h deleted file mode 100644 index 023c064086..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h +++ /dev/null @@ -1,200 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - vtkFoamReader - -Description - -SourceFiles - vtkFoamReader.cxx - -\*---------------------------------------------------------------------------*/ - -#ifndef vtkFoamReader_h -#define vtkFoamReader_h - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "vtkDataSetSource.h" -#include "vtkFoamData.h" - -// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * // - -namespace Foam -{ - class vtkFoam; -} - -class vtkPoints; -class vtkDataArraySelection; -class vtkDataArrayCollection; -class vtkCallbackCommand; - -/*---------------------------------------------------------------------------*\ - Class vtkFoamReader Declaration -\*---------------------------------------------------------------------------*/ - -class VTK_IO_EXPORT vtkFoamReader -: - public vtkDataSetSource -{ - -public: - - //- Standard VTK class creation function - static vtkFoamReader *New(); - - //- Standard VTK class type and revision declaration macro - vtkTypeRevisionMacro(vtkFoamReader,vtkDataSetSource); - - //- Standard VTK class print function - void PrintSelf(ostream& os, vtkIndent indent); - - // File name of FOAM datafile to read - void SetFileName(const char *); - //vtkSetStringMacro(FileName); - vtkGetStringMacro(FileName); - - // GUI update control - vtkSetMacro(UpdateGUI, int); - vtkGetMacro(UpdateGUI, int); - - // FOAM mesh caching control - vtkSetMacro(CacheMesh, int); - vtkGetMacro(CacheMesh, int); - - // Time-step slider control - vtkSetMacro(TimeStep, int); - vtkGetMacro(TimeStep, int); - vtkSetVector2Macro(TimeStepRange, int); - vtkGetVector2Macro(TimeStepRange, int); - - // Control of the upper and lower limits on the number of times - // displayed in the selection list - vtkSetVector2Macro(TimeStepLimits, int); - vtkGetVector2Macro(TimeStepLimits, int); - - // Time selection list control - vtkDataArraySelection* GetTimeSelection(); - int GetNumberOfTimeArrays(); - const char* GetTimeArrayName(int index); - int GetTimeArrayStatus(const char* name); - void SetTimeArrayStatus(const char* name, int status); - - // Region selection list control - vtkDataArraySelection* GetRegionSelection(); - int GetNumberOfRegionArrays(); - const char* GetRegionArrayName(int index); - int GetRegionArrayStatus(const char* name); - void SetRegionArrayStatus(const char* name, int status); - - // volField selection list control - vtkDataArraySelection* GetVolFieldSelection(); - int GetNumberOfVolFieldArrays(); - const char* GetVolFieldArrayName(int index); - int GetVolFieldArrayStatus(const char* name); - void SetVolFieldArrayStatus(const char* name, int status); - - // pointField selection list control - vtkDataArraySelection* GetPointFieldSelection(); - int GetNumberOfPointFieldArrays(); - const char* GetPointFieldArrayName(int index); - int GetPointFieldArrayStatus(const char* name); - void SetPointFieldArrayStatus(const char* name, int status); - - // SetNthOutput provided so that vtkFoam can access it - void SetNthOutput(int num, vtkDataObject *output) - { - vtkDataSetSource::SetNthOutput(num, output); - } - - // Standard VTK ExecuteInformation function overriding the base-class. - // Called by ParaView before GUI is displayed. - virtual void ExecuteInformation(); - - // Callback registered with the SelectionObserver - // for all the selection lists - static void SelectionModifiedCallback - ( - vtkObject* caller, - unsigned long eid, - void* clientdata, - void* calldata - ); - - void SelectionModified(); - - -protected: - - vtkFoamReader(); - ~vtkFoamReader(); - - // Standard VTK execute function overriding the base-class. - // Called by ParaView when Accept is pressed. - void Execute(); - - // Cache for the outputs. These are stored before the end of Execute() - // and re-instated at the beginning because the Outputs would disappear - // otherwise. - vtkFoamData* StoredOutputs; - - // FOAM file name (*.foam) - char *FileName; - - //BTX - Foam::vtkFoam* foamData_; - //ETX - - int CacheMesh; - - int UpdateGUI; - int UpdateGUIOld; - int TimeStep; - int TimeStepRange[2]; - - int TimeStepLimits[2]; - - vtkDataArraySelection* TimeSelection; - vtkDataArraySelection* RegionSelection; - vtkDataArraySelection* VolFieldSelection; - vtkDataArraySelection* PointFieldSelection; - - // The observer to modify this object when the array selections are modified - vtkCallbackCommand* SelectionObserver; - - -private: - - vtkFoamReader(const vtkFoamReader&); // Not implemented. - void operator=(const vtkFoamReader&); // Not implemented. -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx deleted file mode 100644 index fd948578da..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx +++ /dev/null @@ -1,531 +0,0 @@ -/*========================================================================= - - Program: ParaView - Module: $RCSfile: vtkPVFoamSelectTimeSet.cxx,v $ - - Copyright (c) Kitware, Inc. - All rights reserved. - See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkPVFoamSelectTimeSet.h" - -#include "vtkDataArrayCollection.h" -#include "vtkFloatArray.h" -#include "vtkKWFrame.h" -#include "vtkKWLabel.h" -#include "vtkKWLabeledFrame.h" -#include "vtkKWMenu.h" -#include "vtkObjectFactory.h" -#include "vtkPVAnimationInterfaceEntry.h" -#include "vtkPVApplication.h" -#include "vtkPVProcessModule.h" -#include "vtkPVScalarListWidgetProperty.h" -#include "vtkPVSource.h" -#include "vtkPVXMLElement.h" - -#include - -//----------------------------------------------------------------------------- -vtkStandardNewMacro(vtkPVFoamSelectTimeSet); -vtkCxxRevisionMacro(vtkPVFoamSelectTimeSet, "$Revision: 1.39 $"); - -//----------------------------------------------------------------------------- -int vtkDataArrayCollectionCommand(ClientData cd, Tcl_Interp *interp, - int argc, char *argv[]); - -//----------------------------------------------------------------------------- -vtkPVFoamSelectTimeSet::vtkPVFoamSelectTimeSet() -{ - this->LabeledFrame = vtkKWLabeledFrame::New(); - this->LabeledFrame->SetParent(this); - - this->TimeLabel = vtkKWLabel::New(); - this->TimeLabel->SetParent(this->LabeledFrame->GetFrame()); - - this->TreeFrame = vtkKWWidget::New(); - this->TreeFrame->SetParent(this->LabeledFrame->GetFrame()); - - this->Tree = vtkKWWidget::New(); - this->Tree->SetParent(this->TreeFrame); - - this->TimeValue = 0.0; - - this->FrameLabel = 0; - - this->TimeSets = vtkDataArrayCollection::New(); - - this->Property = 0; - - this->SetCommand = 0; - this->ServerSideID.ID = 0; -} - -//----------------------------------------------------------------------------- -vtkPVFoamSelectTimeSet::~vtkPVFoamSelectTimeSet() -{ - this->LabeledFrame->Delete(); - this->Tree->Delete(); - this->TreeFrame->Delete(); - this->TimeLabel->Delete(); - this->SetFrameLabel(0); - this->TimeSets->Delete(); - this->SetSetCommand(0); - if(this->ServerSideID.ID) - { - vtkPVProcessModule* pm = this->GetPVApplication()->GetProcessModule(); - pm->DeleteStreamObject(this->ServerSideID); - pm->SendStream(vtkProcessModule::DATA_SERVER); - } -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::SetLabel(const char* label) -{ - this->SetFrameLabel(label); - if (this->GetApplication()) - { - this->LabeledFrame->SetLabel(label); - } -} - -//----------------------------------------------------------------------------- -const char* vtkPVFoamSelectTimeSet::GetLabel() -{ - return this->GetFrameLabel(); -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::Create(vtkKWApplication *pvApp) -{ - // Call the superclass to create the widget and set the appropriate flags - - if (!this->vtkKWWidget::Create(pvApp, "frame", "-bd 2 -relief flat")) - { - vtkErrorMacro("Failed creating widget " << this->GetClassName()); - return; - } - - // For getting the widget in a script. - if ((this->TraceNameState == vtkPVWidget::Uninitialized || - this->TraceNameState == vtkPVWidget::Default) ) - { - this->SetTraceName("FoamSelectTimeSet"); - this->SetTraceNameState(vtkPVWidget::SelfInitialized); - } - - this->LabeledFrame->Create(this->GetApplication(), 0); - if (this->FrameLabel) - { - this->LabeledFrame->SetLabel(this->FrameLabel); - } - this->TimeLabel->Create(this->GetApplication(), ""); - - char label[32]; - sprintf(label, "Time value: %12.5e", 0.0); - this->TimeLabel->SetLabel(label); - this->Script("pack %s", this->TimeLabel->GetWidgetName()); - - this->TreeFrame->Create(this->GetApplication(), "ScrolledWindow", - "-relief sunken -bd 2"); - - this->Tree->Create(this->GetApplication(), "Tree", - "-background white -bd 0 -width 15 -padx 2 " - "-redraw 1 -relief flat -selectbackground red"); - this->Script("%s bindText {%s SetTimeValueCallback}", - this->Tree->GetWidgetName(), this->GetTclName()); - this->Script("%s setwidget %s", this->TreeFrame->GetWidgetName(), - this->Tree->GetWidgetName()); - - this->Script("pack %s -expand t -fill x", this->TreeFrame->GetWidgetName()); - - this->Script("pack %s -side top -expand t -fill x", - this->LabeledFrame->GetWidgetName()); - -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::SetTimeValue(float time) -{ - if (this->TimeValue != time || - !this->TimeLabel->GetLabel() || - !strcmp(this->TimeLabel->GetLabel(), "No timesets available.")) - { - this->TimeValue = time; - - char label[32]; - sprintf(label, "Time value: %12.5e", time); - this->TimeLabel->SetLabel(label); - this->Modified(); - } -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::SetTimeValueCallback(const char* item) -{ - if (this->TimeSets->GetNumberOfItems() == 0) - { - return; - } - - if ( strncmp(item, "timeset", strlen("timeset")) == 0 ) - { - this->Script("if [%s itemcget %s -open] " - "{%s closetree %s} else {%s opentree %s}", - this->Tree->GetWidgetName(), item, - this->Tree->GetWidgetName(), item, - this->Tree->GetWidgetName(), item); - return; - } - - this->Script("%s selection set %s", this->Tree->GetWidgetName(), - item); - this->Script("%s itemcget %s -data", this->Tree->GetWidgetName(), - item); - const char* result = this->GetApplication()->GetMainInterp()->result; - if (result[0] == '\0') - { - return; - } - - int index[2]; - sscanf(result, "%d %d", &(index[0]), &(index[1])); - - this->SetTimeSetsFromReader(); - this->SetTimeValue(this->TimeSets->GetItem(index[0])->GetTuple1(index[1])); - this->ModifiedCallback(); -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::AddRootNode(const char* name, const char* text) -{ - if (!this->GetApplication()) - { - return; - } - this->Script("%s insert end root %s -text {%s}", this->Tree->GetWidgetName(), - name, text); -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::AddChildNode(const char* parent, const char* name, - const char* text, const char* data) -{ - if (!this->GetApplication()) - { - return; - } - this->Script("%s insert end %s %s -text {%s} -data %s", - this->Tree->GetWidgetName(), parent, name, text, data); -} - - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::SaveInBatchScript(ofstream *file) -{ - *file << " [$pvTemp" << this->PVSource->GetVTKSourceID(0) - << " GetProperty " << this->SetCommand << "] SetElements1 " - << this->Property->GetScalar(0) << endl; -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::AcceptInternal(vtkClientServerID sourceID) -{ - if (this->ModifiedFlag) - { - this->Script("%s selection get", this->Tree->GetWidgetName()); - this->AddTraceEntry("$kw(%s) SetTimeValueCallback {%s}", - this->GetTclName(), - this->GetApplication()->GetMainInterp()->result); - } - - this->Property->SetVTKSourceID(sourceID); - this->Property->SetScalars(1, &this->TimeValue); - this->Property->AcceptInternal(); - - this->ModifiedFlag = 0; -} - -//--------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::Trace(ofstream *file) -{ - if ( ! this->InitializeTrace(file)) - { - return; - } - - this->Script("%s selection get", this->Tree->GetWidgetName()); - *file << "$kw(" << this->GetTclName() << ") SetTimeValueCallback {" - << this->GetApplication()->GetMainInterp()->result << "}" << endl; -} - - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::ResetInternal() -{ - if ( ! this->ModifiedFlag) - { - return; - } - - // Command to update the UI. - if (!this->Tree) - { - return; - } - - this->Script("%s delete [%s nodes root]", this->Tree->GetWidgetName(), - this->Tree->GetWidgetName()); - - this->SetTimeSetsFromReader(); - - int timeSetId=0; - char timeSetName[32]; - char timeSetText[32]; - - char timeValueName[32]; - char timeValueText[32]; - char indices[32]; - - float actualTimeValue = this->Property->GetScalar(0); - int matchFound = 0; - - this->ModifiedFlag = 0; - - if (this->TimeSets->GetNumberOfItems() == 0) - { - this->Script("pack forget %s", this->TreeFrame->GetWidgetName()); - this->TimeLabel->SetLabel("No timesets available."); - return; - } - else - { - this->SetTimeValue(actualTimeValue); - this->Script("pack %s -expand t -fill x", this->TreeFrame->GetWidgetName()); - } - - this->TimeSets->InitTraversal(); - vtkDataArray* da; - while( (da=this->TimeSets->GetNextItem()) ) - { - timeSetId++; - sprintf(timeSetName,"timeset%d", timeSetId); - sprintf(timeSetText,"Time Set %d", timeSetId); - this->AddRootNode(timeSetName, timeSetText); - - vtkIdType tuple; - for(tuple=0; tupleGetNumberOfTuples(); tuple++) - { - float timeValue = da->GetTuple1(tuple); - sprintf(timeValueName, "time%d_%-12.5e", timeSetId, timeValue); - sprintf(timeValueText, "%-12.5e", timeValue); - ostrstream str; - str << "{" << timeSetId-1 << " " << tuple << "}" << ends; - sprintf(indices, "%s", str.str()); - str.rdbuf()->freeze(0); - this->AddChildNode(timeSetName, timeValueName, timeValueText, indices); - if (actualTimeValue == timeValue && !matchFound) - { - matchFound=1; - this->Script("%s selection set %s", this->Tree->GetWidgetName(), - timeValueName); - } - } - if (timeSetId == 1) - { - this->Script("%s opentree %s", this->Tree->GetWidgetName(), - timeSetName); - } - } - - this->SetTimeValue(actualTimeValue); -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::AddAnimationScriptsToMenu(vtkKWMenu *menu, - vtkPVAnimationInterfaceEntry *ai) -{ - char methodAndArgs[500]; - - sprintf(methodAndArgs, "AnimationMenuCallback %s", ai->GetTclName()); - // I do not under stand why the trace name is used for the - // menu entry, but Berk must know. - menu->AddCommand(this->GetTraceName(), this, methodAndArgs, 0, ""); -} - - -//----------------------------------------------------------------------------- -// What a pain. I need this method for tracing. -// Maybe the animation should call PVwidget methods and not vtk object methods. -void vtkPVFoamSelectTimeSet::AnimationMenuCallback(vtkPVAnimationInterfaceEntry *ai) -{ - if (ai->InitializeTrace(NULL)) - { - this->AddTraceEntry("$kw(%s) AnimationMenuCallback $kw(%s)", - this->GetTclName(), ai->GetTclName()); - } - - // I do not under stand why the trace name is used for the - // menu entry, but Berk must know. - ai->SetLabelAndScript(this->GetTraceName(), NULL, this->GetTraceName()); - ai->SetCurrentProperty(this->Property); - ai->Update(); -} - - - -//----------------------------------------------------------------------------- -vtkPVFoamSelectTimeSet* vtkPVFoamSelectTimeSet::ClonePrototype(vtkPVSource* pvSource, - vtkArrayMap* map) -{ - vtkPVWidget* clone = this->ClonePrototypeInternal(pvSource, map); - return vtkPVFoamSelectTimeSet::SafeDownCast(clone); -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::CopyProperties(vtkPVWidget* clone, - vtkPVSource* pvSource, - vtkArrayMap* map) -{ - this->Superclass::CopyProperties(clone, pvSource, map); - vtkPVFoamSelectTimeSet* pvts = vtkPVFoamSelectTimeSet::SafeDownCast(clone); - if (pvts) - { - pvts->SetLabel(this->FrameLabel); - pvts->SetSetCommand(this->SetCommand); - } - else - { - vtkErrorMacro( - "Internal error. Could not downcast clone to PVFoamSelectTimeSet."); - } -} - -//----------------------------------------------------------------------------- -int vtkPVFoamSelectTimeSet::ReadXMLAttributes(vtkPVXMLElement* element, - vtkPVXMLPackageParser* parser) -{ - if(!this->Superclass::ReadXMLAttributes(element, parser)) { return 0; } - - // Setup the Label. - const char* label = element->GetAttribute("label"); - if(label) - { - this->SetLabel(label); - } - - this->SetSetCommand(element->GetAttribute("set_command")); - - return 1; -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::SetTimeSetsFromReader() -{ - vtkPVProcessModule* pm = this->GetPVApplication()->GetProcessModule(); - this->TimeSets->RemoveAllItems(); - - // Create the server-side helper if necessary. - if(!this->ServerSideID.ID) - { - this->ServerSideID = pm->NewStreamObject("vtkPVFoamServerSelectTimeSet"); - pm->SendStream(vtkProcessModule::DATA_SERVER); - } - - // Get the time sets from the reader on the server. - // Reader -> VTKSourceID (0). We assume that there is 1 VTKSource. - pm->GetStream() << vtkClientServerStream::Invoke - << this->ServerSideID << "GetTimeSets" - << this->PVSource->GetVTKSourceID(0) - << vtkClientServerStream::End; - pm->SendStream(vtkProcessModule::DATA_SERVER_ROOT); - vtkClientServerStream timeSets; - if(!pm->GetLastServerResult().GetArgument(0, 0, &timeSets)) - { - vtkErrorMacro("Error getting time sets from server."); - return; - } - - // There is one time set per message. - for(int m=0; m < timeSets.GetNumberOfMessages(); ++m) - { - // Each argument in the message is a time set entry. - vtkFloatArray* timeSet = vtkFloatArray::New(); - int n = timeSets.GetNumberOfArguments(m); - timeSet->SetNumberOfTuples(n); - for(int i=0; i < n; ++i) - { - float value; - if(!timeSets.GetArgument(m, i, &value)) - { - vtkErrorMacro("Error reading time set value."); - timeSet->Delete(); - return; - } - timeSet->SetTuple1(i, value); - } - this->TimeSets->AddItem(timeSet); - timeSet->Delete(); - } - - if (this->Property->GetNumberOfScalars() == 0 && - this->TimeSets->GetNumberOfItems() > 0) - { - vtkFloatArray *ts = - vtkFloatArray::SafeDownCast(this->TimeSets->GetItem(0)); - this->Property->SetScalars(1, ts->GetPointer(0)); - } -} - -//---------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::SaveInBatchScriptForPart(ofstream *file, - vtkClientServerID sourceID) -{ - if (sourceID.ID == 0) - { - vtkErrorMacro(<< this->GetClassName() - << " must not have SaveInBatchScript method."); - return; - } - - *file << "\t" << "pvTemp" << sourceID - << " SetTimeValue " << this->GetTimeValue() - << endl;; -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::SetProperty(vtkPVWidgetProperty *prop) -{ - this->Property = vtkPVScalarListWidgetProperty::SafeDownCast(prop); - if (this->Property) - { - int numScalars = 1; - this->Property->SetVTKCommands(1, &this->SetCommand, &numScalars); - } -} - -//----------------------------------------------------------------------------- -vtkPVWidgetProperty* vtkPVFoamSelectTimeSet::GetProperty() -{ - return this->Property; -} - -//----------------------------------------------------------------------------- -vtkPVWidgetProperty* vtkPVFoamSelectTimeSet::CreateAppropriateProperty() -{ - return vtkPVScalarListWidgetProperty::New(); -} - -//----------------------------------------------------------------------------- -void vtkPVFoamSelectTimeSet::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os, indent); - os << indent << "TimeValue: " << this->TimeValue << endl; - os << indent << "LabeledFrame: " << this->LabeledFrame << endl; - os << indent << "SetCommand: " - << (this->SetCommand ? this->SetCommand : "(none)") << endl; -} diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h deleted file mode 100644 index 70ab8cc97f..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h +++ /dev/null @@ -1,164 +0,0 @@ -/*========================================================================= - - Program: ParaView - Module: $RCSfile: vtkPVFoamSelectTimeSet.h,v $ - - Copyright (c) Kitware, Inc. - All rights reserved. - See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -// .NAME vtkPVFoamSelectTimeSet - Special time selection widget used by PVFoamReaderModule -// .SECTION Description -// This is a PVWidget specially designed to be used with PVFoamReaderModule. -// It provides support for multiple sets. The time value selected by -// the user is passed to the Foam reader with a SetTimeValue() call. - -#ifndef __vtkPVFoamSelectTimeSet_h -#define __vtkPVFoamSelectTimeSet_h - -#include "vtkPVWidget.h" - -class vtkKWLabel; -class vtkKWMenu; -class vtkKWLabeledFrame; -class vtkDataArrayCollection; -class vtkPVScalarListWidgetProperty; - -class VTK_EXPORT vtkPVFoamSelectTimeSet : public vtkPVWidget -{ -public: - static vtkPVFoamSelectTimeSet* New(); - vtkTypeRevisionMacro(vtkPVFoamSelectTimeSet, vtkPVWidget); - void PrintSelf(ostream& os, vtkIndent indent); - - virtual void Create(vtkKWApplication *pvApp); - - //BTX - // Description: - // Called when accept button is pushed. - // Sets objects variable to the widgets value. - // Adds a trace entry. Side effect is to turn modified flag off. - virtual void AcceptInternal(vtkClientServerID); - //ETX - - // Description: - // Called when the reset button is pushed. - // Sets widget's value to the object-variable's value. - // Side effect is to turn the modified flag off. - virtual void ResetInternal(); - - // Description: - // Adds a script to the menu of the animation interface. - virtual void AddAnimationScriptsToMenu(vtkKWMenu *menu, - vtkPVAnimationInterfaceEntry *ai); - - // Description: - // Called whenthe animation method menu item is selected. - // Needed for proper tracing. - // It would be nice if the menu and cascade menus would trace - // invokation of items (?relying of enumeration of menu items or label?) - void AnimationMenuCallback(vtkPVAnimationInterfaceEntry *ai); - - // Description: - // This is the labeled frame around the timeset tree. - vtkGetObjectMacro(LabeledFrame, vtkKWLabeledFrame); - - // Description: - // Label displayed on the labeled frame. - void SetLabel(const char* label); - const char* GetLabel(); - - // Description: - // Updates the time value label and the time ivar. - void SetTimeValue(float time); - vtkGetMacro(TimeValue, float); - - // Description: - // Calls this->SetTimeValue () and Reader->SetTimeValue() - // with currently selected time value. - void SetTimeValueCallback(const char* item); - -//BTX - // Description: - // Creates and returns a copy of this widget. It will create - // a new instance of the same type as the current object - // using NewInstance() and then copy some necessary state - // parameters. - vtkPVFoamSelectTimeSet* ClonePrototype(vtkPVSource* pvSource, - vtkArrayMap* map); -//ETX - - // Description: - // This serves a dual purpose. For tracing and for saving state. - virtual void Trace(ofstream *file); - - // Description: - // Set/get the property to use with this widget. - virtual void SetProperty(vtkPVWidgetProperty *prop); - virtual vtkPVWidgetProperty* GetProperty(); - - // Description: - // Create the right property for use with this widget. - virtual vtkPVWidgetProperty* CreateAppropriateProperty(); - - // Description: - // Set/get the command to pass the value to VTK. - vtkSetStringMacro(SetCommand); - vtkGetStringMacro(SetCommand); - - // Description: - // Save this widget to a file. - virtual void SaveInBatchScript(ofstream *file); - -protected: - vtkPVFoamSelectTimeSet(); - ~vtkPVFoamSelectTimeSet(); - - vtkPVFoamSelectTimeSet(const vtkPVFoamSelectTimeSet&); // Not implemented - void operator=(const vtkPVFoamSelectTimeSet&); // Not implemented - - vtkPVScalarListWidgetProperty *Property; - - char *SetCommand; - - vtkSetStringMacro(FrameLabel); - vtkGetStringMacro(FrameLabel); - - vtkKWWidget* Tree; - vtkKWWidget* TreeFrame; - vtkKWLabel* TimeLabel; - vtkKWLabeledFrame* LabeledFrame; - - void AddRootNode(const char* name, const char* text); - void AddChildNode(const char* parent, const char* name, - const char* text, const char* data); - - float TimeValue; - char* FrameLabel; - - vtkDataArrayCollection* TimeSets; - vtkClientServerID ServerSideID; - - // Fill the TimeSets collection with that from the actual reader. - void SetTimeSetsFromReader(); - -//BTX - virtual void CopyProperties(vtkPVWidget* clone, vtkPVSource* pvSource, - vtkArrayMap* map); -//ETX - - int ReadXMLAttributes(vtkPVXMLElement* element, - vtkPVXMLPackageParser* parser); - - // Description: - // An interface for saving a widget into a script. - virtual void SaveInBatchScriptForPart(ofstream *file, vtkClientServerID); - -}; - -#endif diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx deleted file mode 100644 index acfce9bab2..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx +++ /dev/null @@ -1,85 +0,0 @@ -/*========================================================================= - - Program: ParaView - Module: $RCSfile: vtkPVFoamServerSelectTimeSet.cxx,v $ - - Copyright (c) Kitware, Inc. - All rights reserved. - See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -#include "vtkPVFoamServerSelectTimeSet.h" - -#include "vtkClientServerInterpreter.h" -#include "vtkObjectFactory.h" -#include "vtkPVProcessModule.h" -#include "vtkFoamReader.h" -#include "vtkDataArrayCollection.h" -#include "vtkDataArrayCollectionIterator.h" -#include "vtkClientServerStream.h" - -#include - -//---------------------------------------------------------------------------- -vtkStandardNewMacro(vtkPVFoamServerSelectTimeSet); -vtkCxxRevisionMacro(vtkPVFoamServerSelectTimeSet, "$Revision: 1.4 $"); - -//---------------------------------------------------------------------------- -class vtkPVFoamServerSelectTimeSetInternals -{ -public: - vtkClientServerStream Result; -}; - -//---------------------------------------------------------------------------- -vtkPVFoamServerSelectTimeSet::vtkPVFoamServerSelectTimeSet() -{ - this->Internal = new vtkPVFoamServerSelectTimeSetInternals; -} - -//---------------------------------------------------------------------------- -vtkPVFoamServerSelectTimeSet::~vtkPVFoamServerSelectTimeSet() -{ - delete this->Internal; -} - -//---------------------------------------------------------------------------- -void vtkPVFoamServerSelectTimeSet::PrintSelf(ostream& os, vtkIndent indent) -{ - this->Superclass::PrintSelf(os,indent); -} - -//---------------------------------------------------------------------------- -const vtkClientServerStream& -vtkPVFoamServerSelectTimeSet::GetTimeSets(vtkFoamReader* reader) -{ - // Reset the stream for a new list of time sets. - this->Internal->Result.Reset(); - - // Get the time sets from the reader. - vtkDataArrayCollection* timeSets = reader->GetTimeSets(); - - // Iterate through the time sets. - vtkDataArrayCollectionIterator* iter = vtkDataArrayCollectionIterator::New(); - iter->SetCollection(timeSets); - for(iter->GoToFirstItem(); !iter->IsDoneWithTraversal(); - iter->GoToNextItem()) - { - // Each time set is stored in one message. - this->Internal->Result << vtkClientServerStream::Reply; - vtkDataArray* da = iter->GetDataArray(); - for(int i=0; i < da->GetNumberOfTuples(); ++i) - { - this->Internal->Result << da->GetTuple1(i); - } - this->Internal->Result << vtkClientServerStream::End; - } - iter->Delete(); - - // Return the stream. - return this->Internal->Result; -} diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h b/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h deleted file mode 100644 index 99f755c9f3..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h +++ /dev/null @@ -1,49 +0,0 @@ -/*========================================================================= - - Program: ParaView - Module: $RCSfile: vtkPVFoamServerSelectTimeSet.h,v $ - - Copyright (c) Kitware, Inc. - All rights reserved. - See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notice for more information. - -=========================================================================*/ -// .NAME vtkPVFoamServerSelectTimeSet - Server-side helper for vtkPVFoamSelectTimeSet. -// .SECTION Description - -#ifndef __vtkPVFoamServerSelectTimeSet_h -#define __vtkPVFoamServerSelectTimeSet_h - -#include "vtkPVServerObject.h" - -class vtkClientServerStream; -class vtkPVFoamServerSelectTimeSetInternals; -class vtkFoamReader; - -class VTK_EXPORT vtkPVFoamServerSelectTimeSet : public vtkPVServerObject -{ -public: - static vtkPVFoamServerSelectTimeSet* New(); - vtkTypeRevisionMacro(vtkPVFoamServerSelectTimeSet, vtkPVServerObject); - void PrintSelf(ostream& os, vtkIndent indent); - - // Description: - // Get a list the time sets provided by the given reader. - const vtkClientServerStream& GetTimeSets(vtkFoamReader*); - -protected: - vtkPVFoamServerSelectTimeSet(); - ~vtkPVFoamServerSelectTimeSet(); - - // Internal implementation details. - vtkPVFoamServerSelectTimeSetInternals* Internal; -private: - vtkPVFoamServerSelectTimeSet(const vtkPVFoamServerSelectTimeSet&); // Not implemented - void operator=(const vtkPVFoamServerSelectTimeSet&); // Not implemented -}; - -#endif diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/files b/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/files deleted file mode 100644 index f5a5526caa..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/files +++ /dev/null @@ -1,5 +0,0 @@ -vtkFoam.C -vtkFoamAddInternalMesh.C -vtkFoamAddPatch.C - -LIB = $(FOAM_LIBBIN)/libvtkFoam diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options b/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options deleted file mode 100644 index 670c68424b..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options +++ /dev/null @@ -1,8 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(ParaView_INST_DIR)/include \ - -I../PVFoamReader - -LIB_LIBS = \ - -lfiniteVolume \ - $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkDataArrayTemplateImplicit.txx b/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkDataArrayTemplateImplicit.txx deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C b/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C deleted file mode 100644 index 6a1830b5d1..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C +++ /dev/null @@ -1,665 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "vtkFoam.H" - -#include "argList.H" -#include "Time.H" -#include "polyBoundaryMeshEntries.H" -#include "IOobjectList.H" -#include "wordList.H" -#include "fvMesh.H" -#include "volFields.H" -#include "pointMesh.H" -#include "volPointInterpolation.H" - -#include "vtkFoamReader.h" -#include "vtkDataArraySelection.h" -#include "vtkUnstructuredGrid.h" -#include "vtkPointData.h" -#include "vtkCellData.h" -#include "vtkFloatArray.h" -#include "vtkCharArray.h" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(Foam::vtkFoam, 0); - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -#include "vtkFoamConvertFields.H" - -void Foam::vtkFoam::SetName -( - vtkUnstructuredGrid* vtkMesh, - const char* name -) -{ - vtkCharArray* nmArray = vtkCharArray::New(); - nmArray->SetName("Name"); - size_t len = strlen(name); - nmArray->SetNumberOfTuples(static_cast(len)+1); - char* copy = nmArray->GetPointer(0); - memcpy(copy, name, len); - copy[len] = '\0'; - vtkMesh->GetFieldData()->AddArray(nmArray); - nmArray->Delete(); -} - - -Foam::string Foam::vtkFoam::padTimeString(const string& ts) -{ - return ts + string(" ", max(label(12 - ts.size()), 0)); -} - - -// Pad the patch name string in order to account for dynamic changes -// in patch names during topological changes -Foam::string Foam::vtkFoam::padPatchString(const string& ps) -{ - label n = max(label(50 - ps.size()), 0); - return ps + string(" ", n); -} - - -void Foam::vtkFoam::setSelectedTime -( - Time& runTime, - vtkFoamReader* reader -) -{ - // Get times list - instantList Times = runTime.times(); - int timeIndex = min(max(reader->GetTimeStep() + 1, 0), Times.size()-1); - - // If this is the first call timeIndex will be 0 ("constant") - // so reset to the first time step if one exists and deselect every - // element of the selection array - if (timeIndex == 0) - { - timeIndex = min(1, Times.size()-1); - reader->GetTimeSelection()->DisableAllArrays(); - } - - label selectedTimeIndex = -1; - label nSelectedTimes = reader->GetTimeSelection()->GetNumberOfArrays(); - - for (label i=nSelectedTimes-1; i>=0; i--) - { - if(reader->GetTimeSelection()->GetArraySetting(i)) - { - word timeName = string::validate - ( - reader->GetTimeSelection()->GetArrayName(i) - ); - - forAll(Times, j) - { - if (Times[j].name() == timeName) - { - selectedTimeIndex = j; - break; - } - } - break; - } - } - - if (selectedTimeIndex != -1) - { - timeIndex = min(selectedTimeIndex, Times.size()-1); - } - - if (debug) - { - Info<< "Selecting time " << Times[timeIndex].name() << endl; - } - - runTime.setTime(Times[timeIndex], timeIndex); - - Times = runTime.times(); - - reader->SetTimeStepRange(0, max(Times.size()-2, 0)); - - // reset the time steps ... - reader->GetTimeSelection()->RemoveAllArrays(); - - int* TimeStepLimits = reader->GetTimeStepLimits(); - label maxStartTimes = min(Times.size(), TimeStepLimits[0]); - label maxNTimes = min(Times.size() - maxStartTimes, TimeStepLimits[1]); - - for (label i=0; iGetTimeSelection() - ->AddArray(padTimeString(Times[i].name()).c_str()); - } - - if (Times.size() > TimeStepLimits[0] + TimeStepLimits[1]) - { - reader->GetTimeSelection()->AddArray(padTimeString("...").c_str()); - } - - for (label i=Times.size() - maxNTimes; iGetTimeSelection() - ->AddArray(padTimeString(Times[i].name()).c_str()); - } - - // Disable all the time selections (which are all selected by default) ... - reader->GetTimeSelection()->DisableAllArrays(); - - // But maintain the selections made previously - if (selectedTimeIndex != -1 && selectedTimeIndex < Times.size()) - { - reader->GetTimeSelection()->EnableArray - (padTimeString(Times[selectedTimeIndex].name()).c_str()); - } -} - - -void Foam::vtkFoam::updateSelectedRegions() -{ - if (debug) - { - Info<< "Foam::vtkFoam::updateSelectedRegions()" << endl; - } - - label nRegions = reader_->GetRegionSelection()->GetNumberOfArrays(); - - selectedRegions_.setSize(nRegions); - - // Read the selected patches and add to the region list - for (int i=0; iGetRegionSelection()->GetArraySetting(i); - } -} - - -void Foam::vtkFoam::convertMesh() -{ - if (debug) - { - Info<< "Foam::vtkFoam::convertMesh()" << endl; - } - - const fvMesh& mesh = *meshPtr_; - - // Read the internal mesh as region 0 if selected - if (reader_->GetRegionSelection()->GetArraySetting(0)) - { - selectedRegions_[0] = true; - addInternalMesh - ( - mesh, - vtkUnstructuredGrid::SafeDownCast(reader_->GetOutput(0)) - ); - } - else - { - selectedRegions_[0] = false; - - vtkUnstructuredGrid *vtkMesh = - vtkUnstructuredGrid::SafeDownCast(reader_->GetOutput(0)); - - vtkMesh->Initialize(); - SetName(vtkMesh, "(Internal Mesh)"); - } - - - // Read the selected patches and add to the region list - - polyBoundaryMeshEntries patchEntries - ( - IOobject - ( - "boundary", - dbPtr_().findInstance(polyMesh::meshSubDir, "boundary"), - polyMesh::meshSubDir, - dbPtr_(), - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ) - ); - - label regioni = 0; - label regioniLast = 0; - - // Read in the number Outputs (patch regions) currently being used - label currNOutputs = reader_->GetNumberOfOutputs(); - - // Cycle through all the patches in the boundary file for the relevant - // time step - forAll(patchEntries, entryi) - { - // Number of faces in the current patch (Used to detect dummy patches - // of size zero) - label nFaces(readLabel(patchEntries[entryi].dict().lookup("nFaces"))); - - // Check to see if the patch is currently a part of the displayed list - if - ( - reader_->GetRegionSelection()->ArrayExists - ( - padPatchString(patchEntries[entryi].keyword()).c_str() - ) - ) - { - if (!nFaces) - { - // Remove patch if it is only a dummy patch in the current - // time step with zero faces - reader_->GetRegionSelection()->RemoveArrayByName - ( - padPatchString(patchEntries[entryi].keyword()).c_str() - ); - } - else - { - // A patch already existent in the list and which - // continues to exist found - regioni++; - } - } - else - { - // A new patch so far not yet included into the list has been found - if (nFaces) - { - regioni++; - - // Add a new entry to the list of regions - reader_->GetRegionSelection()->AddArray - ( - padPatchString(patchEntries[entryi].keyword()).c_str() - ); - - // AddArray automatically enables a new array... disable - // it manually - reader_->GetRegionSelection()->DisableArray - ( - padPatchString(patchEntries[entryi].keyword()).c_str() - ); - } - } - - // Avoid Initialization of the same Output twice - if (regioni != regioniLast) - { - // Only setup an Output if it has not been setup before - if(regioni >= currNOutputs) - { - vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New(); - reader_->SetNthOutput(regioni,ugrid); - ugrid->Delete(); - } - // Initialize -> Delete memory used, and reset to zero state - reader_->GetOutput(regioni)->Initialize(); - regioniLast = regioni; - } - } - - // Initialize (reset to zero and free) any outputs which are not used - // anymore - if (regioni < currNOutputs) - { - for(label i = (regioni+1); i < currNOutputs;i++) - { - reader_->GetOutput(i)->Initialize(); - } - } - - selectedRegions_.setSize(regioni + 1); - - regioni = 0; - - const polyBoundaryMesh& patches = mesh.boundaryMesh(); - - forAll (patches, patchi) - { - if (patches[patchi].size()) - { - regioni++; - - if (reader_->GetRegionSelection()->GetArraySetting(regioni)) - { - selectedRegions_[regioni] = true; - addPatch - ( - patches[patchi], - vtkUnstructuredGrid::SafeDownCast - ( - reader_->GetOutput(regioni) - ) - ); - } - else - { - selectedRegions_[regioni] = false; - - vtkUnstructuredGrid *vtkMesh = - vtkUnstructuredGrid::SafeDownCast - ( - reader_->GetOutput(regioni) - ); - - vtkMesh->Initialize(); - SetName - ( - vtkMesh, - ('(' + padPatchString(patches[patchi].name()) + ')').c_str() - ); - } - } - } -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::vtkFoam::vtkFoam(const char* const FileName, vtkFoamReader* reader) -: - reader_(reader), - argsPtr_(NULL), - dbPtr_(NULL), - meshPtr_(NULL) -{ - fileName fullCasePath(fileName(FileName).path()); - - if (!isDir(fullCasePath)) - { - return; - } - - char* argvStrings[3]; - argvStrings[0] = new char[9]; - strcpy(argvStrings[0], "/vtkFoam"); - argvStrings[1] = new char[6]; - strcpy(argvStrings[1], "-case"); - argvStrings[2] = new char[fullCasePath.size()+1]; - strcpy(argvStrings[2], fullCasePath.c_str()); - - int argc = 3; - char** argv = &argvStrings[0]; - argsPtr_.reset(new argList(argc, argv)); - - for(int i = 0; i < argc; i++) - { - delete[] argvStrings[i]; - } - - dbPtr_.reset - ( - new Time - ( - Time::controlDictName, - argsPtr_().rootPath(), - argsPtr_().caseName() - ) - ); - dbPtr_().functionObjects().off(); - setSelectedTime(dbPtr_(), reader_); - - if (debug) - { - Info<< "vtkFoam::ExecuteInformation: Initialising outputs" << endl; - } - - reader_->GetRegionSelection()->AddArray("Internal Mesh"); - - vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New(); - reader_->SetNthOutput(0, ugrid); - ugrid->Delete(); - reader_->GetOutput(0)->Initialize(); - - polyBoundaryMeshEntries patchEntries - ( - IOobject - ( - "boundary", - dbPtr_().findInstance(polyMesh::meshSubDir, "boundary"), - polyMesh::meshSubDir, - dbPtr_(), - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ) - ); - - label regioni = 0; - forAll(patchEntries, entryi) - { - label nFaces(readLabel(patchEntries[entryi].dict().lookup("nFaces"))); - - if (nFaces) - { - regioni++; - - reader_->GetRegionSelection()->AddArray - ( - padPatchString(patchEntries[entryi].keyword()).c_str() - ); - - vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New(); - reader_->SetNthOutput(regioni, ugrid); - ugrid->Delete(); - reader_->GetOutput(regioni)->Initialize(); - } - } - - selectedRegions_.setSize(regioni + 1); - selectedRegions_ = true; - - UpdateInformation(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::vtkFoam::~vtkFoam() -{ - // Do NOT delete meshPtr_ since still referenced somehow. -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -#include "vtkFoamAddFields.H" - -void Foam::vtkFoam::UpdateInformation() -{ - if (debug) - { - Info<< "TimeStep = " << reader_->GetTimeStep() << endl; - } - - setSelectedTime(dbPtr_(), reader_); - - // Search for list of objects for this time - IOobjectList objects(dbPtr_(), dbPtr_().timeName()); - - addFields(reader_->GetVolFieldSelection(), objects); - addFields(reader_->GetVolFieldSelection(), objects); - addFields(reader_->GetVolFieldSelection(), objects); - addFields(reader_->GetVolFieldSelection(), objects); - addFields(reader_->GetVolFieldSelection(), objects); - - addFields(reader_->GetPointFieldSelection(), objects); - addFields(reader_->GetPointFieldSelection(), objects); - addFields(reader_->GetPointFieldSelection(), objects); - addFields(reader_->GetPointFieldSelection(), objects); - addFields(reader_->GetPointFieldSelection(), objects); -} - - -void Foam::vtkFoam::Update() -{ - if - ( - !reader_->GetCacheMesh() - || reader_->GetTimeSelection()->GetArraySetting(0) - ) - { - meshPtr_= NULL; - } - - // Clear the current set of selected fields - - for (label i=0; iGetNumberOfOutputs(); i++) - { - vtkUnstructuredGrid *vtkMesh = - vtkUnstructuredGrid::SafeDownCast(reader_->GetOutput(i)); - - vtkCellData* cellData = vtkMesh->GetCellData(); - int numberOfCellArrays = cellData->GetNumberOfArrays(); - - wordList cellFieldNames(numberOfCellArrays); - for (int j=0; jGetArrayName(j); - } - - for (int j=0; jRemoveArray(cellFieldNames[j].c_str()); - } - - vtkPointData* pointData = vtkMesh->GetPointData(); - int numberOfPointArrays = pointData->GetNumberOfArrays(); - - wordList pointFieldNames(numberOfPointArrays); - for (int j=0; jGetArrayName(j); - } - - for (int j=0; jRemoveArray(pointFieldNames[j].c_str()); - } - } - - // Check to see if the mesh has been created - - if (!meshPtr_) - { - if (debug) - { - Info<< "Reading Mesh" << endl; - } - meshPtr_ = - new fvMesh - ( - IOobject - ( - fvMesh::defaultRegion, - dbPtr_().timeName(), - dbPtr_() - ) - ); - convertMesh(); - } - else - { - boolList oldSelectedRegions = selectedRegions_; - updateSelectedRegions(); - if - ( - meshPtr_->readUpdate() != fvMesh::UNCHANGED - || oldSelectedRegions != selectedRegions_ - ) - { - convertMesh(); - } - } - - if (debug) - { - Info<< "converting fields" << endl; - } - - const fvMesh& mesh = *meshPtr_; - - // Construct interpolation on the raw mesh - Foam::pointMesh pMesh(mesh); - - Foam::volPointInterpolation pInterp(mesh, pMesh); - - // Search for list of objects for this time - Foam::IOobjectList objects(mesh, dbPtr_().timeName()); - - convertVolFields - ( - mesh, pInterp, objects, reader_->GetVolFieldSelection() - ); - convertVolFields - ( - mesh, pInterp, objects, reader_->GetVolFieldSelection() - ); - convertVolFields - ( - mesh, pInterp, objects, reader_->GetVolFieldSelection() - ); - convertVolFields - ( - mesh, pInterp, objects, reader_->GetVolFieldSelection() - ); - convertVolFields - ( - mesh, pInterp, objects, reader_->GetVolFieldSelection() - ); - - convertPointFields - ( - mesh, objects, reader_->GetPointFieldSelection() - ); - convertPointFields - ( - mesh, objects, reader_->GetPointFieldSelection() - ); - convertPointFields - ( - mesh, objects, reader_->GetPointFieldSelection() - ); - convertPointFields - ( - mesh, objects, reader_->GetPointFieldSelection() - ); - convertPointFields - ( - mesh, objects, reader_->GetPointFieldSelection() - ); - - if (debug) - { - Info<< "done" << endl; - } -} - - -// ************************************************************************* // diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.H b/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.H deleted file mode 100644 index baca6a3863..0000000000 --- a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.H +++ /dev/null @@ -1,256 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::vtkFoam - -Description - -SourceFiles - vtkFoam.C - vtkFoamInsertNextPoint.H - vtkFoamAddFields.H - vtkFoamAddInternalMesh.H - vtkFoamConvertFields.H - vtkFoamConvertVolField.H - vtkFoamConvertPatchFaceField.H - vtkFoamConvertPointField.H - vtkFoamConvertPatchPointField.H - -\*---------------------------------------------------------------------------*/ - -#ifndef vtkFoam_H -#define vtkFoam_H - -#include "className.H" -#include "fileName.H" -#include "volPointInterpolation.H" - -// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * // - -// VTK class forward declarations -class vtkFoamReader; -class vtkUnstructuredGrid; -class vtkPoints; -class vtkDataArraySelection; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Foam class forward declarations -class argList; -class Time; -class fvMesh; -class IOobjectList; -class polyPatch; - - -/*---------------------------------------------------------------------------*\ - Class vtkFoam Declaration -\*---------------------------------------------------------------------------*/ - -class vtkFoam -{ - // Private data - - //- Access to the controlling vtkFoamReader - vtkFoamReader *reader_; - - autoPtr argsPtr_; - autoPtr