Navier-Stokes Solver

Numerical methods and mathematical models of Elmer
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Navier-Stokes Solver

Post by hamed »

Dear Elmer group
Hi
I’m working on a very simple axisymmetric model of tube with Navier-Stokes Solver.
I apply pressure=5000 pa in the inlet and pressure=0 pa in the outlet.
While the case seems really simple, it does not converge. Can you please help me solve this problem?
Thanks, Hamed
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Navier-Stokes Solver

Post by mzenker »

Hi Hamed,

I cannot help personally since I have never used the NS solver. But I think you should post your case here (mesh and sif files) in order to enable others with NS knowledge to have a look at it.

Matthias
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Re: Navier-Stokes Solver

Post by hamed »

Hi Matthias
Here is the test case.
Thanks for your help, Hamed
Attachments
ToELMER.rar
(52.87 KiB) Downloaded 339 times
dmitry
Posts: 53
Joined: 09 Dec 2014, 16:52
Antispam: Yes
Location: Russia

Re: Navier-Stokes Solver

Post by dmitry »

Hi Hamed!
Thetr was no second velosity component given for inlet.
See code below

Code: Select all

Header
  
Mesh DB "." "TubeMesh"

End



Constants

End



Simulation
  
Coordinate System = Axi Symmetric
  
Simulation Type = Steady State
Steady State Max Iterations = 50
Steady State Min Iterations = 2
Output Intervals = 1
Post File = "Stenosis.ep"

End



Body 1
  
Equation = 1
  
Material = 1

End



Material 1
   
Density = 1000.0
   
Viscosity = 0.004
   
End



Solver 1
  
Equation = Navier-Stokes
  
Stabilize = True
  
Linear System Solver = Iterative
  
Linear System Iterative Method = BiCGStabl
  
Linear System Preconditioning = ILU1
  
Linear System Max Iterations = 500
  
Linear System Convergence Tolerance = 1.0e-8
  
Nonlinear System Max Iterations = 10
  
Nonlinear System Convergence Tolerance = 1.0e-5
  
Nonlinear System Newton After Tolerance = 1.0e-5
  
Nonlinear System Newton After Iterations = 20
  
Nonlinear System Relaxation Factor = 0.7
  
Steady State Convergence Tolerance = 1.0e-4

End



Equation 1
  
Active Solvers(1) = 1  
End



! inlet
Boundary Condition 1
  
Target Boundaries = 1

Velocity 1 = 0
Velocity 2 = 1
Pressure = 5000.0
  
End



! outlet
Boundary Condition 2
  
Target Boundaries = 3  
Velocity 1 = 0.0

Pressure = 0.0
  
End






! symmetriy
Boundary Condition 3
  
Target Boundaries = 4  
Velocity 1 = 0.0
  
End

! Wall 
Boundary Condition 4
  
Target Boundaries = 2  
Velocity 1 = 0.0
Velocity 2 = 0.0  
End



hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Re: Navier-Stokes Solver

Post by hamed »

Hi dmitry
Thanks for your comment. But the inlet velocity is not 1 or anything else prescribed. It's actually a part of solution.
I hope Peter read this post and help me.
Thanks, Hamed
annier
Posts: 1169
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Navier-Stokes Solver

Post by annier »

Hi Hamed,
I cannot open the attached .rar file in my Ubuntu 14.04 desktop. can you attach it in .gz version (so that it would be convenient for your targeted commenters)?
I am thankful to Dmitry for making the SIF file available on behalf of Hamed. Cheers.


Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
hamed
Posts: 110
Joined: 12 Oct 2009, 18:28

Re: Navier-Stokes Solver

Post by hamed »

Hi Anil
Thanks for your kind attention.
I attached the .tgz file.
Best regards, Hamed
Attachments
ToELMER.tgz
(59.47 KiB) Downloaded 348 times
annier
Posts: 1169
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Navier-Stokes Solver

Post by annier »

Hi Hamed,
Your convergence issue is defined as:

Code: Select all

  IterSolver: Using iterative method: bicgstab
