From b2b498dbaf5e9ced4d21196d46490de863fd9f0e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 18 Jun 2008 11:23:00 +0200 Subject: [PATCH 01/21] RAS turbulenceModels - document default coefficients for doxygen - removed stray 'sourceFiles' --- .../RAS/compressible/LRR/LRR.H | 18 +++++++++++++++ .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 20 +++++++++++++++++ .../LaunderSharmaKE/LaunderSharmaKE.H | 14 ++++++++++++ .../compressible/LaunderSharmaKE/sourceFiles | 2 -- .../compressible/RNGkEpsilon/RNGkEpsilon.H | 16 ++++++++++++++ .../RAS/compressible/RNGkEpsilon/sourceFiles | 2 -- .../SpalartAllmaras/SpalartAllmaras.H | 15 +++++++++++++ .../RAS/compressible/kEpsilon/kEpsilon.H | 14 ++++++++++++ .../RAS/compressible/kOmegaSST/kOmegaSST.H | 22 ++++++++++++++++++- .../compressible/realizableKE/realizableKE.H | 13 +++++++++++ .../RAS/incompressible/LRR/LRR.H | 18 +++++++++++++++ .../LaunderGibsonRSTM/LaunderGibsonRSTM.H | 20 +++++++++++++++++ .../LaunderSharmaKE/LaunderSharmaKE.H | 14 ++++++++++++ .../incompressible/RNGkEpsilon/RNGkEpsilon.H | 16 ++++++++++++++ .../SpalartAllmaras/SpalartAllmaras.H | 15 +++++++++++++ .../RAS/incompressible/kEpsilon/kEpsilon.H | 14 ++++++++++++ .../RAS/incompressible/kOmegaSST/kOmegaSST.H | 20 +++++++++++++++++ .../realizableKE/realizableKE.H | 14 +++++++++++- 18 files changed, 261 insertions(+), 6 deletions(-) delete mode 100644 src/turbulenceModels/RAS/compressible/LaunderSharmaKE/sourceFiles delete mode 100644 src/turbulenceModels/RAS/compressible/RNGkEpsilon/sourceFiles diff --git a/src/turbulenceModels/RAS/compressible/LRR/LRR.H b/src/turbulenceModels/RAS/compressible/LRR/LRR.H index 1c6dcf4888..aa59d2b2bf 100644 --- a/src/turbulenceModels/RAS/compressible/LRR/LRR.H +++ b/src/turbulenceModels/RAS/compressible/LRR/LRR.H @@ -29,6 +29,24 @@ Description Launder, Reece and Rodi Reynolds-stress turbulence model for compressible flows. + The default model coefficients correspond to the following: + @verbatim + LRRCoeffs + { + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1.0; // only for compressible + alphaEps 0.76923; + alphaR 1.22; // only for compressible + couplingFactor 0.0; // only for incompressible + } + @endverbatim + SourceFiles LRR.C LRRcorrect.C diff --git a/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 3942243c9d..4ea6c4f18f 100644 --- a/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/RAS/compressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -28,6 +28,26 @@ Class Description Launder-Gibson Reynolds stress turbulence model for compressible flows. + The default model coefficients correspond to the following: + @verbatim + LaunderGibsonRSTMCoeffs + { + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1.0; // only for compressible + alphaEps 0.76923; + alphaR 1.22; + couplingFactor 0.0; + } + @endverbatim + SourceFiles LaunderGibsonRSTM.C LaunderGibsonRSTMcorrect.C diff --git a/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H index 0ff1754957..9b3ca70971 100644 --- a/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/LaunderSharmaKE.H @@ -29,6 +29,20 @@ Description Launder and Sharma low-Reynolds k-epsilon turbulence model for compressible and combusting flows. + The default model coefficients correspond to the following: + @verbatim + LaunderSharmaKECoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1.0; // only for compressible + alphahk 1.0; // only for compressible + alphaEps 0.76923; + } + @endverbatim + SourceFiles LaunderSharmaKE.C LaunderSharmaKECorrect.C diff --git a/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/sourceFiles b/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/sourceFiles deleted file mode 100644 index 4af781d2c8..0000000000 --- a/src/turbulenceModels/RAS/compressible/LaunderSharmaKE/sourceFiles +++ /dev/null @@ -1,2 +0,0 @@ -SOURCE = \ -$(EXE_SRC)/RNGkEpsilon.C diff --git a/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H index 2168a37504..01f4c80aed 100644 --- a/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/RNGkEpsilon.H @@ -28,6 +28,22 @@ Class Description Renormalisation group k-epsilon turbulence model for compressible flows. + The default model coefficients correspond to the following: + @verbatim + RNGkEpsilonCoeffs + { + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; // only for compressible + alphah 1.0; // only for compressible + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; + } + @endverbatim + SourceFiles RNGkEpsilon.C RNGkEpsilonCorrect.C diff --git a/src/turbulenceModels/RAS/compressible/RNGkEpsilon/sourceFiles b/src/turbulenceModels/RAS/compressible/RNGkEpsilon/sourceFiles deleted file mode 100644 index 4af781d2c8..0000000000 --- a/src/turbulenceModels/RAS/compressible/RNGkEpsilon/sourceFiles +++ /dev/null @@ -1,2 +0,0 @@ -SOURCE = \ -$(EXE_SRC)/RNGkEpsilon.C diff --git a/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H index 4a70f0cb79..431715b8a1 100644 --- a/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/RAS/compressible/SpalartAllmaras/SpalartAllmaras.H @@ -44,6 +44,21 @@ Description Ph.D. thesis, University of Michigan, 1996. @endverbatim + The default model coefficients correspond to the following: + @verbatim + SpalartAllmarasCoeffs + { + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2.0; + Cv1 7.1; + Cv2 5.0; + alphaNut 1.5; + alphah 1.0; // only for compressible + } + @endverbatim + SourceFiles SpalartAllmaras.C SpalartAllmarasCorrect.C diff --git a/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H index 35daac84c4..a103f76077 100644 --- a/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/RAS/compressible/kEpsilon/kEpsilon.H @@ -28,6 +28,20 @@ Class Description Standard k-epsilon turbulence model for compressible flows + The default model coefficients correspond to the following: + @verbatim + kEpsilonCoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; // only for compressible + alphak 1.0; // only for compressible + alphaEps 0.76923; + alphah 1.0; // only for compressible + } + @endverbatim + SourceFiles kEpsilon.C kEpsilonCorrect.C diff --git a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H index e0f124dcbf..07f09dc8aa 100644 --- a/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/RAS/compressible/kOmegaSST/kOmegaSST.H @@ -39,7 +39,7 @@ Description Note that this implementation is written in terms of alpha diffusion coefficients rather than the more traditional sigma (alpha = 1/sigma) so that the blending can be applied to all coefficuients in a consistent - manner. The paper suggests that sigma is blended but this woulf not be + manner. The paper suggests that sigma is blended but this would not be consistent with the blending of the k-epsilon and k-omega models. Also note that the error in the last term of equation (2) relating to @@ -52,6 +52,26 @@ Description uncertainty in their origin, range of applicability and that is y+ becomes sufficiently small blending u_tau in this manner clearly becomes nonsense. + The default model coefficients correspond to the following: + @verbatim + kOmegaSST + { + Cmu 0.09; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + alphah 1.0; // only for compressible + beta1 0.075; + beta2 0.0828; + betaStar 0.09; + gamma1 0.5532; + gamma2 0.4403; + a1 0.31; + c1 10.0; + } + @endverbatim + SourceFiles kOmegaSST.C kOmegaWallFunctionsI.H diff --git a/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H b/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H index 3b4b7d340a..cade1cbfc6 100644 --- a/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H +++ b/src/turbulenceModels/RAS/compressible/realizableKE/realizableKE.H @@ -37,7 +37,20 @@ Description Jiang Zhu Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995 + @endverbatim + + The default model coefficients correspond to the following: @verbatim + realizableKE + { + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1.0; + alphaEps 0.833333; + alphah 1.0; // only for compressible + } + @endverbatim SourceFiles realizableKE.C diff --git a/src/turbulenceModels/RAS/incompressible/LRR/LRR.H b/src/turbulenceModels/RAS/incompressible/LRR/LRR.H index 5384420a05..6af0e2af29 100644 --- a/src/turbulenceModels/RAS/incompressible/LRR/LRR.H +++ b/src/turbulenceModels/RAS/incompressible/LRR/LRR.H @@ -29,6 +29,24 @@ Description Launder, Reece and Rodi Reynolds-stress turbulence model for incompressible flows. + The default model coefficients correspond to the following: + @verbatim + LRRCoeffs + { + Cmu 0.09; + Clrr1 1.8; + Clrr2 0.6; + C1 1.44; + C2 1.92; + Cs 0.25; + Ceps 0.15; + alphah 1.0; // only for compressible + alphaEps 0.76923; + alphaR 1.22; // only for compressible + couplingFactor 0.0; // only for incompressible + } + @endverbatim + SourceFiles LRR.C diff --git a/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 27ea7bec61..f1b4803542 100644 --- a/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/RAS/incompressible/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -28,6 +28,26 @@ Class Description Launder-Gibson Reynolds stress turbulence model for incompressible flows. + The default model coefficients correspond to the following: + @verbatim + LaunderGibsonRSTMCoeffs + { + Cmu 0.09; + Clg1 1.8; + Clg2 0.6; + C1 1.44; + C2 1.92; + C1Ref 0.5; + C2Ref 0.3; + Cs 0.25; + Ceps 0.15; + alphah 1.0; // only for compressible + alphaEps 0.76923; + alphaR 1.22; + couplingFactor 0.0; + } + @endverbatim + SourceFiles LaunderGibsonRSTM.C diff --git a/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H index a43dbfd5da..050163a536 100644 --- a/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/RAS/incompressible/LaunderSharmaKE/LaunderSharmaKE.H @@ -29,6 +29,20 @@ Description Launder and Sharma low-Reynolds k-epsilon turbulence model for incompressible flows. + The default model coefficients correspond to the following: + @verbatim + LaunderSharmaKECoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; + alphah 1.0; // only for compressible + alphahk 1.0; // only for compressible + alphaEps 0.76923; + } + @endverbatim + SourceFiles LaunderSharmaKE.C diff --git a/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H index 6753c114ad..58e0f56c3f 100644 --- a/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/RAS/incompressible/RNGkEpsilon/RNGkEpsilon.H @@ -28,6 +28,22 @@ Class Description Renormalisation group k-epsilon turbulence model for incompressible flows. + The default model coefficients correspond to the following: + @verbatim + RNGkEpsilonCoeffs + { + Cmu 0.0845; + C1 1.42; + C2 1.68; + C3 -0.33; // only for compressible + alphah 1.0; // only for compressible + alphak 1.39; + alphaEps 1.39; + eta0 4.38; + beta 0.012; + } + @endverbatim + SourceFiles RNGkEpsilon.C diff --git a/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H index 67b9b2bf2f..2966c9d0b3 100644 --- a/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/RAS/incompressible/SpalartAllmaras/SpalartAllmaras.H @@ -42,7 +42,22 @@ Description for High Reynolds Number Compressible Flows" G.A. Ashford, Ph.D. thesis, University of Michigan, 1996. + @endverbatim + + The default model coefficients correspond to the following: @verbatim + SpalartAllmarasCoeffs + { + Cb1 0.1355; + Cb2 0.622; + Cw2 0.3; + Cw3 2.0; + Cv1 7.1; + Cv2 5.0; + alphaNut 1.5; + alphah 1.0; // only for compressible + } + @endverbatim SourceFiles SpalartAllmaras.C diff --git a/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H b/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H index 7f9dd06b35..2104962159 100644 --- a/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/RAS/incompressible/kEpsilon/kEpsilon.H @@ -28,6 +28,20 @@ Class Description Standard k-epsilon turbulence model for incompressible flows. + The default model coefficients correspond to the following: + @verbatim + kEpsilonCoeffs + { + Cmu 0.09; + C1 1.44; + C2 1.92; + C3 -0.33; // only for compressible + alphak 1.0; // only for compressible + alphaEps 0.76923; + alphah 1.0; // only for compressible + } + @endverbatim + SourceFiles kEpsilon.C diff --git a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H index 13be4a234a..f8e838a36a 100644 --- a/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/RAS/incompressible/kOmegaSST/kOmegaSST.H @@ -53,6 +53,26 @@ Description uncertainty in their origin, range of applicability and that is y+ becomes sufficiently small blending u_tau in this manner clearly becomes nonsense. + The default model coefficients correspond to the following: + @verbatim + kOmegaSST + { + Cmu 0.09; + alphaK1 0.85034; + alphaK2 1.0; + alphaOmega1 0.5; + alphaOmega2 0.85616; + alphah 1.0; // only for compressible + beta1 0.075; + beta2 0.0828; + betaStar 0.09; + gamma1 0.5532; + gamma2 0.4403; + a1 0.31; + c1 10.0; + } + @endverbatim + SourceFiles kOmegaSST.C kOmegaWallFunctionsI.H diff --git a/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H b/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H index bc4ee34cbc..8e08854a2a 100644 --- a/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H +++ b/src/turbulenceModels/RAS/incompressible/realizableKE/realizableKE.H @@ -37,8 +37,20 @@ Description Jiang Zhu Computers and Fluids Vol. 24, No. 3, pp. 227-238, 1995 - @verbatim + @endverbatim + The default model coefficients correspond to the following: + @verbatim + realizableKE + { + Cmu 0.09; + A0 4.0; + C2 1.9; + alphak 1.0; + alphaEps 0.833333; + alphah 1.0; // only for compressible + } + @endverbatim SourceFiles realizableKE.C From 5390ac2b1f842d8912f3e06b7fb0a436183e4813 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 21 Jun 2008 17:15:45 +0100 Subject: [PATCH 02/21] Adding symmTensor to components.C otherwise foamCalc components sigma does not work in solidDisplacementFoam tutorial --- .../foamCalcFunctions/field/components/components.C | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/postProcessing/foamCalcFunctions/field/components/components.C b/src/postProcessing/foamCalcFunctions/field/components/components.C index 644771023b..9c36d48ac1 100644 --- a/src/postProcessing/foamCalcFunctions/field/components/components.C +++ b/src/postProcessing/foamCalcFunctions/field/components/components.C @@ -112,6 +112,13 @@ void Foam::calcTypes::components::calc processed ); + writeComponentFields + ( + fieldHeader, + mesh, + processed + ); + if (!processed) { FatalError From 713ce12d95a3b745eaea9d1b0454024f503a7759 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 21 Jun 2008 17:35:04 +0100 Subject: [PATCH 03/21] Updating sampleDict in rhoSonicFoam/shockTube case --- tutorials/rhoSonicFoam/shockTube/system/sampleDict | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tutorials/rhoSonicFoam/shockTube/system/sampleDict b/tutorials/rhoSonicFoam/shockTube/system/sampleDict index 7c59b17bef..95b819ee74 100644 --- a/tutorials/rhoSonicFoam/shockTube/system/sampleDict +++ b/tutorials/rhoSonicFoam/shockTube/system/sampleDict @@ -25,13 +25,14 @@ FoamFile interpolationScheme cellPoint; -writeFormat raw; +setFormat raw; -sampleSets +sets ( - uniform + data { - name data; + type uniform; + axis x; start (-4.995 0 0); end (4.995 0 0); @@ -39,6 +40,9 @@ sampleSets } ); +surfaces +(); + fields ( T From 0eaf65b5181670d1279419366643b69e879614c9 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 21 Jun 2008 17:36:18 +0100 Subject: [PATCH 04/21] Updating sampleDict in solidDisplacmentFoam tutorial case --- .../plateHole/system/sampleDict | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tutorials/solidDisplacementFoam/plateHole/system/sampleDict b/tutorials/solidDisplacementFoam/plateHole/system/sampleDict index adf21bd6cf..056f0894ff 100644 --- a/tutorials/solidDisplacementFoam/plateHole/system/sampleDict +++ b/tutorials/solidDisplacementFoam/plateHole/system/sampleDict @@ -25,13 +25,13 @@ FoamFile interpolationScheme cellPoint; -writeFormat raw; +setFormat raw; -sampleSets +sets ( - uniform + leftPatch { - name leftPatch; + type uniform; axis y; start (0 0.5 0.25); end (0 2 0.25); @@ -39,10 +39,12 @@ sampleSets } ); -fields +surfaces +(); + +fields ( sigmaxx ); - // ************************************************************************* // From b6279461fbb494badb70e243b35966ccc660efe5 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 23 Jun 2008 10:14:42 +0200 Subject: [PATCH 05/21] Add find-longlines utility (find *.[CH] files that violate 80-cols) --- doc/Doxygen/tools/README | 1 + doc/Doxygen/tools/find-longlines | 46 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100755 doc/Doxygen/tools/find-longlines diff --git a/doc/Doxygen/tools/README b/doc/Doxygen/tools/README index 0a3a9ceecb..86c4e8ae73 100644 --- a/doc/Doxygen/tools/README +++ b/doc/Doxygen/tools/README @@ -11,4 +11,5 @@ Misc Tools 1. find-templateInComments 2. find-its 3. find-junkFiles +4. find-longlines diff --git a/doc/Doxygen/tools/find-longlines b/doc/Doxygen/tools/find-longlines new file mode 100755 index 0000000000..c5294715d8 --- /dev/null +++ b/doc/Doxygen/tools/find-longlines @@ -0,0 +1,46 @@ +#!/usr/bin/perl -w +use strict; +use File::Find (); + +# ----------------------------------------------------------------------------- +# +# Script +# find-longlines +# +# Description +# Search for *.[CH] files that exceed the 80-column width +# +# - print filename lineNumber and offending line (with truncation point) +# +# ----------------------------------------------------------------------------- + +my $maxlen = 80; +my $re_filespec = qr{^.+\.[CH]$}; +my $count; + +sub wanted { + unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) { + return; + } + + local @ARGV = $_; + while (<>) { + chomp; + s{\s+$}{}; # trim + + if ( $maxlen < length ) { + $count++; + substr( $_, $maxlen, 0 ) = "||->>"; # show truncation point + print "$ARGV $. $_\n"; + } + } + close ARGV; +} + +## Traverse desired filesystems +for my $dir (@ARGV) { + no warnings 'File::Find'; + warn "(**) checking '$dir' ...\n"; + File::Find::find( { wanted => \&wanted }, $dir ); +} + From 0462cfedd54f72cbbfc311f14d9fca01e87a10f7 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 23 Jun 2008 10:15:17 +0200 Subject: [PATCH 06/21] porousZone : use new dictionary lookup methods --- .../cfdTools/general/porousMedia/porousZone.C | 139 +++++++++--------- .../cfdTools/general/porousMedia/porousZone.H | 2 +- 2 files changed, 71 insertions(+), 70 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C index 1a1d940193..c2fca0bbd9 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C @@ -32,15 +32,28 @@ License // * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // // adjust negative resistance values to be multiplier of max value -void Foam::porousZone::adjustNegativeResistance(vector& resist) +void Foam::porousZone::adjustNegativeResistance(dimensionedVector& resist) { - scalar maxCmpt = max(0, cmptMax(resist)); + scalar maxCmpt = max(0, cmptMax(resist.value())); - for (label cmpt=0; cmpt < vector::nComponents; ++cmpt) + if (maxCmpt < 0) { - if (resist[cmpt] < 0) + FatalErrorIn + ( + "Foam::porousZone::porousZone::adjustNegativeResistance" + "(dimensionedVector&)" + ) << "negative resistances! " << resist + << exit(FatalError); + } + else + { + vector& val = resist.value(); + for (label cmpt=0; cmpt < vector::nComponents; ++cmpt) { - resist[cmpt] *= -maxCmpt; + if (val[cmpt] < 0) + { + val[cmpt] *= -maxCmpt; + } } } } @@ -71,24 +84,20 @@ Foam::porousZone::porousZone FatalErrorIn ( "Foam::porousZone::porousZone" - "(const fvMesh&, const Istream&)" + "(const fvMesh&, const word&, const dictionary&)" ) << "cannot find porous cellZone " << name_ << exit(FatalError); } - // local-to-global transformation tensor - const tensor& E = coordSys_.R(); - // porosity - if (dict_.found("porosity")) + if (dict_.readIfPresent("porosity", porosity_)) { - dict_.lookup("porosity") >> porosity_; - if (porosity_ <= 0.0 || porosity_ > 1.0) { FatalIOErrorIn ( - "Foam::porousZone::porousZone(const fvMesh&, const Istream&)", + "Foam::porousZone::porousZone" + "(const fvMesh&, const word&, const dictionary&)", dict_ ) << "out-of-range porosity value " << porosity_ @@ -97,73 +106,64 @@ Foam::porousZone::porousZone } // powerLaw coefficients - if (dict_.found("powerLaw")) + if (const dictionary* dictPtr = dict_.subDictPtr("powerLaw")) { - const dictionary& subDict = dict_.subDict("powerLaw"); - if (subDict.found("C0")) - { - subDict.lookup("C0") >> C0_; - } - if (subDict.found("C1")) - { - subDict.lookup("C1") >> C1_; - } + dictPtr->readIfPresent("C0", C0_); + dictPtr->readIfPresent("C1", C1_); } // Darcy-Forchheimer coefficients - if (dict_.found("Darcy")) + if (const dictionary* dictPtr = dict_.subDictPtr("Darcy")) { - const dictionary& subDict = dict_.subDict("Darcy"); + // local-to-global transformation tensor + const tensor& E = coordSys_.R(); - dimensionedVector d("d", D_.dimensions(), vector::zero); - dimensionedVector f("f", F_.dimensions(), vector::zero); - - if (subDict.found("d")) + dimensionedVector d(vector::zero); + if (dictPtr->readIfPresent("d", d)) { - // d = dimensionedVector("d", subDict.lookup("d")); - subDict.lookup("d") >> d; - adjustNegativeResistance(d.value()); + if (D_.dimensions() != d.dimensions()) + { + FatalIOErrorIn + ( + "Foam::porousZone::porousZone" + "(const fvMesh&, const word&, const dictionary&)", + dict_ + ) << "incorrect dimensions for d: " << d.dimensions() + << " should be " << D_.dimensions() + << exit(FatalIOError); + } - } - if (subDict.found("f")) - { - // f = dimensionedVector("f", subDict.lookup("f")); - subDict.lookup("f") >> f; - adjustNegativeResistance(f.value()); + adjustNegativeResistance(d); + + D_.value().xx() = d.value().x(); + D_.value().yy() = d.value().y(); + D_.value().zz() = d.value().z(); + D_.value() = (E & D_ & E.T()).value(); } - if (D_.dimensions() != d.dimensions()) + dimensionedVector f(vector::zero); + if (dictPtr->readIfPresent("f", f)) { - FatalIOErrorIn - ( - "Foam::porousZone::porousZone(const fvMesh&, const Istream&)", - dict_ - ) << "incorrect dimensions for d: " << d.dimensions() - << " should be " << D_.dimensions() - << exit(FatalIOError); + if (F_.dimensions() != f.dimensions()) + { + FatalIOErrorIn + ( + "Foam::porousZone::porousZone" + "(const fvMesh&, const word&, const dictionary&)", + dict_ + ) << "incorrect dimensions for f: " << f.dimensions() + << " should be " << F_.dimensions() + << exit(FatalIOError); + } + + adjustNegativeResistance(f); + + // leading 0.5 is from 1/2 * rho + F_.value().xx() = 0.5*f.value().x(); + F_.value().yy() = 0.5*f.value().y(); + F_.value().zz() = 0.5*f.value().z(); + F_.value() = (E & F_ & E.T()).value(); } - - if (F_.dimensions() != f.dimensions()) - { - FatalIOErrorIn - ( - "Foam::porousZone::porousZone(const fvMesh&, const Istream&)", - dict_ - ) << "incorrect dimensions for f: " << f.dimensions() - << " should be " << F_.dimensions() - << exit(FatalIOError); - } - - D_.value().xx() = d.value().x(); - D_.value().yy() = d.value().y(); - D_.value().zz() = d.value().z(); - D_.value() = (E & D_ & E.T()).value(); - - // leading 0.5 is from 1/2 * rho - F_.value().xx() = 0.5*f.value().x(); - F_.value().yy() = 0.5*f.value().y(); - F_.value().zz() = 0.5*f.value().z(); - F_.value() = (E & F_ & E.T()).value(); } // provide some feedback for the user @@ -179,7 +179,8 @@ Foam::porousZone::porousZone { FatalIOErrorIn ( - "Foam::porousZone::porousZone(const fvMesh&, const Istream&)", + "Foam::porousZone::porousZone" + "(const fvMesh&, const word&, const dictionary&)", dict_ ) << "neither powerLaw (C0/C1) " "nor Darcy-Forchheimer law (d/f) specified" diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H index eb58f7bb47..671c39fa45 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.H @@ -128,7 +128,7 @@ class porousZone // Private Member Functions //- adjust negative resistance values to be multiplier of max value - static void adjustNegativeResistance(vector& resist); + static void adjustNegativeResistance(dimensionedVector& resist); //- Power-law resistance template From 82fdeb2736af653e594b84ebe91fcda73e15da65 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 23 Jun 2008 11:44:24 +0100 Subject: [PATCH 07/21] bug fix - previously exited after first command as error flag was used instead of ok flag in main while loop --- .../mesh/manipulation/setSet/setSet.C | 138 ++++++++++-------- 1 file changed, 75 insertions(+), 63 deletions(-) diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index c4e6b21162..4790e0ffc2 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -405,64 +405,71 @@ bool doCommand backup(mesh, setName, currentSet, setName + "_old"); } - if (action == topoSetSource::CLEAR) + switch (action) { - // Already handled above by not reading - } - else if (action == topoSetSource::INVERT) - { - currentSet.invert(currentSet.maxSize(mesh)); - } - else if (action == topoSetSource::LIST) - { - currentSet.writeDebug(Pout, mesh, 100); - Pout<< endl; - } - else if (action == topoSetSource::SUBSET) - { - if (is >> sourceType) + case topoSetSource::CLEAR: { - autoPtr setSource - ( - topoSetSource::New - ( - sourceType, - mesh, - is - ) - ); - - // Backup current set. - topoSet oldSet - ( - mesh, - currentSet.name() + "_old2", - currentSet - ); - - currentSet.clear(); - currentSet.resize(oldSet.size()); - setSource().applyToSet(topoSetSource::NEW, currentSet); - - // Combine new value of currentSet with old one. - currentSet.subset(oldSet); + // Already handled above by not reading + break; } - } - else - { - if (is >> sourceType) + case topoSetSource::INVERT: { - autoPtr setSource - ( - topoSetSource::New + currentSet.invert(currentSet.maxSize(mesh)); + break; + } + case topoSetSource::LIST: + { + currentSet.writeDebug(Pout, mesh, 100); + Pout<< endl; + break; + } + case topoSetSource::SUBSET: + { + if (is >> sourceType) + { + autoPtr setSource ( - sourceType, - mesh, - is - ) - ); + topoSetSource::New + ( + sourceType, + mesh, + is + ) + ); - setSource().applyToSet(action, currentSet); + // Backup current set. + topoSet oldSet + ( + mesh, + currentSet.name() + "_old2", + currentSet + ); + + currentSet.clear(); + currentSet.resize(oldSet.size()); + setSource().applyToSet(topoSetSource::NEW, currentSet); + + // Combine new value of currentSet with old one. + currentSet.subset(oldSet); + } + break; + } + default: + { + if (is >> sourceType) + { + autoPtr setSource + ( + topoSetSource::New + ( + sourceType, + mesh, + is + ) + ); + + setSource().applyToSet(action, currentSet); + } } } @@ -532,7 +539,7 @@ bool doCommand } } - return error; + return !error; } @@ -612,31 +619,36 @@ commandStatus parseType switch(stat) { case polyMesh::UNCHANGED: + { Pout<< " mesh not changed." << endl; - break; - + break; + } case polyMesh::POINTS_MOVED: + { Pout<< " points moved; topology unchanged." << endl; - break; - + break; + } case polyMesh::TOPO_CHANGE: + { Pout<< " topology changed; patches unchanged." << nl << " "; printMesh(runTime, mesh); - - break; - + break; + } case polyMesh::TOPO_PATCH_CHANGE: + { Pout<< " topology changed and patches changed." << nl << " "; printMesh(runTime, mesh); - break; - + break; + } default: + { FatalErrorIn("parseType") << "Illegal mesh update state " << stat << abort(FatalError); - break; + break; + } } return INVALID; From dc5e6dcb9a45441e0d828b7ff4fbadfe0d022ad3 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 23 Jun 2008 14:11:47 +0200 Subject: [PATCH 08/21] triSurface : attempt to use ThirdParty zlib instead of system headers --- src/triSurface/Make/options | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/triSurface/Make/options b/src/triSurface/Make/options index e69de29bb2..cd3f5ed69c 100644 --- a/src/triSurface/Make/options +++ b/src/triSurface/Make/options @@ -0,0 +1,3 @@ +EXE_INC = \ + -I$(WM_THIRD_PARTY_DIR)/zlib-1.2.3 + From 9dbb1149fc262ecf9f2be1d4a123a3d62948ee1e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 23 Jun 2008 14:12:49 +0200 Subject: [PATCH 09/21] autoHexMesh : avoid compiler complaints about scalar->label conversion --- src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H | 2 +- .../autoHexMesh/autoHexMeshDriver/autoHexMeshDriverLayers.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H index 6576e3699c..790ef687b9 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriver.H @@ -803,7 +803,7 @@ public: ( const dictionary& shrinkDict, const dictionary& motionDict, - const scalar nAllowableErrors, + const label nAllowableErrors, motionSmoother& ); diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriverLayers.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriverLayers.C index 1cfbee79d4..1de6e845fb 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriverLayers.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoHexMeshDriverLayers.C @@ -2346,7 +2346,7 @@ void Foam::autoHexMeshDriver::addLayers ( const dictionary& shrinkDict, const dictionary& motionDict, - const scalar nAllowableErrors, + const label nAllowableErrors, motionSmoother& meshMover ) { From eb69b16d3edba095acf5f16b82165fe2d91a2b16 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 23 Jun 2008 14:19:31 +0200 Subject: [PATCH 10/21] removed old (junk) files * should gzstream move to ThirdParty? --- .../mesh/manipulation/setSet/.setSet | 1 - .../db/IOstreams/gzstream/gzstream.C.1.7 | 165 ------------------ .../db/IOstreams/gzstream/gzstream.h.1.5 | 121 ------------- 3 files changed, 287 deletions(-) delete mode 100644 applications/utilities/mesh/manipulation/setSet/.setSet delete mode 100644 src/OpenFOAM/db/IOstreams/gzstream/gzstream.C.1.7 delete mode 100644 src/OpenFOAM/db/IOstreams/gzstream/gzstream.h.1.5 diff --git a/applications/utilities/mesh/manipulation/setSet/.setSet b/applications/utilities/mesh/manipulation/setSet/.setSet deleted file mode 100644 index ff604669be..0000000000 --- a/applications/utilities/mesh/manipulation/setSet/.setSet +++ /dev/null @@ -1 +0,0 @@ -quit diff --git a/src/OpenFOAM/db/IOstreams/gzstream/gzstream.C.1.7 b/src/OpenFOAM/db/IOstreams/gzstream/gzstream.C.1.7 deleted file mode 100644 index 361609a24a..0000000000 --- a/src/OpenFOAM/db/IOstreams/gzstream/gzstream.C.1.7 +++ /dev/null @@ -1,165 +0,0 @@ -// ============================================================================ -// gzstream, C++ iostream classes wrapping the zlib compression library. -// Copyright (C) 2001 Deepak Bandyopadhyay, Lutz Kettner -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// ============================================================================ -// -// File : gzstream.C -// Revision : $Revision: 1.7 $ -// Revision_date : $Date: 2003/01/08 14:41:27 $ -// Author(s) : Deepak Bandyopadhyay, Lutz Kettner -// -// Standard streambuf implementation following Nicolai Josuttis, "The -// Standard C++ Library". -// ============================================================================ - -#include -#include -#include // for memcpy - -#ifdef GZSTREAM_NAMESPACE -namespace GZSTREAM_NAMESPACE { -#endif - -// ---------------------------------------------------------------------------- -// Internal classes to implement gzstream. See header file for user classes. -// ---------------------------------------------------------------------------- - -// -------------------------------------- -// class gzstreambuf: -// -------------------------------------- - -gzstreambuf* gzstreambuf::open( const char* name, int open_mode) { - if ( is_open()) - return reinterpret_cast(0); - mode = open_mode; - // no append nor read/write mode - if ((mode & std::ios::ate) || (mode & std::ios::app) - || ((mode & std::ios::in) && (mode & std::ios::out))) - return reinterpret_cast(0); - char fmode[10]; - char* fmodeptr = fmode; - if ( mode & std::ios::in) - *fmodeptr++ = 'r'; - else if ( mode & std::ios::out) - *fmodeptr++ = 'w'; - *fmodeptr++ = 'b'; - *fmodeptr = '\0'; - file = gzopen( name, fmode); - if (file == 0) - return reinterpret_cast(0); - opened = 1; - return this; -} - -gzstreambuf * gzstreambuf::close() { - if ( is_open()) { - sync(); - opened = 0; - if ( gzclose( file) == Z_OK) - return this; - } - return reinterpret_cast(0); -} - -int gzstreambuf::underflow() { // used for input buffer only - if ( gptr() && ( gptr() < egptr())) - return * reinterpret_cast( gptr()); - - if ( ! (mode & std::ios::in) || ! opened) - return EOF; - // Josuttis' implementation of inbuf - int n_putback = gptr() - eback(); - if ( n_putback > 4) - n_putback = 4; - memcpy( buffer + (4 - n_putback), gptr() - n_putback, n_putback); - - int num = gzread( file, buffer+4, bufferSize-4); - if (num <= 0) // ERROR or EOF - return EOF; - - // reset buffer pointers - setg( buffer + (4 - n_putback), // beginning of putback area - buffer + 4, // read position - buffer + 4 + num); // end of buffer - - // return next character - return * reinterpret_cast( gptr()); -} - -int gzstreambuf::flush_buffer() { - // Separate the writing of the buffer from overflow() and - // sync() operation. - int w = pptr() - pbase(); - if ( gzwrite( file, pbase(), w) != w) - return EOF; - pbump( -w); - return w; -} - -int gzstreambuf::overflow( int c) { // used for output buffer only - if ( ! ( mode & std::ios::out) || ! opened) - return EOF; - if (c != EOF) { - *pptr() = c; - pbump(1); - } - if ( flush_buffer() == EOF) - return EOF; - return c; -} - -int gzstreambuf::sync() { - // Changed to use flush_buffer() instead of overflow( EOF) - // which caused improper behavior with std::endl and flush(), - // bug reported by Vincent Ricard. - if ( pptr() && pptr() > pbase()) { - if ( flush_buffer() == EOF) - return -1; - } - return 0; -} - -// -------------------------------------- -// class gzstreambase: -// -------------------------------------- - -gzstreambase::gzstreambase( const char* name, int mode) { - init( &buf); - open( name, mode); -} - -gzstreambase::~gzstreambase() { - buf.close(); -} - -void gzstreambase::open( const char* name, int open_mode) { - if ( ! buf.open( name, open_mode)) - clear( rdstate() | std::ios::badbit); -} - -void gzstreambase::close() { - if ( buf.is_open()) - if ( ! buf.close()) - clear( rdstate() | std::ios::badbit); -} - -#ifdef GZSTREAM_NAMESPACE -} // namespace GZSTREAM_NAMESPACE -#endif - -// ============================================================================ -// EOF // diff --git a/src/OpenFOAM/db/IOstreams/gzstream/gzstream.h.1.5 b/src/OpenFOAM/db/IOstreams/gzstream/gzstream.h.1.5 deleted file mode 100644 index 861653f481..0000000000 --- a/src/OpenFOAM/db/IOstreams/gzstream/gzstream.h.1.5 +++ /dev/null @@ -1,121 +0,0 @@ -// ============================================================================ -// gzstream, C++ iostream classes wrapping the zlib compression library. -// Copyright (C) 2001 Deepak Bandyopadhyay, Lutz Kettner -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library 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 -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// ============================================================================ -// -// File : gzstream.h -// Revision : $Revision: 1.5 $ -// Revision_date : $Date: 2002/04/26 23:30:15 $ -// Author(s) : Deepak Bandyopadhyay, Lutz Kettner -// -// Standard streambuf implementation following Nicolai Josuttis, "The -// Standard C++ Library". -// ============================================================================ - -#ifndef GZSTREAM_H -#define GZSTREAM_H 1 - -// standard C++ with new header file names and std:: namespace -#include -#include -#include - -#ifdef GZSTREAM_NAMESPACE -namespace GZSTREAM_NAMESPACE { -#endif - -// ---------------------------------------------------------------------------- -// Internal classes to implement gzstream. See below for user classes. -// ---------------------------------------------------------------------------- - -class gzstreambuf : public std::streambuf { -private: - static const int bufferSize = 47+256; // size of data buff - // totals 512 bytes under g++ for igzstream at the end. - - gzFile file; // file handle for compressed file - char buffer[bufferSize]; // data buffer - char opened; // open/close state of stream - int mode; // I/O mode - - int flush_buffer(); -public: - gzstreambuf() : opened(0) { - setp( buffer, buffer + (bufferSize-1)); - setg( buffer + 4, // beginning of putback area - buffer + 4, // read position - buffer + 4); // end position - // ASSERT: both input & output capabilities will not be used together - } - int is_open() { return opened; } - gzstreambuf* open( const char* name, int open_mode); - gzstreambuf* close(); - ~gzstreambuf() { close(); } - - virtual int overflow( int c = EOF); - virtual int underflow(); - virtual int sync(); -}; - -class gzstreambase : virtual public std::ios { -protected: - gzstreambuf buf; -public: - gzstreambase() { init(&buf); } - gzstreambase( const char* name, int open_mode); - ~gzstreambase(); - void open( const char* name, int open_mode); - void close(); - gzstreambuf* rdbuf() { return &buf; } -}; - -// ---------------------------------------------------------------------------- -// User classes. Use igzstream and ogzstream analogously to ifstream and -// ofstream respectively. They read and write files based on the gz* -// function interface of the zlib. Files are compatible with gzip compression. -// ---------------------------------------------------------------------------- - -class igzstream : public gzstreambase, public std::istream { -public: - igzstream() : std::istream( &buf) {} - igzstream( const char* name, int open_mode = std::ios::in) - : gzstreambase( name, open_mode), std::istream( &buf) {} - gzstreambuf* rdbuf() { return gzstreambase::rdbuf(); } - void open( const char* name, int open_mode = std::ios::in) { - gzstreambase::open( name, open_mode); - } -}; - -class ogzstream : public gzstreambase, public std::ostream { -public: - ogzstream() : std::ostream( &buf) {} - ogzstream( const char* name, int mode = std::ios::out) - : gzstreambase( name, mode), std::ostream( &buf) {} - gzstreambuf* rdbuf() { return gzstreambase::rdbuf(); } - void open( const char* name, int open_mode = std::ios::out) { - gzstreambase::open( name, open_mode); - } -}; - -#ifdef GZSTREAM_NAMESPACE -} // namespace GZSTREAM_NAMESPACE -#endif - -#endif // GZSTREAM_H -// ============================================================================ -// EOF // - From 5f84691eb8e82dbf599ddfa1fbb504da317d3bf7 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 23 Jun 2008 15:17:50 +0100 Subject: [PATCH 11/21] adding turbulenceProperties conversion script --- bin/upgradeTurbulenceProperties | 85 +++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 bin/upgradeTurbulenceProperties diff --git a/bin/upgradeTurbulenceProperties b/bin/upgradeTurbulenceProperties new file mode 100755 index 0000000000..35de08f093 --- /dev/null +++ b/bin/upgradeTurbulenceProperties @@ -0,0 +1,85 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 1991-2007 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 +# +# Script +# upgradeTurbulenceProperties +# +# Description +# Upgrade the turbulenceProperties dictionary to the new format employed +# in OpenFOAM version 1.5 +# - RAS turbulence models now defined by the RASProperties dictionary, +# and RASModel keyword, and +# - LES turbulence models now defined by the LESProperties dictionary, +# and LESModel keyword. +# +#------------------------------------------------------------------------------ + +printUsage() +{ + echo "Usage: `basename $0` " + echo " Where is the full path to the" + echo " turbulenceProperties dictionary" +} + +convertDict() +{ + echo " Identified $1 turbulence model" + + sed -e "s/turbulenceProperties/$1Properties/" \ + -e "s/$2/$1Model/" \ + -e "s/[a-zA-Z0-9]* [ ]*\[[0-9 ]*\]//" \ + $3 > "$outputPath/$1Properties" + + echo " written $1Properties to $outputPath/" +} + +outputPath=`dirname $1` + +if [ $# -ne 1 ]; then + printUsage + exit 1 +elif [ ! -e $1 ]; then + echo " Error: file $1 does not exist" + echo "" + printUsage + exit 1 +fi + +# Identify type of turbulence model +RAS=`grep turbulenceModel $1` +LES=`grep LESmodel $1` + +if [ -n "$RAS" ]; then + convertDict "RAS" "turbulenceModel" $1 +elif [ -n "$LES" ]; then + convertDict "LES" "LESmodel" $1 +else + echo "Unable to determine turbulence model type - nothing changed" + exit 1 +fi + +echo "done." + +exit 0 From 88b2915fa9df84722349cb8a294bcdf74ad0058a Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 23 Jun 2008 15:22:12 +0100 Subject: [PATCH 12/21] added handling for tensor --- .../foamCalcFunctions/field/components/components.C | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/postProcessing/foamCalcFunctions/field/components/components.C b/src/postProcessing/foamCalcFunctions/field/components/components.C index 9c36d48ac1..95f2421dff 100644 --- a/src/postProcessing/foamCalcFunctions/field/components/components.C +++ b/src/postProcessing/foamCalcFunctions/field/components/components.C @@ -111,13 +111,8 @@ void Foam::calcTypes::components::calc mesh, processed ); - - writeComponentFields - ( - fieldHeader, - mesh, - processed - ); + writeComponentFields(fieldHeader, mesh, processed); + writeComponentFields(fieldHeader, mesh, processed); if (!processed) { From 4c5bd49c0a7a571dfba243fb26ca09e4834b9fd8 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 23 Jun 2008 16:08:01 +0100 Subject: [PATCH 13/21] handling of gamma --- bin/foamLog | 45 +++++++++++++++++++++------------------------ bin/foamLog.db | 4 ++-- 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/bin/foamLog b/bin/foamLog index 28e97a4630..0848d50cc1 100755 --- a/bin/foamLog +++ b/bin/foamLog @@ -47,7 +47,7 @@ printUsage() { cat < +Usage: $PROGNAME [-n][-s] extracts xy files from log $PROGNAME -l lists but does not extract @@ -82,11 +82,11 @@ files with the extracted data only. The query database is a simple text format with three entries per line, separated with '/'. Column 1 is the name of the variable (cannot contain -spaces), column 2 is the regular expression to select the line and -column 3 is the string to select the column inside the line. The value -taken will be the first (non-space)word after this column. -The database will either be \$HOME/.${PROGNAME}.db or if not found -$PROGDIR/${PROGNAME}.db. +spaces), column 2 is the extended regular expression (egrep) to select +the line and column 3 is the string (fgrep) to select the column inside the +line. The value taken will be the first (non-space)word after this +column. The database will either be \$HOME/.${PROGNAME}.db or if not +found $PROGDIR/${PROGNAME}.db. Option -s suppresses the default information and only prints the extracted variables. @@ -105,7 +105,7 @@ myEcho() { # getSolvedVars logFile # Prints names of all 'solved for' variables in the log file. getSolvedVars() { - grep ' Solving for ' $1 | fgrep ',' | sed -e 's/.* Solving for \([^,]*\)[,:].*/\1/' | sort -u + fgrep ' Solving for ' $1 | fgrep ',' | sed -e 's/.* Solving for \([^,]*\)[,:].*/\1/' | sort -u } @@ -163,7 +163,7 @@ getAllQueries() { for var in $dbQueries do getQueries $1 "$var" - line=`grep "$LINEQ" $2` + line=`egrep "$LINEQ" $2` if [ "$line" ]; then column=`echo "$line" | fgrep "$NUMQ"` if [ "$column" ]; then @@ -228,14 +228,13 @@ if [ "$LISTONLY" ]; then exit 0 fi -if [ $# -ne 3 ]; then +if [ $# -ne 1 ]; then printUsage exit 1 fi -ROOT=$1 -CASE=$2 -LOG=$3 +CASEDIR=. +LOG=$1 if [ ! -r $LOG ]; then echo "$PROGNAME: Cannot read log $LOG" exit 1 @@ -244,13 +243,13 @@ fi QUERYNAMES=`getAllQueries $DBFILE $LOG` -if [ ! "$ROOT" -o ! "$CASE" ]; then +if [ ! "$CASEDIR" ]; then printUsage exit 1 fi -if [ ! -d "$ROOT/$CASE" ]; then - echo "$PROGNAME: Cannot read $ROOT/$CASE" +if [ ! -d "$CASEDIR" ]; then + echo "$PROGNAME: Cannot read $CASEDIR" exit 1 fi @@ -262,16 +261,14 @@ fi #-- Make logs dir in case directory and put awk file there. -mkdir -p $ROOT/$CASE/logs -AWKFILE=$ROOT/$CASE/logs/$PROGNAME.awk +mkdir -p $CASEDIR/logs +AWKFILE=$CASEDIR/logs/$PROGNAME.awk myEcho "Using:" -myEcho " root : $ROOT" -myEcho " case : $CASE" myEcho " log : $LOG" myEcho " database : $DBFILE" myEcho " awk file : $AWKFILE" -myEcho " files to : $ROOT/$CASE/logs" +myEcho " files to : $CASEDIR/logs" myEcho "" @@ -364,19 +361,19 @@ cat <> $AWKFILE varName=varNameVal[1] file=varName "_" subIter[varName]++ - file="$ROOT/$CASE/logs/" file + file="$CASEDIR/logs/" file extract(\$0, "Initial residual = ", val) print $TIMENAME "\t" val[1] > file varName=varNameVal[1] "FinalRes" file=varName "_" subIter[varName]++ - file="$ROOT/$CASE/logs/" file + file="$CASEDIR/logs/" file extract(\$0, "Final residual = ", val) print $TIMENAME "\t" val[1] > file varName=varNameVal[1] "Iters" file=varName "_" subIter[varName]++ - file="$ROOT/$CASE/logs/" file + file="$CASEDIR/logs/" file extract(\$0, "No Iterations ", val) print $TIMENAME "\t" val[1] > file } @@ -393,7 +390,7 @@ do echo "#-- Extraction of $queryName" >> $AWKFILE echo "/$LINEQ/ {" >> $AWKFILE echo " extract(\$0, \"$NUMQ\", val)" >> $AWKFILE - echo " file=\"$ROOT/$CASE/logs/${queryName}_\" ${counter}" >> $AWKFILE + echo " file=\"$CASEDIR/logs/${queryName}_\" ${counter}" >> $AWKFILE echo " print $TIMENAME \"\\t\" val[1] > file" >> $AWKFILE echo " ${counter}++" >> $AWKFILE echo "}" >> $AWKFILE diff --git a/bin/foamLog.db b/bin/foamLog.db index 933dae1a8d..49d551f32c 100644 --- a/bin/foamLog.db +++ b/bin/foamLog.db @@ -48,6 +48,6 @@ epsMax/bounding epsilon,/max: epsAvg/bounding epsilon,/average: #- gamma bounding -gammaMin/Min\(gamma\) =/Min(gamma) = -gammaMax/Max\(gamma\) =/Max(gamma) = +gammaMin/Min\(gamma\) =/Min(gamma) = +gammaMax/Max\(gamma\) =/Max(gamma) = From 92f7290c128d9a37c34973f3e7c3917617702227 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 23 Jun 2008 17:42:05 +0100 Subject: [PATCH 14/21] removed molecular dynamics functionality (being updated) --- .../preProcessing/molConfig/Make/files | 8 - .../preProcessing/molConfig/Make/options | 15 - .../molConfig/correctVelocities.H | 21 - .../preProcessing/molConfig/createMolecules.C | 253 ---- .../preProcessing/molConfig/createPositions.H | 26 - .../molConfig/createVelocities.H | 13 - .../preProcessing/molConfig/genMolConfig.C | 129 -- .../molConfig/latticeStructures/BCC.H | 179 --- .../molConfig/latticeStructures/FCC.H | 217 --- .../molConfig/latticeStructures/SC.H | 127 -- .../preProcessing/molConfig/molConfig.C | 50 - .../preProcessing/molConfig/molConfig.H | 147 -- .../preProcessing/molConfig/molConfigI.H | 98 -- .../preProcessing/molConfig/origin.H | 49 - .../preProcessing/molConfig/readZoneSubDict.H | 93 -- .../preProcessing/molConfig/startingPoint.H | 97 -- .../velocityDistributions/maxwellian.H | 26 - .../molConfig/velocityDistributions/uniform.H | 27 - src/lagrangian/molecule/Make/files | 57 - src/lagrangian/molecule/Make/options | 8 - .../bufferedAccumulator/bufferedAccumulator.C | 238 --- .../bufferedAccumulator/bufferedAccumulator.H | 178 --- .../bufferedAccumulatorI.H | 80 - .../bufferedAccumulatorIO.C | 52 - .../correlationFunction/correlationFunction.C | 224 --- .../correlationFunction/correlationFunction.H | 180 --- .../correlationFunctionI.H | 70 - .../correlationFunctionIO.C | 72 - .../molecule/distribution/distribution.C | 449 ------ .../molecule/distribution/distribution.H | 133 -- .../molecule/distribution/distributionI.H | 35 - .../molecule/distribution/distributionIO.C | 35 - .../molecule/mdTools/averageMDFields.H | 227 --- .../calculateAutoCorrelationFunctions.H | 83 -- .../molecule/mdTools/calculateMDFields.H | 23 - .../mdTools/calculateTransportProperties.H | 65 - .../mdTools/createAutoCorrelationFunctions.H | 99 -- .../molecule/mdTools/createMDFields.H | 306 ---- .../molecule/mdTools/createRefUnits.H | 22 - src/lagrangian/molecule/mdTools/md.H | 11 - .../mdTools/meanMomentumEnergyAndNMols.H | 130 -- .../molecule/mdTools/resetMDFields.H | 26 - .../molecule/mdTools/temperatureAndPressure.H | 114 -- .../mdTools/temperatureAndPressureVariables.H | 59 - .../mdTools/temperatureEquilibration.H | 43 - src/lagrangian/molecule/molecule/molecule.C | 214 --- src/lagrangian/molecule/molecule/molecule.H | 271 ---- src/lagrangian/molecule/molecule/moleculeI.H | 152 -- src/lagrangian/molecule/molecule/moleculeIO.C | 208 --- .../molecule/moleculeCloud/moleculeCloud.C | 135 -- .../molecule/moleculeCloud/moleculeCloud.H | 350 ----- ...eculeCloudApplyConstraintsAndThermostats.C | 60 - .../moleculeCloudBuildCellInteractionLists.C | 80 - .../moleculeCloudBuildCellOccupancy.C | 54 - .../moleculeCloudBuildCellReferralLists.C | 194 --- .../moleculeCloudBuildCellsFoundInRange.H | 52 - .../moleculeCloudBuildDirectInteractionList.H | 188 --- ...oleculeCloudBuildReferredInteractionList.H | 1285 ----------------- .../moleculeCloudCalculateExternalForce.C | 42 - .../moleculeCloudCalculateForce.C | 59 - .../moleculeCloudCalculatePairForce.C | 41 - ...moleculeCloudCalculatePairForceRealCells.H | 49 - ...lculatePairForceRealCellsCalculationStep.H | 33 - ...culeCloudCalculatePairForceReferredCells.H | 59 - .../moleculeCloudCalculateTetherForce.C | 69 - .../molecule/moleculeCloud/moleculeCloudI.H | 184 --- .../moleculeCloudIntegrateEquationsOfMotion.C | 50 - .../moleculeCloudReadIdList.H | 14 - .../moleculeCloudReadMDParameters.H | 6 - .../moleculeCloudReadMDSolution.H | 27 - .../moleculeCloudReadPotentials.H | 327 ----- .../moleculeCloudRealCellsInRangeOfSegment.C | 152 -- ...leculeCloudReferredCellsInRangeOfSegment.C | 117 -- .../moleculeCloudRemoveHighEnergyOverlaps.C | 67 - ...leCloudRemoveHighEnergyOverlapsRealCells.H | 55 - ...ghEnergyOverlapsRealCellsCalculationStep.H | 70 - ...oudRemoveHighEnergyOverlapsReferredCells.H | 144 -- .../moleculeCloudTestEdgeEdgeDistance.C | 86 -- .../moleculeCloudTestPointFaceDistance.C | 235 --- .../pairPotential/basic/pairPotential.C | 308 ---- .../pairPotential/basic/pairPotential.H | 196 --- .../pairPotential/basic/pairPotentialI.H | 102 -- .../pairPotential/basic/pairPotentialList.C | 180 --- .../pairPotential/basic/pairPotentialList.H | 169 --- .../pairPotential/basic/pairPotentialListI.H | 59 - .../pairPotential/derived/lennardJones.C | 132 -- .../pairPotential/derived/lennardJones.H | 148 -- .../pairPotential/derived/lennardJonesI.H | 69 - .../tetherPotential/tetherPotential.C | 94 -- .../tetherPotential/tetherPotential.H | 125 -- .../tetherPotential/tetherPotentialI.H | 56 - .../tetherPotential/tetherPotentialList.C | 146 -- .../tetherPotential/tetherPotentialList.H | 125 -- .../tetherPotential/tetherPotentialListI.H | 50 - .../molecule/reducedUnits/reducedUnits.C | 165 --- .../molecule/reducedUnits/reducedUnits.H | 184 --- .../molecule/reducedUnits/reducedUnitsI.H | 95 -- .../molecule/reducedUnits/reducedUnitsIO.C | 61 - .../referralLists/receivingReferralList.C | 181 --- .../referralLists/receivingReferralList.H | 138 -- .../referralLists/receivingReferralListI.H | 56 - .../referralLists/sendingReferralList.C | 178 --- .../referralLists/sendingReferralList.H | 138 -- .../referralLists/sendingReferralListI.H | 56 - .../molecule/referredCell/referredCell.C | 441 ------ .../molecule/referredCell/referredCell.H | 277 ---- .../molecule/referredCell/referredCellI.H | 127 -- .../referredCellList/referredCellList.C | 327 ----- .../referredCellList/referredCellList.H | 103 -- .../referredCellList/referredCellListI.H | 42 - .../referredMolecule/referredMolecule.C | 89 -- .../referredMolecule/referredMolecule.H | 129 -- .../referredMolecule/referredMoleculeI.H | 75 - .../mdEquilibrationFoam/periodicCube/Allrun | 10 - .../constant/polyMesh/blockMeshDict | 73 - .../periodicCube/system/controlDict | 55 - .../periodicCube/system/decomposeParDict | 70 - .../periodicCube/system/fvSchemes | 67 - .../periodicCube/system/fvSolution | 40 - .../periodicCube/system/mdEquilibrationDict | 27 - .../periodicCube/system/mdSolution | 31 - .../periodicCube/system/molConfigDict | 43 - .../periodicCube/system/potentialDict | 89 -- 123 files changed, 15049 deletions(-) delete mode 100755 applications/utilities/preProcessing/molConfig/Make/files delete mode 100755 applications/utilities/preProcessing/molConfig/Make/options delete mode 100644 applications/utilities/preProcessing/molConfig/correctVelocities.H delete mode 100644 applications/utilities/preProcessing/molConfig/createMolecules.C delete mode 100644 applications/utilities/preProcessing/molConfig/createPositions.H delete mode 100644 applications/utilities/preProcessing/molConfig/createVelocities.H delete mode 100644 applications/utilities/preProcessing/molConfig/genMolConfig.C delete mode 100644 applications/utilities/preProcessing/molConfig/latticeStructures/BCC.H delete mode 100644 applications/utilities/preProcessing/molConfig/latticeStructures/FCC.H delete mode 100644 applications/utilities/preProcessing/molConfig/latticeStructures/SC.H delete mode 100644 applications/utilities/preProcessing/molConfig/molConfig.C delete mode 100644 applications/utilities/preProcessing/molConfig/molConfig.H delete mode 100644 applications/utilities/preProcessing/molConfig/molConfigI.H delete mode 100644 applications/utilities/preProcessing/molConfig/origin.H delete mode 100644 applications/utilities/preProcessing/molConfig/readZoneSubDict.H delete mode 100644 applications/utilities/preProcessing/molConfig/startingPoint.H delete mode 100644 applications/utilities/preProcessing/molConfig/velocityDistributions/maxwellian.H delete mode 100644 applications/utilities/preProcessing/molConfig/velocityDistributions/uniform.H delete mode 100755 src/lagrangian/molecule/Make/files delete mode 100755 src/lagrangian/molecule/Make/options delete mode 100755 src/lagrangian/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulator.C delete mode 100755 src/lagrangian/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulator.H delete mode 100755 src/lagrangian/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulatorI.H delete mode 100755 src/lagrangian/molecule/correlationFunction/bufferedAccumulator/bufferedAccumulatorIO.C delete mode 100644 src/lagrangian/molecule/correlationFunction/correlationFunction.C delete mode 100644 src/lagrangian/molecule/correlationFunction/correlationFunction.H delete mode 100644 src/lagrangian/molecule/correlationFunction/correlationFunctionI.H delete mode 100644 src/lagrangian/molecule/correlationFunction/correlationFunctionIO.C delete mode 100755 src/lagrangian/molecule/distribution/distribution.C delete mode 100755 src/lagrangian/molecule/distribution/distribution.H delete mode 100755 src/lagrangian/molecule/distribution/distributionI.H delete mode 100755 src/lagrangian/molecule/distribution/distributionIO.C delete mode 100755 src/lagrangian/molecule/mdTools/averageMDFields.H delete mode 100644 src/lagrangian/molecule/mdTools/calculateAutoCorrelationFunctions.H delete mode 100755 src/lagrangian/molecule/mdTools/calculateMDFields.H delete mode 100644 src/lagrangian/molecule/mdTools/calculateTransportProperties.H delete mode 100644 src/lagrangian/molecule/mdTools/createAutoCorrelationFunctions.H delete mode 100755 src/lagrangian/molecule/mdTools/createMDFields.H delete mode 100644 src/lagrangian/molecule/mdTools/createRefUnits.H delete mode 100755 src/lagrangian/molecule/mdTools/md.H delete mode 100755 src/lagrangian/molecule/mdTools/meanMomentumEnergyAndNMols.H delete mode 100755 src/lagrangian/molecule/mdTools/resetMDFields.H delete mode 100755 src/lagrangian/molecule/mdTools/temperatureAndPressure.H delete mode 100755 src/lagrangian/molecule/mdTools/temperatureAndPressureVariables.H delete mode 100755 src/lagrangian/molecule/mdTools/temperatureEquilibration.H delete mode 100755 src/lagrangian/molecule/molecule/molecule.C delete mode 100755 src/lagrangian/molecule/molecule/molecule.H delete mode 100755 src/lagrangian/molecule/molecule/moleculeI.H delete mode 100755 src/lagrangian/molecule/molecule/moleculeIO.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloud.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloud.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudApplyConstraintsAndThermostats.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudBuildCellInteractionLists.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudBuildCellOccupancy.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudBuildCellReferralLists.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudBuildCellsFoundInRange.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudBuildDirectInteractionList.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudBuildReferredInteractionList.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudCalculateExternalForce.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudCalculateForce.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudCalculatePairForce.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudCalculatePairForceRealCells.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudCalculatePairForceRealCellsCalculationStep.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudCalculatePairForceReferredCells.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudCalculateTetherForce.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudI.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudIntegrateEquationsOfMotion.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudReadMDParameters/moleculeCloudReadIdList.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudReadMDParameters/moleculeCloudReadMDParameters.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudReadMDParameters/moleculeCloudReadMDSolution.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudReadMDParameters/moleculeCloudReadPotentials.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudRealCellsInRangeOfSegment.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudReferredCellsInRangeOfSegment.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlaps.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsRealCells.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsRealCellsCalculationStep.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudRemoveHighEnergyOverlapsReferredCells.H delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudTestEdgeEdgeDistance.C delete mode 100755 src/lagrangian/molecule/moleculeCloud/moleculeCloudTestPointFaceDistance.C delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/basic/pairPotential.C delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/basic/pairPotential.H delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/basic/pairPotentialI.H delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/basic/pairPotentialList.C delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/basic/pairPotentialList.H delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/basic/pairPotentialListI.H delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/derived/lennardJones.C delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/derived/lennardJones.H delete mode 100755 src/lagrangian/molecule/potentials/pairPotential/derived/lennardJonesI.H delete mode 100755 src/lagrangian/molecule/potentials/tetherPotential/tetherPotential.C delete mode 100755 src/lagrangian/molecule/potentials/tetherPotential/tetherPotential.H delete mode 100755 src/lagrangian/molecule/potentials/tetherPotential/tetherPotentialI.H delete mode 100755 src/lagrangian/molecule/potentials/tetherPotential/tetherPotentialList.C delete mode 100755 src/lagrangian/molecule/potentials/tetherPotential/tetherPotentialList.H delete mode 100755 src/lagrangian/molecule/potentials/tetherPotential/tetherPotentialListI.H delete mode 100644 src/lagrangian/molecule/reducedUnits/reducedUnits.C delete mode 100644 src/lagrangian/molecule/reducedUnits/reducedUnits.H delete mode 100644 src/lagrangian/molecule/reducedUnits/reducedUnitsI.H delete mode 100644 src/lagrangian/molecule/reducedUnits/reducedUnitsIO.C delete mode 100755 src/lagrangian/molecule/referralLists/receivingReferralList.C delete mode 100755 src/lagrangian/molecule/referralLists/receivingReferralList.H delete mode 100755 src/lagrangian/molecule/referralLists/receivingReferralListI.H delete mode 100755 src/lagrangian/molecule/referralLists/sendingReferralList.C delete mode 100755 src/lagrangian/molecule/referralLists/sendingReferralList.H delete mode 100755 src/lagrangian/molecule/referralLists/sendingReferralListI.H delete mode 100755 src/lagrangian/molecule/referredCell/referredCell.C delete mode 100755 src/lagrangian/molecule/referredCell/referredCell.H delete mode 100755 src/lagrangian/molecule/referredCell/referredCellI.H delete mode 100755 src/lagrangian/molecule/referredCellList/referredCellList.C delete mode 100755 src/lagrangian/molecule/referredCellList/referredCellList.H delete mode 100755 src/lagrangian/molecule/referredCellList/referredCellListI.H delete mode 100755 src/lagrangian/molecule/referredMolecule/referredMolecule.C delete mode 100755 src/lagrangian/molecule/referredMolecule/referredMolecule.H delete mode 100755 src/lagrangian/molecule/referredMolecule/referredMoleculeI.H delete mode 100755 tutorials/mdEquilibrationFoam/periodicCube/Allrun delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/constant/polyMesh/blockMeshDict delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/controlDict delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/decomposeParDict delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/fvSchemes delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/fvSolution delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/mdEquilibrationDict delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/mdSolution delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/molConfigDict delete mode 100644 tutorials/mdEquilibrationFoam/periodicCube/system/potentialDict diff --git a/applications/utilities/preProcessing/molConfig/Make/files b/applications/utilities/preProcessing/molConfig/Make/files deleted file mode 100755 index 6501e68426..0000000000 --- a/applications/utilities/preProcessing/molConfig/Make/files +++ /dev/null @@ -1,8 +0,0 @@ -latticeStructures = latticeStructures -velocityDistributions = velocityDistributions - -createMolecules.C -molConfig.C -genMolConfig.C - -EXE = $(FOAM_APPBIN)/molConfig diff --git a/applications/utilities/preProcessing/molConfig/Make/options b/applications/utilities/preProcessing/molConfig/Make/options deleted file mode 100755 index 196a4d66dd..0000000000 --- a/applications/utilities/preProcessing/molConfig/Make/options +++ /dev/null @@ -1,15 +0,0 @@ -EXE_INC = \ - -I$(latticeStructures) \ - -I$(velocityDistributions) \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/lagrangian/molecule/lnInclude \ - -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = \ - -lmeshTools \ - -ldynamicMesh \ - -lfiniteVolume \ - -llagrangian \ - -lmolecule diff --git a/applications/utilities/preProcessing/molConfig/correctVelocities.H b/applications/utilities/preProcessing/molConfig/correctVelocities.H deleted file mode 100644 index 0c69f15c7c..0000000000 --- a/applications/utilities/preProcessing/molConfig/correctVelocities.H +++ /dev/null @@ -1,21 +0,0 @@ -for (molN = totalMols; molN < totalMols + totalZoneMols; molN++) -{ - - // Remove bulk momentum introduced by random numbers and add - // desired bulk velocity - - // For systems with molecules of significantly differing masses, this may - // need to be an iterative process or employ a better algorithm for - // removing an appropriate share of the excess momentum from each molecule. - - initialVelocities(molN) += bulkVelocity - momentumSum/totalZoneMols/mass; -} - -// momentumSum = vector::zero; -// -// for (molN = totalMols; molN < totalMols + totalZoneMols; molN++) -// { -// momentumSum += mass*initialVelocities(molN); -// } -// -// Info << "Check momentum adjustment: " << momentumSum << endl; diff --git a/applications/utilities/preProcessing/molConfig/createMolecules.C b/applications/utilities/preProcessing/molConfig/createMolecules.C deleted file mode 100644 index 20318f06d6..0000000000 --- a/applications/utilities/preProcessing/molConfig/createMolecules.C +++ /dev/null @@ -1,253 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2005 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 "molConfig.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -void Foam::molConfig::createMolecules() -{ - Info<< nl << "Creating molecules from zone specifications\n" << endl; - - DynamicList initialPositions(0); - - DynamicList