CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Two questions about groovyBC

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 4, 2012, 16:44
Default Two questions about groovyBC
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
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 is offline   Reply With Quote

Old   December 4, 2012, 16:53
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
immortality is on a distinguished road
another little question.
groovy makes error in ^ sign.is there another easy way for making power(except itself!)
thanks.
immortality is offline   Reply With Quote

Old   December 4, 2012, 19:38
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,920
Rep Power: 41
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
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:
__________________
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 4, 2012, 19:42
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,920
Rep Power: 41
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by immortality View Post
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 View Post
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
__________________
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
groovyBC and funkySetFields married and got a kid named swak4Foam gschaider OpenFOAM 164 January 13, 2015 03:52
Boundary condition with a non-uniform gradient - groovyBC? STiss OpenFOAM Programming & Development 3 October 11, 2013 02:04
GroovyBC for 2D wave flume! Hisham OpenFOAM Running, Solving & CFD 13 January 20, 2012 06:04
groovyBC and Eqn.setReference() benk OpenFOAM 3 June 2, 2011 08:49
Wall heat transfer using groovyBC (XiFoam solver) usergk OpenFOAM 7 February 4, 2011 14:36


All times are GMT -4. The time now is 22:21.