# Same pressure gradient but different velocity field

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

 April 19, 2018, 19:35 Same pressure gradient but different velocity field #1 Senior Member   Join Date: Oct 2017 Location: United States Posts: 233 Blog Entries: 1 Rep Power: 9 Hello guys, I am running a simple steady-state laminar case within a cubic box in openFoam with fixed static pressure. When I assign fixed static pressure at inlet, let's say with constant pressure gradient = 1, and it will generate large velocity within the domain. When I specified total pressure at the inlet which will result same static pressure gradient = 1 in the end, yet the velocity field is way more smaller than the previous one. I am confused: since the static pressure gradients at steady-state for both cases are exactly the same, and the purpose of pressure gradient is balancing the viscous force, so I think both cases should have same velocity fields. However the computations give complete different results. Why is that? ----------- I am using SIMPLE algorithm solving a simple laminar flow in a box, so it will be a 1D flow. I compare the results from 2 different BCs: 1. fixed static pressure at inlet; 2. fixed total pressure at inlet. And fixed static pressure at outlet for both cases. First one will give a constant pressure difference of 1. 2nd one has pressure difference of 3.8 initially and will reduce to 1 when the flow reaches steady state. Since pressure gradient is solely balancing with viscous force, these 2 cases has exactly static pressure difference(or pressure gradient), it should have same velocity field. However, my results shows that the 1st case gives a much larger velocity field. I have no idea why this is happening. Last edited by TurbJet; April 23, 2018 at 14:00.

 April 22, 2018, 21:59 #2 Senior Member   Join Date: Oct 2017 Location: United States Posts: 233 Blog Entries: 1 Rep Power: 9 Can anybody help me out here?

 April 23, 2018, 03:34 #3 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 I don't understand your problem without more details. What type of formulation are you using?

April 23, 2018, 13:58
#4
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro I don't understand your problem without more details. What type of formulation are you using?
I am using SIMPLE algorithm solving a simple laminar flow in a box, so it will be a 1D flow. I compare the results from 2 different BCs:

1. fixed static pressure at inlet;
2. fixed total pressure at inlet.

And fixed static pressure at outlet for both cases. First one will give a constant pressure difference of 1. 2nd one has pressure difference of 3.8 initially and will reduce to 1 when the flow reaches steady state.

Since pressure gradient is solely balancing with viscous force, these 2 cases has exactly static pressure difference(or pressure gradient), it should have same velocity field.

However, my results shows that the 1st case gives a much larger velocity field. I have no idea why this is happening.

 April 23, 2018, 14:05 #5 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,793 Rep Power: 71 In summary, you have an incompressible flow at a steady state but I don't knwo if you have up and down walls. Remember that for incompressible flow you have not thermodinamic meaning of the pressure and the realtion between static and total pressure p0=p+ k =constant is valid only in absence of dissipative effects therefore assuming regular inviscid flows

April 23, 2018, 14:18
#6
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro In summary, you have an incompressible flow at a steady state but I don't knwo if you have up and down walls. Remember that for incompressible flow you have not thermodinamic meaning of the pressure and the realtion between static and total pressure p0=p+ k =constant is valid only in absence of dissipative effects therefore assuming regular inviscid flows
yes, I have up & down walls, it's a cubic box.

I am not sure I understand your point. My pressures are not constant. My pressure gradient is constant.

April 23, 2018, 14:27
#7
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by TurbJet yes, I have up & down walls, it's a cubic box. I am not sure I understand your point. My pressures are not constant. My pressure gradient is constant.
For incompressible flows you set either velocity or pressure as BC.s. If you set at the inlet a static pressure you do not set the velocity profile that must be computed from the solution developing in the interior. Of course, if you set the total pressure (sum of static and dynamic pressure) you should have difference in the generated velocity profile. That depends on the way you set the outlet and the global pressure difference acts.

April 23, 2018, 14:28
#8
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro In summary, you have an incompressible flow at a steady state but I don't knwo if you have up and down walls. Remember that for incompressible flow you have not thermodinamic meaning of the pressure and the realtion between static and total pressure p0=p+ k =constant is valid only in absence of dissipative effects therefore assuming regular inviscid flows
However, what baffles me is that, since both cases have same pressure gradient at steady state, the velocity field should be the same to have the same viscous force, so that it can balance the pressure gradient.

April 23, 2018, 14:34
#9
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by TurbJet Do you mean that with viscous flow, the total pressure will no longer be equal with static plus dynamic? However, what baffles me is that, since both cases have same pressure gradient at steady state, the velocity field should be the same to have the same Laplacian of velocity, or the viscous force.
Immagine the Poiseuille 2D solution, the pressure derivative in x is balanced by the second derivative of u along y. Both terms are constant. The solution depends on a constant that give you the flow rate for a given Reynolds number.
IF you want to work setting only the pressure at the inlet and outlet you need to know that the difference gives the flow rate.

April 23, 2018, 14:43
#10
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro Immagine the Poiseuille 2D solution, the pressure derivative in x is balanced by the second derivative of u along y. Both terms are constant.
I can understand this part. But I can't understand this part:

