View Issue Details

IDProjectCategoryView StatusLast Update
0001541OpenFOAM[All Projects] Bugpublic2015-02-17 23:23
ReporterwyldckatAssigned Tohenry 
PrioritylowSeveritytextReproducibilityN/A
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0001541: Inconsistent and broken comments for "snappyHexMeshDict" in the "tutorials"
DescriptionI'm not certain which is the best approach on this, but the major example that I'll report now refers to the comments above the entry "finalLayerThickness". Worst case scenario is something like this:

     // Wanted thickness of final added cell layer. If multiple layers
     // is the
     // thickness of the layer furthest away from the wall.
     // Relative to undistorted size of cell outside layer.
     // is the thickness of the layer furthest away from the wall.
     // See relativeSizes parameter.
     finalLayerThickness 0.3;


Attached is the file "snappyHexMeshDict.patch" which has the fixes for all of the comment blocks for this parameter, based on the one that made most sense to me. But still, these comment updates are based on the tutorial cases themselves and not based on the main "snappyHexMeshDict" example that is in the respective source code folder.


I haven't checked all other comments for the other parameters, because there is also the possibility to do as it's done in the tutorial "compressible/rhoPimpleDyMFoam/annularThermalMixer", where all comments simply were removed. Although if this is the chosen way to do this, then please at least provide a comment indicating that the full explanation for each parameter is available at "FOAM_UTILITIES/mesh/generation/snappyHexMesh/snappyHexMeshDict".
Steps To ReproduceRun the following commands, for using the application "meld" for assisting in updating the different comments in the "snappyHexMeshDict" files in the tutorials:

tut
find . -name snappyHexMeshDict | xargs -I {} meld ./multiphase/interPhaseChangeDyMFoam/propeller/system/snappyHexMeshDict {}
TagsNo tags attached.

Activities

wyldckat

2015-02-17 19:48

updater  

snappyHexMeshDict.patch (12,124 bytes)
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict
index f7874e5..891abf4 100644
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict
@@ -287,7 +287,6 @@ addLayersControls
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
     // Relative to undistorted size of cell outside layer.
-    // is the thickness of the layer furthest away from the wall.
     // See relativeSizes parameter.
     finalLayerThickness 0.5;
 
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict
index b8c4bec..901ac60 100644
--- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict
@@ -281,6 +281,7 @@ addLayersControls
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
     // Relative to undistorted size of cell outside layer.
+    // See relativeSizes parameter.
     finalLayerThickness 1;
 
     // Minimum thickness of cell layer. If for any reason layer
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/system/snappyHexMeshDict b/tutorials/incompressible/pimpleDyMFoam/propeller/system/snappyHexMeshDict
index 3c0006c..9fb7ced 100644
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/system/snappyHexMeshDict
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/system/snappyHexMeshDict
@@ -338,10 +338,8 @@ addLayersControls
     expansionRatio 1.0;
 
     // Wanted thickness of final added cell layer. If multiple layers
-    // is the
-    // thickness of the layer furthest away from the wall.
-    // Relative to undistorted size of cell outside layer.
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.3;
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict
index ef48412..8b98c2d 100644
--- a/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict
+++ b/tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion_snappyHexMesh/system/snappyHexMeshDict
@@ -193,7 +193,6 @@ addLayersControls
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
     // Relative to undistorted size of cell outside layer.
-    // is the thickness of the layer furthest away from the wall.
     // See relativeSizes parameter.
     finalLayerThickness 0.7;
 
diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/snappyHexMeshDict
index ce97533..fdef51d 100644
--- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/snappyHexMeshDict
+++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/system/snappyHexMeshDict
@@ -206,6 +206,7 @@ addLayersControls
 
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.3;
 
diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict
index dfa3e96..e52a5d0 100644
--- a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict
+++ b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict
@@ -228,10 +228,8 @@ addLayersControls
     expansionRatio 1.0;
 
     // Wanted thickness of final added cell layer. If multiple layers
-    // is the
-    // thickness of the layer furthest away from the wall.
-    // Relative to undistorted size of cell outside layer.
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.3;
 
diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/turbineSiting/system/snappyHexMeshDict
index 9d6ce65..751c803 100644
--- a/tutorials/incompressible/simpleFoam/turbineSiting/system/snappyHexMeshDict
+++ b/tutorials/incompressible/simpleFoam/turbineSiting/system/snappyHexMeshDict
@@ -246,6 +246,7 @@ addLayersControls
 
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.3;
 
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict b/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict
index 53c7827..e08032f 100644
--- a/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict
@@ -200,10 +200,8 @@ addLayersControls
     expansionRatio 1.0;
 
     // Wanted thickness of final added cell layer. If multiple layers
-    // is the
-    // thickness of the layer furthest away from the wall.
-    // Relative to undistorted size of cell outside layer.
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.5;
 
diff --git a/tutorials/mesh/foamyHexMesh/blob/system/snappyHexMeshDict b/tutorials/mesh/foamyHexMesh/blob/system/snappyHexMeshDict
index 425a488..16ac085 100644
--- a/tutorials/mesh/foamyHexMesh/blob/system/snappyHexMeshDict
+++ b/tutorials/mesh/foamyHexMesh/blob/system/snappyHexMeshDict
@@ -219,7 +219,6 @@ addLayersControls
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
     // Relative to undistorted size of cell outside layer.
