( 
  Nearly inc. Navier Stokes.
  Laminar air flow in a long tube.
  Dipl.-Ing. Frank Jordan <f.jordan@uni-duisburg.de>

  At a long distance from the inlet the flow velocity should be analyticaly:

  Vy{r}=2 * Q/A * { 1 - {r/R}^2 }
  
  Q = flow volume 
  A = cross-section area of the tube A = PI * R^2

  Distances are given in millimeter [ mm ] 
  Velocities are given in millimeter per second [ mm / s ] 
  Masses are given in milligram [ mg ]
  Times are given in seconds [ s ]
  
  R =   5 [mm]     Radius of tube
  L = 100 [mm]     Length of tube 
  V = 500 [mm / s] Mean velocity in y-direction { V = Q / A }
 
  vis   = 1.81e-2 [ mg / { mm * s } ] Viscosity of Air
  dens  = 1.2e-3  [ mg / mm^3 ]       Density of Air
  co    = 1.0e-8  [ s^2 mm / mg ]     Compressibility of Air
  
  Air is an ideal gas ->  co = 1 / P0
  P0 = Atmospheric pressure at normal conditiones
     = 10^5 Pa                                     

  Re = 2 * R * dens * V / vis       Reynoldsnumber  
  Re = 333.15                       should be laminar for Re < 2300 

  For a fully developed flow profile the pressure drop p(L) versus 
  length of tube should be:

  p{L} = 8 * vis * { Q / A } * L / R^2 
       = 8 * vis * Q * L / { PI * R^4 }

  Here:
  p{ L=100mm } = 289.6 [ mg / { s^2 mm } ]
)

echo -no
number_of_space_dimensions 2
materi_velocity
materi_stress
end_initia

options_mesh -fixed_in_space -fixed_in_space

(# if options_convection is set to -no it disables rho * v * grad(v) )
options_convection -no

(# if options_inertia is to -no it disables rho * dv/dt )
(# used for stationary processes )
options_inertia -no

start_define
  symmetrie_line        geometry_line 1
end_define
start_define
  in_flow               geometry_line 2
end_define
start_define
  wall                  geometry_line 3
end_define
start_define
  out_flow              geometry_line 4
end_define
start_define
  length                100.
end_define

node  0  0.0     0.0
node  1  5.0     0.0
node  2  0.0    length
node  3  5.0    length

element 1  -quad4  0  1  2  3

symmetrie_line    0.0   0.0   0.0   length 0.01
in_flow           0.0   0.0   5.0     0.0  0.01
out_flow          0.0  length 5.0   length 0.01
wall              5.0   0.0   5.0   length 0.01

(# parabolic flow profile at the inlet )
geometry_bounda_factor 2  2. 1.5 0.0

bounda_unknown 0  -symmetrie_line -velx
bounda_time    0  0.

bounda_unknown 1  -in_flow -vely
bounda_time    1  0. 0. 1.e-5 500. 1.e6 500.

bounda_unknown 2  -out_flow -velx
bounda_time    2  0.

bounda_unknown 3  -wall -velx -vely
bounda_time    3  0.

bounda_unknown 4  -in_flow -velx
bounda_time    4  0.


group_type 0  -materi
group_materi_viscosity 0  1.81e-2
group_materi_density 0  1.2e-3
group_materi_elasti_compressibility 0 1.e-8
group_materi_memory 0  -updated_without_rotation
group_integration_method 0  -lobatto
group_axisymmetric 0 -yes

post_point 0   2.5 0.0
post_point 1   0.0 50.
print_filter 1 -post_point_dof 1 -vely

(# used for printing out the normal force to volume elements )
(# ->  - pressure )
post_calcul -materi_stress -average

(# only linear elements are used to get the correct pressure )
(# on the boundaries )
control_mesh_refine_globally          10  -h_refinement
control_mesh_refine_globally          12  -h_refinement
control_mesh_refine_globally          14  -h_refinement -no -yes
control_mesh_refine_globally          15  -h_refinement -no -yes

(# very small timesteps in order to get a convergating solution )
control_timestep                      30  1.e-6 3.e-5 
(
control_print                         30  -time_current -post_point_dof 
control_print_history                 30  -post_point_dof 0  -sigyy -post_point_dof 1 -vely
)

target_item 0  -post_point_dof 1 -vely
target_value 0   1000. 100.0
end_data
