CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   How to properly set pressure inlet pressure. (https://www.cfd-online.com/Forums/main/234508-how-properly-set-pressure-inlet-pressure.html)

ansys_matt March 9, 2021 14:55

How to properly set pressure inlet pressure.
 
There are two kinds of inlet BCs I am wondering about: Velocity inlet and Pressure inlet.



For velocity inlets, we simply specify the velocity normal to the boundary. Simple.


A pressure inlet requires the stagnation pressure p0, which is given by



p0 = p + 1/2 * rho * V^2


Great. Now the question: in order to use the pressure inlet BC I have to know the pressure p and also the velocity - these are needed to calculate p0. But if I know V already, why wouldn't I just use a velocity inlet? If I don't know V, then how can I calculate p0 to give the solver a numerical value??

sbaffini March 10, 2021 01:35

Quote:

Originally Posted by ansys_matt (Post 798361)
There are two kinds of inlet BCs I am wondering about: Velocity inlet and Pressure inlet.



For velocity inlets, we simply specify the velocity normal to the boundary. Simple.


A pressure inlet requires the stagnation pressure p0, which is given by



p0 = p + 1/2 * rho * V^2


Great. Now the question: in order to use the pressure inlet BC I have to know the pressure p and also the velocity - these are needed to calculate p0. But if I know V already, why wouldn't I just use a velocity inlet? If I don't know V, then how can I calculate p0 to give the solver a numerical value??

There are four aspects to consider.

The first is that you might know the total pressure from an upstream reservoir assuming ideal behavior.

The second is that the pressure inlet, in fact, doesn't actually require you to know the velocity, which is instead extrapolated from the interior of the domain. So you won't have a fixed velocity at inlet with a pressure inlet.

The third is that, sometimes, one boundary conditions is just better instead of another (as indeed, they are different). Either in terms of stability/convergence or (despite the user first guess) accuracy in representing the physical scenario at hand.

The fourth, is that you should really put everything in a different perspective. From a mathematical point of view the boundary conditions are well defined. But once you get into the physics of it, the real experiment, the truth is that you don't actually know the boundary condition at all, not even the boundary where it is supposed to hold.

ansys_matt March 10, 2021 12:39

Quote:

Originally Posted by sbaffini (Post 798412)
There are four aspects to consider.

The first is that you might know the total pressure from an upstream reservoir assuming ideal behavior.

The second is that the pressure inlet, in fact, doesn't actually require you to know the velocity, which is instead extrapolated from the interior of the domain. So you won't have a fixed velocity at inlet with a pressure inlet.

The third is that, sometimes, one boundary conditions is just better instead of another (as indeed, they are different). Either in terms of stability/convergence or (despite the user first guess) accuracy in representing the physical scenario at hand.

The fourth, is that you should really put everything in a different perspective. From a mathematical point of view the boundary conditions are well defined. But once you get into the physics of it, the real experiment, the truth is that you don't actually know the boundary condition at all, not even the boundary where it is supposed to hold.


Thanks for the reply, sbaffini. However, I think you are not correct in your second comment. I have inserted the a picture of the documentation for the pressure inlet boundary condition from ANSYS. Note that ANSYS refers to the fluid mechanics quantity "stagnation pressure" as "total pressure" for some reason.

See equation 7.3-17? The documentation says we are to specify the "total pressure" which is p0, aka the stagnation pressure. But to specify a numerical value for p0, I must be able to calculate p0, which would involve knowing the velocity (v in equation 7.3-17). For definiteness, let's set up the BCs on this problem together:

Imagine a house with a single open window and an open chimney. We call the open window a pressure inlet and the open chimney a pressure outlet. There is a fire consuming air in the fireplace at the bottom of the chimney. So we have air coming into the domain through the open window, and combustion products exiting the domain through the chimney. The ANSYS documentation says that for a pressure outlet we only need to specify the static pressure, ps in equation 3.7-17. That is just the pressure of the atmosphere. So we set a numerical value of 101325 Pa (or zero gauge) because we assume sea level. But what about the pressure inlet boundary condition? We cannot simply use the static pressure ps, because according to the documentation we need p0, which we must calculate from knowledge of both ps and the velocity. What numerical value do we use here? Clearly, it is wrong to use 101325 Pa (or 0 gauge) because then we are assuming zero velocity according to equation 7.3-17. Certainly air has some velocity as it comes into the domain!

So you say we do not need to know the velocity, but then how would you assign a numerical value to the pressure inlet in this situation and conform to the ANSYS requirement of equation 7.3-17? I don't see how you can come up with a value without at least making some assumption about the velocity.





















https://i.imgur.com/5RPZGpa.png

LuckyTran March 10, 2021 14:12

Not all CFD software have the limitation that you cannot specify static pressure at the inlet. Mathematically, you can. But most robust commercial software will not let you do this and require you instead to specify the stagnation pressure.

But to double down on what sbaffini has written, there are reasons of posedness numerically which is closely linked to physical reality. There's no physical way to impose a static pressure at an inlet (unless it is a supersonic inlet). Many experimenters measure only static pressure at inlets when they run experiments due to neglect or ignorance (they should be measuring the total pressure). It's very easy to install wall static-pressure taps and get static pressure at inlets. It's not that much harder to get the total pressure either. Experimenters don't do a lot of things that don't get done.

In the example of a house with an open window and chimney, the correct real world boundary conditions is a stagnation pressure inlet (the stagnation pressure being the atmospheric pressure) and the outlet BC of the chimney is the static pressure outlet (with static pressure equal to atmospheric pressure). Btw this is a very good example! The flow source is a non-moving ambient. As soon as you open the window and flow starts flowing, its stagnation pressure stays the same but the static pressure at the window will drop to accommodate the incoming flow. This would be true for both a compressible and incompressible flow. So you see I don't need to assume anything about the velocity or static pressure...

If your problem is properly defined, you should be using a velocity inlet or stagnation pressure inlet.

ansys_matt March 10, 2021 14:28

Quote:

Originally Posted by LuckyTran (Post 798480)
Not all CFD software have the limitation that you cannot specify static pressure at the inlet. Mathematically, you can. But most robust commercial software will not let you do this and require you instead to specify the stagnation pressure.

But to double down on what sbaffini has written, there are reasons of posedness numerically which is closely linked to physical reality. There's no physical way to impose a static pressure at an inlet (unless it is a supersonic inlet). Many experimenters measure only static pressure at inlets when they run experiments due to neglect or ignorance (they should be measuring the total pressure). It's very easy to install wall static-pressure taps and get static pressure at inlets. It's not that much harder to get the total pressure either. Experimenters don't do a lot of things that don't get done.

In the example of a house with an open window and chimney, the correct real world boundary conditions is a stagnation pressure inlet (the stagnation pressure being the atmospheric pressure) and the outlet BC of the chimney is the static pressure outlet (with static pressure equal to atmospheric pressure). Btw this is a very good example! The flow source is a non-moving ambient. As soon as you open the window and flow starts flowing, its stagnation pressure stays the same but the static pressure at the window will drop to accommodate the incoming flow. This would be true for both a compressible and incompressible flow. So you see I don't need to assume anything about the velocity or static pressure...

If your problem is properly defined, you should be using a velocity inlet or stagnation pressure inlet.

Thanks LuckyTran. If I read you correctly, the best choice BC for the house situation is to specify zero gauge at both the inlet and outlet? So the idea is to specify the BC based on the conditions before the fluid starts flowing? Is that correct? I think I can live with that, since as you say once the fluid starts flowing the local static pressure at the inlet will drop as the velocity increases in such a way as to keep the total pressure the same. Is that right?

sbaffini March 10, 2021 17:32

Quote:

Originally Posted by ansys_matt (Post 798467)
Thanks for the reply, sbaffini. However, I think you are not correct in your second comment. I have inserted the a picture of the documentation for the pressure inlet boundary condition from ANSYS. Note that ANSYS refers to the fluid mechanics quantity "stagnation pressure" as "total pressure" for some reason.

See equation 7.3-17? The documentation says we are to specify the "total pressure" which is p0, aka the stagnation pressure. But to specify a numerical value for p0, I must be able to calculate p0, which would involve knowing the velocity (v in equation 7.3-17). For definiteness, let's set up the BCs on this problem together:

Imagine a house with a single open window and an open chimney. We call the open window a pressure inlet and the open chimney a pressure outlet. There is a fire consuming air in the fireplace at the bottom of the chimney. So we have air coming into the domain through the open window, and combustion products exiting the domain through the chimney. The ANSYS documentation says that for a pressure outlet we only need to specify the static pressure, ps in equation 3.7-17. That is just the pressure of the atmosphere. So we set a numerical value of 101325 Pa (or zero gauge) because we assume sea level. But what about the pressure inlet boundary condition? We cannot simply use the static pressure ps, because according to the documentation we need p0, which we must calculate from knowledge of both ps and the velocity. What numerical value do we use here? Clearly, it is wrong to use 101325 Pa (or 0 gauge) because then we are assuming zero velocity according to equation 7.3-17. Certainly air has some velocity as it comes into the domain!

So you say we do not need to know the velocity, but then how would you assign a numerical value to the pressure inlet in this situation and conform to the ANSYS requirement of equation 7.3-17? I don't see how you can come up with a value without at least making some assumption about the velocity.





















https://i.imgur.com/5RPZGpa.png

Yeah, I actually wrote my answer while having that page open in a second tab [emoji1]

What I wanted to say is that the pressure inlet somehow frees you from knowing the velocity explicitly and alone.

It is called stagnation pressure because it is the pressure that you would reach if the flow was isentropically put to rest or, more simply, the pressure in the stagnation point if Bernoully holds.

Knowing the total pressure is somehow simpler than knowing pressure alone and is also less restrictive.

ansys_matt March 10, 2021 19:39

Right. So I think we are clear on the pressure inlet BC. To summarize: The numerical value used in the pressure inlet BC is the pressure before flow starts, which is the stagnation or total pressure. As flow starts, the static pressure drops and the dynamic pressure increases but the total pressure remains the same.


As for the pressure outlet, the specification of the static pressure (in Fluent, the static pressure is specified at a pressure outlet, not the stagnation pressure) at an outlet must also be only for initial conditions because as soon as flow starts the local static pressure may change. I am not sure how the solver uses that numerical value for the BC after the flow starts, because it would seem the actual pressure at the outlet would be whatever propagates through the domain.

aero_head March 10, 2021 20:43

Quote:

Originally Posted by sbaffini (Post 798497)
Yeah, I actually wrote my answer while having that page open in a second tab [emoji1]

What I wanted to say is that the pressure inlet somehow frees you from knowing the velocity explicitly and alone.

It is called stagnation pressure because it is the pressure that you would reach if the flow was isentropically put to rest or, more simply, the pressure in the stagnation point if Bernoully holds.

Knowing the total pressure is somehow simpler than knowing pressure alone and is also less restrictive.

I scrolled a very long way just to like your reply.

sbaffini March 11, 2021 02:59

Quote:

Originally Posted by ansys_matt (Post 798501)
Right. So I think we are clear on the pressure inlet BC. To summarize: The numerical value used in the pressure inlet BC is the pressure before flow starts, which is the stagnation or total pressure. As flow starts, the static pressure drops and the dynamic pressure increases but the total pressure remains the same.


As for the pressure outlet, the specification of the static pressure (in Fluent, the static pressure is specified at a pressure outlet, not the stagnation pressure) at an outlet must also be only for initial conditions because as soon as flow starts the local static pressure may change. I am not sure how the solver uses that numerical value for the BC after the flow starts, because it would seem the actual pressure at the outlet would be whatever propagates through the domain.

I would not put that in terms of time, as the boundary value you pick will stay so during the whole simulation. It is just at inlet that, not having a specification for each single quantity, they will be free to change, the sum being fixed.

AtoHM March 11, 2021 04:53

Quote:

Originally Posted by ansys_matt (Post 798501)

As for the pressure outlet, the specification of the static pressure (in Fluent, the static pressure is specified at a pressure outlet, not the stagnation pressure) at an outlet must also be only for initial conditions because as soon as flow starts the local static pressure may change. I am not sure how the solver uses that numerical value for the BC after the flow starts, because it would seem the actual pressure at the outlet would be whatever propagates through the domain.


If that would be true - how could you ever perform a simulation with a meaningful result? For example you have an atmospheric outlet pressure (static). Now, your solver changes that value to something else. Wouldn't make sense. As sbaffini pointed out, boundaries stay the same, at least until we let the "machines" take over and decide what we like to simulate :) Also I see it the other way around, you fix it at the outlet and what happens at the inlet is what propagates back in accordance with the inlet boundary condition and how the geometry interacts with the flow.

LuckyTran March 11, 2021 06:48

Quote:

Originally Posted by ansys_matt (Post 798501)
As for the pressure outlet, the specification of the static pressure (in Fluent, the static pressure is specified at a pressure outlet, not the stagnation pressure) at an outlet must also be only for initial conditions because as soon as flow starts the local static pressure may change. I am not sure how the solver uses that numerical value for the BC after the flow starts, because it would seem the actual pressure at the outlet would be whatever propagates through the domain.


At outlets you still want to fix the static pressure and not the stagnation pressure.



It's already been mentioned several times but stuff happening at an outlet can propagate back upstream and influence the flow at the inlet. That's why you can't simply fix the inlet static pressure if you follow the physics. Mathematically you can.


The chimney example is not a good one for why the outlet BC needs to be a static pressure. Yes the flow static pressure at the chimney exit will be slightly above atmospheric. Really you should place your boundary where the static pressure actually is the atmospheric pressure or go and measure the static pressure at the chimney before you ever want to simulate it this way with the exit at the chimney.


All times are GMT -4. The time now is 05:41.