-    // is the thickness of the layer furthest away from the wall.
     // See relativeSizes parameter.
     finalLayerThickness 0.02;
 
diff --git a/tutorials/mesh/foamyHexMesh/flange/system/snappyHexMeshDict b/tutorials/mesh/foamyHexMesh/flange/system/snappyHexMeshDict
index ebdf103..648d811 100644
--- a/tutorials/mesh/foamyHexMesh/flange/system/snappyHexMeshDict
+++ b/tutorials/mesh/foamyHexMesh/flange/system/snappyHexMeshDict
@@ -213,7 +213,6 @@ addLayersControls
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
     // Relative to undistorted size of cell outside layer.
-    // is the thickness of the layer furthest away from the wall.
     // See relativeSizes parameter.
     finalLayerThickness 0.0003;
 
diff --git a/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict
index 8745180..5186a8b 100644
--- a/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict
+++ b/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict
@@ -216,6 +216,7 @@ addLayersControls
 
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.3;
 
diff --git a/tutorials/multiphase/LTSInterFoam/DTCHull/system/snappyHexMeshDict b/tutorials/multiphase/LTSInterFoam/DTCHull/system/snappyHexMeshDict
index 2fa3987..c6cf0ef 100644
--- a/tutorials/multiphase/LTSInterFoam/DTCHull/system/snappyHexMeshDict
+++ b/tutorials/multiphase/LTSInterFoam/DTCHull/system/snappyHexMeshDict
@@ -196,6 +196,7 @@ addLayersControls
 
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.7;
 
diff --git a/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/snappyHexMeshDict b/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/snappyHexMeshDict
index 2fa3987..c6cf0ef 100644
--- a/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/snappyHexMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/DTCHull/system/snappyHexMeshDict
@@ -196,6 +196,7 @@ addLayersControls
 
     // Wanted thickness of final added cell layer. If multiple layers
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.7;
 
diff --git a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/snappyHexMeshDict b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/snappyHexMeshDict
index ae54ebb..f5b4cf7 100644
--- a/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/snappyHexMeshDict
+++ b/tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/system/snappyHexMeshDict
@@ -384,9 +384,10 @@ addLayersControls
         // Expansion factor for layer mesh
         expansionRatio 1.0;
 
-        // Wanted thickness of the layer furthest away from the wall.
-        // If relativeSizes this is relative to undistorted size of cell
-        // outside layer.
+        // Wanted thickness of final added cell layer. If multiple layers
+        // is the thickness of the layer furthest away from the wall.
+        // Relative to undistorted size of cell outside layer.
+        // See relativeSizes parameter.
         finalLayerThickness 0.3;
 
         // Wanted thickness of the layer next to the wall.
diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/snappyHexMeshDict b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/snappyHexMeshDict
index 3c0006c..9fb7ced 100644
--- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/snappyHexMeshDict
+++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/system/snappyHexMeshDict
@@ -338,10 +338,8 @@ addLayersControls
     expansionRatio 1.0;
 
     // Wanted thickness of final added cell layer. If multiple layers
-    // is the
-    // thickness of the layer furthest away from the wall.
-    // Relative to undistorted size of cell outside layer.
     // is the thickness of the layer furthest away from the wall.
+    // Relative to undistorted size of cell outside layer.
     // See relativeSizes parameter.
     finalLayerThickness 0.3;
 
diff --git a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict
index 8953b05..30b9f7b 100644
--- a/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict
+++ b/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet/system/snappyHexMeshDict
@@ -211,9 +211,9 @@ addLayersControls
     expansionRatio 1.0;
 
     // Wanted thickness of final added cell layer. If multiple layers
-    // is the
-    // thickness of the layer furthest away from the wall.
+    // is the thickness of the layer furthest away from the wall.
     // Relative to undistorted size of cell outside layer.
+    // See relativeSizes parameter.
     finalLayerThickness 0.3;
 
     // Minimum thickness of cell layer. If for any reason layer
snappyHexMeshDict.patch (12,124 bytes)

henry

2015-02-17 20:03

manager   ~0003811

I am not sure that having large, complex, only vaguely comprehensible comments in dictionaries in the test-cases is a good way to go. This is a huge maintenance overhead and usually when an update to the comments is needed it is not done everywhere. We really must avoid this kind of duplication.

Better would be to have the documentation for the dictionaries centralised. The file FOAM_UTILITIES/mesh/generation/snappyHexMesh/snappyHexMeshDict is OK, at least it is in one place but again I would not want to have a comment in all dictionaries to say where some example might be as this would then become out of date. Ideally we need a way to scan the example dictionaries and create Doxygen documentation pages for example or maybe a simple application which for any given dictionary will print the example dictionary or at least the location.

Nevertheless I will apply your patch (as the comments are clearly nonsense) pending some better approach to dictionary documentation.

henry

2015-02-17 23:23

manager   ~0003817

Resolved by commit 8072a9ad3aa76dacf8ad1b3ec0b10b1ad6184c3e

Issue History

Date Modified Username Field Change
2015-02-17 19:48 wyldckat New Issue
2015-02-17 19:48 wyldckat File Added: snappyHexMeshDict.patch
2015-02-17 20:03 henry Note Added: 0003811
2015-02-17 23:23 henry Note Added: 0003817
2015-02-17 23:23 henry Status new => resolved
2015-02-17 23:23 henry Resolution open => fixed
2015-02-17 23:23 henry Assigned To => henry