

  head 2 "Test of different wheel/rail couplings  coupl creep_fastrip_1"
  head 3 "axl_111 pure long.creep; axl_112 pure lat.creep; axl_113 pure spin"
  head 4 "Cylindric wheel profile  mu= $mu_"

##
## Analyse specific input data
##
  idebug= 1                                     # Dump memory to file
  idebug_file= out/pure_creep_fastrip_1.out     # File where memory dump will be written

  fresp_param= Fourier_CG1  1.e-4  fstart .2   fstop 20.  fstep -1.05
  modal_param= Schur_fact1  1.e-4
  quasi_param= Damped_Tens  1.e-4 0.1   20    2.
# tsim_param = heun_c .01 .2e-3  tstart= 0.  tstop= 3.00  tstep= 0.0001  tout= .001
  tsim_param = heun_c            tstart= 0.  tstop= 2.00  tstep= 2e-5    tout= .001

##
##  Track irregularities and designed track geometry
##
  func intpl_r   lat_trac      -200    0.   100    0.
  func intpl_r   spv_trac      -200 1435.   100 1435.
  func intpl_r   vert_trac     -200    0.   100    0.
  func intpl_r   fi_trac       -200    0.   100    0.

  func intpl_r   krok_R  -200 0   100 0
  func intpl_r   krok_h  -200 0   100 0
  func intpl_r   krok_z  -200 0   100 0

##
##  Define constants for the wheel-rail-coupling substructure wr_coupl
##
  func const_block
   Vo     = 10.     # Speed of the vehicles
   mu_    = 0.5     # Friction coefficient, all wheels in the train
   ro_    = 0.45    # Wheel radius, all wheels in the train
   bo_    = 0.75    # Semi distance between the wheel profile origins, all wheels in the train
   ma_    =   1887  # Mass of wheelset
   ma_114 = 5*1887  # Mass of wheelset 114
   Jka_   =    100  # Moment of inertia in pitch, wheelset
   Jka_114=  5*100  # Moment of inertia in pitch, wheelset 114

   YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities

   gauge_average= 1435.    # Average gauge of the track
   gauge_dev_   = 0.000    # Deviation in gauge
  end_block


##
##  Create the wheelsets.
##  ---------------------
  lsys   e_abs_bendrf  esys  Vo  0.  krok_R krok_h krok_z
                                     4 4    4 4    4 4
  substruct create_axles [      # $1= axle number                                       
   lsys  l_local      lsa_$1  esys      0. 0. 0.                                        
   mass  m_rigid_6    axl_$1  lsa_$1    0. 0. -ro_$1  ma_$1 ma_$1 ma_$1  720 Jka_$1 720 
   mass  m_rigid_6    trc_$1  lsa_$1    0. 0. 0.      1.e3 1.e3 1.e3  1.e3 1.e3 1.e3    
   mass  fixpoint_6   grd_$1  lsa_$1    0. 0. 0.                                        
#  body  w_set_lsys   axl_$1  lsa_$1    ro_$1 bo_                                       
   body  whe_set_mass axl_$1            ro_$1 bo_                                       
   body  figure_lsys  trc_$1  lsa_$1    1 5        .5  1 0   .5 -1 0                    
                                                  -.5 -1 0  -.5  1 0  .5 1 0            
#
   constr fix_rigid_1  axl_$1  x   0.                                                   
   constr fix_rigid_1  axl_$1  y   0.                                                   
   constr fix_rigid_1  axl_$1  p   0.                                                   
#                                                                                       
   constr fix_rigid_1  trc_$1  x   0.   constr fix_rigid_1  trc_$1  f   0.              
   constr fix_rigid_1  trc_$1  y   0.   constr fix_rigid_1  trc_$1  k   0.              
   constr fix_rigid_1  trc_$1  z   0.   constr fix_rigid_1  trc_$1  p   0.              
#                                                                                       
   force rel_mass1 vload_$1  axl_$1  0. 0. -ro_$1  0. 0. 200e3-ma_$1*9.81  0. 0. 0.     
#                                                                                       
   coupl c czag$1l  axl_$1 0. -bo_ -ro_$1  grd_$1 0. -bo_ -ro_$1  .7*3e6/pi/40 esys z   
   coupl c czag$1r  axl_$1 0.  bo_ -ro_$1  grd_$1 0.  bo_ -ro_$1  .7*3e6/pi/40 esys z   
  ]
