
[Sponsors] 
August 28, 2013, 10:34 
3D parabolic inflow profile

#1 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
Dear OpenFOAM users,
I am simulating the growth, pinchoff, detachment and free rise of a single air bubble in water that is created by the steadyrate injection of air into a tank with water at rest from a small circular inlet at the middle of the bottom boundary (interFoam). The inflow is along the positive direction of the zaxis of the domain. So far I have used the mean inflow velocity value with a constant value at inlet and I have noticed that this causes some oscillations in my results. Therefore I want to use a parabolic inflow profile imposed at the circular inlet. Can anyone help me? Thank you very much in advance ageorg 

August 29, 2013, 14:41 

#2 
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,211
Blog Entries: 1
Rep Power: 17 
search for
1 code stream 2 groovyBC you will find how to do it
__________________
Telegram channel (https://telegram.me/openfoam4Iranian) My Weblog (http://openfoam.blogfa.com/) Training Course on OpenFOAM at (http://www.isme.ir/) 

August 30, 2013, 05:19 
groovyBC

#3 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
Thanks for the advise I will search for the things you suggest!


October 28, 2013, 12:56 

#4 
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Dear ageorg,
I almost have the same issue. I want to impose a parabolic B.C for a 3D case with interFoam solver OF 2.1.1. So have you manged to sort out case? If you did, what kind of B.C you used? could you please advice or direct me if there is any direct tool to get it with out codding for a 3D case? Best Wishes, Sandy13, 

October 28, 2013, 18:32 

#5 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
Yes I managed it using groovyBC in Swak4Foam
But i remember that i had to follow many forums in order to compile swak4Foam in OF 2.2.1 that i am working on. If you are able to compile this in your OF version get back to me through this forum and I will tel you how to use it for a 3D parabolic Inflow. 

October 29, 2013, 05:41 

#6 
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Dear ageorg,
Thank in advance for your help, I appreciate it very much. Yes please, I will try to compile it today, but If you have any hints how to do it with OF2.1.1 I would be very grateful.. Best wishes, Sandy13, 

October 29, 2013, 05:47 

#7 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
This was quite long ago so the only thing I remember is that I followed instructions suggested in this forum and others and I finally managed to compile it. Just Google it and you will find the solution....then get back to me for the 3D parabolic inflow.


October 29, 2013, 07:27 

#8  
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Quote:
I installed swak4foam and did all the downloading and compiling and I added the necessary libraries to my control dictionary as written in the instruction. What I need now is the type of groovy B.C for my case, I checked the groovy wiki web site and there are few types, so could you please direct me... My case is a liquid jet starts from above of my domain to downstream, so my flow in zdirection perpendicular on the xy plain. I have to tell you that I am not any good with c++.. best wishes, Sandy13, 

October 30, 2013, 05:56 

#9 
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Dear ageorg,
I installed swak4foam and did all the downloading and compiling, I added the necessary libraries to my control dictionary as written in the instruction. Could you please help me out with the 3D parabolic profile B.C for velocity. Thank you in advance... Sandy13, 

October 30, 2013, 09:16 
3D parabolic Inlet Profile

#10 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
inlet
{ type groovyBCFixedValue; variables ( "velIn=0.03822;" //velIn is the normal mean inlet velocity "c=sum(pos()*mag(Sf()))/sum(mag(Sf()));" //c is the centre of the patch "n=sum(normal())/mag(sum(normal()));" //n is the averaged patch normal "pp=pos()c;" "r=mag(pp)+1.0e10;" "R=max(r);" ); valueExpression "velIn*normal()*(1pow(r/R,2))"; value uniform (0 0 0.03822); } This is an example of the expression that I used for a 3D parabolic inflow profile This is a fully developed laminal profile for a circular inlet Maximum value at the center of the patch and reduces parabolically to zero at the edge of the patch Dont forget to add the libraries at the ControlDict According to version of OpenFoam you might get a few warnings when applying it but despite that it works fine PS: Dont expect to see it in paraview after initialization it starts after the first iteration Hope that this helps All the Best T. 

October 30, 2013, 12:40 

#11 
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Dear ageorg,
Thanks so much for passing your code over, but I have only on question more.. The mean inlet velocity(velIn), is not the same value of velocity we get from solving Re number equation? or we have to impose the maximum one(which double the mean value) in the same position?. lat us assume I got u=20 m/s from solving the Re number equation... which is the mean value, so shall I impose one in as a parameter for the normal mean inlet velocity? Thanks in advance... Sandy13, 

October 30, 2013, 12:44 

#12 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
The mean value of U is simply U=Q/A
Q: flow rate m3/sec A: area of inlet m2 Hope it is clear now Don't hesitate to ask me anything else... 

October 30, 2013, 13:05 

#13 
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Dear ageorg,
Thanks for your replay. I know what you explained but what I have is a specific parameters and Re no, so I extracted the velocity value from solving the Re equation. Now I have this parameter in the B.C you gave to me. I am confused to put this value I got from Re as a mean or not? because solving Re gives us the mean value...am I wrong?? Sandy13, 

October 30, 2013, 13:13 

#14 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
Average velocity in circular pipes is half the maximum
So use your half value of the one you calculated with your Re number..... 

October 30, 2013, 14:04 

#15  
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Quote:
As you see from the attached picture, I imposed u mean =20 m/s which I got from solving Re equation but from the velocity variation It gives me varying between 020. So I did not get the max one I need which is should be about 40 m/s. Is this correct? Sandy13, 

October 30, 2013, 20:12 

#16 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
Please send me a description or a paper of what you try to simulate I need more info in order to give you a correct answer... The info I gave you so far is in order to apply a parabolic inflow profile if you know your flow rate at the inlet following the theory for fully developed 3D laminal flow profile.
Send me some more details about your case and then I can advise you what to do T. 

October 31, 2013, 09:55 

#17 
Member
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 5 
Dear ageorg,
I am trying to simulate a liquid jet for water and make a comparison for this with another work. So i specification for geometry liquid, gas and specific Re and We numbers. So I have diamter of my case with the solving of Re and We I got the a velocity=10 m/s. So know when I use the parabolic B.C code you gave to me, If I put u=10 as an entry, i get max velocity value=10 as I done yesterday with picture I sent, but this is not correct because we know that Re works with the mean value and maximum one should be around double this one, i.e. u=20. Best Wishes, Sandy13, 

October 31, 2013, 11:32 

#19 
Member
Anastasios
Join Date: Mar 2009
Posts: 32
Rep Power: 9 
If your flow is turbulent then try to put 2 times the mean velocity in the code I send you and it should work....


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
swak4Foam: problem with a parabolic velocity profile  Claudio87  OpenFOAM PreProcessing  5  May 29, 2014 09:30 
parabolic velocity profile with fluctuations (groovyBC?)  newOFuser  OpenFOAM  17  July 15, 2013 17:27 
Half parabolic profile for the velocity inlet  adele  FLUENT  4  July 19, 2012 11:43 
IdeasUnvToFoam Bug amp Fix  benru  OpenFOAM Bugs  42  November 13, 2009 08:59 
Prescribed inflow velocity profile  how to?  Alan  Main CFD Forum  10  October 28, 2005 12:14 