Simulation Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CHOKE_VARIABLES.f90 3.5 KiB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. MODULE CHOKEVARIABLES
  2. !IMPLICIT DOUBLEPRECISION(A-H,O-Z)
  3. use CBopControlPanelVariables
  4. use CEquipmentsConstants
  5. use CSimulationVariables
  6. use CAccumulatorVariables
  7. use CBopStackVariables
  8. use CChokeControlPanelVariables
  9. IMPLICIT NONE
  10. !===========================================================================
  11. ! CHOKE VARIABLES
  12. !===========================================================================
  13. REAL Ycritical,Cp,Cv,CL,kRatio,nPolytripic,x1,SGliquid,WaterDensity,LiquidDensity,VL,VG1
  14. REAL epsilon_step,epsilon_abs,step_size,Ycritical_a,Ycritical_b,Ycritical_c
  15. REAL G2,Cdrag,Pwh,MixDens2,Yratio_a,Yratio_b,Yratio_c,Yratio,Yratio_low,Yratio_high
  16. REAL FlowRate,Patm,MassFlux,LiquidPPG,time2,AreaChoke
  17. REAL eps_step,eps_abs,Yratiomat(100),Yrario_actual,Yrario
  18. REAL :: DegreeOpen,GRAVITY1=9.81!,PercentClose
  19. REAL ChokedMassFlux,ChokedFlowRate,PwhChoked
  20. REAL TotalStrokes1,TotalStrokes2
  21. !INTEGER WashoutMalf,PlugMalf,failMalf
  22. INTEGER GaugeChokePositionMailf,SoundChokePump
  23. Real Cumulative_AirVolume_Choke
  24. Real HydraulicChoke1WashoutCoef,HydraulicChoke2WashoutCoef
  25. Real Present_HydraulicChoke1Plug, Present_HydraulicChoke2Plug,DeltaPlug1Percent,DeltaPlug2Percent
  26. Integer HydraulicChoke1PluggedPercent_Old,HydraulicChoke2PluggedPercent_Old,Plug1TimeCounter,Plug2TimeCounter,ChokePlugTimeDelay
  27. Real ChokeAreaFullyOpen
  28. !===========================================================================
  29. ! AIR DRIVEN PUMP VARIABLES
  30. !===========================================================================
  31. REAL QAIR_PUMP,cc1,cc2,cc3,cc4,cc5
  32. PARAMETER PI=3.141593
  33. INTEGER ChokeAirFail
  34. !============================================================================
  35. ! OIL & ENVIRONMENT VARIABLES
  36. !============================================================================
  37. REAL:: SG=1.12,WDENS=1000,GRAVITY=9.81,RE_CR=2000,NU=9e-6
  38. !specific gravity of liquid
  39. !water density(kg/m^3)
  40. !===========================================================================
  41. ! AIR PUMP LINE COMPUTATIONAL VARIABLES
  42. !===========================================================================
  43. !logical ChokeIsClosing,ChokeIsOpening
  44. REAL ChokeControlLeverOld
  45. REAL P_AIRP,QITER,DELTAV_AIR,TIME,DeltaT_Choke,TOL_AIR
  46. REAL diffp_air,losses_air,pipe_loss1air,minor_loss1air,static_loss1air
  47. integer NO_PIPINGS_AIRPLINE,NO_MINORS_AIRPLINE
  48. REAL,ALLOCATABLE:: Re_air(:),DIAM_AIR_MM(:),DIAM_AIR_INCH(:),AREA_AIR(:),REL_ROUGHAIR(:),LENGT_AIR(:),LF_AIR(:),CV_AIR(:),NOTE_AIR(:)
  49. REAL,ALLOCATABLE:: fric_air(:),fricloss_air(:),minlosspa_air(:),minloss_air(:),MINORS_AIRPUMP(:,:)
  50. REAL,ALLOCATABLE:: MINORDIAM_AIR_INCH(:),MINORAREA_AIR(:)
  51. REAL,ALLOCATABLE:: ROUGHNESS_AIRPLINE(:),PIPINGS_AIRPUMP(:,:)
  52. REAL Acylinder,CourseBase!,PassedCourse
  53. REAL alpha_Qair,alpha_timeair,alpha_pairp,alpha_diffpair,alpha_lossesair,alpha_Pdownstrem,Pdownstrem
  54. !=================================================================================
  55. TYPE, PUBLIC :: CHOKE_TypeVars
  56. INTEGER WashoutMalf,PlugMalf,failMalf
  57. REAL PercentClose,PassedCourse,AreaChoke,AreaChokeFinal
  58. logical ChokeIsClosing,ChokeIsOpening
  59. END TYPE CHOKE_TypeVars
  60. TYPE(CHOKE_TypeVars), DIMENSION(1:2) :: CHOOKE
  61. !TYPE, PUBLIC :: BOP_TypeVars2D
  62. !REAL, ALLOCATABLE:: minlosspa(:,:),minloss(:,:)
  63. !REAL,ALLOCATABLE:: Re_ramline(:,:),fric(:,:),fricloss(:,:)
  64. !
  65. !
  66. !END TYPE BOP_TypeVars2D
  67. !
  68. !TYPE(BOP_TypeVars2D) :: RAMS
  69. ! 1 : CHOKE1
  70. ! 2 : CHOKE2
  71. END MODULE