#
  in_substruct create_axles [ 110 ]     # Pure rolling, cylindrical wheels
  in_substruct create_axles [ 111 ]     # Long creep,   cylindrical wheels
  in_substruct create_axles [ 112 ]     # Lat  creep,   cylindrical wheels
  in_substruct create_axles [ 113 ]     # Spin creep,   cylindrical wheels
# in_substruct create_axles [ 114 ]     # Conical wheel

##
##  Define pure creepage on the three different axles
##  -------------------------------------------------

  func   const          nom_pitch_cyl = -Vo/ro_

  constr fix_rigid_1    axl_110 f =  0.
  constr fix_free_1     axl_110.k =  0.
  initval set_var       axl_110.vk= nom_pitch_cyl                   # Pure rolling
  initval set_mass      axl_110 z=  9.86253e-5
  s_var  force_on       axl_110 k

  constr fix_rigid_1    axl_111 f =  0.
  constr fix_free_1     axl_111.k =  0.
  constr fix_free_1     axl_111.vk= nom_pitch_cyl                   # Pure longitudinal creepage
  func   intpl_l    axl_111.vk= time 
                                .0 nom_pitch_cyl
                                .2 nom_pitch_cyl
                               1.2 nom_pitch_cyl-0.25

  constr fix_rigid_1    axl_112 f =  0.
  constr fix_free_1     axl_112.k =  0.
  initval set_var       axl_112.vk= nom_pitch_cyl                   # Pure lateral creepage
  func   intpl_l    axl_112.p= time
                                 .0  0.
                                 .2  0.
                                1.2  0.01

  constr fix_rigid_1    axl_113 f =  0.
  constr fix_free_1     axl_113.k =   0.
  constr fix_free_1     axl_113.vk= nom_pitch_cyl                   # Pure spin creepage
  func   intpl_l    axl_113.vp= time
                                 .0   0.
                                 .2   0.
                                1.2 -16
  func   intpl_l    axl_113.vx= time
                                 .0   0.
                                 .2   0.
                                1.2 -12.
#            func operp axl_113.vp= -16                         # Use together with tstop= 0
# no_warning func operp axl_113.vx= -12                         # Use together with tstop= 0

# s_var force_on axl_114 z
# mass  fixpoint_6   car_1    lsa_111   0. 0. 0.
# constr fix_free_1     axl_114.k =   0.
# func const            axl_114.vk=  nom_pitch_cyl

##
##      Creepage and creep-forces
##      -----------------------------------

##
##  Rail profiles
##  ----------------------------
   func intpl_r   rail_prof=    
     insert file "kpf/r_prof/R.450_dy.001.rail"

  func intpl2_r  rail_prof_memfield=   0.   rail_prof
                                     200.   rail_prof

##
##  Wheel profiles
##  ----------------------------
   func intpl_r   wheel_prof_=
     insert file "kpf/w_prof/cylindric.wheel"
#  func intpl_r   wheel_prof_114=    
#    insert file "kpf/w_prof/conical_0.1.wheel"

  func const_block
   tral110l.y    =  0.   tral110r.y    =  0.   # Lateral position track irregularity
   tral110l.z    =  0.   tral110r.z    =  0.   # Vertical position track irregularity
   tral110l.vy   =  0.   tral110r.vy   =  0.   # Lateral velocity track irregularity
   tral110l.vz   =  0.   tral110r.vz   =  0.   # Vertical velocity track irregularity

   tral111l.y    =  0.   tral111r.y    =  0.
   tral111l.z    =  0.   tral111r.z    =  0.
   tral111l.vy   =  0.   tral111r.vy   =  0.
   tral111l.vz   =  0.   tral111r.vz   =  0.

   tral112l.y    =  0.   tral112r.y    =  0.
   tral112l.z    =  0.   tral112r.z    =  0.
   tral112l.vy   =  0.   tral112r.vy   =  0.
   tral112l.vz   =  0.   tral112r.vz   =  0.

   tral113l.y    =  0.   tral113r.y    =  0.
   tral113l.z    =  0.   tral113r.z    =  0.
   tral113l.vy   =  0.   tral113r.vy   =  0.
   tral113l.vz   =  0.   tral113r.vz   =  0.