Quote:
 Originally Posted by FMDenaro The solution depends on a constant that give you the flow rate for a given Reynolds number.IF you want to work setting only the pressure at the inlet and outlet you need to know that the difference gives the flow rate.

April 23, 2018, 14:46
#11
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by TurbJet I can understand this part. But I can't understand this part:

Since the second derivative is constant, the velocity is parabolic u(y)=c0+c1*y+c2*y^2. Two conditions are determined by the no slip condition at the walls but the third depends on the flow rate, that is on the max velocity at the centerline. Therefore you need to provide a third condition by setting the difference p_outlet - p_inlet

April 23, 2018, 14:52
#12
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro Since the second derivative is constant, the velocity is parabolic u(y)=c0+c1*y+c2*y^2. Two conditions are determined by the no slip condition at the walls but the third depends on the flow rate, that is on the max velocity at the centerline. Therefore you need to provide a third condition by setting the difference p_outlet - p_inlet

But just as I stated, eventually, both cases will have same p_out - p_in. It should give the same c0.

I am thinking about, with constant pressure gradient (the 1st case), would it be possible that it is solving NS incorrectly? Since pressure gradient is constant, basically it is solving NS without pressure term.

April 23, 2018, 15:11
#13
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by TurbJet Oh, I see your point. But just as I stated, eventually, both cases will have same p_out - p_in. It should give the same c0. I am thinking about, with constant pressure gradient (the 1st case), would it be possible that it is solving NS incorrectly? Since pressure gradient is constant, basically it is solving NS without pressure term.

Yes. Setting the static pressure difference between inlet and outlet and fixing the Re number will give you the third condition. Of course, owing to the dissipative effects, also the total pressure has a loss.

April 23, 2018, 15:17
#14
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro Yes. Setting the static pressure difference between inlet and outlet and fixing the Re number will give you the third condition. Of course, owing to the dissipative effects, also the total pressure has a loss.
I feel we have drifted from my original question, or maybe I didn't have a good understand of your points.

Let's simplify my question to:
with same pressure gradient at steady state, why these 2 cases have different velocity field?

1st case has much larger velocity, which means it has much larger velocity gradient along y-direction to balance the pressure gradient; 2nd case has smaller velocity gradient along y-direction, which means the pressure gradient only needs smaller viscous force to balance. So which one is correct?

April 23, 2018, 15:21
#15
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by TurbJet I feel we have drifted from my original question, or maybe I didn't have a good understand of your points. Let's simplify my question to: with same pressure gradient at steady state, why these 2 cases have different velocity field? 1st case has much larger velocity, which means it has much larger velocity gradient along y-direction to balance the pressure gradient; 2nd case has smaller velocity gradient along y-direction, which means the pressure gradient only needs smaller viscous force to balance. So which one is correct?

Well, if the two velocity profiles are different, the integrals are different too and hence the flow rates are different. That corresponds to a different (p_outlet-p_inlet) values. Hence, you are setting different problems. Check some bug in the setting.

April 23, 2018, 16:01
#16
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro Well, if the two velocity profiles are different, the integrals are different too and hence the flow rates are different. That corresponds to a different (p_outlet-p_inlet) values. Hence, you are setting different problems. Check some bug in the setting.
I double checked, and I don't think I have bugs in my settings.

April 23, 2018, 16:14
#17
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by TurbJet I double checked, and I don't think I have bugs in my settings.
Analytically there is only a different pressure difference that produces a different flow rate.
The first thing to assess is if the two velocity profiles are both a parabola or one of them is wrong. If they are both a parabola with different max values, the setting of the pressure gives a different flow rates and you have to check what happens. Of course check also that at the steady state the vertical velocity is always zero and the continuity equation is satisfied.

April 23, 2018, 16:19
#18
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro Analytically there is only a different pressure difference that produces a different flow rate. The first thing to assess is if the two velocity profiles are both a parabola or one of them is wrong. If they are both a parabola with different max values, the setting of the pressure gives a different flow rates and you have to check what happens. Of course check also that at the steady state the vertical velocity is always zero and the continuity equation is satisfied.
um...... I guess that's the problem. I've always have a hard time having the 1st case to converge, especially for velocity in x-direction and y-direction. And the cumulative errors in continuity is around ~0.002 (not a small number).

So maybe the 1st case will result in incorrect solutions?

April 23, 2018, 16:27
#19
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,793
Rep Power: 71
Quote:
 Originally Posted by TurbJet um...... I guess that's the problem. I've always have a hard time having the 1st case to converge, especially for velocity in x-direction and y-direction. And the cumulative errors in continuity is around ~0.002 (not a small number). So maybe the 1st case will result in incorrect solutions?

You have an analytical solution, you can check all you want to assess which solution is correct

April 23, 2018, 19:32
#20
Senior Member

Join Date: Oct 2017
Location: United States
Posts: 233
Blog Entries: 1
Rep Power: 9
Quote:
 Originally Posted by FMDenaro You have an analytical solution, you can check all you want to assess which solution is correct
I kind of figured this out. 1st case will be Poiseuille flow and it follows the parabola profile. But for 2nd case, it's not Poiseuill flow, the velocity profile will not be parabola. It has much larger gradient at near wall region to balance the pressure gradient, so the entire velocity field is smaller than the 1st case.