View Issue Details

IDProjectCategoryView StatusLast Update
0001764OpenFOAM[All Projects] Bugpublic2015-06-25 22:01
ReporterTimm SeverinAssigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version14.04
Product Version 
Fixed in Version 
Summary0001764: sample utility using wrong dictionary
DescriptionThe sampleDict available e.g. at https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/applications/utilities/postProcessing/sampling/sample/sampleDict#L179 shows that it is possible to use a separate coordinate system for planes.

However, this does not work the way it os shown there, since the sample utility so far does not pass the sub-dictionary, but it's own dictionary to the coordinateSystem-class. Attached patch sample to be used in $FOAM_SRC/sampling/sampledSurface/sampledPlane r3esolves this issue.

Furthermore the sampleDict above is incomplete, since the coordinateSystem class also expects a coordinateRotation subdictionary. Attached patch sampleDict.patch resolves this issue, to be patched in $FOAM_UTILITES/postProcessing/sampling/sample/.
Steps To ReproduceTry to use the interpolatedlane subdict from the example subdictionary https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/applications/utilities/postProcessing/sampling/sample/sampleDict#L179 in any case.
TagsNo tags attached.

Activities

Timm Severin

2015-06-25 09:58

reporter  

sampleDict.patch (591 bytes)
--- sampleDict	2014-09-08 13:26:21.858410978 +0200
+++ sampleDict.new	2015-06-25 10:54:16.210478504 +0200
@@ -179,6 +179,15 @@
         coordinateSystem
         {
             origin      (0.0501 0.0501 0.005);
+            
+            // add a coordinate rotation 
+            //  (required, so here one that doesn't change anything)
+            coordinateRotation
+            {
+                type    axesRotation;
+                e1      (1 0 0);
+                e2      (0 1 0);
+            }
         }
         basePoint       (0 0 0);
         normalVector    (0.1 0.1 1);
sampleDict.patch (591 bytes)

Timm Severin

2015-06-25 09:59

reporter  

sampledPlane.patch (474 bytes)
--- sampledPlane.C	2015-06-24 15:36:06.433897310 +0200
+++ sampledPlane.C.new	2015-06-24 15:36:45.214089610 +0200
@@ -80,7 +80,7 @@
     // allow lookup from global coordinate systems
     if (dict.found("coordinateSystem"))
     {
-        coordinateSystem cs(mesh, dict);
+        coordinateSystem cs(mesh, dict.subDict("coordinateSystem"));
 
         point  base = cs.globalPosition(planeDesc().refPoint());
         vector norm = cs.globalVector(planeDesc().normal());
sampledPlane.patch (474 bytes)

henry

2015-06-25 22:01

manager   ~0004998

Thanks for the bug-report and patches.
Resolved by commit 5cf70d30efeba0237299c173655338731379683f in OpenFOAM-2.4.x

Issue History

Date Modified Username Field Change
2015-06-25 09:58 Timm Severin New Issue
2015-06-25 09:58 Timm Severin File Added: sampleDict.patch
2015-06-25 09:59 Timm Severin File Added: sampledPlane.patch
2015-06-25 22:01 henry Note Added: 0004998
2015-06-25 22:01 henry Status new => resolved
2015-06-25 22:01 henry Resolution open => fixed
2015-06-25 22:01 henry Assigned To => henry