View Issue Details

IDProjectCategoryView StatusLast Update
0002454OpenFOAMBugpublic2017-02-28 11:42
Reporterolle Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformAllOSAllOS VersionAll
Fixed in Versiondev 
Summary0002454: Example dictionary for fieldCoordinateSystemTransform functionObject does not work
DescriptionThe example Dictionary (postProcessingDict) for fieldCoordinateSystemTransform functionObject does not work. When I paste the fieldCoordinateSystemTransform1 dictionary into my controlDict I get the following error:

keyword origin is undefined in dictionary "/casePath/system/controlDict.functions.fieldCoordinateSystemTransform1"

file: /casePath/system/controlDict.functions.fieldCoordinateSystemTransform1 from line 64 to line 86.

    From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 441
Steps To ReproduceUse the example Dictionary for the functionObject and execute the function object.
TagscoordinateTransformation, functionObject



2017-02-21 00:22

updater   ~0007779

I've confirmed that this also occurs with OpenFOAM 4.x (commit e964d879e2) and OpenFOAM-dev (0ab1758b2f5).

Furthermore, the method "fieldCoordinateSystemTransform::read" is not re-reading the settings into the variable "coordSys_" and therefore it's only done in the constructor.


2017-02-21 01:12

updater   ~0007780

@Henry: I've attached the package "bug2454_4.x_v1.tar.gz", which contains the following files and respective proposed changes for OpenFOAM 4.x:

  - src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C

    - Constructor for 'coordSys_' now uses 'dict.subDict("coordinateSystem")' instead of just 'dict'.

    - I did not add this to the 'read' method because it would affect the results, i.e. the changing coordinates during a simulation would make the originally outputted fields inconsistent with the others after the change.

  - src/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H

    - Updated the description to use "coordinateRotation".

  - src/functionObjects/field/fieldCoordinateSystemTransform/postProcessingDict

    - Same change as in the description.

  - src/meshTools/coordinateSystems/coordinateRotation/coordinateRotationNew.C

    - Removed the output line '"[default: axes ]"', given that this is not used at all as a default, nor is the name correct any more.

Sorry, I didn't provide the same changes for OpenFOAM-dev, since I didn't have time to test it, but it looked like it would be pretty much the same exact changes.


@olle: If you cannot upgrade to OpenFOAM 4.x after this patch is applied, you can use a workaround, by changing these lines:

        // Fields to be transformed - runTime modifiable

            origin (0.001 0 0);
            e1 (1 0.15 0);
            e3 (0 0 -1);

To these:

        // Fields to be transformed - runTime modifiable

        origin (0 0 0);
            type axesRotation;
            e1 (1 0.15 0);
            e3 (0 0 -1);
bug2454_4.x_v1.tar.gz (2,768 bytes)


2017-02-28 11:42

manager   ~0007829

Thanks Bruno

Resolved by commit c3848b6e98e729e07385e6c3d331bf98a46b3978

Issue History

Date Modified Username Field Change
2017-02-08 12:44 olle New Issue
2017-02-08 12:44 olle Tag Attached: functionObject
2017-02-08 12:44 olle Tag Attached: coordinateTransformation
2017-02-21 00:22 wyldckat Note Added: 0007779
2017-02-21 01:12 wyldckat File Added: bug2454_4.x_v1.tar.gz
2017-02-21 01:12 wyldckat Note Added: 0007780
2017-02-21 01:12 wyldckat Assigned To => henry
2017-02-21 01:12 wyldckat Status new => assigned
2017-02-28 11:42 henry Status assigned => resolved
2017-02-28 11:42 henry Resolution open => fixed
2017-02-28 11:42 henry Fixed in Version => dev
2017-02-28 11:42 henry Note Added: 0007829