Home    Search    Reference Manuals    Return   


##
##
##      Headlines
##      ==========================================================
  head 2 "Railway vehicle with two bogies; 4 driven axles; $CalcType"
  head 3 "Wheel/Rail= $ckpfr; Friction=$mu_; Speed=$vkmh"
  head 4 "Curve Radius=$CurveRadius; Track irr.=$ctrack_irreg"
# head 5 "Variation: "
# head 6 "           Up to ten header lines can be defined,"
# head 7 "           to describe current case.    "

# idebug= 1     # If idebug>0 a memory dump will be written to file "idebug_file"
# idebug_file= "calc.out"

##
##      Define variables used in the wheel-rail coupling substructure
##      =============================================================
  func const  vkmh=  160                # The initial speed of the vehicle in km/h
# func operp  vkmh=  400 - 5 * time     # Vary vkmh in order to calculate critical speed
  func const  bo_ = 0.75                # Lateral semi-distance between the nominal rolling circles of the wheels
  func const  mu_ = 0.50                # Coefficient of friction between wheel and rail

##
##      Define wheel-rail geometry functions
##      ==========================================================
  func   char  ckpfr=  ENS1002t32.5_uic60i40
#
  if_then_char_init ckpfr        .eq. "ckona_fl"
   func copy_init  lambda0= 0.025               # Rail inclination 1/40
   func copy_init  lambda = 0.30                # Effective conicity
   s_var scalar_0  lambda
   func operp_init epsilon= 50.7 * ( lambda - lambda0 ) # Contact angle difference parameter
   insert file  $genkpf/kpf_ckona_fl.kpfr
   in_substruct kpf_ckona [ " " lambda lambda0 epsilon ]
#
  elseif_then_char_init ckpfr .eq. "rkona"
   insert file  $genkpf/kpf_rkona.kpfr
   in_substruct kpf_rkona [ " " 0. ]
#
  elseif_then_char_init ckpfr .eq. "ENS1002t32.5_uic60i40"
   insert file  $genkpf/ENS1002t32.5_uic60i40.kpfr
   in_substruct ENS1002t32.5_uic60i40 [ " " ]
#
  elseif_then_char_init ckpfr .eq. "ENS1002t32.5_uic60i30"
   insert file  $genkpf/ENS1002t32.5_uic60i30.kpfr
   in_substruct ENS1002t32.5_uic60i30 [ " " ]
#
  elseif_then_char_init ckpfr .eq. "ENS1002t32.5_uic60i20"
   insert file  $genkpf/ENS1002t32.5_uic60i20.kpfr
   in_substruct ENS1002t32.5_uic60i20 [ " " ]
#
  elseif_then_char_init ckpfr .eq. "SjNormalt33_uic60i40"
   insert file  $genkpf/SjNormalt33_uic60i40.kpfr
   in_substruct SjNormalt33_uic60i40 [ " " ]
#
  elseif_then_char_init ckpfr .eq. "SjNormalt33_uic60i20"
   insert file  $genkpf/SjNormalt33_uic60i20.kpfr
   in_substruct SjNormalt33_uic60i20 [ " " ]
#
  elseif_then_char_init ckpfr .eq. "Variable_W/R-geom"
   insert file  $genkpf/S1002t32.5_bv50i30.kpfr
   insert file  $genkpf/S1002t32.5_bv50i30_worn_r3.kpfr
   insert file  $genkpf/S1002t32.5_bv50i30_worn_l3.kpfr
   in_substruct S1002t32.5_bv50i30          [ tangtrc ]
   in_substruct S1002t32.5_bv50i30_worn_r3  [ Rcurve ]
   in_substruct S1002t32.5_bv50i30_worn_l3  [ Lcurve ]

   func kpf_variable_1 " "  -100.0      tangtrc
                               0.0      tangtrc
                               5.0      Rcurve
                             300.0      Rcurve
                             305.0      tangtrc
                             320.0      tangtrc
                             325.0      Lcurve
                             620.0      Lcurve
                             625.0      tangtrc
                            1000.0      tangtrc
#
  else
   func print06_char_init " "
   func print06_char_init " ***ERROR*** In Input Reading"
   func print06_char_init "             Unvalid value given for character variable ckpfr"
   func stop
  endif

##
##      Pre- & Post- Processing
##      ==========================================================
  if_then_char_init  CalcType .eq. TSIM  .or.
                     CalcType .eq. MODAL
#  pre_process=  'sed "s!runf/Master.runf!$CURRENT_FILE!" npickf/flex_car.npickf > npickf/$IDENT.npickf'
#  pre_process=  'npick npickf/$IDENT.npickf'
#  pre_process=  'quasi $CURRENT_FILE'
#  post_process= 'mplot mplotf/Tsim_All_BoBo.mplotf $IDENT'
#  post_process= 'mplot mplotf/critSpeedGoalfunc.mplotf $IDENT'
#  post_process= 'mgv   diags/$IDENT.ps'
  endif

