CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Two questions about groovyBC (http://www.cfd-online.com/Forums/openfoam-solving/110147-two-questions-about-groovybc.html)

immortality December 4, 2012 16:44

Two questions about groovyBC
 
1)if the variable or constant names in variables list is same as the name of a field it makes any problem?names should be different?
2)as well as variables is it possible to write formulas in valueExpression and others in more than one line?how?
thanks again.

immortality December 4, 2012 16:53

another little question.
groovy makes error in ^ sign.is there another easy way for making power(except itself!)
thanks.

gschaider December 4, 2012 19:38

Quote:

Originally Posted by immortality (Post 395772)
another little question.
groovy makes error in ^ sign.is there another easy way for making power(except itself!)
thanks.

^ is (and this follows the convention of OpenFOAM) not the power function but the cross product of vectors (external product).

Power function is named pow.

But all that is (I admin not very verbosely) documented at http://openfoamwiki.net/index.php/Co...e_implemented:

gschaider December 4, 2012 19:42

Quote:

Originally Posted by immortality (Post 395771)
1)if the variable or constant names in variables list is same as the name of a field it makes any problem?names should be different?

Best way to find out is to try.

But the answer is: a variable with the name alpha "shadows" a field with the name alpha ... no problem but you can't access the field anymore.

Anyway: if you're unsure about the behaviour name the variable differently

Quote:

Originally Posted by immortality (Post 395771)
2)as well as variables is it possible to write formulas in valueExpression and others in more than one line?how?
thanks again.

You asked that elsewhere


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