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

[swak4Foam] Two questions about groovyBC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2012, 15:44
Default Two questions about groovyBC
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 15:53
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
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, 18:38
Default
  #3
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
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, 18:42
Default
  #4
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
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


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] groovyBC for oscillatory flow liybzd OpenFOAM Community Contributions 5 November 12, 2018 07:53
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC zanilu70 OpenFOAM Community Contributions 4 December 13, 2016 06:46
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam dani2702 OpenFOAM Community Contributions 0 November 17, 2016 03:30
[swak4Foam] some questions about neibours of patches in groovyBC immortality OpenFOAM Community Contributions 7 March 3, 2013 11:38
[swak4Foam] questions about groovyBC immortality OpenFOAM Community Contributions 2 December 14, 2012 10:07


All times are GMT -4. The time now is 03:30.