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

how to set up inlet velocity profile

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 31, 2013, 09:09
Default how to set up inlet velocity profile
  #1
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
Hey,

I am setting up a polynomial velocity profile (say, Ux = C1+C2*y+C3*y^2) for a velocity inlet. Any idea for it?

Cheers,
Raymond
Raymond.Leoi is offline   Reply With Quote

Old   July 31, 2013, 09:36
Default
  #2
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
Hello Raymond,

I am not sure but maybe you can do that with swak4Foam (groovyBC). You may want to look into that.

Best,
kilroy
kilroy is offline   Reply With Quote

Old   July 31, 2013, 09:50
Default
  #3
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
Thanks, Kilroy. Unfortunately, I couldn't find it in the OF version used.

Actually, the question is similar to setting up the inlet velocity profile for fully-dveloped laminar flow.

Quote:
Originally Posted by kilroy View Post
Hello Raymond,

I am not sure but maybe you can do that with swak4Foam (groovyBC). You may want to look into that.

Best,
kilroy
Raymond.Leoi is offline   Reply With Quote

Old   July 31, 2013, 10:26
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 295
Rep Power: 13
Lieven will become famous soon enough
Hi Raymond,

Have a look at http://www.openfoam.org/version2.1.0...conditions.php
the functionality you are looking for, is already available in OF.

Cheers

L
Lieven is offline   Reply With Quote

Old   July 31, 2013, 10:32
Default
  #5
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
Thanks, L. Well, I suppose the polynomial example for scalar variables. Is it also applicable for vector variables like velocity?

Quote:
Originally Posted by Lieven View Post
Hi Raymond,

Have a look at http://www.openfoam.org/version2.1.0...conditions.php
the functionality you are looking for, is already available in OF.

Cheers

L
Raymond.Leoi is offline   Reply With Quote

Old   July 31, 2013, 10:43
Default
  #6
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Mol, Belgium
Posts: 295
Rep Power: 13
Lieven will become famous soon enough
That's a very good question, I have no clue

I would say, have a look at the sources and see if that tells you a bit more. Otherwise, I'm pretty sure you can use the codedFixedValue boundary condition but this will be a bit more challenging. Then the groovyBC might be easier to use (never used it myself so can't help you with that).

Cheers,

L
Lieven is offline   Reply With Quote

Old   July 31, 2013, 11:01
Default
  #7
Senior Member
 
kilroy's Avatar
 
Join Date: Mar 2013
Location: USA
Posts: 120
Rep Power: 4
kilroy is on a distinguished road
Quote:
Originally Posted by Raymond.Leoi View Post
Thanks, Kilroy. Unfortunately, I couldn't find it in the OF version used.

Actually, the question is similar to setting up the inlet velocity profile for fully-dveloped laminar flow.
Raymond,

swak4Foam doesn't come with standard OpenFoam. You need to add it seperately. Please see the link below for details:

http://openfoamwiki.net/index.php/Contrib/swak4Foam

Best,
kilroy
kilroy is offline   Reply With Quote

Old   August 21, 2013, 11:08
Default
  #8
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
I made up a parabolic profile for velocity inlet using groovyBC as
Code:
inletL
{
type groovyBC;
variables "yp=pts().y;minY=min(yp);maxY=max(yp);rad=0.5*(max Y-minY);vavg=0.23;";
valueExpression "2.0*vavg*(1.0-pow(pos().y/rad,2))*normal()";
value uniform (10 0 0);
}
Also,
Code:
libs ( "libOpenFOAM.so" "libgroovyBC.so" );
is declared in controlDict. But I got the following error
Code:
Create mesh for time = 0
Reading field p
Reading field U

--> FOAM FATAL IO ERROR: 
keyword boundaryField is undefined in dictionary "/home/parallels/OpenFOAM/..../0/U"

file: /home/parallels/OpenFOAM/..../0/U from line 17 to line 48.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 461.

FOAM exiting
Anything wrong I made?

Last edited by wyldckat; August 22, 2013 at 07:18. Reason: Added [CODE][/CODE]
Raymond.Leoi is offline   Reply With Quote

Old   August 22, 2013, 07:21
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Raymond,

OK, the error message says that "boundaryField" is missing. If you look at one of OpenFOAM's tutorial files, such as "incompressible/icoFoam/cavity/0/U", you'll see that the "boundaryField" is the keyword for the list of boundary conditions, as you can examine at this link: https://github.com/OpenFOAM/OpenFOAM...oam/cavity/0/U

Therefore, it looks like you somehow has a damaged "U" file, which you must fix, to make it more similar to the ones on OpenFOAM's tutorials.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 23, 2013, 05:16
Default
  #10
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Raymond,

OK, the error message says that "boundaryField" is missing. If you look at one of OpenFOAM's tutorial files, such as "incompressible/icoFoam/cavity/0/U", you'll see that the "boundaryField" is the keyword for the list of boundary conditions, as you can examine at this link: https://github.com/OpenFOAM/OpenFOAM...oam/cavity/0/U

Therefore, it looks like you somehow has a damaged "U" file, which you must fix, to make it more similar to the ones on OpenFOAM's tutorials.

Best regards,
Bruno
Many cheers, Bruno. It's sorted out. Eventually, GroovyBC works. BTW, normal() follows right-hand rule as most of other codes, doesn't it?
Raymond.Leoi is offline   Reply With Quote

Old   August 24, 2013, 19:41
Default
  #11
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by Raymond.Leoi View Post
BTW, normal() follows right-hand rule as most of other codes, doesn't it?
It should, but keep in mind that it might (probably) also take(s) into account which way is the inside of the simulation domain.
Nonetheless, I advise you to do some trial-and-error tests, just to confirm this
wyldckat is offline   Reply With Quote

Old   August 25, 2013, 06:06
Default
  #12
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
It should, but keep in mind that it might (probably) also take(s) into account which way is the inside of the simulation domain.
Nonetheless, I advise you to do some trial-and-error tests, just to confirm this
Thanks for your suggestion. That's a good idea. It's for sure that the direction of normal() at boundaries points outwards.
Raymond.Leoi is offline   Reply With Quote

Old   August 26, 2013, 11:36
Default
  #13
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 Raymond.Leoi View Post
Thanks for your suggestion. That's a good idea. It's for sure that the direction of normal() at boundaries points outwards.
Honestly: I've got to look that up every time myself. But basically it just passes through the definition that OpenFOAM uses. But I guess outwards. Because the boundary cell is the "owner" of the boundary face. And the normal of a face points from the "owner" to the "neighbour"
__________________
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
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 9 November 26, 2014 08:58
extracting outlet velocity profile from one case to another case's inlet tonggysun OpenFOAM 2 September 13, 2013 04:19
FSI- Pipe- uniform velocity profile inlet Absy Main CFD Forum 0 April 6, 2010 03:01
Variables Definition in CFX Solver 5.6 R P CFX 2 October 26, 2004 02:13
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


All times are GMT -4. The time now is 10:02.