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

groovyBC oscilating pipe flow problems

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

Like Tree1Likes
  • 1 Post By gschaider

Reply
 
LinkBack Thread Tools 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: 10
Rep Power: 5
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, 4 views)
duncan21187 is offline   Reply With Quote

Old   January 23, 2013, 15:28
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
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,186
Rep Power: 16
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: 3,912
Rep Power: 40
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: 10
Rep Power: 5
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,186
Rep Power: 16
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: 3,912
Rep Power: 40
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,186
Rep Power: 16
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: 3,912
Rep Power: 40
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

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
steam flow in a pipe driven by a pressure gradient between inlet and outlet SalvoCalvo Main CFD Forum 0 March 11, 2010 07:52
High speed compressible flow through pipe Munni Main CFD Forum 5 April 20, 2007 03:15
Pipe flow with obstacle - HELP Min FLUENT 5 April 10, 2007 17:23
Turbulence in a pipe flow JM Main CFD Forum 4 December 21, 2006 05:04
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) HB &DS CFX 0 January 9, 2000 14:19


All times are GMT -4. The time now is 15:19.