CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Unknown FunctionEntry 'eval'

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By Yann
  • 1 Post By NotDrJeff
  • 2 Post By olesen
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 23, 2020, 11:58
Default Unknown FunctionEntry 'eval'
  #1
New Member
 
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 5
NotDrJeff is on a distinguished road
Hello,

First time poster and new OpenFOAM user here. I am trying to run a tutorial from the OpenFOAM User guide 'Turbulent plane channel flow with smooth walls' as found here.

I am getting an error when I try to run blockMesh on the files.

Code:
Unknown functionEntry 'eval' in "...system/controlDict" near line 49

Valid functionEntries are :

6 (
codeStream
include
neg
calc
includeIfPresent
includeEtc
)
This refers to a line in the control dictionary:

Code:
timestart     #eval #{ 0.1 * ${/endTime} #};
I am confused why #eval is not working, and also about the difference between #calc and #eval.

I saw something that said #eval was a new feature intended to replace #calc because it was more efficient. Is this correct? I have OpenFoam8 installed so it's not because of an old version.

I tried to replace #eval with #calc in the control dictionary but I am also confused by the apparently different syntaxes used in each case. The examples I have seen seem to suggest that #calc uses quotation marks around the expression whereas #eval uses curly braces. Have I got this correct?

I tried the following:

Code:
timeStart     #calc "0.1*${/endTime}";
but this didn't work either. I think I'm using the wrong syntax. I get the following:

Code:
error: '$' was not declared in this scope
and
Code:
error: expected ')' before '{' token
I'm sure there is an answer to this somewhere on the internet, but I'm struggling to find what I'm looking for. Any help would be appreciated!

Thanks,

P.S. I am using the windows subsystem for Linux to run Ubuntu.
NotDrJeff is offline   Reply With Quote

Old   October 26, 2020, 03:24
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,055
Rep Power: 26
Yann will become famous soon enough
Hello Jeffrey,

You are right, #eval is a pretty recent feature meant to replace the #calc feature. This feature has been released in OpenFOAM-v1912 (see release notes)

This feature is only available in the ESI-OpenCFD branch (openfoam.com) and this is why you cannot use it with OpenFOAM-8 which is developed by the OpenFOM Foundation branch (openfoam.org)

The easiest way to learn how to use OpenFOAM is to start with the tutorials available for the version you are using.
The tutorial you linked in your first post is from the ESI-OpenCFD branch so you should better run it with the last version from this branch (OpenFOAM-v2006) OR find the equivalent tutorial in OpenFOAM-8 (see here)

Have fun!
Yann
olesen likes this.
Yann is offline   Reply With Quote

Old   October 26, 2020, 09:20
Default
  #3
New Member
 
Jeffrey Johnston
Join Date: Oct 2020
Location: Belfast, Northern Ireland
Posts: 21
Rep Power: 5
NotDrJeff is on a distinguished road
Thank you Yann! I had no idea there were two different versions. I will try to use the ESI-openCFD version.
Yann likes this.
NotDrJeff is offline   Reply With Quote

Old   November 7, 2020, 04:42
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by Yann View Post
Hello Jeffrey,

You are right, #eval is a pretty recent feature meant to replace the #calc feature. This feature has been released in OpenFOAM-v1912 (see release notes)
Hi Yann,
Good answer and overview!

Just additional notes. There is some more information in the upgrade guide, the interesting part being the timings - since you skip the compiler step completely!
Also useful to note that this is part of the entire expressions infrastructure, which adds several swak4foam features, and also gives an expression-based Function1 or PatchFunction1 that be immediately used with many different existing boundary conditions.
Yann and NotDrJeff like this.
olesen is offline   Reply With Quote

Old   November 7, 2020, 04:44
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by NotDrJeff View Post
P.S. I am using the windows subsystem for Linux to run Ubuntu.
Precompiled for ubuntu:
https://develop.openfoam.com/Develop...ompiled/debian
NotDrJeff likes this.
olesen is offline   Reply With Quote

Reply

Tags
eval calc functionentry


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Commercial meshers] converting Fluent mesh to openfoam standard mesh deepesh OpenFOAM Meshing & Mesh Conversion 31 March 29, 2017 05:59
[Other] How to create an MRF zone ? aminem OpenFOAM Meshing & Mesh Conversion 2 December 8, 2014 10:45
Thermal Comfort Simulation in STAR CCM+ anupmu STAR-CCM+ 1 February 27, 2013 14:25
[OpenFOAM] Saving ParaFoam views and case sail ParaView 9 November 25, 2011 15:46
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


All times are GMT -4. The time now is 14:38.