Simulation Core
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

PowerLimits.f90 1.6 KiB

1 rok temu
1 rok temu
1 rok temu
1 rok temu
1 rok temu
1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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