Simulation Core
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 
 

44 řádky
1.5 KiB

  1. subroutine PowerLimits
  2. !subroutine PowerLimits(Power_sigma)
  3. USE Pump_VARIABLES, only: PUMP
  4. USE Drawworks_VARIABLES, only: Drawworks
  5. USE RTable_VARIABLES, only: RTable
  6. USE CPowerVariables, only: NumberOfgenerators, GeneratorPowerRating
  7. USE CDrillingConsoleVariables
  8. USE equipments_PowerLimit
  9. IMPLICIT NONE
  10. !integer :: ii
  11. Power_sigma=2.d0*(PUMP(1)%Vt*PUMP(1)%ia_new)+2.d0*(PUMP(2)%Vt*PUMP(2)%ia_new)+2.d0*(PUMP(3)%Vt*PUMP(3)%ia_new)+(RTable%Vt*RTable%ia_new)+2.d0*(Drawworks%Vt*Drawworks%ia_new)
  12. !write(*,*) 'Power_sigma=', Power_sigma
  13. power_num_of_Jenerators=sngl(NumberOfgenerators)
  14. Jenerator_power=GeneratorPowerRating
  15. drilling_console_Jenerators(1)=GEN1BTNLED
  16. drilling_console_Jenerators(2)=GEN2BTNLED
  17. drilling_console_Jenerators(3)=GEN3BTNLED
  18. drilling_console_Jenerators(4)=GEN4BTNLED
  19. drilling_num_of_Jenerators=0.d0
  20. !do ii=1,4
  21. ! if (drilling_console_Jenerators(ii)=1) then
  22. ! drilling_num_of_Jenerators=drilling_num_of_Jenerators+1.
  23. ! end if
  24. !end do
  25. drilling_num_of_Jenerators=sngl(sum(drilling_console_Jenerators))
  26. !drilling_num_of_Jenerators=1.d0
  27. if (power_num_of_Jenerators>drilling_num_of_Jenerators) then
  28. num_of_active_Jenerators=drilling_num_of_Jenerators
  29. else if (power_num_of_Jenerators<=drilling_num_of_Jenerators) then
  30. num_of_active_Jenerators=power_num_of_Jenerators
  31. end if
  32. max_Power_sigma=num_of_active_Jenerators*Jenerator_power
  33. end subroutine PowerLimits