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

[swak4Foam] groovyBC using swakExpression

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

Like Tree1Likes
  • 1 Post By osha

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2014, 17:38
Default groovyBC using swakExpression
  #1
New Member
 
Kalli
Join Date: Jul 2014
Posts: 9
Rep Power: 11
osha is on a distinguished road
I am writing a BC for a patch in my computational domain using groovyBC which uses the average value of temperature on a faceSet created using topoSet utility.

I can write the average temperature on faceSet using swakExpression but I am not sure how to use it in groovyBC for a faceSet created from topoSet. Is it possible?

Instead, one can access the temperature of other patches in groovyBC but is it possible to access field variables like temperature on a faceSet.

Thank you for your insight and help.
osha is offline   Reply With Quote

Old   November 16, 2014, 19:07
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 osha View Post
I am writing a BC for a patch in my computational domain using groovyBC which uses the average value of temperature on a faceSet created using topoSet utility.

I can write the average temperature on faceSet using swakExpression but I am not sure how to use it in groovyBC for a faceSet created from topoSet. Is it possible?

Instead, one can access the temperature of other patches in groovyBC but is it possible to access field variables like temperature on a faceSet.

Thank you for your insight and help.
It has been described a number of times. The latest instance would be http://openfoamwiki.net/images/7/7a/...icTraining.pdf sildes 152ff (just replace cellSet with faceSet)
__________________
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   November 17, 2014, 02:45
Default
  #3
New Member
 
Kalli
Join Date: Jul 2014
Posts: 9
Rep Power: 11
osha is on a distinguished road
Quote:
Originally Posted by gschaider View Post
It has been described a number of times. The latest instance would be http://openfoamwiki.net/images/7/7a/...icTraining.pdf sildes 152ff (just replace cellSet with faceSet)
Dear Bernhard,

Thank you very much for pointing me to right direction. I apologize as I didn't pose the question as I should have. Your solution does answer the question I had asked in first post perfectly.

I think I should give you a little more background on what I am trying to achieve. I have developed a multiRegion solver which is similar to chtMultiRegionFoam. A simple representation of my case is shown below.



My sensor is a faceSet in different region, i.e. AIR and using the average temperature calculated on this faceSet I intend to calculate my boundary condition using an expression that I define using groovyBC on a patch defined in different region, i.e. SOLID.

As the faceSet is defined for the region AIR, it doesn’t get accessed by groovyBC on the region SOLID. I get an error

Quote:
XYZ not found in table. Valid entries:
0
(
)
This is the reason why I evaluated the expression using swakExpression with a hope that it can be accessed by groovyBC like internalField.

Sorry again for curt explanation of my problem earlier.
osha is offline   Reply With Quote

Old   November 17, 2014, 06:09
Default Solved
  #4
New Member
 
Kalli
Join Date: Jul 2014
Posts: 9
Rep Power: 11
osha is on a distinguished road
I think I have figured it out. If someone else is facing similar problem like the one described above, you can refer to the example multiRegionHeaterFeedback in Examples/groovyBC folder.

the syntax is like this

Quote:
<nameOfVariable>{ faceSet'<nameOfFaceSet>/<nameOfRegion>} = <expression>
Bernhard, thank you very much for all the help!
Hamoon likes this.
osha is offline   Reply With Quote

Old   November 17, 2014, 06:10
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 osha View Post
I think I have figured it out. If someone else is facing similar problem like the one described above, you can refer to the example multiRegionHeaterFeedback in Examples/groovyBC folder.
Good. I was just going to point you to the same Example
__________________
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   November 17, 2014, 06:23
Default
  #6
New Member
 
Kalli
Join Date: Jul 2014
Posts: 9
Rep Power: 11
osha is on a distinguished road
Thanks again Bernhard. As I explore OpenFOAM further I realize that no other tool improves FOAM's usability like swak4foam.
osha is offline   Reply With Quote

Reply

Tags
faceset, groovybc, gschaider, swak4foam, wyldkat

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 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 08:53
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC zanilu70 OpenFOAM Community Contributions 4 December 13, 2016 07:46
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam dani2702 OpenFOAM Community Contributions 0 November 17, 2016 04:30
[swak4Foam] groovyBC issue - k and epsilon sagnikmazumdar OpenFOAM Community Contributions 24 March 1, 2015 08:16
[swak4Foam] groovyBC and Eqn.setReference() benk OpenFOAM Community Contributions 3 June 2, 2011 09:49


All times are GMT -4. The time now is 20:34.