Flow due to pressure

Clearly defined bug reports and their fixes
Post Reply
kevinarden
Posts: 1021
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Flow due to pressure

Post by kevinarden »

Been trying to model flow due to pressure differential without luck. So i built this simple test case and it appears to flow in the wrong direction, the velocities and pressures are negative as if it is flowing from lower pressure to higher pressure.
pressure_flow.zip
(257.75 KiB) Downloaded 40 times
pressure.png
(19.95 KiB) Not downloaded yet
velocity.png
(27.24 KiB) Not downloaded yet
mika
Posts: 194
Joined: 15 Sep 2009, 07:44

Re: Flow due to pressure

Post by mika »

Unfortunately the historical choice of some keywords may cause confusion.

The keyword "External Pressure" basically defines the surface traction (surface force) s applied to the fluid by the environment in terms of unit normal vector n to the boundary as s(n) = p_ext n. If we neglect viscous effects from consideration to approximate the stress tensor as -pI, we expect to see

s(n) = p_ext n => -p I n = -p n = p_ext n <=> -p = p_ext

Now the force exerted on the fluid over the "inlet" has the same direction as -ex and has larger magnitude than the positively directed force on the "outlet". Therefore I expect material to flow in the direction of -ex as seen.

-- Mika
kevinarden
Posts: 1021
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Flow due to pressure

Post by kevinarden »

How is the normal for the boundary determined? Why is the left one out of the fluid and the right on into the fluid?

If I changed it to Pressure 1 =

then the problem diverges.
mika
Posts: 194
Joined: 15 Sep 2009, 07:44

Re: Flow due to pressure

Post by mika »

On the other hand the keyword "Pressure i" defines directly the components of the traction vector s(n) with respect to the basis vectors of the global frame. In this case the normal is automatically directed by Elmer to point outwards from the body containing the fluid. To get the same problem by using the keyword "Pressure i" one must define

Boundary Condition 1
Target Boundaries(1) = 1
! External Pressure = 100001
Pressure 1 = -100001
End

Boundary Condition 2
Target Boundaries(1) = 2
Name = "outlet"
! External Pressure = 100000
Pressure 1 = 100000
End

The solution is essentially the same as obtained by using the original BCs. I think the solution is again what is expected, although it would have been better to replace the keyword name "pressure i" in the code by the name "surface traction i" or "surface force i".

Sometimes the orientation of the normal to a boundary must be defined by the user to get equations right. For this purpose there exists the keyword "Normal Target Body".

-- Mika
kevinarden
Posts: 1021
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Flow due to pressure

Post by kevinarden »

In order to get flow from the higher numerical pressur eto the lower numerical pressure I did this.

Boundary Condition 1
Target Boundaries(1) = 1
Name = "inlet"
Pressure 1 = 100001
End

Boundary Condition 2
Target Boundaries(1) = 2
Name = "outlet"
Pressure 1 = -100000
End
velocity.png
(29.22 KiB) Not downloaded yet
Post Reply