!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Elmer Solver Input File
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! switch that in for debugging only
! ---------------------------------
! check keywords warn
!echo on

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! HEADER
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Header
  Mesh DB "." "flow"
End

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! CONSTANTS
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Constants
 Gas Constant = Real 8.314D00 ! in m-k-s
  Stefan Boltzmann = Real 6.78E-08
  Gravity(4) = 0 0 -1 9.81
End

Simulation
  Coordinate System  = "Cartesian 3D"
  Simulation Type ="Steady"
  Output Intervals = 1
  ! Output files
  ! ------------
   Post File = "parallel_flow.ep"
   Output File = "parallel_flow.result"

  ! how verbose the solver should be
  !  1 = very low 
  ! 42 = the answer to all and everything
  !-------------------------------------------------------
  max output level = 4
End

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! SOLVER
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! the Navier-Stokes Solver
!-------------------------
Solver 1
  Equation = "Navier-Stokes"
  Optimize Bandwidth = Logical True
  Linear System Solver = Iterative
  Linear System Iterative Method = "BiCGStab"
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0E-04
  Linear System Abort Not Converged = True
  Linear System Preconditioning = "ILU1"
  Linear System Residual Output = 1


  !Linear System Preconditioning = "ParaSails"
  ParaSails Threshold = Real -0.95
  ParaSails Filter = Real -0.95
  ParaSails Maxlevel = Integer 1
  ParaSails Symmetry = Integer 0


  Steady State Convergence Tolerance = 3.0E-03
  Stabilization Method = Stabilized

  Nonlinear System Convergence Tolerance = 1.0E-03
  Nonlinear System Max Iterations = 30
  Nonlinear System Newton After Iterations = 1
  Nonlinear System Newton After Tolerance =  1.0E-03
  Nonlinear System Relaxation Factor = 0.75
End

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! BODIES (i.e., domains to compute on)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Body 1
  Name = "fluid"
  Equation = 1
  Material = 1
  Body Force = 1
  Initial Condition = 1
End

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! EQUATION
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Equation 1 ! 
 Active Solvers(1) = 1
 Convection = Computed ! we have a computed velocity field
 Flow Solution Name = String "Flow Solution" ! and that is its name
End

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! INITIAL CONDITIONS
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Initial Condition 1
  Velocity 1 = 0.0
  Velocity 2 = 0.0
  Velocity 3 = 0.0
  Pressure = 0.0
End

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! BODY FORCE
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Body Force 1
  Flow BodyForce 1 = 0.0
  Flow BodyForce 2 = 0.0 
  Flow BodyForce 3 = 0.0
End


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! MATERIAL
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Material 1

  Density = 1000.0
  Viscosity = 1.0
End

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! BOUNDARY CONDITIONS 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Boundary Condition 1
  Name = "largeinflow"
  Target Boundaries  = 1
  Normal-Tangential Velocity = True
  Velocity 1 = -0.01
  Velocity 2 = 0.0
  Velocity 3 = 0.0
End

Boundary Condition 2
  Name = "largeoutflow"
  Target Boundaries  = 2
  Normal-Tangential Velocity = True
  Velocity 2 = 0.0
  Velocity 3 = 0.0
End

Boundary Condition 3
  Name = "smallinflow"
  Target Boundaries  = 3
  Normal-Tangential Velocity = True
  Velocity 1 = -0.01
  Velocity 2 = 0.0
  Velocity 3 = 0.0
End

Boundary Condition 4
  Name = "pipewalls"
  Target Boundaries(2)  = 4 5
  Normal-Tangential Velocity = False
  Velocity 1 = 0.0
  Velocity 2 = 0.0
  Velocity 3 = 0.0
End



