CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Compressible Flow using buoyantSimpleFoam (http://www.cfd-online.com/Forums/openfoam-solving/99962-compressible-flow-using-buoyantsimplefoam.html)

 klio April 17, 2012 02:21

Compressible Flow using buoyantSimpleFoam

1 Attachment(s)
HI @ all!

I want to simulate a simple compressiple pipe flow with given pressure and higher tempreture at the inlet using kEpsilon Model with buoyantSimpleFoam.

How do I set BC at p_rgh, when pressure inlet goes in z-direction!

p = p_rgh + rho*g*z

In my case it would be p-rgh = 0.5 - 1.225*-9.81*0.1 --> 0.701

But if i set up the BC of p_rgh with 0.7 it either crashes (when p is 0 but 0.5 at inlet) or it p_rho dosen't converge (when p is 1e-5 but 0.5 at inlet)!

 soonic April 17, 2012 03:24

http://www.cfd-online.com/Forums/ope...rgh-1-7-a.html

I'll check the rest later today...

 klio April 17, 2012 05:16

Ok thank you but I just want to know if I had understood everything correctly:

So because of my fixed pressure inlet I have to set that in p_rgh after that i have to calculate p with the formula and in my case the pressure p is negative because of positive direction of the flow.

my questions:

1. did I understand everything right?

2. do i have to calc p separately at every boundary?

3. is h half of my height?

thank you! :rolleyes:

ps: with gravity in y direction this sim will never be correct ...

 soonic April 17, 2012 05:29

is the buoyant effect significant in your case? what kind of fluid do you count on ?

 klio April 17, 2012 08:21

Its like last time a simple air flow and it is not significant!

It is just a test case for my understanding that i can do my work when i get my new mesh! :)
And i wanted to know what i did wrong in my bc.

Which pressure is now the pressure that drives my flow? p? but if it is p i have to set same bc as last time (inlet 0.5, outlet 0) and then my simulation chrashes.

Now i did this:

P

internalField uniform -1.2017;

inlet
type fixedValue;
value uniform 0.5;

outlet
type fixedValue;
value uniform -1.2017;

wall

P_rgh

internalField uniform 0;

inlet
type buoyantPressure;
rho rho;
value uniform 0.5;

outlet
type buoyantPressure;
rho rho;
value uniform 0;

wall