##
##      Define track irregularities
##      ==========================================================
  func char  ctrack_irreg=  Ideal_track         # Output in header lines
  func const Track_Gauge= 1435.
#
  if_then_char_init ctrack_irreg .eq. "Ideal_track"   # {{
   func const YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   func const ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   func const GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   func const CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities
   func const Xtrac_start=   0.
   func const Xtrac_stop= 30000.
   func intpl_track_irr2 Xtrac_start Xtrac_stop Ideal_track Track_Gauge
#
  elseif_then_char_init ctrack_irreg .eq. "Latshift_A7"   # }{
   func const YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   func const ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   func const GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   func const CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities
   func const Xtrac_start=   0.
   func const Xtrac_stop= 3000.
   func intpl_r lat_trac
   -100.0      0.0
     -0.250006 0.0
     -0.250003 0.0
     -0.250001 0.0
     -0.25     0.0
      0.4      7.0       # Lateral shift of track alignment
      0.400001 7.0
      0.400003 7.0       # Several points in order to avoid ringing in the spline interpolation
      0.400006 7.0
    Xtrac_stop 7.0
   func intpl_r vert_trac        # vertical alignment in mm
   -100.0      0.0
    Xtrac_stop 0.0
   func intpl_r spv_trac         # track gauge in mm
   -100.0      Track_Gauge
    Xtrac_stop Track_Gauge
   func intpl_r fi_trac          # cant in mm
   -100.0      0.0
    Xtrac_stop 0.0
#
  elseif_then_char_init ctrack_irreg .eq. "UIC518_wheel_unloading"   # }{
   func const YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   func const ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   func const GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   func const CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities
   func const Xtrac_start=   0.
   func const Xtrac_stop= 3000.
   func intpl_r lat_trac
   -100.0      0.0
    Xtrac_stop 0.0
   func intpl_r vert_trac        # vertical alignment in mm
   -100.0      0.0
    -10.0        0.0
     -9.0        0.0
     -8.0        0.0
      0.0      0.0
     66-6-.1       0.0
     66-6-.00006   0.0           # Several points in order to avoid ringing in the spline interpolation
     66-6-.00004   0.0
     66-6-.00003   0.0
     66-6-.00001   0.0
     66-6          0.0
     66-6+0.0003   0.0005
     66-6+0.0006   0.001
     66-6+0.006    0.01
     66-0.006      9.99
     66-0.0006     9.999
     66-0.0003     9.9995
     66           10.0           # 20 dip on high rail
     66+0.0003     9.9995        # 6 m semi-span
     66+0.0006     9.999
     66+0.006      9.99
     66+6-0.006    0.01
     66+6-0.0006   0.001
     66+6-0.0003   0.0005
     66+6          0.0
     66+6+.00001   0.0
     66+6+.00003   0.0
     66+6+.00004   0.0
     66+6+.00006   0.0
    Xtrac_stop 0.0
   func intpl_r spv_trac         # track gauge in mm
   -100.0      1435.
    Xtrac_stop 1435.
   func intpl_r fi_trac          # cant in mm
   -100.0        0.0
    -10.0        0.0
     -9.0        0.0
     -8.0        0.0
      0.0        0.0
     66-6-.1       0.0
     66-6-.00006   0.0           # Several points in order to avoid ringing in the spline interpolation
     66-6-.00004   0.0
     66-6-.00003   0.0
     66-6-.00001   0.0
     66-6          0.0
     66-6+0.0003  -0.001
     66-6+0.0006  -0.002
     66-6+0.006   -0.02
     66-0.006    -19.98
     66-0.0006   -19.998
     66-0.0003   -19.999
     66          -20.0           # 20 dip on high rail
     66+0.0003   -19.999         # 6 m semi-span
     66+0.0006   -19.998
     66+0.006    -19.98
     66+6-0.006   -0.02
     66+6-0.0006  -0.002
     66+6-0.0003  -0.001
     66+6          0.0
     66+6+.00001   0.0
     66+6+.00003   0.0
     66+6+.00004   0.0
     66+6+.00006   0.0
    Xtrac_stop   0.0
#
  elseif_then_char_init ctrack_irreg .eq. "track_irr4"   # }{
   func const YMtrac 0.000650  # from mm to m, and factor 0.65
   func const ZMtrac 0.000800  # from mm to m, and factor 0.80
   func const GMtrac 0.001000  # from mm to m, and factor 0.65
   func const CMtrac 0.000533  # from mm to rad, and factor 0.80
   func const Xtrac_start=   0.
   func const Xtrac_stop= 2003.
   func intpl_track_irr2 Xtrac_start Xtrac_stop track/track_irr4.trax Track_Gauge
