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

[swak4Foam] a problem in groovyBC: "syntax error, unexpected '('"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2012, 15:26
Default a problem in groovyBC: "syntax error, unexpected '('"
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
hello
here is my groovyBC in a patch but I receive an error that is:

Mean and max Courant Numbers = 97.4802 211.345
deltaT = 9.46319e-10
Time = 9.46319e-10

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
swak4Foam: Allocating new repository for sampledGlobalVariables


--> FOAM FATAL ERROR:
Parser Error at "1.36" :"syntax error, unexpected '(', expecting value or '-'"
"pr_01*pow((internalField(T)/Tr_01),(gamma/(gamma-1)))"
" ^ "

From function parsingValue
in file lnInclude/CommonValueExpressionDriverI.H at line 802.

FOAM exiting

I need a urgent help.
thank you to helper!
Attached Files
File Type: txt groovy.txt (751 Bytes, 4 views)
immortality is offline   Reply With Quote

Old   December 2, 2012, 17:55
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
hello
here is my groovyBC in a patch but I receive an error that is:

Mean and max Courant Numbers = 97.4802 211.345
deltaT = 9.46319e-10
Time = 9.46319e-10

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
swak4Foam: Allocating new repository for sampledGlobalVariables


--> FOAM FATAL ERROR:
Parser Error at "1.36" :"syntax error, unexpected '(', expecting value or '-'"
"pr_01*pow((internalField(T)/Tr_01),(gamma/(gamma-1)))"
" ^ "

From function parsingValue
in file lnInclude/CommonValueExpressionDriverI.H at line 802.

FOAM exiting

I need a urgent help.
thank you to helper!
THe formatting on the message board makes it hard to tell where the parser locates the syntax error. Reformatting helps:
Code:
--> FOAM FATAL ERROR: 
 Parser Error at "1.36" :"syntax error, unexpected '(', expecting value or '-'"
"pr_01*pow((internalField(T)/Tr_01),(gamma/(gamma-1)))"
"                                    ^                "
It seems like the problem is that you're using an old version of swak4Foam: until recently for "pow(a,b)" only constant scalar values were allowed for b
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 3, 2012, 05:03
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
ok.from where i can download the new version?
Thank you.
immortality is offline   Reply With Quote

Old   December 3, 2012, 05:06
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
another thing gamma here is a scalar i assigned it in variables list.just a number should be use in this version?
immortality is offline   Reply With Quote

Old   December 3, 2012, 06:22
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
ok.from where i can download the new version?
Thank you.
New versions of groovyBC are only available as a part of swak4Foam:
http://openfoamwiki.net/index.php/Co...am#Downloading

Quote:
Originally Posted by immortality View Post
another thing gamma here is a scalar i assigned it in variables list.just a number should be use in this version?
I think so. Best way to find out is try
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 3, 2012, 06:58
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
yes when I use their number values it dosen't show any error.
immortality is offline   Reply With Quote

Old   December 4, 2012, 14:30
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I can't download new swak4Foam.how I should do it:
https://openfoam-extend.svn.sourcefo...ies/swak4Foam/
it opens a list that I don't know how download it.
thanks.
immortality is offline   Reply With Quote

Old   December 4, 2012, 14:47
Default
  #8
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Please consult this section on the wiki for details on the download procedure:

http://openfoamwiki.net/index.php/Co...am#Downloading

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   December 4, 2012, 16:40
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
ISP I use now doesn't support https so Im downloading with http.
it doesn't have any problem?
what should I do then for installing?where this file is saving?
immortality is offline   Reply With Quote

Old   December 4, 2012, 17:03
Default
  #10
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
First of all, you should use svn (google 'subversion') to download the entire package. It is not intended for you to download the files manually.

Secondly, for compiling (building) swak4Foam look at the description on the page I gave you the link for in the previous post.

Kind regards,

Niels
ngj is offline   Reply With Quote

Old   December 4, 2012, 17:36
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Thank you Mr Jacobsen
a directory named swakFoam that is 7.3MB has maked in downloads directory.
is it ok?
how can I find the version of swak4Foam?
thanks.
immortality is offline   Reply With Quote

Old   December 4, 2012, 17:40
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I had another swak4foam before.it doesn't make any problem to older one?
it can't be upgrade or must compile from none?
thanks.
immortality is offline   Reply With Quote

Old   December 4, 2012, 19:26
Default
  #13
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
I had another swak4foam before.it doesn't make any problem to older one?
it can't be upgrade or must compile from none?
thanks.
Just compile the new one. The binaries should replace the old ones
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 5, 2012, 02:31
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
thanks Mr.Gschaider
How about knowing version?
Thanks.
immortality is offline   Reply With Quote

Old   December 5, 2012, 05:22
Default
  #15
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
thanks Mr.Gschaider
How about knowing version?
Thanks.
You mean: "how do I know which version I have?"?

When you just enter

funkySetFields

you get an error message. Above that is the usual OF-header. Just below the header is a line saying "swakVersion: 0.x.x". If your version is 0.2.1 you have the most recent. If you don't see that line your version is from before 0.2.0
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply


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
[swak4Foam] log velocity profile with groovyBC - syntax grjmell OpenFOAM Community Contributions 43 December 9, 2020 16:36
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 01:53
[swak4Foam] Problem with fully developed velocity profile groovyBC in 2D axi-sym mesh harshad88 OpenFOAM Community Contributions 7 July 24, 2014 15:28
[swak4Foam] GroovyBC syntax Daniele111 OpenFOAM Community Contributions 19 August 20, 2010 05:40
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 18:19.