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.
 
 
 
 
 
 

62 lines
3.8 KiB

  1. MODULE Fluid_Flow_Startup_Vars
  2. !!! In this module constants and conversion factors are stated
  3. REAL , PARAMETER :: RUniversal = 10.73159 ! [psia.ft^3/(lbmole.R)]
  4. REAL , PARAMETER :: RUniversalSI = 8.314 * 10**6 ! [Pa.cm^3/(mole.K)]
  5. ! REAL , PARAMETER :: PI = 3.141593 ! Pi number
  6. REAL , PARAMETER :: StandardPress = 14.7 ! [psia]
  7. REAL , PARAMETER :: StandardTemp = 519.67 ! 60 F [R] , Temp F = Temp R + 459.67
  8. REAL , PARAMETER :: dt = 0.1 ! time step = 0.1 [s]
  9. REAL , PARAMETER :: GasDensityRefrence = 28.96 ! molar weight of air [lbm/lbmole]
  10. !! Tolerance and convergence or error criteria
  11. REAL , PARAMETER :: UTubePressTolerance = 4 ! minimum pressure tolerance between two arms of U tube for which calculations will stop [psi]
  12. !REAL , PARAMETER :: PressDensityTolerance = 2 ! Pressure Density Tolerance: for flow elements with density below this amount (usually gas pockets),
  13. ! frictional and gravitional pressure gradients are neglected [ppg]
  14. REAL , PARAMETER :: PressLengthTolerance = 0.0 ! Pressure Length Tolerance: for flow elements with length below this amount,
  15. ! frictional and gravitional pressure gradients are neglected [ft]
  16. REAL , PARAMETER :: PressFlowrateTolerance = 0.2 ! Pressure Flowrate Tolerance: for flow elements with flowrates below this amount,
  17. ! frictional pressure gradients are neglected [gpm]
  18. REAL , PARAMETER :: KickConvergenceTolerance = 0.05 ! absolute value of maximum error in calculation of gas kick pressure and flowrate
  19. !!!!!!!!!!!!!!!!!! Conversion factors
  20. REAL , PARAMETER :: Convlbftolbm = 32.174 ! 1 lbf = 32.174 lbm*ft/s^2
  21. REAL , PARAMETER :: Convft3toUSgal = 7.48052 ! 1 ft^3 = 7.48052 US gal
  22. REAL , PARAMETER :: Convfttom = 0.3048 ! 1 ft = 0.3048 m
  23. REAL , PARAMETER :: Convfttoinch = 12.0 ! 1 ft = 12 inch
  24. REAL , PARAMETER :: Convdaytohour = 24.0 ! 1 day = 24 hour
  25. REAL , PARAMETER :: Convhourtomin = 60.0 ! 1 hour = 60 min
  26. REAL , PARAMETER :: Convmintosec = 60.0 ! 1 min = 60 sec
  27. REAL , PARAMETER :: ConvpsitoPa = 6894.76 ! 1 psi = 6894.76 pa
  28. REAL , PARAMETER :: ConvRtoK = 0.555556 ! 1 R = 0.555556 K
  29. REAL , PARAMETER :: Convpcftogpcm3 = 0.0160185 ! 1 lbm/ft^3 = 0.0160185 gr/cm^3
  30. !!!!!!!!!!!!!!!!!
  31. !!!!!!! Bit data !!!!!!
  32. ! Type :: BitDataType
  33. LOGICAL :: BitTrue ! bit may be present (.TRUE.) or may be absent(.FALSE.)
  34. REAL :: BitNozzleArea ! area of a nozzle
  35. INTEGER :: BitNozzleNum ! Number of bit nozzles
  36. REAL :: BitNozzDia ! nozzle diameter in 1/32 in
  37. REAL :: BitTotNozzArea ! Total bit area
  38. REAL :: BitCd ! Discharge coefficient
  39. REAL :: BitPressLoss ! bit pressure loss [psi]
  40. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  41. REAL :: Theta600Refrence , Theta300Refrence ! Fann data (Theta600 and Theta300) of active tank (input from panel)
  42. REAL :: DensityRefrence ! Density of active tank mud (input from panel) [gpm]
  43. ! End Type BitDataType
  44. ! Type(BitDataType)::BitData
  45. TYPE, PUBLIC :: GasData
  46. REAL :: CritPress ! critical pressure [psia]
  47. REAL :: CritTemp ! critical temperature [R]
  48. REAL :: MolarWt ! molar weight [lbm/lbmole]
  49. REAL :: StDensity ! density at standard pressure (14.7 psi) and temperature (60 F = 520 Ra) [lbm/ft^3]
  50. REAL :: GasConstant ! Gas constant = RUniversal/MolarWt [psia.ft^3/(R.lbm)]
  51. END TYPE GasData
  52. END MODULE