#  tral114l.y = -4.47766735594495e-02   # Move the rail laterally, to make the contact point to happen on the nominal running circle
#  tral114l.z = -2.23326440550488e-03   # Move the rail vertical, to give the wheelset a height of 0(zero)
#  tral114l.vy=  0.                     # The rail has a constant lateral curvature
#  tral114l.vz=  0.                     # The wheel has a cone angle of 0.1
#
#  tral114r.y =  4.47766735594495e-02
#  tral114r.z = -2.23326440550488e-03
#  tral114r.vy=  0.
#  tral114r.vz=  0.
  end_block



  substruct wr_coupl [    # $1=axle #                                                                   
#                                                                                                       
   mass m_rigid_6f  ral_$1l lsa_$1    0. -bo_ 0.   0. 600 600  0. 0. 0.                                 
   mass m_rigid_6f  ral_$1r lsa_$1    0.  bo_ 0.   0. 600 600  0. 0. 0.                                 
#                                                                                                       
   force rel_mass1 Fralz_$1l ral_$1l  0. -bo_ 0.   0. 0. -(600-60)*9.81  0. 0. 0.                       
   force rel_mass1 Fralz_$1r ral_$1r  0.  bo_ 0.   0. 0. -(600-60)*9.81  0. 0. 0.                       
#                                                                                                       
   func  operp whe_$1l.x= axl_$1.x + bo_ * axl_$1.p                                                     
   func  operp whe_$1r.x= axl_$1.x - bo_ * axl_$1.p                                                     
#                                                                                                       
   func  operp whe_$1l.vx= axl_$1.vx + bo_ * axl_$1.vp                                                  
   func  operp whe_$1r.vx= axl_$1.vx - bo_ * axl_$1.vp                                                  
#
#
#
#  func tral_interp_spline $1           # Interpolate track irregularities tral*                        

   coupl creep_fastrip_1        cp_$1l                                                                  
                axl_$1  0.        -bo_  0.                                                              
                ral_$1l whe_$1l.x -bo_  0.   esys m                                                     
                tral$1l.y                  # Lateral position track irregularity                        
                tral$1l.z                  # Vertical position track irregularity                       
                tral$1l.vy                 # Lateral velocity track irregularity                        
                tral$1l.vz                 # Vertical velocity track irregularity                       
                ro_$1l                     # Wheel rolling radius, will vary for OOR-wheels             
                 1                         # Orientation                                                
                 1                         # Circular shape of wheel in longitudinal direction          
                 1.    # mulfact_nux_$1l   # Longitudinal creep relaxation due to contaminated surfaces 
                 1.    # mulfact_nuy_$1l   # Lateral      creep relaxation due to contaminated surfaces 
                 1.    # mulfact_spin_$1l  # Spin         creep relaxation due to contaminated surfaces 
#                                                                                                       
                wheel_prof_$1l             # Wheel profile                                              
                .0                         # Rotation angle in which the wheel profile has been given   
                .001 .001                  # Distance between brushes in mesh long&lat direction        
                rail_prof_memfield         # Rail profile                                               
                .0                         # Rotation angle rail profile                                
#                                                                                                       
                82000e6                    # Combined Shear Modulus                                     
                0.28                       # Combined Poisson's ratio                                   
#                                                                                                       
                0.                         # Vertical curvature rail head                               
                .5                         # Smoothing of lateral curvature difference                  
#                                                                                                       
                1                          # Type of friction                                           
                mu_$1l                     # Friction coefficient in wheel/rail contact cp1             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp2             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp3             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp4             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp5             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp6             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp7             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp8             
                mu_$1l                     # Friction coefficient in wheel/rail contact cp9             
#                                                                                                       
                 1e6                       # ckd viscous damper parallel with contact patch             
#                                                                                                       
                2.6e9                      # Hardness in Vickers N/m2                                   
                2.1e9                      # kp1    1st border Contact pressure level                   
                0.2                        # kv1    1st border sliding speed                            
                0.7                        # kv2    2d border sliding speed                             
                350e-4                     # k1  Values in Archard's wear chart                         
                5e-4                       # k2                                                         
                35e-4                      # k3                                                         
                5e-4                       # k4                                                         

   coupl creep_fastrip_1        cp_$1r                                                                  
                axl_$1  0.         bo_  0.                                                              
                ral_$1r whe_$1r.x  bo_  0.   esys m                                                     
                tral$1r.y                  # Lateral position track irregularity                        
                tral$1r.z                  # Vertical position track irregularity                       
                tral$1r.vy                 # Lateral velocity track irregularity                        
                tral$1r.vz                 # Vertical velocity track irregularity                       
                ro_$1r                     # Wheel rolling radius, will vary for OOR-wheels             
                -1                         # Orientation                                                
                 1                         # Circular shape of wheel in longitudinal direction          
                 1.    # mulfact_nux_$1r   # Longitudinal creep relaxation due to contaminated surfaces 
                 1.    # mulfact_nuy_$1r   # Lateral      creep relaxation due to contaminated surfaces 
                 1.    # mulfact_spin_$1r  # Spin         creep relaxation due to contaminated surfaces 
#                                                                                                       
                wheel_prof_$1r             # Wheel profile                                              
                .0                         # Rotation angle in which the wheel profile has been given   
                .001 .001                  # Distance between brushes in mesh long&lat direction        
                rail_prof_memfield         # Rail profile                                               
                .0                         # Rotation angle rail profile                                
#                                                                                                       
                82000e6                    # Combined Shear Modulus                                     
                0.28                       # Combined Poisson's ratio                                   
#                                                                                                       
                0.                         # Vertical curvature rail head                               
                .5                         # Smoothing of lateral curvature difference                  
#                                                                                                       
                1                          # Type of friction                                           
                mu_$1r                     # Friction coefficient in wheel/rail contact cp1             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp2             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp3             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp4             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp5             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp6             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp7             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp8             
                mu_$1r                     # Friction coefficient in wheel/rail contact cp9             
#                                                                                                       
                 1e6                       # ckd viscous damper parallel with contact patch             
#                                                                                                       
                2.6e9                      # Hardness in Vickers N/m2                                   
                2.1e9                      # kp1    1st border Contact pressure level                   
                0.2                        # kv1    1st border sliding speed                            
                0.7                        # kv2    2d border sliding speed                             
                350e-4                     # k1  Values in Archard's wear chart                         
                5e-4                       # k2                                                         
                35e-4                      # k3                                                         
                5e-4                       # k4                                                         
 ]
  in_substruct wr_coupl [ 110 ]
  in_substruct wr_coupl [ 111 ]
  in_substruct wr_coupl [ 112 ]
  in_substruct wr_coupl [ 113 ]
