CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   3D parabolic inflow profile (http://www.cfd-online.com/Forums/openfoam-pre-processing/122805-3d-parabolic-inflow-profile.html)

ageorg August 28, 2013 10:34

3D parabolic inflow profile
 
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

nimasam August 29, 2013 14:41

search for

1- code stream
2- groovyBC

you will find how to do it ;)

ageorg August 30, 2013 05:19

groovyBC
 
Thanks for the advise I will search for the things you suggest!

sandy13 October 28, 2013 12:56

Quote:

Originally Posted by ageorg (Post 448859)
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,

ageorg October 28, 2013 18:32

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.

;)

sandy13 October 29, 2013 05:41

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,

ageorg October 29, 2013 05:47

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.

sandy13 October 29, 2013 07:27

Quote:

Originally Posted by ageorg (Post 459591)
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 October 30, 2013 05:56

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,

ageorg October 30, 2013 09:16

3D parabolic Inlet Profile
 
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.

sandy13 October 30, 2013 12:40

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,

ageorg October 30, 2013 12:44

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...

sandy13 October 30, 2013 13:05

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,

ageorg October 30, 2013 13:13

Average velocity in circular pipes is half the maximum
So use your half value of the one you calculated with your Re number.....

sandy13 October 30, 2013 14:04

1 Attachment(s)
Quote:

Originally Posted by ageorg (Post 459902)
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,

ageorg October 30, 2013 20:12

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.

sandy13 October 31, 2013 09:55

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 October 31, 2013 09:57

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

ageorg October 31, 2013 11:32

If your flow is turbulent then try to put 2 times the mean velocity in the code I send you and it should work....

sandy13 November 1, 2013 09:04

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


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