subroutine TD_ForceUpS(i,TD_SemiMudVisc)
    
   Use TD_DrillStemComponents
   use SimulationVariables !@
   use SimulationVariables !@
   use SimulationVariables !@
   

   implicit none
   
   Integer :: i
   Real(8) :: TD_SemiMudVisc , TD_SemiAngle
   
   
   if ( data%State%TD_DrillStems(i)%StartAngle<=(pi/180.) ) then
       TD_SemiAngle = (pi/180.)
   else
       TD_SemiAngle = data%State%TD_DrillStems(i)%StartAngle
   end if
   
   
   If (i==1) then
       data%State%TD_DrillStems(1)%Force1 = -data%State%TD_String%WeightOnBit
       data%State%TD_DrillStems(i)%Force2 = data%State%TD_DrillStems(i)%Force1 +  (data%State%TD_DrillStems(i)%WeightperLength * data%State%TD_DrillStems(i)%Length * &
                            data%State%TD_DrillStems(i)%BouyancyFactor * (cos(data%State%TD_DrillStems(i)%StartAngle) + &
                            (TD_SemiMudVisc * sin(data%State%TD_DrillStems(i)%StartAngle))))
       
       
       if (data%State%TD_DrillStems(i)%ComponentType==0) then
           data%State%TD_DrillStems(i)%Torque = data%State%TD_String%BitTorque
       else
           data%State%TD_DrillStems(i)%Torque = data%State%TD_DrillStems(i)%MudViscosity* data%State%TD_DrillStems(i)%BouyancyFactor* &
                            data%State%TD_DrillStems(i)%WeightperLength* data%State%TD_DrillStems(i)%Length* data%State%TD_DrillStems(i)%RtoolJoint * &
                            sin(TD_SemiAngle)
       end if
       
       return
   End If
   
   
!=========> F1 Calculation
   data%State%TD_DrillStems(i)%Force1 = data%State%TD_DrillStems(i-1)%Force2
   
    
!=========> F2 Calculation
    data%State%TD_DrillStems(i)%Force2 = data%State%TD_DrillStems(i)%Force1 +  (data%State%TD_DrillStems(i)%WeightperLength * data%State%TD_DrillStems(i)%Length * &
                            data%State%TD_DrillStems(i)%BouyancyFactor * (cos(data%State%TD_DrillStems(i)%StartAngle) + &
                            (TD_SemiMudVisc * sin(data%State%TD_DrillStems(i)%StartAngle))))
   
   !Strains(i)%Dl = TDForces(i)%Force * (Elements(i)%Length  ) / &
   !                          (Elements(i)%Area * Element%ElasticModule)
     
   
   data%State%TD_DrillStems(i)%Torque = data%State%TD_DrillStems(i)%MudViscosity* data%State%TD_DrillStems(i)%BouyancyFactor* &
                            data%State%TD_DrillStems(i)%WeightperLength* data%State%TD_DrillStems(i)%Length* data%State%TD_DrillStems(i)%RtoolJoint * &
                            sin(TD_SemiAngle)
   
   
   !!if (data%State%TD_DrillStems(i)%Torque>500.) then
   !      print* , 'data%State%TD_String%TotalTorque=' , i , data%State%TD_String%TotalTorque , data%State%TD_DrillStems(i)%Torque , data%State%TD_String%WeightOnBit
   !      print* , 'propertiess=' , data%State%TD_DrillStems(i)%Force2 , data%State%TD_DrillStems(i)%Force1 , data%State%TD_DrillStems(i)%MudViscosity , data%State%TD_DrillStems(i)%EndAngle , data%State%TD_DrillStems(i)%StartAngle , data%State%TD_DrillStems(i)%WeightperLength , data%State%TD_DrillStems(i)%MudVisCorrectCoef
   !  !end if
   
   
end subroutine