# in_substruct wr_coupl [ 114 ]








##                                                                                       
#   force rel_mass1 vload_113b axl_113  0. 0. -ro_113  0. 0. -100e3  0. 0. 0.     
##
#   mass m_rigid_6f  ral_113l lsa_113  0. -bo_  0.    0. 600 600  0. 0. 0.                           
#   mass m_rigid_6f  ral_113r lsa_113  0.  bo_  0.    0. 600 600  0. 0. 0.                           
##                                                                                                       
#   force rel_mass1 Fralz_$1l ral_113l  0. -bo_ 0.   0. 0. -(600-60)*9.81  0. 0. 0.                       
#   force rel_mass1 Fralz_$1r ral_113r  0.  bo_ 0.   0. 0. -(600-60)*9.81  0. 0. 0.                       
##
#   func  operp whe_113l.x= axl_113.x + bo_ * axl_113.p
#   func  operp whe_113r.x= axl_113.x - bo_ * axl_113.p
##
#   func  operp whe_113l.vx= axl_113.vx + bo_ * axl_113.vp
#   func  operp whe_113r.vx= axl_113.vx - bo_ * axl_113.vp
##
##
##
##
##  func tral_interp_spline 113    # Interpolate track irregularities
##
#   coupl creep_fastrip_1        cp_113r
#                axl_113  0.          bo_  0.
#                ral_113r whe_113r.x  bo_  0.   esys m
#                tral113r.y                 # Lateral position track irregularity
#                tral113r.z                 # Vertical position track irregularity
#                tral113r.vy                # Lateral velocity track irregularity
#                tral113r.vz                # Vertical velocity track irregularity
#                ro_113r                    # Wheel rolling radius, will vary for OOR-wheels
#                -1                         # Orientation
#                 1                         # Circular shape of wheel in longitudinal direction          
#                 1.    # mulfact_nux_$1r   # Longitudinal creep relaxation due to contaminated surfaces 
#                 1.    # mulfact_nuy_$1r   # Lateral      creep relaxation due to contaminated surfaces 
#                 1.    # mulfact_spin_$1r  # Spin         creep relaxation due to contaminated surfaces 
##                                                                                                       
#                wheel_prof_$1r             # Wheel profile                                              
#                .0                         # Rotation angle in which the wheel profile has been given   
#                .001 .001                  # Distance between brushes in mesh long&lat direction        
#                rail_prof_memfield         # Rail profile                                               
#                .0                         # Rotation angle rail profile                                
##                                                                                                       
#                82000e6                    # Combined Shear Modulus                                     
#                0.28                       # Combined Poisson's ratio                                   
##                                                                                                       
#                0.                         # Vertical curvature rail head                               
#                .5                         # Smoothing of lateral curvature difference                  
##                                                                                                       
#                1                          # Type of friction                                           
#                mu_113r                    # Friction coefficient in wheel/rail contact cp1             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp2             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp3             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp4             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp5             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp6             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp7             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp8             
#                mu_113r                    # Friction coefficient in wheel/rail contact cp9             
##                                                                                                       
#                 1e6                       # ckd viscous damper parallel with contact patch             
##                                                                                                       
#                2.6e9                      # Hardness in Vickers N/m2                                   
#                2.1e9                      # kp1    1st border Contact pressure level                   
#                0.2                        # kv1    1st border sliding speed                            
#                0.7                        # kv2    2d border sliding speed                             
#                350e-4                     # k1  Values in Archard's wear chart                         
#                5e-4                       # k2                                                         
#                35e-4                      # k3                                                         
#                5e-4                       # k4                                                         

   constr fix_rigid_1  ral_110l x 0.  constr fix_rigid_1  ral_110l y 0.  constr fix_rigid_1  ral_110l z 0.
   constr fix_rigid_1  ral_110l f 0.  constr fix_rigid_1  ral_110l k 0.  constr fix_rigid_1  ral_110l p 0.
   constr fix_rigid_1  ral_110r x 0.  constr fix_rigid_1  ral_110r y 0.  constr fix_rigid_1  ral_110r z 0.
   constr fix_rigid_1  ral_110r f 0.  constr fix_rigid_1  ral_110r k 0.  constr fix_rigid_1  ral_110r p 0.