#
  elseif_then_char_init ctrack_irreg .eq. "track_V120a"   # }{
   func const YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   func const ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   func const GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   func const CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities
   func const Xtrac_start= 1400.
   func const Xtrac_stop=  3100.
   func intpl_track_irr2 Xtrac_start Xtrac_stop track/track_V120a.trax Track_Gauge
#
  elseif_then_char_init ctrack_irreg .eq. "track_V120b"   # }{
   func const YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   func const ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   func const GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   func const CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities
   func const Xtrac_start= 1050.
   func const Xtrac_stop=  3000.
   func intpl_track_irr2 Xtrac_start Xtrac_stop track/track_V120b.trax Track_Gauge
#
  elseif_then_char_init ctrack_irreg .eq. "track_V160a"   # }{
   func const YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   func const ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   func const GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   func const CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities
   func const Xtrac_start=  700.
   func const Xtrac_stop=  4200.
   func intpl_track_irr2 Xtrac_start Xtrac_stop track/track_V160a.trac Track_Gauge
#
  elseif_then_char_init ctrack_irreg .eq. "track_V200a"   # }{
   func const YMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Lateral irregularities
   func const ZMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Vertical irregularities
   func const GMtrac= 1e-3         # From mm to m;   Scale factor 1.00; Gauge irregularities
   func const CMtrac= 1e-3/(2*bo_) # From mm to rad; Scale factor 1.00; Cant irregularities
   func const Xtrac_start=    0.
   func const Xtrac_stop=  4997.
   func intpl_track_irr2 Xtrac_start Xtrac_stop track/track_V200a.trac Track_Gauge
#
  else
   func print06_char_init " "
   func print06_char_init " ***ERROR*** In Input Reading"
   func print06_char_init "             Unvalid value given for character variable ctrack_irreg"
   func stop
  endif   # }}
#
  s_var scalar_0 Xtrac_start    # Save start coordinate as a scalar for post processing
  s_var scalar_0 Xtrac_stop     # Save stop  coordinate as a scalar for post processing

##
##      Define designed(nominal) track geometry
##      ==========================================================
  func const CurveRadius=  1e99                # Curve radius in [m]
  func const CurveCant=   0.000                # Cant of track in [m]
#
  func intpl_r ro_trac_design  -100.+Xtrac_start  0.
                                  0.+Xtrac_start  0.
                                120.+Xtrac_start  1/CurveRadius
                                160.+Xtrac_start  1/CurveRadius
                                280.+Xtrac_start  0.
                                320.+Xtrac_start  0.
                                440.+Xtrac_start -1/CurveRadius
                                480.+Xtrac_start -1/CurveRadius
                                600.+Xtrac_start  0.
                               1000.+Xtrac_start  0.
  func intpl_r f_trac_design   -100.+Xtrac_start  0.
                                  0.+Xtrac_start  0.
                                120.+Xtrac_start  CurveCant/(2*bo_)
                                160.+Xtrac_start  CurveCant/(2*bo_)
                                280.+Xtrac_start  0.
                                320.+Xtrac_start  0.
                                440.+Xtrac_start -CurveCant/(2*bo_)
                                480.+Xtrac_start -CurveCant/(2*bo_)
                                600.+Xtrac_start  0.
                               1000.+Xtrac_start  0.
  func intpl_r z_trac_design   -100.+Xtrac_start  0.
                                  0.+Xtrac_start  0.
                                120.+Xtrac_start -abs(CurveCant)/2.
                                160.+Xtrac_start -abs(CurveCant)/2.
                                280.+Xtrac_start  0.
                                320.+Xtrac_start  0.
                                440.+Xtrac_start -abs(CurveCant)/2.
                                480.+Xtrac_start -abs(CurveCant)/2.
                                600.+Xtrac_start  0.
                               1000.+Xtrac_start  0.
  s_var scalar_0 CurveRadius
  s_var scalar_0 CurveCant

##
##      Calculate speed in curve for constant cant deficiency (if vkmh= 0)
##      ==================================================================
  func const Y_cp= 0.65*sign(CurveRadius)         # lateral acc. in track plane
  if_then_init CurveRadius .lt. 1e99  .and.  vkmh .eq. 0
   no_warning  func const vkmh= 3.6*sqrt(CurveRadius*(Y_cp+CurveCant/(2*bo_)*9.81))
  endif
