Up

##
##       Calculate and store a number of flange wear index's in the contant point
##       ========================================================================
  insert file $gensys/calc/insert_files/fl_weare1.ins  # Define substructure fl_wear.
#
  in_substruct fl_wear [ 1 111 ]                       # Make a call to fl_wear
  in_substruct fl_wear [ 1 112 ]                       # for each wheelset

##
##       Create a substructure save_fl_wear, for saving the result variables
##       ========================================================================
 substruct save_fl_wear [
  s_var sngl     wYa_$1	        	# Guiding force times angle of attack
  s_var scalar_0 wYa_$1

  s_var sngl     uFny_$1		# Creep*creepforce in contact point tread
  s_var scalar_0 uFny_$1
  if_then_init .exist. vFny_$1
   s_var sngl     vFny_$1		# Creep*creepforce in contact point flange
   s_var scalar_0 vFny_$1
  endif
  s_var sngl     wFny_$1		# Creep*creepforce tread+flange
  s_var scalar_0 wFny_$1

  s_var sngl     uFMny_$1		# Energy dissipation in contact point tread
  s_var scalar_0 uFMny_$1
  if_then_init .exist. vFMny_$1
   s_var sngl     vFMny_$1		# Energy dissipation in contact point flange
   s_var scalar_0 vFMny_$1
  endif
  s_var sngl     wFMny_$1		# Total energy dissipation tread+flange
  s_var scalar_0 wFMny_$1
 ]
  in_substruct save_fl_wear [ 111r ]	# Make calls to the save_fl_wear-
  in_substruct save_fl_wear [ 111l ]	# substructure one call for each wheel.
  in_substruct save_fl_wear [ 112r ]
  in_substruct save_fl_wear [ 112l ]


 s_var scalar_0 Curve_radius            # Save the radius of the curve as a scalar, in order to
                                        # make a joint plots in MPLOT.