CRS_IncompleteLU: ILU(1) (Real), Starting Factorization:
CRS_IncompleteLU: ILU(1) (Real), NOF nonzeros:     81226
CRS_IncompleteLU: ILU(1) (Real), filling (%) :       137
CRS_IncompleteLU: ILU(1) (Real), Factorization ready at (s):     0.00
     1 0.1124E+05
       2 0.7514E+04
       3 0.5889E+04
       4 0.1708E+05
       5 0.3866E+04
       6 0.2429E+04
       7 0.2580E+04
       8 0.2275E+04
       9 0.3035E+04
      10 0.1031E+06
      11 0.2049E+04
      12 0.1822E+04
      13 0.2328E+04
      14 0.1327E+04
      15 0.1211E+04
      16 0.1222E+04
      17 0.1139E+04
      18 0.1130E+04
      19 0.1147E+04
      20 0.1106E+04
      21 0.1089E+04
      22 0.1182E+04
      23 0.1358E+04
      24 0.1402E+04
      25 0.1570E+04
      26 0.1381E+04
      27 0.1409E+04
      28 0.6168E+03
      29 0.5025E+03
      30 0.2913E+03
      31 0.3302E+03
      32 0.1333E+03
      33 0.1059E+03
      34 0.1962E+03
      35 0.8856E+02
      36 0.8878E+02
      37 0.9958E+02
      38 0.9659E+02
      39 0.3875E+02
      40 0.3510E+03
      41 0.3105E+03
      42 0.3118E+03
      43 0.3135E+03
      44 0.2634E+03
      45 0.7139E+02
      46 0.6194E+02
      47 0.6374E+02
      48 0.1161E+03
      49 0.5760E+01
      50 0.5687E+01
      51 0.1241E+01
      52 0.1185E+01
      53 0.1287E+01
      54 0.9660E-01
      55 0.1075E+00
      56 0.5053E-01
      57 0.3380E-01
      58 0.2505E-01
      59 0.2436E-01
      60 0.2422E-01
      61 0.1878E-01
      62 0.1883E-01
      63 0.1655E+00
      64 0.4446E-01
      65 0.1493E-02
      66 0.1373E-02
      67 0.1298E-02
      68 0.1621E-02
      69 0.1719E-02
      70 0.4436E-03
      71 0.5970E-03
      72 0.8140E-03
      73 0.1712E-03
      74 0.1372E-04
      75 0.2752E-04
      76 0.2608E-04
      77 0.2598E-04
      78 0.3635E-03
      79 0.3873E-04
      80 0.3631E-04
      81 0.9381E-04
      82 0.7828E-04
      83 0.1010E-03
      84 0.9913E-04
      85 0.9599E-04
      86 0.1026E-03
      87 0.3557E-04
      88 0.3782E-04
      89 0.4027E-04
      90 0.3586E-03
      91 0.8586E-05
      92 0.8552E-05
      93 0.7416E-05
      94 0.6277E-05
      95 0.1689E-05
      96 0.1410E-05
      97 0.1916E-05
      98 0.1727E-05
      99 0.1453E-05
     100 0.1964E-05
     101 0.1968E-05
     102 0.1677E-05
     103 0.3624E-06
     104 0.3147E-06
     105 0.3398E-06
     106 0.3393E-06
     107 0.3394E-06
     108 0.3979E-06
     109 0.3284E-06
     110 0.3265E-06
     111 0.2866E-06
     112 0.2866E-06
     113 0.2835E-06
     114 0.2844E-06
     115 0.2838E-06
     116 0.2838E-06
     117 0.2838E-06
     118 0.2838E-06
     119 0.2838E-06
     120 0.2838E-06
     121 0.2838E-06
     122 0.2838E-06
     123 0.2838E-06
     124 0.2838E-06
     125 0.2838E-06
     126 0.2838E-06
     127 0.2838E-06
     128 0.2838E-06
     129 0.2838E-06
     130 0.2838E-06
     131 0.2838E-06
     132 0.2838E-06
     133 0.2838E-06
     134 0.2838E-06
     135 0.2838E-06
     136 0.2838E-06
     137 0.2838E-06
     138 0.2838E-06
     139 0.2838E-06
     140 0.2838E-06
     141 0.2838E-06
     142 0.2838E-06
     143 0.2838E-06
     144 0.2838E-06
     145 0.2838E-06
     146 0.2838E-06
     147 0.2838E-06
     148 0.2838E-06
     149 0.2838E-06
     150 0.2838E-06
     151 0.2838E-06
     152 0.2838E-06
     153 0.2838E-06
     154 0.2838E-06
     155 0.2838E-06
     156 0.2838E-06
     157 0.2838E-06
     158 0.2838E-06
     159 0.2838E-06
     160 0.2838E-06
     161 0.2838E-06
     162 0.2838E-06
     163 0.2838E-06
     164 0.2838E-06
     165 0.2838E-06
     166 0.2838E-06
     167 0.2838E-06
     168 0.2838E-06
     169 0.2838E-06
     170 0.2838E-06
     171 0.2838E-06
     172 0.2838E-06
     173 0.2838E-06
     174 0.2838E-06
     175 0.2838E-06
     176 0.2838E-06
     177 0.2838E-06
     178 0.2838E-06
     179 0.2838E-06
     180 0.2838E-06
     181 0.2838E-06
     182 0.2838E-06
     183 0.2838E-06
     184 0.2838E-06
     185 0.2838E-06
     186 0.2838E-06
     187 0.2838E-06
     188 0.2838E-06
     189 0.2838E-06
     190 0.2838E-06
     191 0.2838E-06
     192 0.2838E-06
     193 0.2838E-06
     194 0.2838E-06
     195 0.2838E-06
     196 0.2838E-06
     197 0.2838E-06
     198 0.2838E-06
     199 0.2838E-06
     200 0.2838E-06
     201 0.2838E-06
     202 0.2838E-06
     203 0.2838E-06
     204 0.2838E-06
     205 0.2838E-06
     206 0.2838E-06
     207 0.2838E-06
     208 0.2838E-06
     209 0.2838E-06
     210 0.2838E-06
     211 0.2838E-06
     212 0.2838E-06
     213 0.2838E-06
     214 0.2838E-06
     215 0.2838E-06
     216 0.2838E-06
     217 0.2838E-06
     218 0.2838E-06
     219 0.2838E-06
     220 0.2838E-06
     221 0.2838E-06
     222 0.2838E-06
     223 0.2838E-06
     224 0.2838E-06
     225 0.2838E-06
     226 0.2838E-06
     227 0.2838E-06
     228 0.2838E-06
     229 0.2838E-06
     230 0.2838E-06
     231 0.2838E-06
     232 0.2838E-06
     233 0.2838E-06
     234 0.2838E-06
     235 0.2838E-06
     236 0.2838E-06
     237 0.2838E-06
     238 0.2838E-06
     239 0.2838E-06
     240 0.2838E-06
     241 0.2838E-06
     242 0.2838E-06
     243 0.2838E-06
     244 0.2838E-06
     245 0.2838E-06
     246 0.2838E-06
     247 0.2838E-06
     248 0.2838E-06
     249 0.2838E-06
     250 0.2838E-06
     251 0.2838E-06
     252 0.2838E-06
     253 0.2838E-06
     254 0.2838E-06
     255 0.2838E-06
     256 0.2838E-06
     257 0.2838E-06
     258 0.2838E-06
     259 0.2838E-06
     260 0.2838E-06
     261 0.2838E-06
     262 0.2838E-06
     263 0.2838E-06
     264 0.2838E-06
     265 0.2838E-06
     266 0.2838E-06
     267 0.2838E-06
     268 0.2838E-06
     269 0.2838E-06
     270 0.2953E-38
