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

3D parabolic inflow profile

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 28, 2013, 10:34
Default 3D parabolic inflow profile
  #1
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
Dear OpenFOAM users,

I am simulating the growth, pinch-off, detachment and free rise of a single air bubble in water that is created by the steady-rate 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 z-axis 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
ageorg is offline   Reply With Quote

Old   August 29, 2013, 14:41
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
search for

1- code stream
2- groovyBC

you will find how to do it
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   August 30, 2013, 05:19
Default groovyBC
  #3
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
Thanks for the advise I will search for the things you suggest!
ageorg is offline   Reply With Quote

Old   October 28, 2013, 12:56
Default
  #4
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Quote:
Originally Posted by ageorg View Post
Thanks for the advise I will search for the things you suggest!
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,
sandy13 is offline   Reply With Quote

Old   October 28, 2013, 18:32
Default
  #5
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
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.

ageorg is offline   Reply With Quote

Old   October 29, 2013, 05:41
Default
  #6
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
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,
sandy13 is offline   Reply With Quote

Old   October 29, 2013, 05:47
Default
  #7
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
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.
ageorg is offline   Reply With Quote

Old   October 29, 2013, 07:27
Default
  #8
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Quote:
Originally Posted by ageorg View Post
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.
Dear ageorg,
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 z-direction perpendicular on the x-y plain. I have to tell you that I am not any good with c++..
best wishes,
Sandy13,
sandy13 is offline   Reply With Quote

Old   October 30, 2013, 05:56
Default
  #9
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
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,
sandy13 is offline   Reply With Quote

Old   October 30, 2013, 09:16
Default 3D parabolic Inlet Profile
  #10
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
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.0e-10;"
"R=max(r);"
);
valueExpression "-velIn*normal()*(1-pow(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.
ageorg is offline   Reply With Quote

Old   October 30, 2013, 12:40
Default
  #11
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
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,
sandy13 is offline   Reply With Quote

Old   October 30, 2013, 12:44
Default
  #12
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
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...
ageorg is offline   Reply With Quote

Old   October 30, 2013, 13:05
Default
  #13
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
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,
sandy13 is offline   Reply With Quote

Old   October 30, 2013, 13:13
Smile
  #14
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
Average velocity in circular pipes is half the maximum
So use your half value of the one you calculated with your Re number.....
ageorg is offline   Reply With Quote

Old   October 30, 2013, 14:04
Default
  #15
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Quote:
Originally Posted by ageorg View Post
Average velocity in circular pipes is half the maximum
So use your half value of the one you calculated with your Re number.....
Dear ageorg,
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 0-20. So I did not get the max one I need which is should be about 40 m/s. Is this correct?
Sandy13,
Attached Images
File Type: jpg u mean=20.jpg (19.7 KB, 16 views)
sandy13 is offline   Reply With Quote

Old   October 30, 2013, 20:12
Default
  #16
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
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.
ageorg is offline   Reply With Quote

Old   October 31, 2013, 09:55
Default
  #17
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
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,
sandy13 is offline   Reply With Quote

Old   October 31, 2013, 09:57
Default
  #18
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Dear ageorg,
Sorry, the value I imposed for mean u was 20 m/s, not 10 as I said, so I should get maximum around u=40
Snady13
sandy13 is offline   Reply With Quote

Old   October 31, 2013, 11:32
Default
  #19
New Member
 
Anastasios
Join Date: Mar 2009
Posts: 26
Rep Power: 8
ageorg is on a distinguished road
If your flow is turbulent then try to put 2 times the mean velocity in the code I send you and it should work....
ageorg is offline   Reply With Quote

Old   November 1, 2013, 09:04
Default
  #20
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 71
Rep Power: 4
sandy13 is on a distinguished road
Dear ageorg,
Thanks a gain for your help. My flow is laminar for my case, so, do I have to put the mean value in the code in this case?..
Best Wishes,
Sandy13
sandy13 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
swak4Foam: problem with a parabolic velocity profile Claudio87 OpenFOAM Pre-Processing 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


All times are GMT -4. The time now is 16:45.