
[Sponsors] 
November 9, 2010, 06:47 
having problems configuring parabolic inlet using groovyBC

#1 
New Member
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 6 
Hi ,
I've been experimenting with different boundary conditions and am trying to set up velocity profile using groovyBC. At the inlet i require a power law condition given by U=2.5*(z/zr)^0.299... Code:
inlet { type groovyBC; variables "Umin=2.5;h=pts().y;a=pow((h/10),0.299);speed=Umin*a;"; valueExpression "vector (speed, 0, 0)"; } " ^^ " I am also a little confused on how to specify my "y" coordinate varying from 40 to 100 in groovy BC, I think i've done it incorrectly. Any help would be much appreciated. Thanks in advance, Regards , Abhinav 

November 10, 2010, 00:02 

#2 
Member
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 6 
I'm also now trying to use groovy BC to model a parabolic inlet velocity profile in a pipe flow.
Any help please?
__________________
Stefano Wahono Defence Science and Technology Organisation Propulsion Systems 

November 10, 2010, 01:15 

#3 
New Member
Aidan
Join Date: Apr 2010
Posts: 18
Rep Power: 7 
pts() returns a vector and you are using it as a scalar. Try something like this instead:
Code:
inlet { type groovyBC; variables "dir=vector (0,1,0);Umin=2.5;h=mag(pos()*dir);a=pow((h/10),0.299);speed=Umin*a;"; valueExpression "vector (speed, 0, 0)"; } 

November 10, 2010, 02:00 

#4  
New Member
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 6 
Hi Aidan,
Thanks for the prompt reply. I tried implementing "dir=vector (0,1,0)" as suggested, but then when i run i get the following... Quote:
Regards, Abhinav 

November 10, 2010, 02:14 