# func u_lim    vkmh= 160       # Set the upper limit of the speed
  func div       Vo = vkmh 3.6  # The speed of the vehicle in m/s
  s_var var_0 vkmh              # Save speed as a scalar for post processing

##
##      Modify track gauge
##      ==========================================================
#  The average gauge of the track can be modified in two ways:
#
#  1) Automatically by defining the gauge in variable track_width
#  func const track_width= 1435.
#  func mean_r2_init Xavg gauge_average spv_trac  Xtrac_start Xtrac_stop
#  func print06_char_init ' '
#  func print06_init gauge_average
#  func operp_init   gauge_dev_= 0.001 * ( track_width - 1435. )
#
#  2) Manually by defining the variables gauge_average and gauge_dev_
#
    func const gauge_average=1435. # Gauge to be removed from the track irregularity file
 #  func const gauge_dev_=-0.008    # Make the track 8 mm tighter
 #  func const gauge_dev_=-0.004    # Make the track 4 mm tighter
    func const gauge_dev_= 0.000    # Do not change the gauge
 #  func const gauge_dev_= 0.004    # Make the track 4 mm wider
 #  func const gauge_dev_= 0.008    # Make the track 8 mm wider

##
##      Insertion of standard commands for all types of vehicles.
##      ==========================================================
  insert file vhedat/std_inserts.ins

##
##      Insert default vehicle properties
##      ==========================================================
  insert file vhedat/BoBo.propf

##
##      Start positions along the track
##      ==========================================================
  func const sstart_1= Xtrac_start-(2+aba_11+acb_1)              # vehicle #1
  func const sstart_2= sstart_1-(acb_1+aba_12+2+2+aba_21+acb_2)  # vehicle #2
  func const sstart_3= sstart_2-(acb_2+aba_22+2+2+aba_31+acb_3)  # vehicle #3

##
##      Change of vehicle data parameters
##      ==========================================================

##
##      Insert vehicle model-file
##      ==========================================================
  insert file vhedat/BoBo.ins

##
##      Limit values according to UIC 518 and CEN/TC 256 WG 10
##      ==========================================================
  insert file vhedat/UIC-518_lim_passenger.ins

##
##      Select type of excitation for program FRESP
##      ==========================================================
# func char cexcitation= Track_Vertical.001
# func char cexcitation= Track_Lateral.001
# insert file track/trc_fexcit.ins

##
##      Read flexible parameters for the car-body
##      ==========================================================
# if_then_char_init CalcType .ne. NPICK
#  insert file npickr/$IDENT.npickr
# endif

##
##      Set initial values
##      ===============================================================
# if_then_char_init CalcType .eq. TSIM  .or.
#                   CalcType .eq. MODAL
#  initval read_gpdat gp/$IDENT.gp 1
# endif

##
##      Store extra variables for postprocessing
##      ===============================================================
# s_var force_on  bog_11  k      # Store all forces acting on specified mass (for debugging)

##
##      Excite the vehicle in order to calculate critical speed
##      ===============================================================
# initval set_var  car_1.vy= .15
# initval set_var  car_1.vp= .15
# force rel_lsys1  retard_car_1    car_1   0 0 -hccg_1   -mc_1*5/3.6  0. 0.  0. 0. 0.     # Apply redardation 5[km/h/s]  
# force rel_lsys1  retard_bog_11   bog_11  0 0 -hbcg_11  -mb_11*5/3.6 0. 0.  0. 0. 0.     # as external forces
# force rel_lsys1  retard_bog_12   bog_12  0 0 -hbcg_12  -mb_12*5/3.6 0. 0.  0. 0. 0.
# force rel_lsys1  retard_axl_111  axl_111 0 0 -ro_111  -(ma_111+Jka_111/ro_111^2)*5/3.6 0. 0.  0. 0. 0.
# force rel_lsys1  retard_axl_112  axl_112 0 0 -ro_112  -(ma_112+Jka_112/ro_112^2)*5/3.6 0. 0.  0. 0. 0.
# force rel_lsys1  retard_axl_121  axl_121 0 0 -ro_121  -(ma_121+Jka_121/ro_121^2)*5/3.6 0. 0.  0. 0. 0.
# force rel_lsys1  retard_axl_122  axl_122 0 0 -ro_122  -(ma_122+Jka_122/ro_122^2)*5/3.6 0. 0.  0. 0. 0.

##
##      Stop the simulation at the end of the track
##     (if not tstop will end the simulation first)
##      ==========================================================
  tstop=  10.
  if_then lsa_111.pn .gt. Xtrac_stop
   func print06_char_all " "
   func print06_char_all " Execution interrupted due to lsa_111.pn > Xtrac_stop"
   func print06_char_all " ----------------------------------------------------"
   func stop
  endif

eof  # Always end the input data file with an eof-mark.