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

[swak4Foam] groovyBC oscilating pipe flow problems

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 23, 2013, 14:49
Default groovyBC oscilating pipe flow problems
  #1
New Member
 
Duncan Weatherhead
Join Date: Feb 2012
Location: University of Exeter
Posts: 11
Rep Power: 14
duncan21187 is on a distinguished road
Hi All

I am trying to use the groovyBC utility to model oscillating pipe flow but am having trouble. OpenFOAM does not appear to be solving for the velocities according to the equation I have set up in the 0/'U' directory, and as such is taking a '0' value for all times other than time t=0. I was wondering if anyone could help suggest why the code is not processing the equation for all timesteps? The 'U' file is attached.

Many thanks

Duncan
Attached Files
File Type: docx U.docx (1.7 KB, 6 views)
duncan21187 is offline   Reply With Quote

Old   January 23, 2013, 15:28
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 duncan21187 View Post
The 'U' file is attached.
May first impression was "a word file? Really?". Then found out that it is a plain ol' text file. I think uploading files with .txt is possible and would be more appropriate.

Quote:
Originally Posted by duncan21187 View Post
I am trying to use the groovyBC utility to model oscillating pipe flow but am having trouble. OpenFOAM does not appear to be solving for the velocities according to the equation I have set up in the 0/'U' directory, and as such is taking a '0' value for all times other than time t=0. I was wondering if anyone could help suggest why the code is not processing the equation for all timesteps?
What do you mean with "does not solve"? The boundary conditions do not get the anticipated values or the rest of the fluid.

To make sure that the BCs are correct you can use the replayTransientBC-utility that comes with swak4Foam: it loads field files and then steps through simulation time but only updates the boundary conditions (because of that it is MUCH faster ... several orders of magnitude usually ... than running the real simulation). If the boundary conditions for U give the values you expect (you can for instance check that in paraview) I refuse all responsibility and blame the solver
__________________
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   January 23, 2013, 16:40
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I used replayTransientBC as you said before to me.now at paraview is observed only initial condition with blue color and nothing change when time is going ahead.how can i see boundary values?
immortality is offline   Reply With Quote

Old   January 23, 2013, 17:19
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
I used replayTransientBC as you said before to me.now at paraview is observed only initial condition with blue color and nothing change when time is going ahead.how can i see boundary values?
OK. I assume that you visualized the patch and not the internal field in paraview.

Anyway. I assume that your problem is with testpipe_inlet BC:

Code:
        variables (
 //         "yp=pts().y;"
 //         "minY=min(yp);"
//          "maxY=max(yp);"
 //         "para=-(maxY-pos().y)*(pos().y-minY)/(0.25*pow(maxY-minY,2))*normal();"
//      "para=5.0*vector(1,0,0);"
      )
        
        valueExpression   "20+(10*sin(0.5*time()))*normal()";
When looking at it the first thing that occurred to me that in the valueExpression you try to add a scalar ("20") to a vector ("scalar*normal()") and no syntax error occurs. So it seems that valueExpression is not evaluated because it was not found (and therefor replaced with an expression equivalent to 0). The reason seems to be that the variables entry above is not terminated by a ; (in that case valueExpression is treated by the OpenFOAM-dictionary-parser as a part of variables .... and discarded)
__________________
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   January 24, 2013, 12:39
Default
  #5
New Member
 
Duncan Weatherhead
Join Date: Feb 2012
Location: University of Exeter
Posts: 11
Rep Power: 14
duncan21187 is on a distinguished road
Hi Bernhard

Firstly apologies for my lazy choice of format!! When finding I could not submit the file as a .C file, I just converted it to the first option on the list.

Thank you very much for your advice and pointing out my writing error, I have fixed this now and the code runs fine .
duncan21187 is offline   Reply With Quote

Old   January 24, 2013, 13:29
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
i selected all patches and in display seleted wireframe.is it true?then how can i see fields on a speciefic patch like that was in internalfield case?
immortality is offline   Reply With Quote

Old   January 24, 2013, 14:05
Default
  #7
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
i selected all patches and in display seleted wireframe.is it true?then how can i see fields on a speciefic patch like that was in internalfield case?
If you also loaded the internalField then "split off" the patch with the "Extract Block"-filter and just display it as "Surface". The values you see are the values on the patch. If you didn't load the internalField then the filter is not necessary
immortality likes this.
__________________
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   January 27, 2013, 04:36
Default
  #8
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
since my patch is 2D with small depth,patches are so hard to see by themselves.how to correct this situation?
immortality is offline   Reply With Quote

Old   January 27, 2013, 06:21
Default
  #9
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
since my patch is 2D with small depth,patches are so hard to see by themselves.how to correct this situation?
"Hard to see" you mean "Hard To see in paraview"?

Two things might help you there:
- "Zoom to Data"-Button in the "Display" panel of the filter
- further down in that panel with a "Scale"-entry you can enlarge the patch in the "thin" direction

But that is hardly OF-specific (not to speak of groovyBC)
__________________
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
interFoam two-phase pipe flow air phase behaviour katete OpenFOAM Running, Solving & CFD 11 February 3, 2021 04:14
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC zanilu70 OpenFOAM Community Contributions 4 December 13, 2016 07:46
Setting boundary conditions for simple pipe flow with flow direction changing in time Sipher FLUENT 1 May 4, 2015 21:05
Two-phase flow in a circular horizontal pipe DmitryS Fluent Multiphase 0 May 17, 2014 17:22
fluid flow fundas ram Main CFD Forum 5 June 17, 2000 22:31


All times are GMT -4. The time now is 23:56.