CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] a problem in groovyBC: "syntax error, unexpected '('" (https://www.cfd-online.com/Forums/openfoam-community-contributions/109998-problem-groovybc-syntax-error-unexpected.html)

immortality December 2, 2012 14:26

a problem in groovyBC: "syntax error, unexpected '('"
 
1 Attachment(s)
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!

gschaider December 2, 2012 16:55

Quote:

Originally Posted by immortality (Post 395316)
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

immortality December 3, 2012 04:03

ok.from where i can download the new version?
Thank you.

immortality December 3, 2012 04:06

another thing gamma here is a scalar i assigned it in variables list.just a number should be use in this version?

gschaider December 3, 2012 05:22

Quote:

Originally Posted by immortality (Post 395396)
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 (Post 395397)
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

immortality December 3, 2012 05:58

yes when I use their number values it dosen't show any error.

immortality December 4, 2012 13:30

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.

ngj December 4, 2012 13:47

Please consult this section on the wiki for details on the download procedure:

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

Kind regards,

Niels

immortality December 4, 2012 15:40

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?

ngj December 4, 2012 16:03

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

immortality December 4, 2012 16:36

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 December 4, 2012 16:40

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.

gschaider December 4, 2012 18:26

Quote:

Originally Posted by immortality (Post 395783)
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

immortality December 5, 2012 01:31

thanks Mr.Gschaider
How about knowing version?
Thanks.

gschaider December 5, 2012 04:22

Quote:

Originally Posted by immortality (Post 395846)
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


All times are GMT -4. The time now is 02:55.