From 9118e8ea9ddce6df851c6493191eecd043f34a80 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 16 May 2011 10:06:09 +0100 Subject: [PATCH 1/5] porousExplicitSourceReactingParcelFoam: Removed spurious relaxation statement from rhoEqn. --- .../lagrangian/porousExplicitSourceReactingParcelFoam/rhoEqn.H | 2 -- 1 file changed, 2 deletions(-) diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/rhoEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/rhoEqn.H index b1770a5a9d..33b7943cad 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/rhoEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/rhoEqn.H @@ -39,8 +39,6 @@ Description + massSource.SuTot() ); - rhoEqn.relax(); - rhoEqn.solve(); } From f0f1e29779248bf00c1a9e8e2888f6a8090a9b78 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 16 May 2011 10:06:41 +0100 Subject: [PATCH 2/5] chtMultiRegionFoam/multiRegionLiquidHeater tutorial: corrected relaxation statement --- .../multiRegionLiquidHeater/system/bottomWater/fvSolution | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSolution b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSolution index 48dae067cb..5004b93012 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSolution +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionLiquidHeater/system/bottomWater/fvSolution @@ -77,7 +77,7 @@ PIMPLE relaxationFactors { - "h.* 1; + "h.*" 1; "U.*" 1; } From 52ce8bae96364f299297bc583a69df71d6511484 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 16 May 2011 10:08:36 +0100 Subject: [PATCH 3/5] HerschelBulkley: Changed the definition of the coefficients and stress to more commonly used forms. This does not change the form of the function but the coefficients must be set appropriately. --- .../HerschelBulkley/HerschelBulkley.C | 24 ++++++++++++++++--- .../viscosityModel/viscosityModel.C | 4 ++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/transportModels/incompressible/viscosityModels/HerschelBulkley/HerschelBulkley.C b/src/transportModels/incompressible/viscosityModels/HerschelBulkley/HerschelBulkley.C index 52085f8b69..c1b4132323 100644 --- a/src/transportModels/incompressible/viscosityModels/HerschelBulkley/HerschelBulkley.C +++ b/src/transportModels/incompressible/viscosityModels/HerschelBulkley/HerschelBulkley.C @@ -52,10 +52,28 @@ Foam::viscosityModels::HerschelBulkley::calcNu() const { dimensionedScalar tone("tone", dimTime, 1.0); dimensionedScalar rtone("rtone", dimless/dimTime, 1.0); + tmp sr(strainRate()); - return (min(nu0_,(tau0_ + k_* rtone *( pow(tone * sr(), n_) - - pow(tone*tau0_/nu0_,n_))) / (max(sr(), dimensionedScalar - ("VSMALL", dimless/dimTime, VSMALL))))); + + // return + // ( + // min + // ( + // nu0_, + // (tau0_ + k_*rtone*(pow(tone*sr(), n_) - pow(tone*tau0_/nu0_, n_))) + // /max(sr(), dimensionedScalar("VSMALL", dimless/dimTime, VSMALL)) + // ) + // ); + + return + ( + min + ( + nu0_, + (tau0_ + k_*rtone*pow(tone*sr(), n_)) + /(max(sr(), dimensionedScalar ("VSMALL", dimless/dimTime, VSMALL))) + ) + ); } diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.C b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.C index 493cb89df6..57be63e30e 100644 --- a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.C +++ b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,7 +57,7 @@ Foam::viscosityModel::viscosityModel Foam::tmp Foam::viscosityModel::strainRate() const { - return mag(symm(fvc::grad(U_))); + return sqrt(2.0)*mag(symm(fvc::grad(U_))); } From 50660fcca560ca37fdb9fb0e95dd3a86d2633e81 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 16 May 2011 10:13:25 +0100 Subject: [PATCH 4/5] snappyHexMesh/flange tutorial: remove the generated "flange" file. --- tutorials/mesh/snappyHexMesh/flange/Allclean | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/mesh/snappyHexMesh/flange/Allclean b/tutorials/mesh/snappyHexMesh/flange/Allclean index 884d713e5f..abb949539e 100755 --- a/tutorials/mesh/snappyHexMesh/flange/Allclean +++ b/tutorials/mesh/snappyHexMesh/flange/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions rm -rf 0 > /dev/null 2>&1 -rm -f ./*.obj > /dev/null 2>&1 +rm -f ./flange ./*.obj > /dev/null 2>&1 rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 rm -f constant/triSurface/flange.eMesh > /dev/null 2>&1 rm -f constant/polyMesh/boundary From 3868902d80d815d9310a52a179b630d2075e216f Mon Sep 17 00:00:00 2001 From: graham Date: Mon, 16 May 2011 10:26:40 +0100 Subject: [PATCH 5/5] STYLE: Using $internalField for lowerWall as per training notes. --- tutorials/incompressible/simpleFoam/motorBike/0.org/U | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/U b/tutorials/incompressible/simpleFoam/motorBike/0.org/U index 0e62e1551f..c1fb7eec0a 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/U +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/U @@ -35,7 +35,7 @@ boundaryField lowerWall { type fixedValue; - value uniform (20 0 0); + value $internalField; } "motorBike_.*"