Simulation Core
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

182 linhas
10 KiB

  1. # 1 "/home/admin/SimulationCore2/Equipments/BopStack/VARIABLES.f90"
  2. MODULE BopVariables
  3. use DynamicDoubleArray, only:DynamicDoubleArrayType
  4. IMPLICIT NONE
  5. !===========================================================================
  6. ! INPUT VARIABLES
  7. !===========================================================================
  8. type :: BopStackInputType
  9. REAL,ALLOCATABLE:: MINORS1(:,:),PIPINGS_RAMLINE(:,:),MINORS_ANNULAR(:,:),PIPINGS_ANNULAR(:,:),PIPINGS_AIRPUMP(:,:),MINORS_AIRPUMP(:,:)
  10. integer AnnularOpenLedMine,AnnularCloseLedMine,UpperRamsCloseLEDMine,UpperRamsOpenLEDMine,LowerRamsOpenLEDMine,LowerRamsCloseLEDMine
  11. integer MiddleRamsOpenLEDMine,MiddleRamsCloseLEDMine,KillLineOpenLedMine,KillLineCloseLedMine,ChokeLineOpenLEDMine,ChokeLineCloseLEDMine
  12. integer BOP_timeCounter
  13. end type BopStackInputType
  14. !===========================================================================
  15. ! ACC. VARIABLES
  16. !===========================================================================
  17. REAL,PARAMETER :: PressureDifferenceSteps = 20. ,BaseDifferenceP= 200. ! psi
  18. type::BopStackAccType
  19. REAL FVR_TOT,BOTTLE_CAPACITY,PRAMS_REGSET,acc_ChargedPressure,acc_MinPressure,ACC_PRECHARGE,ByPassOld
  20. REAL pram_reg,test1,test2,test3,test4,test5,test6,test7,test8,test9,ax,bx
  21. integer NOBOTTLES,AccPupmsFailMalf,AirSupplyPressureGaugeMalf,ManifoldPressureGaugeMalf,AccumulatorPressureGaugeMalf,RigAirMalf
  22. real Cumulative_AirVolume, PressureDifference
  23. integer SoundKoomeyAirPump
  24. end type BopStackAccType
  25. !===========================================================================
  26. ! RAM LINE COMPUTATIONAL VARIABLES
  27. !===========================================================================
  28. type:: RamLineType
  29. logical ShearRamIsClosing,ShearRamIsOpening
  30. REAL ShearRamsLeverOld,NoActiveRmas
  31. !REAL checkp,p_acccheck
  32. REAL P_ACC,FVR,DeltaT_BOP
  33. REAL diffp_air,losses_air,Qup,kinetic_air,pipe_loss1air,minor_loss1air,static_loss1air!,pipe_loss1_before,minor_loss1,static_loss1,kinetic_loss1,pipe_loss1
  34. !REAL loss_before,pipe_loss2,minor_loss2,deltah,static_loss2,kinetic_loss2,loss_after
  35. integer AIRP_SWITCH,ELECP_SWITCH,ShearBop_closed,FINISHED_shear,EOF,NO_MINORSRAMLINE,NO_PIPINGSRAMLINE,NO_PIPINGS_AIRPLINE,NO_MINORS_AIRPLINE
  36. integer counter,iteration,ShearBop_Situation_forTD
  37. real BA1,BA2,BA3,BA4,BBA1,BBA2,BBA3,BBA4
  38. REAL B1,B2,B3,B4
  39. REAL,ALLOCATABLE:: Re_air(:),DIAM_AIR_MM(:),DIAM_AIR_INCH(:),AREA_AIR(:),REL_ROUGHAIR(:),LENGT_AIR(:),LF_AIR(:),CV_AIR(:),NOTE_AIR(:)
  40. REAL,ALLOCATABLE:: fric_air(:),fricloss_air(:),minlosspa_air(:),minloss_air(:)
  41. REAL,ALLOCATABLE:: MINORDIAM_AIR_INCH(:),MINORAREA_AIR(:)
  42. REAL,ALLOCATABLE:: DIAM_RAMLINE_INCH(:),DIAM_RAMLINE_MM(:),AREA_RAMLINE(:),ROUGHNESS_AIRPLINE(:),ROUGHNESS_RAMLINE(:),RELROUGH_RAMLINE(:),LENGT_RAMLINE(:),LF_RAMLINE(:),CV_RAMLINE(:),NOTE_RAMLINE(:),AREAMINOR_RAMLINE(:)
  43. !REAL,ALLOCATABLE:: Re_ramline(:),fric(:),fricloss(:)
  44. REAL,ALLOCATABLE:: MINORDIAMETER_RAMLINE(:)
  45. INTEGER,ALLOCATABLE:: ITEM(:),ITEM_PIPING(:),ITEM_PIPINGAIR(:),ITEM_MINORAIR(:)
  46. CHARACTER,ALLOCATABLE:: DECRIPTION(:),DECRIPTION2(:),DECRIPTION_RAM(:),DESCRIPTION_AIR1(:),DESCRIPTION_AIR2(:)
  47. real:: counter_airp,pacc_before
  48. integer Annular_active,ShearBop_active,PipeRam1_active,PipeRam2_active,ChokeLine_active,KillLine_active
  49. end type RamLineType
  50. !===========================================================================
  51. ! ANNULAR PREVENTER COMPUTATIONAL VARIABLES
  52. !===========================================================================
  53. type::AnnularComputationalType
  54. integer PannularTimeStepDelay
  55. type(DynamicDoubleArrayType) :: Pannular_regDelay
  56. logical AnnPressureRise
  57. integer NO_MinorsAnnularLine,NO_PipingsAnnularLine,RamsFirstSet
  58. REAL pa_annular,p_annular
  59. REAL,ALLOCATABLE:: MINORDIAMETER_ANNULARLINE(:),AREAMINOR_ANNULARLINE(:)
  60. !REAL,ALLOCATABLE:: REAL_PregAnnular(:),real_IDAnnular(:),real_pAnnular(:)
  61. REAL REAL_PregAnnular,real_IDAnnular,real_pAnnular
  62. REAL,ALLOCATABLE:: LF_ANNULARLINE(:),CV_ANNULARLINE(:),NOTE_ANNULARLINE(:),minlosspa_ANNULAR(:),minloss_ANNULAR(:)
  63. REAL,ALLOCATABLE:: DIAM_ANNULARLINE_INCH(:),DIAM_ANNULARLINE_MM(:),AREA_ANNULARLINE(:)
  64. REAL,ALLOCATABLE:: LENGT_ANNULARLINE(:),ROUGHNESS_ANNULARLINE(:),RELROUGH_ANNULARLINE(:),Re_ANNULARline(:),fricANNULAR(:),friclossANNULAR(:)
  65. INTEGER,ALLOCATABLE:: ITEMANNULAR(:),ITEM_PIPINGANNULAR(:)
  66. CHARACTER,ALLOCATABLE:: DECRIPTIONANNULAR(:),DECRIPTION2ANNULAR(:),DECRIPTION_ANNULAR(:)
  67. REAL WellBorePressure,acoef,Bcoef,const,AnnularSealingPressure,AnnularMovingPressure
  68. end type AnnularComputationalType
  69. !===========================================================================
  70. ! ANNULAR PREVENTER VARIABLES
  71. !===========================================================================
  72. type :: AnnularType
  73. REAL (8) Pannular_reg
  74. real Pannular_regset
  75. logical AnnularIsClosing,AnnularIsOpening
  76. REAL tolAnnular,tolzeroAnnular
  77. integer Annular_closed,finished_Annular,FirstSet,AnnularFailureMalf,AnnularLeakMalf,AnnularPressureGaugeMalf,Annular_Situation_forTD
  78. REAL AnnularLeverOld,H_AnnularBop,IDAnnular,AbopAnnular,ODDrillpipe_inAnnular,IDAnnularBase,ODDrillpipe_inAnnularBase
  79. REAL NeededVolumeAnnular
  80. end type AnnularType
  81. !===========================================================================
  82. ! PIPE RAMS 1 VARIABLES
  83. !===========================================================================
  84. type::PipeRams1Type
  85. logical IsClosing,IsOpening
  86. REAL PipeRams1DotLeverOld,H
  87. REAL NeededVolume,A,IDBase,ID,ODDrillpipe_in,ODDrillpipe_inBase
  88. integer closed,finished,UpperRamsFailureMalf,UpperRamsLeakMalf,Situation_forTD
  89. ! REAL real_ID
  90. end type PipeRams1Type
  91. !============================================================================
  92. ! SHEAR RAM BOP VARIABLES
  93. !============================================================================
  94. type:: ShearRamType
  95. REAL PA,PB,P_SHEAR,VA,VB,RAM_COURSE,H_REGRAM,H_ShearRamBop
  96. REAL,ALLOCATABLE:: ALPHA_QRAM(:),ALPHA_VDISRAM(:),ALPHA_PACC(:),ALPHA_PREGRAM(:),ALPHA_PBOP(:)
  97. !REAL,ALLOCATABLE:: REAL_TIME(:),REAL_QRAM(:),REAL_VDISRAM(:),REAL_PACC(:),REAL_PREGRAM(:),REAL_PBOP(:),real_IDshearBop(:)
  98. REAL REAL_TIME,REAL_QRAM,REAL_VDISRAM,REAL_PACC,REAL_PREGRAM,REAL_PBOP,real_IDshearBop
  99. REAL IDshearBopBase,IDshearBop,ODDrillpipe_inShearRam,AbopShearRam,NeededVolumeShearRams,ODDrillpipe_inShearRamBase
  100. Real IDshearBopFinal,IDPipeRam1Final,IDPipeRam2Final,IDAnnularFinal,OpenArea_shearBop,OpenArea_PipeRam1,OpenArea_PipeRam2,OpenArea_Annular
  101. Real MinimumOpenArea_InBOP
  102. integer MiddleRamsFailureMalf,MiddleRamsLeakMalf,ShearIsNotAllowed
  103. end type ShearRamType
  104. !===========================================================================
  105. ! PIPE RAMS 2 VARIABLES
  106. !===========================================================================
  107. type::PipeRam2Type
  108. logical IsClosing,IsOpening
  109. REAL LeverOld,H_Bop
  110. REAL NeededVolume,ID,ODDrillpipe_in,ODDrillpipe_inBase
  111. integer closed,finished,LowerRamsFailureMalf,LowerRamsLeakMalf,Situation_forTD
  112. !REAL,ALLOCATABLE:: real_IDPipeRam2(:)
  113. REAL real_ID
  114. end type PipeRam2Type
  115. !===========================================================================
  116. ! CHOKE LINE VARIABLES
  117. !===========================================================================
  118. type::ChokeLineType
  119. logical IsClosing,IsOpening
  120. REAL LeverOld,H_Bop
  121. REAL NeededVolume,Abop,ID,ODDrillpipe_in,IDBase,ODDrillpipe_inBase
  122. integer closed,finished
  123. !REAL,ALLOCATABLE:: real_IDPipeRam1(:)
  124. REAL real_ID
  125. end type ChokeLineType
  126. !===========================================================================
  127. ! KILL LINE VARIABLES
  128. !===========================================================================
  129. type::KillLineType
  130. logical IsClosing,IsOpening
  131. REAL LeverOld,H_Bop
  132. REAL NeededVolume,Abop,ID,ODDrillpipe_in,IDBase,ODDrillpipe_inBase
  133. integer closed,finished
  134. !REAL,ALLOCATABLE:: real_IDPipeRam1(:)
  135. REAL real_ID
  136. end type KillLineType
  137. !============================================================================
  138. ! OIL & ENVIRONMENT VARIABLES
  139. !============================================================================
  140. ! REAL:: SG=1.12,WDENS=1000,GRAVITY=9.81,RE_CR=2000
  141. !specific gravity of liquid
  142. !water density(kg/m^3)
  143. !============================================================================
  144. ! PUMP VARIABLES
  145. !============================================================================
  146. type::PumpsType
  147. REAL P_AIRP,DELTAV_AIR,TOL_AIR,DELTAV_ELECP,Qiter
  148. REAL ELECTRIC_ON,ELECTRIC_OFF,AIR_ON,AIR_OFF,QAIR,QELECTRIC
  149. !REAL,ALLOCATABLE:: alpha_Qair(:),alpha_timeair(:),alpha_paccair(:),alpha_pairp(:),alpha_diffpair(:),alpha_lossesair(:),alpha_fvrair(:)
  150. REAL alpha_Qair,alpha_timeair,alpha_paccair,alpha_pairp,alpha_diffpair,alpha_lossesair,alpha_fvrair
  151. logical SoundKoomeyElectric
  152. end type PumpsType
  153. !=================================================================================
  154. TYPE, PUBLIC :: BOP_TypeVars
  155. REAL vdis_tot,vdis_bottles,deltav_bottles,fvr_air,vdis_elecp,Qzero,Q,flow,tol,TIME,timecounter_ram,clock
  156. integer bop_type, SuccessionCounter, SuccessionCounterOld,First_CloseTimecheck,First_OpenTimecheck,FourwayValve ! FourwayValve 1: Open , 0: Close
  157. REAL loss_before,pipe_loss2,minor_loss2,deltah,static_loss2,kinetic_loss2,loss_after,TOLZERO,diffp_ram
  158. REAL checkp,p_acccheck,P_BOP,minor_loss1,static_loss1,kinetic_loss1,pipe_loss1
  159. Logical Bottles_Charged_MalfActive
  160. END TYPE BOP_TypeVars
  161. ! 1 : Annular (RNUMBER)
  162. ! 2 : PipeRam1 (RNUMBER)
  163. ! 3 : PipeRam2 (RNUMBER)
  164. ! 4 : ShearRam (RNUMBER)
  165. ! 5 : ChokeLine (RNUMBER)
  166. ! 6 : KillLine (RNUMBER)
  167. TYPE, PUBLIC :: BOP_TypeVars2D
  168. REAL, ALLOCATABLE:: minlosspa(:,:),minloss(:,:)
  169. REAL,ALLOCATABLE:: Re_ramline(:,:),fric(:,:),fricloss(:,:)
  170. END TYPE BOP_TypeVars2D
  171. END MODULE