#
   constr fix_rigid_1  ral_111l x 0.  constr fix_rigid_1  ral_111l y 0.  constr fix_rigid_1  ral_111l z 0.
   constr fix_rigid_1  ral_111l f 0.  constr fix_rigid_1  ral_111l k 0.  constr fix_rigid_1  ral_111l p 0.
   constr fix_rigid_1  ral_111r x 0.  constr fix_rigid_1  ral_111r y 0.  constr fix_rigid_1  ral_111r z 0.
   constr fix_rigid_1  ral_111r f 0.  constr fix_rigid_1  ral_111r k 0.  constr fix_rigid_1  ral_111r p 0.
#
   constr fix_rigid_1  ral_112l x 0.  constr fix_rigid_1  ral_112l y 0.  constr fix_rigid_1  ral_112l z 0.
   constr fix_rigid_1  ral_112l f 0.  constr fix_rigid_1  ral_112l k 0.  constr fix_rigid_1  ral_112l p 0.
   constr fix_rigid_1  ral_112r x 0.  constr fix_rigid_1  ral_112r y 0.  constr fix_rigid_1  ral_112r z 0.
   constr fix_rigid_1  ral_112r f 0.  constr fix_rigid_1  ral_112r k 0.  constr fix_rigid_1  ral_112r p 0.
