From 1089bbc69c02d5b86cd7ffcb522e48d10930f22a Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 29 Jul 2009 11:52:42 +0100 Subject: [PATCH 1/5] 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 2/5] 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 4e6dbf573063621c69e5b92534f00c10c08285bd Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 30 Jul 2009 12:58:03 +0100 Subject: [PATCH 3/5] 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 54a734670e0880571cb1f47a5d680fc5a1772aa5 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 30 Jul 2009 15:59:30 +0100 Subject: [PATCH 4/5] 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 8f95d4ea3ddc2ce04dff69717dcf4de3daf5f110 Mon Sep 17 00:00:00 2001 From: henry Date: Fri, 31 Jul 2009 12:51:40 +0100 Subject: [PATCH 5/5] 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