#5 
Member
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 6 
Hi,
Thanks for the reply. I am trying to put a parabolic velocity profile at a pipe inlet. u(r) = umean * (1 (r/R)^2) My domain is a half pipe (see attached Picture). Pipe is oriented along the xdirection. Code:
inlet { type groovyBC; // Use Parabolic Profile //fractionExpression 1; variables "Umax=0.178;c=vector(0,0,0);n=vector(1,0,0);p=pos()c;r=mag(p)+1.0e10;R=max(r);uprof=(1pow(r/R,2))*Umax*normal();"; valueExpression "uprof"; timelines (); value uniform (0.178 0 0); } It's supposed to be 0.178 m/s at the inlet centre. I think I haven't got the transformation from the cylindrical to cartesian coordinate correctly. Can someone please help on the transformation. Thank you very much. Stefano 

November 30, 2010, 06:06 
groovy BC

#6  
New Member
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 6 
Hi foamers,
I've been trying out this new boundary condition describing inflow vertical velocity profile given as: u(z)=u*/k*log((zdo)/zo) i've used groovyBC at my inlet wall as follows... Code:
inlet { type groovyBC; variables "Ustar=0.05;do=0.057;zo=0.00025;K=0.4;para (Ustar/K)*log((pos().zdo)/(zo))*normal();"; valueExpression "vector(para,0,0)"; } Quote:
regards, Abhinav 

December 1, 2010, 03:20 

#7 
New Member
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 6 
I could get to run my case without any error.The problem was a small mistake at my end in defining my points.(sorry)
Thank you, Abhinav 

December 4, 2010, 06:54 

#8 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 8 
Hello Stefano and Abhinav,
I am trying to set parabolic inlet velocity using the groovyBC on a radial mesh which I generated using the guidelines from this website http://openfoamwiki.net/index.php/Si...nical_diffuser A snapshot of my mesh is attached . My flow is in the Z direction and it is a radial mesh. My doubt is that to apply the parabolic inlet do I have to perform transformation. Secondly I dont get the syntax of the groovyBC as used by Stefano. Some advice would be really helpful bye regards K.Suresh kumar 

December 6, 2010, 01:42 

#9 
Member
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 6 
Hi Kumar,
I just used the groovyBC syntax as given in the groovyBC Wiki (http://openfoamwiki.net/index.php/Contrib_groovyBC). I made a bit of mistake in my earlier post. The setup for the 0/U file supposed to be: Code:
inlet { type groovyBC; variables "rpm=0.0;Un=0.178;c=vector(10,0,0);n=sum(normal())/mag(sum(normal()));p=pos()c;r=mag(p)+1.0e10;R=max(r);xt=vector(n.y,n.x,0);xT=xt/mag(xt);yt=vector(n.x*n.z,n.y*n.z,n.x*n.x+n.y*n.y);yT=yt/mag(yt);"; valueExpression "Un*normal()*(1pow(r/R,2)) + (rpm*pi/30)*((p & yT)*xT  (p & xT)*yT)"; value uniform (0 0 0); timelines(); } Un is the centreline velocity at the inlet c is the position vector of the centre of the inlet patch. The parabolic profile is just simply given by: U(r) = Un * (1(r/R)^2), where R is the radius of the inlet patch. Just put the above expression onto your 0/U for the inlet patch, set rpm to zero, change the value of c and Un. It's already in the cylindrical coordinate. It should work straight away  no additional transformation required. Be warned, epsilon will blow up in less than 10 iterations (if you use kepsilon and steady RANS, and starting the solution from zero). You need to start the run with laminar RAS model, then switch to kepsilon after the initial instabilities near the wall dissapear. Good luck. Please let me know if you need further info. Best Regards, Stefano 

December 7, 2010, 03:49 

#10 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 8 
Hi Stefano,
Thanks for the clear explanation of the use of the syntax. I will try the groovyBC in the format that you have specified. Actually I am still having some issues with the mesh . Once I am done with that, I will straight away use the groovyBC in the way you have specified. I will get back to you, If I have any errors. Thanks again. bye regards K.Suresh kumar 

December 27, 2010, 06:20 

#11 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 8 
Hi Stefano,
I had to change the mesh, because I want to compare the results with another solver FS3D. This time I am using a cartesian mesh and the solver interFoam. So I first had to define the volume fraction in a circular way from the center. Now I want to put a parabolic velocity profile on it. I started with your formulation. internalField uniform (0 0 0); boundaryField { inletWall { type groovyBC; variables "rpm=0.0;Un=20;c=vector(2.1e3,2.1e3,0);n=sum(normal())/mag(sum(normal()));p=pos()c;r=mag(p)+1.0e10;R=max(r);xt=vector(n.y,n.x,0);xT=xt/mag(xt);yt=vector(n.x*n.z,n.y*n.z,n.x*n.x+n.y*n.y);yT=yt/mag(yt);"; valueExpression "(alpha1+internalField(alpha1))*Un*normal()*(1pow(r/R,2)) + (rpm*pi/30)*((p & yT)*xT  (p & xT)*yT)"; value uniform (0 0 20); timelines (); } atmosphere { type fixedValue; value uniform (0 0 0); } } But I am not getting the parabolic velocity profile.The definition of c is the location of the centre of the round inlet. And I want to have a max velocity of 20 m/s. Could you give me any suggestions on how to set a parabolic velocity profile for this kind of problem regards K.Suresh kumar 

January 10, 2011, 19:10 

#12  
Member
Stefano Wahono
Join Date: Aug 2010
Location: Melbourne, Australia
Posts: 42
Rep Power: 6 
Quote:
I don't understand why you put "(alpha1+internalField(alpha1))" in your value expression. This is a U BC isn't it? I don't think you need that alpha1. But again, I have not run interFoam before. Another suggestion, it may be simpler to put the centre of the inlet face at 0,0,0. It makes things simpler because you don't have to worry about rounding. The other thing, is the patch "atmosphere" your outlet? You cannot have both fixedValue for velocity on both inlet and outlet. If you fixed the velocity at inlet, then you need to use zeroGradient for velocity at the outlet boundary. You can then use zeroGradient pressure at Inlet, and fixedValue pressure at outlet. Kind Regards, Stefano 

January 11, 2011, 07:33 

#13 
Senior Member
Suresh kumar Kannan
Join Date: Mar 2009
Location: Luxembourg, Luxembourg, Luxembourg
Posts: 129
Rep Power: 8 
Hi Stefano,
Thanks for the suggestions. Actually I solved the problem for setting the parabolic inlet. You are right about the velocity at the outlet. I will change it. Your explanation was very useful. regards K.Suresh kumar 

May 25, 2011, 07:41 
information in parabolic inlet

#14 
New Member
bamba
Join Date: Apr 2011
Posts: 4
Rep Power: 6 
Hello foamers
I 'm using open foam (IcoFoam)to solver my problem.I want use the parabolic velocity inlet for a cylinder.I understand stephane use a same my problem. Stephane ,I want your help.I have attache the geometry and the condition inlet. Thank 

May 27, 2011, 05:41 
information in parabolic inlet

#15 
New Member
bamba
Join Date: Apr 2011
Posts: 4
Rep Power: 6 
Hello Stefano
I send you my geomtry .you can find it on the attachment.I work with IcoFoam( laminar staionnary) and i want a parabolic velocity inlet. Thank you . 

October 4, 2013, 13:41 
GroovyBC doubt

#16 
New Member
Akash Sharma
Join Date: May 2013
Location: Paris
Posts: 15
Rep Power: 4 
Hello,
I am doing simulation on a rotor blade. My flow is a pressure based flow. I have my Velocity at inlet which is given by direction cosines dir_cos1 = 4.04 dir_cos2 = EXPR{57.2958*(acos(0.07045*(z/sqrt(z*z+y*y))))} dir_cos3 = EXPR{57.2958*(acos(0.07045*(y/sqrt(z*z+y*y))))} Can someone tell me how to give this using groovyBC. Thanks a lot !! 

October 6, 2013, 06:59 

#17  
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40 
Quote:
__________________
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 

June 23, 2015, 13:21 

#18  
New Member
ICST
Join Date: Mar 2011
Posts: 20
Rep Power: 6 
Quote:
I use OpenFoam to simulate flow throught street canyon, but I have some troubles, it is the boundaries condition. Especially, boundary condition for inlet? Can you help me about it? Thanks. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Pressure problems with inlet variable velocity  jaimesdiegop  CFX  0  June 10, 2015 19:20 
Power law inlet velocity using groovyBC  aviator  OpenFOAM Running, Solving & CFD  3  November 13, 2013 11:50 
Inlet patch problems  martyn88  OpenFOAM  5  October 1, 2012 03:39 
adjust inlet temperature depending on values of monitor points (groovyBC)  braennstroem  OpenFOAM Running, Solving & CFD  2  May 31, 2011 13:45 
what the result is negatif pressure at inlet  chong chee nan  FLUENT  0  December 29, 2001 06:13 