#
   constr fix_rigid_1  ral_113l x 0.  constr fix_rigid_1  ral_113l y 0.  constr fix_rigid_1  ral_113l z 0.
   constr fix_rigid_1  ral_113l f 0.  constr fix_rigid_1  ral_113l k 0.  constr fix_rigid_1  ral_113l p 0.
   constr fix_rigid_1  ral_113r x 0.  constr fix_rigid_1  ral_113r y 0.  constr fix_rigid_1  ral_113r z 0.
   constr fix_rigid_1  ral_113r f 0.  constr fix_rigid_1  ral_113r k 0.  constr fix_rigid_1  ral_113r p 0.
#
#  constr fix_rigid_1  ral_114l x 0.
#  constr fix_rigid_1  ral_114l f 0.  constr fix_rigid_1  ral_114l k 0.  constr fix_rigid_1  ral_114l p 0.
#  constr fix_rigid_1  ral_114r x 0.
#  constr fix_rigid_1  ral_114r f 0.  constr fix_rigid_1  ral_114r k 0.  constr fix_rigid_1  ral_114r p 0.
##
# coupl k kyrt114l  ral_114l  0. -bo_ 0.  grd_114  0. -bo_ 0.  17e6    esys y
# coupl k kyrt114r  ral_114r  0.  bo_ 0.  grd_114  0.  bo_ 0.  17e6    esys y
# coupl c cyrt114l  ral_114l  0. -bo_ 0.  grd_114  0. -bo_ 0.  10e3    esys y
# coupl c cyrt114r  ral_114r  0.  bo_ 0.  grd_114  0.  bo_ 0.  10e3    esys y
##
# coupl p_lin kzrt_114= -100e3-ral_114r.zz*9.81 230e6
# coupl k kzrt114l  ral_114l  0. -bo_ 0.  grd_114  0. -bo_ 0. kzrt_114 esys z
# coupl k kzrt114r  ral_114r  0.  bo_ 0.  grd_114  0.  bo_ 0. kzrt_114 esys z
# coupl c czrt114l  ral_114l  0. -bo_ 0.  grd_114  0. -bo_ 0.   1e6    esys z
# coupl c czrt114r  ral_114r  0.  bo_ 0.  grd_114  0.  bo_ 0.   1e6    esys z

# func fl_wear_w 111r  mu_111r1 mu_111r2 mu_111r3
# func fl_wear_w 112r  mu_112r1 mu_112r2 mu_112r3
# func fl_wear_w 113r  mu_113r1 mu_113r2 mu_113r3
# func fl_wear_w 114r  mu_114r1 mu_114r2 mu_114r3

##
##  Modal parameters of the wheelsets.
##  ----------------------------------
# mass  m_flex_1 axl_111  70   0.10               ## Torsionsform
# coupl m_flex_1 cp3_111r end_2  0.0636396 0. 0.  # 0. 0.14142 0.
# coupl m_flex_1 cp3_111l end_2  -.0636396 0. 0.  # 0. 0.14142 0.
# s_var sngl axl_111.c1
# s_var sngl axl_111.v1

##
##  Store variables for postprocessing
##  ----------------------------------
  s_var gpdat_r1                   # Write the motions of all masses to the GPdat-file
#
  s_var scalar_0 mu_
#
  s_var sngl ro_
  s_var sngl bo_
  s_var sngl Vo