ERROR:: IterSolve: Failed convergence tolerances.
Observation:
i.) Your linear system convergence tolerance setting is 1.0e-8.
ii.)The solver failed to converge in the 270th iteration, when the tolerance jumped from 1.0e-6 (within tolerance) to 1.0e-38 (far smaller tolerance width than the set 1.0e-8).


I express herein my rough guesses:
1. Try changing Linear System Preconditioning tools from ILU1 to others.
2. What is the fineness of your axisymmetric meshes?


For more information, you can view the following posts:
viewtopic.php?f=3&t=3920&p=13729&hilit= ... 5be#p13729
viewtopic.php?f=3&t=3372&p=13061&hilit= ... 5be#p13061

Yours Sincerely
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
annier
Posts: 1169
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Navier-Stokes Solver

Post by annier »

Hi Hamed,
1. I changed the keyword "Pressure" in BCs to the keyword "External Pressure" in your solver input file and the solver converged.

Code: Select all

!Inlet
Boundary Condition 1 
...
External Pressure = -1.01e5
...

Code: Select all

!Outlet
Boundary Condition 2 
...
External Pressure = -1.0e5
...
Results
pressure distribution for external pressure
pressure distribution for external pressure
External_Pressure_P_Result.jpg (40.6 KiB) Viewed 6825 times
veclocity distribution for external pressure
veclocity distribution for external pressure
External_Pressure_v_result.jpg (36.51 KiB) Viewed 6825 times
Yours Sincerely
Anil Kunwar
Last edited by annier on 28 Jun 2015, 17:42, edited 4 times in total.
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
annier
Posts: 1169
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Navier-Stokes Solver

Post by annier »

Hi Hamed,
2. I applied Pressure (force) boundary conditions in BCs as:

Code: Select all

! inlet
Boundary Condition 1
  
Target Boundaries = 1
...
Pressure 1 = 30.0
Pressure 2 = 40.0
 ...
End

Code: Select all

! outlet
Boundary Condition 2
Target Boundaries = 3  
...
Pressure 1 = 0
Pressure 2 = 0
... 
End
And, then it converged.

The results are as following:
Pressure Result
Pressure Result
pressure.jpg (37.96 KiB) Viewed 6825 times
velocity result
velocity result
velocity.jpg (36.62 KiB) Viewed 6825 times


Please Note that:
Elmer_Models_Manual wrote:Boundary Condition bc id
...
External Pressure Real
An external pressure boundary condition directed normal to the surface.
...
Pressure i Real
A pressure force in the given direction i= 1,2,3 (It has a unit of Newtons/m^2. In Elmer, Force at boundary condition has the unit of N/m^2)
...
Yours Sincerely
Anil Kunwar
Last edited by annier on 28 Jun 2015, 17:38, edited 1 time in total.
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Post Reply