anchor.diff:     COMPLEX(ReKi)                                  :: Currentm    ! Magnitizing current (amps)
                                                     
      REAL(ReKi)                                     :: ComDenom    ! Common denominator of variables used in the TEC model
  -   REAL(ReKi)                                     :: HSSBrFrac   ! Fraction of full braking torque {0 (off) <= HSSBrFrac <= 1 (full)} (-)
      REAL(ReKi)                                     :: PwrLossS    ! Power loss in the stator (watts)
      REAL(ReKi)                                     :: PwrLossR    ! Power loss in the rotor (watts)
      REAL(ReKi)                                     :: PwrMech     ! Mechanical power (watts)
  
positive.code:       CHARACTER(*),                   INTENT(  OUT)  :: ErrMsg      !< Error message if ErrStat /= ErrID_None
  
        CHARACTER(*), PARAMETER                        :: RoutineName = 'SrvD_UpdateDiscState'
        REAL(ReKi)                                     :: temp
        
           ! Initialize ErrStat
  
  
negative.code:    REAL(ReKi)                                     :: GenTrq      ! generator torque 
     
     REAL(ReKi)                                     :: ComDenom, ComDenom_du  ! temporary variable (common denominator)
     REAL(ReKi)                                     :: PwrLossS_du ! Power loss in the stator (watts) and its derivative w.r.t. u%HSS_Spd 
     REAL(ReKi)                                     :: PwrLossR_du ! Power loss in the rotor (watts) and its derivative w.r.t. u%HSS_Spd 
     REAL(ReKi)                                     :: PwrMech_du  ! partial derivative of Mechanical power (watts) w.r.t. u%HSS_Spd
     REAL(ReKi)                                     :: Slip        ! Generator slip
     REAL(ReKi)                                     :: SlipRat     ! Generator slip ratio
     
     REAL(ReKi)                                     :: A, B, dAdu, dBdu
     REAL(ReKi)                                     :: SlipRat_du ! temporary variables for computing derivatives
        
     !REAL(ReKi)                                     :: S2          ! SlipRat**2
  