NS solver: sign of the pressure.

Numerical methods and mathematical models of Elmer
Post Reply
martijn
Posts: 25
Joined: 05 Oct 2009, 21:30

NS solver: sign of the pressure.

Post by martijn »

Hi,
I made a simulation of the air flow in a cylindrical gap. High pressure (500000Pa) in the centre (@0.1mm), low pressure (100000) at the edge (@3.5mm). The simulations results are shown below. The results show that the signs of the pressure and consequently the flow direction are reversed. Air is flowing from the edge to the centre instead of the other way around. Since the NS equations are non-linear, I can not just revert the signs to obtain the correct solution.
How is the pressure defined in Elmer? Can I just reverse the sign in the SIF file or enable the normal/tangential switch to obtain the right results?
analyse_small.png
analyse_small.png (65.5 KiB) Viewed 3649 times
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: NS solver: sign of the pressure.

Post by raback »

Hi Martijn

Pressure is defined as the solution to the N-S equations where pressure appears most importantly in a force term as -grad(p) i.e. flow tends from high to low pressure. Sharing the sif file here would help in analyzing the problem.

-Peter
martijn
Posts: 25
Joined: 05 Oct 2009, 21:30

Re: NS solver: sign of the pressure.

Post by martijn »

Hi Peter and all the others,
The signs of the pressure gradient and velocity are consistent. I just don't understand why the pressure is negative while I defined it positive in the SIF file:

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 4
  Coordinate System = Axi Symmetric
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
End

...

Solver 1
  Equation = Navier-Stokes
  Procedure = "FlowSolve" "FlowSolver"
  Variable = Flow Solution[Velocity:2 Pressure:1]
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-4
  ...
End

...

Boundary Condition 1
  Target Boundaries(1) = 1
  Name = "flow in"
  External Pressure = 500000
End

Boundary Condition 2
  Target Boundaries(1) = 2
  Name = "wall"
  Noslip wall BC = True
End

Boundary Condition 3
  Target Boundaries(1) = 3
  Name = "flow out"
  External Pressure = 100000
End

Boundary Condition 4
  Target Boundaries(1) = 4
  Name = "wall"
  Noslip wall BC = True
End
Flow out / boundary 3 is the right side, flow in / boundary 1 the left. The full sif file has been attached. The project directory can be downloaded from http://martijn.dynalias.org/files/gap.tar.bz2
Attachments
case.sif
(2.24 KiB) Downloaded 284 times
martijn
Posts: 25
Joined: 05 Oct 2009, 21:30

Re: NS solver: sign of the pressure.

Post by martijn »

I have been able to work arround this problem by specifying the size of the pressure commonents instead of defining an external pressure. So it works, the I still would like to know the cause.
Juha
Site Admin
Posts: 357
Joined: 21 Aug 2009, 15:11

Re: NS solver: sign of the pressure.

Post by Juha »

Hi,

the "External Pressure" is in the direction of the outward normal,
while "Pressure 1", for example, is in the direction of positive
x-axis. Might this be the effect you are seeing ?

Regards, Juha
Post Reply