View Issue Details

IDProjectCategoryView StatusLast Update
0003557OpenFOAMBugpublic2020-09-25 16:36
ReporterendresAssigned Tohenry 
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionno change required 
PlatformLinuxOSOpenSuSE TumbleweedOS Version20200622
Product Version8 
Fixed in Version 
Summary0003557: Omitting space characters in #calc dictionary entry leads to incomprehensible error
DescriptionWhen omitting the space characters in a #calc dictionary entry (for example "2*$testVar/0.13" instead of "2 * $testVar / 0.13") leads to the error message 'error: ‘$testVar’ was not declared in this scope' although the variable testVar has been declared in the line above.

Formulas without space characters used to work in OpenFoam 7 but do not work anymore in OpenFoam 8 and OpenFoam-dev (dev-a972b208ee71).
Steps To Reproduce- Include the following two lines in the blockMeshDict of any case, for example the pipeCyclic tutorial:
testVar 0.5;
testVar2 #calc "2*$testVar/0.13";

- run blockMesh in OpenFoam 8
TagsNo tags attached.

Activities

henry

2020-09-25 13:41

manager   ~0011525

That is correct, you will need to space the operators or use '()'s around the variables to define the boundaries of the variable name.

Issue History

Date Modified Username Field Change
2020-09-25 13:25 endres New Issue
2020-09-25 13:41 henry Note Added: 0011525
2020-09-25 16:36 henry Assigned To => henry
2020-09-25 16:36 henry Status new => closed
2020-09-25 16:36 henry Resolution open => no change required