( 
  Nearly inc. Navier Stokes.
  Laminar fluid flow in a lid driven square cavity 

  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 ]
  
  The domain is a square 1 x 1
  Top is loaded with Vx = 1
  Re = 100

  vis   = 1.0e-2 [ mg / { mm * s } ] Viscosity of Gas
  dens  = 1.    [ mg / mm^3 ]       Density of Gas
  co    = 1.0e-8  [ s^2 mm / mg ]     Compressibility of Gas
  
  Air is an ideal gas ->  co = 1 / P0
  P0 = Atmospheric pressure at normal conditiones
     = 10^5 Pa                                     

  Re = L * V / vis       Reynoldsnumber  
  Re = 1 * 1 / vis , set vis = 0.01
  
  Osman Buyukisik   osman@fuse.net

)

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 set to -no it disables rho * dv/dt )
(# used for stationary processes )
options_inertia -no

start_define
  bottom        geometry_line 1
end_define
start_define
  right         geometry_line 2
end_define
start_define
  left          geometry_line 3
end_define
start_define
  top           geometry_line 4
end_define
start_define
  vx_top        1.
end_define

node  0  0.0  0.0
node  1  1.0  0.0
node  2  0.0  1.0
node  3  1.0  1.0

element 1  -quad4  0  1  2  3

bottom  0.0   0.0   1.0   0.0    0.01
top     0.0   1.0   1.0   1.0    0.01
right   1.0   0.0   1.0    1.0   0.01
left    0.0   0.0   0.0    1.0   0.01

bounda_unknown 0  -bottom  -velx -vely
bounda_time    0  0.

bounda_unknown 4  -top -velx 
bounda_time    4  0. 1. 1.e6 1.

bounda_unknown 2  -right -velx -vely
bounda_time    2  0.

bounda_unknown 1  -left -velx -vely
bounda_time    1  0.

bounda_unknown 3  -top -vely
bounda_time    3  0.

group_type 0  -materi
group_materi_viscosity 0  1.e-2
group_materi_density 0  1.
group_materi_elasti_compressibility 0 1.e-8
group_materi_memory 0  -updated_without_rotation
group_integration_points 0  -minimal

post_point 1   0.5 0.90

print_filter 1 -post_point_dof 1 -velx

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

control_mesh_refine_globally          10  -h_refinement
control_mesh_refine_globally          11  -h_refinement
control_mesh_refine_globally          12  -h_refinement
control_mesh_refine_globally          13  -p_refinement

(# very small timesteps in order to get a convergating solution )
control_timestep                      30  0.5e-5 2.0e-5 
control_timestep_iterations           30  3
(
control_print                         30  -time_current -post_point_dof 
)

target_item 0  -post_point_dof 1 -velx
target_value 0 0.41916  0.01

end_data