#
  s_var var_0 esys.x
  s_var var_0 esys.y
  s_var var_0 esys.z
  s_var var_0 esys.f
  s_var var_0 esys.k
  s_var var_0 esys.p
#
  s_var var_0 esys.vx
  s_var var_0 esys.vy
  s_var var_0 esys.vz
  s_var var_0 esys.vf
  s_var var_0 esys.vk
  s_var var_0 esys.vp
#
  s_var var_0 esys.ax
  s_var var_0 esys.ay
  s_var var_0 esys.az
  s_var var_0 esys.af
  s_var var_0 esys.ak
  s_var var_0 esys.ap
#
  substruct store_axle [        
   s_var var_0 axl_$1.x         
   s_var var_0 axl_$1.y         
   s_var var_0 axl_$1.z         
   s_var var_0 axl_$1.f         
   s_var var_0 axl_$1.k         
   s_var var_0 axl_$1.p         
#
   s_var var_0 axl_$1.vx        
   s_var var_0 axl_$1.vy        
   s_var var_0 axl_$1.vz        
   s_var var_0 axl_$1.vf        
   s_var var_0 axl_$1.vk        
   s_var var_0 axl_$1.vp        
#
   s_var var_0 axl_$1.Fx        
   s_var var_0 axl_$1.Fy        
   s_var var_0 axl_$1.Fz        
   s_var var_0 axl_$1.Mf        
   s_var var_0 axl_$1.Mk        
   s_var var_0 axl_$1.Mp        
#
   s_var var_0 axl_$1.Ax        
   s_var var_0 axl_$1.Ay        
   s_var var_0 axl_$1.Az        
   s_var var_0 axl_$1.Af        
   s_var var_0 axl_$1.Ak        
   s_var var_0 axl_$1.Ap        
#
  s_var var_0 trc_$1.x     s_var var_0 trc_$1.y     s_var var_0 trc_$1.z        
  s_var var_0 trc_$1.f     s_var var_0 trc_$1.k     s_var var_0 trc_$1.p        
  s_var var_0 trc_$1.vx    s_var var_0 trc_$1.vy    s_var var_0 trc_$1.vz       
  s_var var_0 trc_$1.vf    s_var var_0 trc_$1.vk    s_var var_0 trc_$1.vp       
  ]