and then OpenFoam says to me that I have no mass outflow --> i changed BC --> got wrong pressure --> sim also not correct and diverges
:(

 raghu.tejaswi April 17, 2012 10:28

Just a question:
buoyantSimpleFoam used to analyse heat transfer right?
What is this buoyancy here actually? In what conditions can we use buoyantSimpleFoam.
I want to use it for a simple heat transfer between 2 parallel plates (as an incompressible case, steady-state).
Would you suggest some other solver? I have tried buoyantBoussinessqSimpleFoam but it doesnt seem to give me the right results as in FLUENT.

Thanks.

 klio April 18, 2012 02:24

Quote:
 Originally Posted by raghu.tejaswi (Post 355174) Just a question: buoyantSimpleFoam used to analyse heat transfer right? What is this buoyancy here actually? In what conditions can we use buoyantSimpleFoam. I want to use it for a simple heat transfer between 2 parallel plates (as an incompressible case, steady-state). Would you suggest some other solver? I have tried buoyantBoussinessqSimpleFoam but it doesnt seem to give me the right results as in FLUENT. Thanks.
You can use buoyantSimpleFoam for compressible heat transfer! I guess buoyantBoussinessqSimpleFoam will be the right solver for your sim but don't ask me how to use it :rolleyes:. Now I try to find how to setup heat transfer sims!

 soonic April 18, 2012 07:59

1 Attachment(s)
Hello Kilo

I am sorry I cannot reproduce your ideas.

I had a look at my pipe I used before to drive the flow with pressure bc. I simply took the case what works. I had a look at buoyantSimpleFoam tutorials and chosen the circuitBoard and analyze and identify those two pressures. By colors in paraview. It seemed to me, that p is the pressure field based on pressure stratification in g direction due to change in density. So the other one could be the one which will drive the flow.

So p from simpleFoam test case will be p_rgh in that case. When you check the dimensions it is not p/rho anymore. I guess in buoyant case, the rho is not constant anymore and is computed. right ?

I set BCs. Imagine the U to be in turbulent regime, compute p on that speed as inlet pressure which drives the flow. (hope so)
Compute approximate k and €, the solution is still sensitive on that.
Set p to absolute value what computes the ammount of bouyant forces in that case. (hope so)
Set p_rgh for the pressure p (not p/rho). I set it as fixedValue. I do not know what type buoyantPressure does.
Set T and U correctly or as you want.

fv* files from old simpleFoam case without change will not work for buoyantSimpleFoam. Check it on your own to see why. Then I compared fvSchemes and fvSolution from old case and tutorial case and mix it upon best performance trying several combinantions and simulation runs. I do not see into solution settings too much. It is just trying from my side. But, I can try to test cases by myself. Why not...

check also constant folder for appropriate files and values. (as usual...)

see attached case again...

good luck

 klio April 18, 2012 08:52

Ok thanks for all the input!

How did you calculate p and p_rho ? (which values would be comparable with total pressure 0.5 like it was in the first simpleFoam case?)

I really do not understand why this values are so high!

I thought: p = prgh + r*g*h --> your pipe is 0,1 m high so the hydraulic pressure is about 1.225*-9.81*0.1 ~ -1.2 --> if p_rgh is 0.5 then p = -0.7 ????????

I also thought I've understood the explanations in the thread you've posted but it seems not so!

 soonic April 18, 2012 10:58

oh sorry, I forgot.

Quote:
 Originally Posted by The King (Post 308037) To understand the different pressures, look at Bernoulli: Dynamic pressure --> 1/2*rho*v^2 Hydraulic pressure--> rho*g*h Static pressure --> p 1/2*rho*v^2 + rho*g*h + p = Constant From the openFoam site, p_rgh = p - rho*g*h. So, p_rgh is the static pressure minus the hydraulic pressure, based on a arbitrary height. I do not understand where the dynamic pressure came into this discussion. I think it has nothing to do p_rgh. Dynamic pressure is the pressure of the moving fluid and it will convert into static pressure if you bring the velocity of the fluid to zero. Conservation of energy, back to Bernoulli. Good to know: To get my VOF model working, I placed in the fvSolutions file under the PISO solver pRefPoint (0.0 0.0 0.0); pRefValue 1e5; Succes!

Let us have a horizontal pipe with pressure driven flow.
From the thread we know, that p is static pressure. I set it to be ~1atm.

It could be more clear, when you write down the bernoulli eq. on the outside of the inlet and a point in pipe.
A - inlet; B - in pipe

pA + rho/2 wA^2 + rho*g*hA = pB + rho/2 wB^2 + rho*g*hB
at the inlet:
pA = 1 atm ~ 101kPa
wA = 0 m/s
hA = zero as refference

in pipe:
pB = 1 atm ~ 101kPa
wB = non-zero
hB = hA

(I was wrong about dynamic pressure before. It is the same expression, but it should come from that bernoulli equation!)

The question is, what pA should you set to have wB at desired value ? hm ? :)

that pA should be set on the inlet boundary in p_rgh because rgh = 0, and maybe in p boundary file too. try it. It took few minutes. Having vertical pipe should make some h in those terms. But the value coul be much smaller than value of other terms..

Maybe check the case with no pressure gradient, no flow to see how the pressure stratificate over the height of domain. Change orientation (by g vector), values.. And add some velocity on the inlet to see what is to be done with pressures. You could analyze it on your own. Results could be interesting.

 klio April 19, 2012 16:12

Jey!!!!

Thanks a lot .... I think I got it. :)

 All times are GMT -4. The time now is 01:34.