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