#
  substruct store_wheel [       
   s_var var_0 ral_$1.y         
   s_var var_0 ral_$1.z         
   s_var var_0 ral_$1.vy        
   s_var var_0 ral_$1.vz        
#
   s_var var_0 cp_$1.eta        
   s_var var_0 cp_$1.Fx         
   s_var var_0 cp_$1.Fy         
   s_var var_0 cp_$1.Fz         
   s_var var_0 cp_$1.Mf         
   s_var var_0 cp_$1.Mk         
   s_var var_0 cp_$1.Mp         
#
   s_var var_0 cp_$1.F1x        
   s_var var_0 cp_$1.F1y        
   s_var var_0 cp_$1.F1z        
   s_var var_0 cp_$1.M1f        
   s_var var_0 cp_$1.M1k        
   s_var var_0 cp_$1.M1p        
#
   s_var var_0 cp_$1.F2x        
   s_var var_0 cp_$1.F2y        
   s_var var_0 cp_$1.F2z        
   s_var var_0 cp_$1.M2f        
   s_var var_0 cp_$1.M2k        
   s_var var_0 cp_$1.M2p        
#
   s_var var_0 tral$1.y         
   s_var var_0 tral$1.z         
   s_var var_0 tral$1.vy        
   s_var var_0 tral$1.vz        
#
   s_var var_0 cp3_$1.z         
   s_var var_0 cp3_$1.dr        
   s_var var_0 cp3_$1.gam       
   s_var var_0 cp3_$1.udefa     
   s_var var_0 cp3_$1.udefb     
   s_var var_0 cp3_$1.area      
   s_var var_0 cp3_$1.ksi       
   s_var var_0 cp3_$1.posw      
   s_var var_0 cp3_$1.posr      
   s_var var_0 cp3_$1.bo_       
#
   s_var var_0 cp3_$1.nux       
   s_var var_0 cp3_$1.nuy       
   func  atan2 cp3_$1.nya= cp3_$1.nuy cp3_$1.nux        # Direction of creepage         
   s_var var_0 cp3_$1.nya       
   s_var var_0 cp3_$1.spin      
   s_var var_0 cp3_$1.uny       
   s_var var_0 cp3_$1.usp       
#
   s_var var_0 cp3_$1.vx        
   s_var var_0 cp3_$1.vy        
   s_var var_0 cp3_$1.vz        
   s_var var_0 cp3_$1.vf        
   s_var var_0 cp3_$1.vk        
   s_var var_0 cp3_$1.vp        
   s_var var_0 cp3_$1.vux       
   s_var var_0 cp3_$1.vuy       
   s_var var_0 cp3_$1.vuz       
   s_var var_0 cp3_$1.Vref      
   s_var var_0 cp3_$1.trl_h     
#
   s_var var_0 cp3_$1.Fn        
   s_var var_0 cp3_$1.Fny       
#
   s_var var_0 cp3_$1.Fx        
   s_var var_0 cp3_$1.Fy        
   s_var var_0 cp3_$1.Fz        
   s_var var_0 cp3_$1.Mf        
   s_var var_0 cp3_$1.Mk        
   s_var var_0 cp3_$1.Mp        
#
   s_var var_0 cp3_$1.F1x       
   s_var var_0 cp3_$1.F1y       
   s_var var_0 cp3_$1.F1z       
   s_var var_0 cp3_$1.M1f       
   s_var var_0 cp3_$1.M1k       
   s_var var_0 cp3_$1.M1p       
#
   s_var var_0 cp3_$1.F2x       
   s_var var_0 cp3_$1.F2y       
   s_var var_0 cp3_$1.F2z       
   s_var var_0 cp3_$1.M2f       
   s_var var_0 cp3_$1.M2k       
   s_var var_0 cp3_$1.M2p       
#
#  s_var var_0 cp3_$1.Mspin     
#
   s_var var_0 cp3_$1.wear      # Wear according to Archard's law [m^3/s]       
   s_var var_0 cp3_$1.kArch     # Wear constant according to Archard's law      
#
   if_then cp3_$1.Vref .ge. 0.
    func  operp cp3_$1.Fnu =  cp3_$1.Fx * cp3_$1.nux + cp3_$1.Fny * cp3_$1.nuy    # Tgamma      
   else
    func  operp cp3_$1.Fnu = -cp3_$1.Fx * cp3_$1.nux - cp3_$1.Fny * cp3_$1.nuy    # Tgamma      
   endif
#  func  operp cp3_$1.FMnu= cp3_$1.Fnu + cp3_$1.spin * cp3_$1.Mspin               # Energy dissipation

   s_var var_0 cp3_$1.Fnu       # func fl_wear_w  Tgamma                
   s_var var_0 cp3_$1.FMnu      # func fl_wear_w  Energy dissipation    
#
   s_var var_0 cp3_$1.slip_area                                         
   if_then_init .exist. cp3_$1.Fx                                       
    func div cp3_$1.mux= cp3_$1.Fx cp3_$1.Fn                            
    s_var var_0 cp3_$1.mux       # Utilized friction                    
   endif                                                                
  ]
  in_substruct store_axle  [ 111  ]
  in_substruct store_axle  [ 112  ]
  in_substruct store_axle  [ 113  ]
# in_substruct store_axle  [ 114  ]
  in_substruct store_wheel [ 111l ]
  in_substruct store_wheel [ 111r ]
  in_substruct store_wheel [ 112l ]
  in_substruct store_wheel [ 112r ]
# in_substruct store_wheel [ 113l ]
  in_substruct store_wheel [ 113r ]
# in_substruct store_wheel [ 114l ]
# in_substruct store_wheel [ 114r ]
#
# in_substruct store [ 111l ]
# in_substruct store [ 112l ]
# in_substruct store [ 113l ]
#
# initval read_gpdat gp/quasi_fastrip_1.gp 601
#
 eof
