Simulation Core
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

44 righe
1.6 KiB

  1. subroutine PowerLimits
  2. !subroutine PowerLimits(Power_sigma)
  3. USE Pumps_VARIABLES, only: PUMP
  4. USE Drawworks_VARIABLES, only: Drawworks
  5. USE RTable_VARIABLES, only: RTable
  6. USE CPowerVariables, only: Power%NumberOfgenerators, Power%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(Power%NumberOfgenerators)
  14. Jenerator_power=Power%GeneratorPowerRating
  15. drilling_console_Jenerators(1)=DrillingConsole%GEN1BTNLED
  16. drilling_console_Jenerators(2)=DrillingConsole%GEN2BTNLED
  17. drilling_console_Jenerators(3)=DrillingConsole%GEN3BTNLED
  18. drilling_console_Jenerators(4)=DrillingConsole%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