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.
 
 
 
 
 
 

64 lines
3.7 KiB

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