@@ -1,5 +1,7 @@ | |||
module CStringConfiguration | |||
use CStringConfigurationVariables | |||
use ConfigurationVariables | |||
implicit none | |||
public | |||
contains | |||
@@ -14,41 +16,41 @@ module CStringConfiguration | |||
type(CStringItem), intent(inout), target :: array(count) | |||
type(CBitInfo), intent(inout) :: bit | |||
type(CStringItem), pointer :: item | |||
StringConfiguration%BitDefinition%BitType = bit%BitType | |||
StringConfiguration%BitDefinition%BitSize = bit%BitSize | |||
StringConfiguration%BitDefinition%BitCodeHundreds = bit%BitCodeHundreds | |||
StringConfiguration%BitDefinition%BitCodeTens = bit%BitCodeTens | |||
StringConfiguration%BitDefinition%BitCodeOnes = bit%BitCodeOnes | |||
StringConfiguration%BitDefinition%BitNozzleSize = bit%BitNozzleSize | |||
StringConfiguration%BitDefinition%BitLength = bit%BitLength | |||
StringConfiguration%BitDefinition%BitWeightPerLength = bit%BitWeightPerLength | |||
StringConfiguration%BitDefinition%BitNozzleNo = bit%BitNozzleNo | |||
StringConfiguration%BitDefinition%FloatValve = bit%FloatValve | |||
StringConfiguration%StringConfigurationCount = count | |||
Configuration%StringConfiguration%BitDefinition%BitType = bit%BitType | |||
Configuration%StringConfiguration%BitDefinition%BitSize = bit%BitSize | |||
Configuration%StringConfiguration%BitDefinition%BitCodeHundreds = bit%BitCodeHundreds | |||
Configuration%StringConfiguration%BitDefinition%BitCodeTens = bit%BitCodeTens | |||
Configuration%StringConfiguration%BitDefinition%BitCodeOnes = bit%BitCodeOnes | |||
Configuration%StringConfiguration%BitDefinition%BitNozzleSize = bit%BitNozzleSize | |||
Configuration%StringConfiguration%BitDefinition%BitLength = bit%BitLength | |||
Configuration%StringConfiguration%BitDefinition%BitWeightPerLength = bit%BitWeightPerLength | |||
Configuration%StringConfiguration%BitDefinition%BitNozzleNo = bit%BitNozzleNo | |||
Configuration%StringConfiguration%BitDefinition%FloatValve = bit%FloatValve | |||
Configuration%StringConfiguration%StringConfigurationCount = count | |||
if(StringConfiguration%BitDefinition%FloatValve) then | |||
if(Configuration%StringConfiguration%BitDefinition%FloatValve) then | |||
call InstallFloatValve() | |||
else | |||
call RemoveFloatValve() | |||
endif | |||
if(size(StringConfiguration%StringConfigurations) > 0) then | |||
deallocate(StringConfiguration%StringConfigurations) | |||
if(size(Configuration%StringConfiguration%StringConfigurations) > 0) then | |||
deallocate(Configuration%StringConfiguration%StringConfigurations) | |||
end if | |||
if(count > 0) then | |||
allocate(StringConfiguration%StringConfigurations(count)) | |||
allocate(Configuration%StringConfiguration%StringConfigurations(count)) | |||
!j = count | |||
do i = 1, count | |||
item => array(i) | |||
StringConfiguration%StringConfigurations(i)%ComponentType = item%ComponentType | |||
StringConfiguration%StringConfigurations(i)%NumberOfJoint = item%NumberOfJoint | |||
StringConfiguration%StringConfigurations(i)%LengthPerJoint = item%LengthPerJoint | |||
StringConfiguration%StringConfigurations(i)%NominalOd = item%NominalOd | |||
StringConfiguration%StringConfigurations(i)%NominalId = item%NominalId | |||
StringConfiguration%StringConfigurations(i)%WeightPerLength = item%WeightPerLength | |||
StringConfiguration%StringConfigurations(i)%ComponentLength = item%ComponentLength | |||
StringConfiguration%StringConfigurations(i)%NominalToolJointOd = item%NominalToolJointOd | |||
StringConfiguration%StringConfigurations(i)%Grade = item%Grade | |||
Configuration%StringConfiguration%StringConfigurations(i)%ComponentType = item%ComponentType | |||
Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint = item%NumberOfJoint | |||
Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint = item%LengthPerJoint | |||
Configuration%StringConfiguration%StringConfigurations(i)%NominalOd = item%NominalOd | |||
Configuration%StringConfiguration%StringConfigurations(i)%NominalId = item%NominalId | |||
Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength = item%WeightPerLength | |||
Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength = item%ComponentLength | |||
Configuration%StringConfiguration%StringConfigurations(i)%NominalToolJointOd = item%NominalToolJointOd | |||
Configuration%StringConfiguration%StringConfigurations(i)%Grade = item%Grade | |||
!print*, 'type=', StringConfigurations(i)%ComponentType | |||
!print*, 'NumberOfJoint=', StringConfigurations(i)%NumberOfJoint | |||
!print*, '-----------------------------------------------------------' | |||
@@ -1,7 +1,7 @@ | |||
module CStringConfigurationVariables | |||
! use ConfigurationVariables, only: Configuration | |||
implicit none | |||
public | |||
public | |||
!constants | |||
integer :: Bit_ComponentType = 0 | |||
integer :: Stabilizer_ComponentType = 1 | |||
@@ -49,7 +49,5 @@ module CStringConfigurationVariables | |||
type(CStringItem), allocatable :: StringConfigurations(:) | |||
type(CBitInfo) :: BitDefinition | |||
End type StringConfigurationType | |||
Type(StringConfigurationType)::StringConfiguration | |||
contains | |||
end module CStringConfigurationVariables |
@@ -1,5 +1,6 @@ | |||
module CFormation | |||
use CFormationVariables | |||
use ConfigurationVariables | |||
implicit none | |||
public | |||
contains | |||
@@ -11,27 +12,26 @@ module CFormation | |||
integer :: i | |||
type(CFormationItem), intent(inout), target :: array(count) | |||
type(CFormationItem), pointer :: item | |||
Formation%Count = count | |||
if(size(Formation%Formations) > 0) then | |||
deallocate(Formation%Formations) | |||
Configuration%Formation%Count = count | |||
if(size(Configuration%Formation%Formations) > 0) then | |||
deallocate(Configuration%Formation%Formations) | |||
end if | |||
if(count > 0) then | |||
allocate(Formation%Formations(count)) | |||
allocate(Configuration%Formation%Formations(count)) | |||
do i = 1, count | |||
item => array(i) | |||
Formation%Formations(i)%Top = item%Top | |||
Formation%Formations(i)%Thickness = item%Thickness | |||
Formation%Formations(i)%Drillablity = item%Drillablity | |||
Formation%Formations(i)%Abrasiveness = item%Abrasiveness | |||
Formation%Formations(i)%ThresholdWeight = item%ThresholdWeight | |||
Formation%Formations(i)%PorePressureGradient = item%PorePressureGradient | |||
Configuration%Formation%Formations(i)%Top = item%Top | |||
Configuration%Formation%Formations(i)%Thickness = item%Thickness | |||
Configuration%Formation%Formations(i)%Drillablity = item%Drillablity | |||
Configuration%Formation%Formations(i)%Abrasiveness = item%Abrasiveness | |||
Configuration%Formation%Formations(i)%ThresholdWeight = item%ThresholdWeight | |||
Configuration%Formation%Formations(i)%PorePressureGradient = item%PorePressureGradient | |||
!print*, "===========================" | |||
!print*, "Formations(", i, ")%Top=", Formations(i)%Top | |||
!print*, "Formations(",i,")%Thickness", Formations(i)%Thickness | |||
!print*, "Formations(",i,")%Drillablity", Formations(i)%Drillablity | |||
end do | |||
end if | |||
SetFormations = 0 | |||
end function SetFormations | |||
end module CFormation |
@@ -1,6 +1,7 @@ | |||
module CFormationVariables | |||
! use ConfigurationVariables, only: Configuration | |||
implicit none | |||
public | |||
public | |||
! types | |||
! Pipe Items in String Array | |||
@@ -17,7 +18,4 @@ module CFormationVariables | |||
integer :: Count = 0 | |||
type(CFormationItem), allocatable :: Formations(:) | |||
End type FormationType | |||
Type(FormationType) :: Formation | |||
contains | |||
end module CFormationVariables |
@@ -1,15 +0,0 @@ | |||
module CLesson | |||
use CLessonVariables | |||
implicit none | |||
public | |||
contains | |||
subroutine SetWellProfileApproach(path, survey) | |||
!DEC$ ATTRIBUTES DLLEXPORT :: SetWellProfileApproach | |||
!DEC$ ATTRIBUTES ALIAS: 'SetWellProfileApproach' :: SetWellProfileApproach | |||
implicit none | |||
logical, intent(in) :: path | |||
logical, intent(in) :: survey | |||
Lesson%IsPathGeneration = path | |||
Lesson%IsWellSurveyData = survey | |||
end subroutine | |||
end module CLesson |
@@ -1,9 +0,0 @@ | |||
module CLessonVariables | |||
implicit none | |||
public | |||
type:: LessonType | |||
logical :: IsPathGeneration | |||
logical :: IsWellSurveyData | |||
end type LessonType | |||
type(LessonType)::Lesson | |||
end module CLessonVariables |
@@ -1,278 +0,0 @@ | |||
module CDownHole | |||
use CDownHoleVariables | |||
implicit none | |||
public | |||
!abstract interface | |||
! subroutine ActionFluid(array) | |||
! use CDownHoleVariables | |||
! type(CFluid), intent(inout), target :: array | |||
! end subroutine | |||
!end interface | |||
contains | |||
subroutine AnnalusDrillMud | |||
!DEC$ ATTRIBUTES DLLEXPORT::AnnalusDrillMud | |||
!DEC$ ATTRIBUTES ALIAS: 'AnnalusDrillMud' :: AnnalusDrillMud | |||
implicit none | |||
DownHole%AnnDrillMud = .true. | |||
end subroutine AnnalusDrillMud | |||
subroutine AnnalusCirculateMud | |||
!DEC$ ATTRIBUTES DLLEXPORT::AnnalusCirculateMud | |||
!DEC$ ATTRIBUTES ALIAS: 'AnnalusCirculateMud' :: AnnalusCirculateMud | |||
implicit none | |||
DownHole%AnnCirculateMud = .true. | |||
end subroutine AnnalusCirculateMud | |||
!type(CFluid) function ActionFluid() !(array) | |||
! !use CDownHoleVariables | |||
! !integer, intent(in) :: count | |||
! !type(CFluid), intent(inout), target :: array !(count) | |||
! end function | |||
integer function GetAnnalusFluidsCount() | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetAnnalusFluidsCount | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAnnalusFluidsCount' :: GetAnnalusFluidsCount | |||
implicit none | |||
GetAnnalusFluidsCount = size(DownHole%AnnalusFluids) | |||
!GetAnnalusFluidsCount = AnnalusFluidsCount | |||
end function GetAnnalusFluidsCount | |||
subroutine GetAnnalusFluids(count, array) | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetAnnalusFluids | |||
!DEC$ ATTRIBUTES ALIAS: 'GetAnnalusFluids' :: GetAnnalusFluids | |||
implicit none | |||
integer :: i | |||
integer, intent(in) :: count | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
if(.not.allocated(DownHole%AnnalusFluids)) return | |||
do i = 1, count | |||
item => array(i) | |||
item%StartMd = DownHole%AnnalusFluids(i)%StartMd | |||
item%EndMd = DownHole%AnnalusFluids(i)%EndMd | |||
item%Density = DownHole%AnnalusFluids(i)%Density | |||
item%MudType = DownHole%AnnalusFluids(i)%MudType | |||
end do | |||
end subroutine GetAnnalusFluids | |||
integer function GetStringFluidsCount() | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetStringFluidsCount | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStringFluidsCount' :: GetStringFluidsCount | |||
implicit none | |||
!GetStringFluidsCount = StringFluidsCount | |||
GetStringFluidsCount = size(DownHole%StringFluids) | |||
end function GetStringFluidsCount | |||
subroutine GetStringFluids(count, array) | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetStringFluids | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStringFluids' :: GetStringFluids | |||
implicit none | |||
integer :: i | |||
integer, intent(in) :: count | |||
type(CFluid), intent(inout), target :: array(count) | |||
type(CFluid), pointer :: item | |||
if(.not.allocated(DownHole%StringFluids)) return | |||
do i = 1, count | |||
item => array(i) | |||
item%StartMd = DownHole%StringFluids(i)%StartMd | |||
item%EndMd = DownHole%StringFluids(i)%EndMd | |||
item%Density = DownHole%StringFluids(i)%Density | |||
item%MudType = DownHole%StringFluids(i)%MudType | |||
end do | |||
end subroutine GetStringFluids | |||
integer function GetStringCount() | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetStringCount | |||
!DEC$ ATTRIBUTES ALIAS: 'GetStringCount' :: GetStringCount | |||
implicit none | |||
GetStringCount = DownHole%StringCount | |||
!GetStringCount = 4 | |||
end function GetStringCount | |||
subroutine GetString(count, array) | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetString | |||
!DEC$ ATTRIBUTES ALIAS: 'GetString' :: GetString | |||
implicit none | |||
integer :: i | |||
integer, intent(in) :: count | |||
type(CStringComponent), intent(inout), target :: array(count) | |||
type(CStringComponent), pointer :: item | |||
!do i = 1, count | |||
! item => array(i) | |||
! item%Length = String(i)%Length | |||
! item%TopDepth = String(i)%TopDepth | |||
! item%DownDepth = String(i)%DownDepth | |||
! item%Od = String(i)%Od | |||
! item%Id = String(i)%Id | |||
! item%ComponentType = String(i)%ComponentType | |||
!end do | |||
end subroutine GetString | |||
subroutine GetDownhole() | |||
!DEC$ ATTRIBUTES DLLEXPORT::GetDownhole | |||
!DEC$ ATTRIBUTES ALIAS: 'GetDownhole' :: GetDownhole | |||
implicit none | |||
!BopElement | |||
if(associated(BopElementsPtr)) call BopElementsPtr(DownHole%BopElements) | |||
!Annalus | |||
if(associated(AnnalusMudCountPtr)) call AnnalusMudCountPtr(DownHole%AnnalusFluidsCount) | |||
if(associated(AnnalusMudArrayPtr)) call AnnalusMudArrayPtr(DownHole%AnnalusFluids) | |||
!string | |||
if(associated(StringMudCountPtr)) call StringMudCountPtr(DownHole%StringFluidsCount) | |||
if(associated(StringMudArrayPtr)) call StringMudArrayPtr(DownHole%StringFluids) | |||
!components | |||
if(associated(StringComponentCountPtr)) call StringComponentCountPtr(DownHole%StringCount) | |||
if(associated(StringComponentArrayPtr)) call StringComponentArrayPtr(DownHole%String) | |||
end subroutine GetDownhole | |||
real(8) function GetDrillPipePressureH() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetDrillPipePressureH | |||
!DEC$ ATTRIBUTES ALIAS: 'GetDrillPipePressureH' :: GetDrillPipePressureH | |||
use PressureDisplayVARIABLES | |||
implicit none | |||
GetDrillPipePressureH = DownHole%DrillPipePressure !real(PressureGauges(1), 8) ! | |||
end function | |||
real(8) function GetCasingPressureH() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetCasingPressureH | |||
!DEC$ ATTRIBUTES ALIAS: 'GetCasingPressureH' :: GetCasingPressureH | |||
use FricPressDropVars | |||
implicit none | |||
!if (allocated(FinalFlowEl)) then | |||
! if(size(FinalFlowEl) > 0) then | |||
! CasingPressure = real(int(FinalFlowEl(AnnulusLastEl)%EndPress), 8) !CasingPressure | |||
! endif | |||
!endif | |||
GetCasingPressureH = DownHole%CasingPressure | |||
end function | |||
real(8) function GetShoePressure() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetShoePressure | |||
!DEC$ ATTRIBUTES ALIAS: 'GetShoePressure' :: GetShoePressure | |||
use PressureDisplayVARIABLES | |||
implicit none | |||
GetShoePressure = DownHole%ShoePressure !real(PressureGauges(5), 8) ! | |||
end function | |||
real(8) function GetBottomHolePressure() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetBottomHolePressure | |||
!DEC$ ATTRIBUTES ALIAS: 'GetBottomHolePressure' :: GetBottomHolePressure | |||
use PressureDisplayVARIABLES | |||
implicit none | |||
GetBottomHolePressure = DownHole%BottomHolePressure !real(PressureGauges(3), 8) ! | |||
end function | |||
real(8) function GetFormationPressure() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetFormationPressure | |||
!DEC$ ATTRIBUTES ALIAS: 'GetFormationPressure' :: GetFormationPressure | |||
implicit none | |||
GetFormationPressure = DownHole%FormationPressure | |||
end function | |||
real function GetInfluxRate() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetInfluxRate | |||
!DEC$ ATTRIBUTES ALIAS: 'GetInfluxRate' :: GetInfluxRate | |||
implicit none | |||
GetInfluxRate = DownHole%InfluxRate | |||
end function | |||
real function GetKickVolume() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetKickVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'GetKickVolume' :: GetKickVolume | |||
implicit none | |||
!KickVolume = KickVolume + 1 | |||
GetKickVolume = DownHole%KickVolume | |||
end function | |||
real function GetSecondKickVolume() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetSecondKickVolume | |||
!DEC$ ATTRIBUTES ALIAS: 'GetSecondKickVolume' :: GetSecondKickVolume | |||
implicit none | |||
!SecondKickVolume = SecondKickVolume + 1 | |||
GetSecondKickVolume = DownHole%SecondKickVolume | |||
end function | |||
real function GetPermeabilityExposedHeight() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPermeabilityExposedHeight | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPermeabilityExposedHeight' :: GetPermeabilityExposedHeight | |||
implicit none | |||
GetPermeabilityExposedHeight = DownHole%PermeabilityExposedHeight | |||
end function | |||
real(8) function GetDensityH() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetDensityH | |||
!DEC$ ATTRIBUTES ALIAS: 'GetDensityH' :: GetDensityH | |||
implicit none | |||
GetDensityH = DownHole%Density | |||
end function | |||
real(8) function GetPressureH() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetPressureH | |||
!DEC$ ATTRIBUTES ALIAS: 'GetPressureH' :: GetPressureH | |||
implicit none | |||
GetPressureH = DownHole%Pressure | |||
end function | |||
real(8) function GetTemperatureH() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetTemperatureH | |||
!DEC$ ATTRIBUTES ALIAS: 'GetTemperatureH' :: GetTemperatureH | |||
implicit none | |||
GetTemperatureH = DownHole%Temperature | |||
end function | |||
real(8) function GetHeightH() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetHeightH | |||
!DEC$ ATTRIBUTES ALIAS: 'GetHeightH' :: GetHeightH | |||
implicit none | |||
GetHeightH = DownHole%Height | |||
end function | |||
real(8) function GetVolumeH() | |||
!DEC$ ATTRIBUTES DLLEXPORT :: GetVolumeH | |||
!DEC$ ATTRIBUTES ALIAS: 'GetVolumeH' :: GetVolumeH | |||
implicit none | |||
GetVolumeH = DownHole%Volume | |||
end function | |||
end module CDownHole |
@@ -1,7 +1,7 @@ | |||
module CDownHoleVariables | |||
use CDownHoleTypes | |||
use CStringConfigurationVariables | |||
use CDownHoleActions | |||
! use CDownHoleActions | |||
use CLog4 | |||
implicit none | |||
public | |||
@@ -2221,29 +2221,16 @@ module MudSystemModule | |||
if (StudentStation%PitGainLossZero) then | |||
DrillingWatch%PitGainLose= 0.d0 !DrillWatch | |||
MudSystem%RefrencePitVolume_DrillWatch= MudSystem%ActiveTankVolume/42. !(bbl) !DrillWatch | |||
!********************************************* | |||
DataDisplayConsole%PitGainLossGauge= 0. !MFF Indicator | |||
MudSystem%RefrencePitVolume= MudSystem%ActiveTankVolume/42. !(bbl) !MFF Indicator | |||
endif | |||
!!====================================================================== | |||
!! MUD FLOW-FILL INDICATOR | |||
!!====================================================================== | |||
IF (DataDisplayConsole%MFFIPowerSwitch==1 ) THEN !.and. IsPortable==.false. | |||
!!====================================================================== | |||
IF (DataDisplayConsole%MFFIPowerSwitch==1 ) THEN !.and. IsPortable==.false. | |||
!====================TotalStrokes Reset and Calculate====================== | |||
if (DataDisplayConsole%MFFIResetTotalStrokes == 1) then | |||
IF (DataDisplayConsole%MFFIPumpSelectorSwitch == 1) THEN | |||
@@ -1,5 +1,5 @@ | |||
SUBROUTINE FlowStartup | |||
Use ConfigurationVariables | |||
USE Fluid_Flow_Startup_Vars | |||
USE CStringConfigurationVariables | |||
USE CMudPropertiesVariables | |||
@@ -68,7 +68,7 @@ SUBROUTINE FlowStartup | |||
CasingPressure_DataDisplayMalF = 0 | |||
SoundSpeed = 1530.0 / Convfttom | |||
PressureTimeStepDelay(1) = INT(2.0 * SUM(StringConfiguration%StringConfigurations(2:)%ComponentLength) / SoundSpeed / dt) | |||
PressureTimeStepDelay(1) = INT(2.0 * SUM(Configuration%StringConfiguration%StringConfigurations(2:)%ComponentLength) / SoundSpeed / dt) | |||
PressureTimeStepDelay(2) = INT(PathGeneration%Items(SIZE(PathGeneration%Items))%MeasuredDepth / SoundSpeed / dt) | |||
PressureTimeStepDelay(3) = INT(Shoe%ShoeDepth / SoundSpeed / dt) | |||
@@ -13,7 +13,7 @@ SUBROUTINE WellPressureDataTransfer | |||
!! frictional pressure drop calculated by subroutine Sub_Press_Drop_Calculator | |||
!! This subroutine includes hydrostatic pressure and later will include effect of corss-section area change | |||
!! which causes acceleration or decceleration of flow | |||
Use ConfigurationVariables | |||
USE FricPressDropVars | |||
use MudSystemModule | |||
USE MudSystemVARIABLES | |||
@@ -43,11 +43,11 @@ SUBROUTINE WellPressureDataTransfer | |||
!!!!!!!!!!!!!!!! bit is present | |||
BitTrue = StringConfiguration%StringConfigurations(1)%ComponentType == Bit_ComponentType ! Bit_ComponentType = 0 | |||
BitTrue = Configuration%StringConfiguration%StringConfigurations(1)%ComponentType == Bit_ComponentType ! Bit_ComponentType = 0 | |||
BitCd = 0.98 | |||
BitNozzDia = 32.0 * StringConfiguration%BitDefinition%BitNozzleSize ! nozzle diameter in 1/32 in | |||
BitNozzDia = 32.0 * Configuration%StringConfiguration%BitDefinition%BitNozzleSize ! nozzle diameter in 1/32 in | |||
BitNozzleArea = 7.6699E-4 * BitNozzDia**2 | |||
BitNozzleNum = StringConfiguration%BitDefinition%BitNozzleNo - BitJetsPlugged * BitProblems%PlugJetsCount | |||
BitNozzleNum = Configuration%StringConfiguration%BitDefinition%BitNozzleNo - BitJetsPlugged * BitProblems%PlugJetsCount | |||
BitTotNozzArea = BitNozzleNum * BitNozzleArea + 0.5 * BitJetsWashedOut * BitProblems%JetWashoutCount * BitNozzleArea | |||
IF (BitNozzleNum == 0) THEN | |||
BitTotallyPluged = .TRUE. | |||
@@ -55,7 +55,7 @@ SUBROUTINE WellPressureDataTransfer | |||
BitTotallyPluged = .FALSE. | |||
END IF | |||
FloatValveIn = StringConfiguration%BitDefinition%FloatValve | |||
FloatValveIn = Configuration%StringConfiguration%BitDefinition%FloatValve | |||
!FloatValveOpen = .TRUE. | |||
!IF (JetWashoutCount > 0 .OR. PlugJetsCount > 0) THEN | |||
! WRITE (*,*) 'PlugJetsCount' , PlugJetsCount | |||
@@ -4,6 +4,7 @@ SUBROUTINE FormationInformationCalculator | |||
Use TD_WellGeometry | |||
Use CReservoirVariables | |||
Use CFormationVariables | |||
Use ConfigurationVariables | |||
USE Fluid_Flow_Startup_Vars | |||
USE CLog2 | |||
USE CDownHoleVariables | |||
@@ -51,12 +52,12 @@ SUBROUTINE FormationInformationCalculator | |||
!!===> Down Measured Depth of Formation | |||
WellGeoTopTVD = 0. | |||
Do i = 1 , TD_WellGeneral%WellIntervalsCount | |||
if ( (Reservoir%FormationTop + Formation%Formations(Reservoir%FormationNo)%Thickness)>=TD_WellGeo(i)%VerticalDepth ) then | |||
if ( (Reservoir%FormationTop + Configuration%Formation%Formations(Reservoir%FormationNo)%Thickness)>=TD_WellGeo(i)%VerticalDepth ) then | |||
KickFormDownMD = KickFormDownMD + TD_WellGeo(i)%IntervalLength | |||
WellGeoTopTVD = TD_WellGeo(i)%VerticalDepth | |||
else if ( (Reservoir%FormationTop+Formation%Formations(Reservoir%FormationNo)%Thickness)<TD_WellGeo(i)%VerticalDepth ) then | |||
else if ( (Reservoir%FormationTop+Configuration%Formation%Formations(Reservoir%FormationNo)%Thickness)<TD_WellGeo(i)%VerticalDepth ) then | |||
if ( TD_WellGeo(i)%HoleType==0 ) then | |||
KickFormDownMD = KickFormDownMD + (((Reservoir%FormationTop+Formation%Formations(Reservoir%FormationNo)%Thickness)-WellGeoTopTVD)& | |||
KickFormDownMD = KickFormDownMD + (((Reservoir%FormationTop+Configuration%Formation%Formations(Reservoir%FormationNo)%Thickness)-WellGeoTopTVD)& | |||
/ cos(TD_WellGeo(i)%StartAngle)) | |||
else | |||
KickFormDownMD = KickFormDownMD + (TD_WellGeo(i)%RCurvature & | |||
@@ -67,9 +68,9 @@ SUBROUTINE FormationInformationCalculator | |||
End Do | |||
!!===> Determination of Formation Length for Kick Modeling | |||
if (TD_WellGeneral%WellTotalVerticalLength >= Reservoir%FormationTop .AND. TD_WellGeneral%WellTotalVerticalLength < (Reservoir%FormationTop+Formation%Formations(Reservoir%FormationNo)%Thickness)) then | |||
if (TD_WellGeneral%WellTotalVerticalLength >= Reservoir%FormationTop .AND. TD_WellGeneral%WellTotalVerticalLength < (Reservoir%FormationTop+Configuration%Formation%Formations(Reservoir%FormationNo)%Thickness)) then | |||
KickFormLength = TD_WellGeneral%WellTotalLength - KickFormTopMD ![ft] | |||
else if ( TD_WellGeneral%WellTotalVerticalLength >= (Reservoir%FormationTop + Formation%Formations(Reservoir%FormationNo)%Thickness) ) then | |||
else if ( TD_WellGeneral%WellTotalVerticalLength >= (Reservoir%FormationTop + Configuration%Formation%Formations(Reservoir%FormationNo)%Thickness) ) then | |||
KickFormLength = KickFormDownMD - KickFormTopMD ![ft] | |||
else | |||
KickFormLength = 0. | |||
@@ -82,7 +83,7 @@ SUBROUTINE FormationInformationCalculator | |||
!==================================================== | |||
FormPermeability = Reservoir%FormationPermeability ! [mD] | |||
FormPressure = TD_WellGeneral%WellTotalVerticalLength * Formation%Formations(Reservoir%FormationNo)%PorePressureGradient ![psia] | |||
FormPressure = TD_WellGeneral%WellTotalVerticalLength * Configuration%Formation%Formations(Reservoir%FormationNo)%PorePressureGradient ![psia] | |||
DownHole%FormationPressure = INT(FormPressure) | |||
!CALL Log_2('FormPressure =' , FormPressure) | |||
!print*, 'Formations(FormationNo)%PorePressureGradient=', Formations(FormationNo)%PorePressureGradient | |||
@@ -3,7 +3,7 @@ subroutine Bit_Specification | |||
use sROP_Other_Variables | |||
use sROP_Variables | |||
use CStringConfigurationVariables | |||
use ConfigurationVariables | |||
implicit none | |||
INTEGER :: io | |||
@@ -17,7 +17,7 @@ subroutine Bit_Specification | |||
ROP_Spec%BitClass = (StringConfiguration%BitDefinition%BitCodeHundreds*100)+(StringConfiguration%BitDefinition%BitCodeTens*10)+StringConfiguration%BitDefinition%BitCodeOnes | |||
ROP_Spec%BitClass = (Configuration%StringConfiguration%BitDefinition%BitCodeHundreds*100)+(Configuration%StringConfiguration%BitDefinition%BitCodeTens*10)+Configuration%StringConfiguration%BitDefinition%BitCodeOnes | |||
rd = SNGL(ROP_Spec%BitClass)/10.d0 | |||
ROP_Spec%BrCoef = ( (SNGL(ROP_Spec%BitClass)/10.d0)-(DINT(rd)) )*10.d0 | |||
@@ -1,5 +1,5 @@ | |||
subroutine ROP_MainCalculation | |||
use ConfigurationVariables | |||
use sROP_Other_Variables | |||
use sROP_Variables | |||
use CStringConfigurationVariables | |||
@@ -28,13 +28,13 @@ subroutine ROP_MainCalculation | |||
!Real(8) :: ROP_Bit%SetROPGauge | |||
zero_ROPcount = 0 | |||
ROP_Bit%NoOfFormations = Formation%Count | |||
ROP_Bit%NoOfFormations = Configuration%Formation%Count | |||
ROP_Bit%DrillingVerticalDepth = TD_WellGeneral%WellTotalVerticalLength | |||
!===> MaximumWellDepthExceeded Warning | |||
if ( ROP_Bit%DrillingVerticalDepth>=(Formation%Formations(Formation%Count)%Top+Formation%Formations(Formation%Count)%Thickness) ) then | |||
if ( ROP_Bit%DrillingVerticalDepth>=(Configuration%Formation%Formations(Configuration%Formation%Count)%Top+Configuration%Formation%Formations(Configuration%Formation%Count)%Thickness) ) then | |||
ROP_Bit%RateOfPenetration = 0.0d0 | |||
Call Set_ROP(ROP_Bit%RateOfPenetration) | |||
Call Activate_MaximumWellDepthExceeded() | |||
@@ -48,7 +48,7 @@ subroutine ROP_MainCalculation | |||
ROP_Spec%FormationNumber = ROP_Spec%FormationNumber | |||
else | |||
do i= 1,ROP_Bit%NoOfFormations | |||
ROP_Spec%FormationTopDepth = Formation%Formations(i)%Top | |||
ROP_Spec%FormationTopDepth = Configuration%Formation%Formations(i)%Top | |||
if (ROP_Bit%DrillingVerticalDepth>=ROP_Spec%FormationTopDepth) then | |||
ROP_Spec%FormationNumber = i | |||
end if | |||
@@ -74,14 +74,14 @@ subroutine ROP_MainCalculation | |||
! $$$$$**$$$$$**$$$$$**$$$$$**$$$$$** Variables Initialization: *$$$$$**$$$$$**$$$$$**$$$$$**$$$$$ | |||
ROP_Spec%DiameterOfBit = StringConfiguration%BitDefinition%BitSize ! unit : [in.] (Typical Range: 3.0 to 30.0) | |||
ROP_Spec%NumberOfBitNozzles = StringConfiguration%BitDefinition%BitNozzleNo ! (Typical Values: 1 to 10) | |||
ROP_Spec%DiameterOfBitNozzle = StringConfiguration%BitDefinition%BitNozzleSize ! unit : [inch] *** basic input: [1/32 in.] (Typical Range: 8.0 to 32.0) | |||
ROP_Spec%CriticalMudDensity = Formation%Formations(ROP_Spec%FormationNumber)%PorePressureGradient/.465d0*9.d0 ! ????????? delete ,unit : [ppg] or [lb/gal] (Typical Range: 0 to 10.0) | |||
ROP_Bit%FormationMudDensity = Formation%Formations(ROP_Spec%FormationNumber)%PorePressureGradient/0.052d0 | |||
ROP_Spec%DiameterOfBit = Configuration%StringConfiguration%BitDefinition%BitSize ! unit : [in.] (Typical Range: 3.0 to 30.0) | |||
ROP_Spec%NumberOfBitNozzles = Configuration%StringConfiguration%BitDefinition%BitNozzleNo ! (Typical Values: 1 to 10) | |||
ROP_Spec%DiameterOfBitNozzle = Configuration%StringConfiguration%BitDefinition%BitNozzleSize ! unit : [inch] *** basic input: [1/32 in.] (Typical Range: 8.0 to 32.0) | |||
ROP_Spec%CriticalMudDensity = Configuration%Formation%Formations(ROP_Spec%FormationNumber)%PorePressureGradient/.465d0*9.d0 ! ????????? delete ,unit : [ppg] or [lb/gal] (Typical Range: 0 to 10.0) | |||
ROP_Bit%FormationMudDensity = Configuration%Formation%Formations(ROP_Spec%FormationNumber)%PorePressureGradient/0.052d0 | |||
ROP_Bit%BottomHolePressure = PressureGauges(3) !5200 [psi] | |||
ROP_Bit%ECD = ROP_Bit%BottomHolePressure/(0.052*ROP_Bit%DrillingVerticalDepth) | |||
ROP_Spec%CriticalWeightOnBit = (Formation%Formations(ROP_Spec%FormationNumber)%ThresholdWeight/5.d0)-(.06d0*(Formation%Formations(ROP_Spec%FormationNumber)%ThresholdWeight-10.d0)) ! unit : [klb/in] (Typical Range: 0 to 10 ----> 0.6 to 2) | |||
ROP_Spec%CriticalWeightOnBit = (Configuration%Formation%Formations(ROP_Spec%FormationNumber)%ThresholdWeight/5.d0)-(.06d0*(Configuration%Formation%Formations(ROP_Spec%FormationNumber)%ThresholdWeight-10.d0)) ! unit : [klb/in] (Typical Range: 0 to 10 ----> 0.6 to 2) | |||
!IF (ALLOCATED(FlowEl)) THEN | |||
! ROP_Bit%MudViscosity = FlowEl(NoHorizontalEl + NoStringEl)%mueff !13.5 [cP] | |||
ROP_Bit%MudDensity = MudSystem%BitMudDensity ! [ppg] | |||
@@ -98,7 +98,7 @@ subroutine ROP_MainCalculation | |||
! -----**-----**-----**-----**-----* ROP_bit%RateofPenetration Model Coefficients: *-----**-----**-----**-----**----- | |||
ROP_Spec%a1 = log(Formation%Formations(ROP_Spec%FormationNumber)%Drillablity) | |||
ROP_Spec%a1 = log(Configuration%Formation%Formations(ROP_Spec%FormationNumber)%Drillablity) | |||
ROP_Spec%a2 = 1.2799d-04 | |||
ROP_Spec%a3 = 1.7952d-04 | |||
ROP_Spec%a4 = 4.0656d-05 | |||
@@ -107,7 +107,7 @@ subroutine ROP_MainCalculation | |||
ROP_Spec%a7 = 2.1837d-01 | |||
ROP_Spec%a8 = 4.4915d-01 | |||
ROP_Spec%dt = 0.1d0 ![s] | |||
ROP_Spec%TouH = Formation%Formations(ROP_Spec%FormationNumber)%Abrasiveness*3600.d0 ! [hr]--->[s] ( Typical Range: 1<Abrasiveness<100 ) | |||
ROP_Spec%TouH = Configuration%Formation%Formations(ROP_Spec%FormationNumber)%Abrasiveness*3600.d0 ! [hr]--->[s] ( Typical Range: 1<Abrasiveness<100 ) | |||
! -----**-----**-----**-----**--- End of ROP_bit%RateofPenetration Model Coefficients ---**-----**-----**-----**----- | |||
@@ -116,7 +116,7 @@ subroutine ROP_MainCalculation | |||
! $$$$$**$$$$$**$$$$$**$$$$$**$$$$$** Main Calculations: *$$$$$**$$$$$**$$$$$**$$$$$**$$$$$ | |||
ROP_Spec%f1 = Formation%Formations(ROP_Spec%FormationNumber)%Drillablity ! 1<=Drillability<=100 [ft/h] | |||
ROP_Spec%f1 = Configuration%Formation%Formations(ROP_Spec%FormationNumber)%Drillablity ! 1<=Drillability<=100 [ft/h] | |||
ROP_Spec%f2 = exp(2.303d0*ROP_Spec%a2*(10000.d0 - ROP_Bit%DrillingVerticalDepth)) ! First Compaction Vairable | |||
ROP_Spec%f3 = exp(2.303d0*ROP_Spec%a3*(ROP_Bit%DrillingVerticalDepth**0.69d0)*(ROP_Bit%FormationMudDensity-9.d0)) ! Second Compaction Vairable | |||
@@ -1,146 +0,0 @@ | |||
module CSimulationThreads | |||
use iso_c_binding | |||
implicit none | |||
public | |||
! Thread Related Variables | |||
integer(INT_PTR_KIND()), parameter :: ThreadSecurity = 0 | |||
integer(INT_PTR_KIND()), parameter :: ThreadStackSize = 0 | |||
integer(4) :: ApiResult | |||
integer(4) :: WaitForStopMs = 500 | |||
!BopStack | |||
integer(INT_PTR_KIND()) :: BopStackThreadHandle | |||
integer(INT_PTR_KIND()) :: BopStackThreadId | |||
integer(4) :: BopStackThreadParam = 0 | |||
!Pumps | |||
integer(INT_PTR_KIND()) :: Pump1ThreadHandle | |||
integer(INT_PTR_KIND()) :: Pump2ThreadHandle | |||
integer(INT_PTR_KIND()) :: Pump3ThreadHandle | |||
integer(INT_PTR_KIND()) :: Pump1ThreadId | |||
integer(INT_PTR_KIND()) :: Pump2ThreadId | |||
integer(INT_PTR_KIND()) :: Pump3ThreadId | |||
integer(4) :: Pump1ThreadParam = 0 | |||
integer(4) :: Pump2ThreadParam = 0 | |||
integer(4) :: Pump3ThreadParam = 0 | |||
!ChokeControl | |||
integer(INT_PTR_KIND()) :: ChokeControlThreadHandle | |||
integer(INT_PTR_KIND()) :: ChokeControlThreadId | |||
integer(4) :: ChokeControlThreadParam = 0 | |||
!Rop | |||
integer(INT_PTR_KIND()) :: RopThreadHandle | |||
integer(INT_PTR_KIND()) :: RopThreadId | |||
integer(4) :: RopThreadParam = 0 | |||
!RotaryTable | |||
integer(INT_PTR_KIND()) :: RotaryTableThreadHandle | |||
integer(INT_PTR_KIND()) :: RotaryTableThreadId | |||
integer(4) :: RotaryTableThreadParam = 0 | |||
!FluidFlow | |||
integer(INT_PTR_KIND()) :: FluidFlowThreadHandle | |||
integer(INT_PTR_KIND()) :: FluidFlowThreadId | |||
integer(4) :: FluidFlowThreadParam = 0 | |||
!TorqueDrag | |||
integer(INT_PTR_KIND()) :: TorqueDragThreadHandle | |||
integer(INT_PTR_KIND()) :: TorqueDragThreadId | |||
integer(4) :: TorqueDragThreadParam = 0 | |||
!TopDrive | |||
integer(INT_PTR_KIND()) :: TopDriveThreadHandle | |||
integer(INT_PTR_KIND()) :: TopDriveThreadId | |||
integer(4) :: TopDriveThreadParam = 0 | |||
!Drawworks | |||
integer(INT_PTR_KIND()) :: DrawworksThreadHandle | |||
integer(INT_PTR_KIND()) :: DrawworksThreadId | |||
integer(4) :: DrawworksThreadParam = 0 | |||
!Geo | |||
integer(INT_PTR_KIND()) :: GeoThreadHandle | |||
integer(INT_PTR_KIND()) :: GeoThreadId | |||
integer(4) :: GeoThreadParam = 0 | |||
!MudFlowFillIndicator | |||
integer(INT_PTR_KIND()) :: MudFlowFillIndicatorThreadHandle | |||
integer(INT_PTR_KIND()) :: MudFlowFillIndicatorThreadId | |||
integer(4) :: MudFlowFillIndicatorThreadParam = 0 | |||
!MudSystem | |||
integer(INT_PTR_KIND()) :: MudSystemThreadHandle | |||
integer(INT_PTR_KIND()) :: MudSystemThreadId | |||
integer(4) :: MudSystemThreadParam = 0 | |||
!PipeRams1 | |||
integer(INT_PTR_KIND()) :: PipeRams1ThreadHandle | |||
integer(INT_PTR_KIND()) :: PipeRams1ThreadId | |||
integer(4) :: PipeRams1ThreadParam = 0 | |||
!PipeRams2 | |||
integer(INT_PTR_KIND()) :: PipeRams2ThreadHandle | |||
integer(INT_PTR_KIND()) :: PipeRams2ThreadId | |||
integer(4) :: PipeRams2ThreadParam = 0 | |||
!KillLine | |||
integer(INT_PTR_KIND()) :: KillLineThreadHandle | |||
integer(INT_PTR_KIND()) :: KillLineThreadId | |||
integer(4) :: KillLineThreadParam = 0 | |||
!ChokeLine | |||
integer(INT_PTR_KIND()) :: ChokeLineThreadHandle | |||
integer(INT_PTR_KIND()) :: ChokeLineThreadId | |||
integer(4) :: ChokeLineThreadParam = 0 | |||
!BlindRams | |||
integer(INT_PTR_KIND()) :: BlindRamsThreadHandle | |||
integer(INT_PTR_KIND()) :: BlindRamsThreadId | |||
integer(4) :: BlindRamsThreadParam = 0 | |||
!Annular | |||
integer(INT_PTR_KIND()) :: AnnularThreadHandle | |||
integer(INT_PTR_KIND()) :: AnnularThreadId | |||
integer(4) :: AnnularThreadParam = 0 | |||
!OperationScenarios | |||
integer(INT_PTR_KIND()) :: OperationScenariosThreadHandle | |||
integer(INT_PTR_KIND()) :: OperationScenariosThreadId | |||
integer(4) :: OperationScenariosThreadParam = 0 | |||
!PathFinding | |||
integer(INT_PTR_KIND()) :: PathFindingThreadHandle | |||
integer(INT_PTR_KIND()) :: PathFindingThreadId | |||
integer(4) :: PathFindingThreadParam = 0 | |||
! just for now | |||
!Sample | |||
integer(INT_PTR_KIND()) :: SampleThreadHandle | |||
integer(INT_PTR_KIND()) :: SampleThreadId | |||
integer(4) :: SampleThreadParam = 0 | |||
#ifdef disEnableSimulation | |||
!Test | |||
integer(INT_PTR_KIND()) :: TestThreadHandle | |||
integer(INT_PTR_KIND()) :: TestThreadId | |||
integer(4) :: TestThreadParam = 0 | |||
#endif | |||
contains | |||
end module CSimulationThreads |
@@ -0,0 +1,37 @@ | |||
module ConfigurationVariables | |||
use CStringConfigurationVariables | |||
use CFormationVariables | |||
use CReservoirVariables | |||
use CShoeVariables | |||
use CAccumulatorVariables | |||
use CBopStackVariables | |||
use CHoistingVariables | |||
use CPowerVariables | |||
use CPumpsVariables | |||
use CRigSizeVariables | |||
use CCasingLinerChokeVariables | |||
use CPathGenerationVariables | |||
use CWellSurveyDataVariables | |||
use CMudPropertiesVariables | |||
type ConfigurationType | |||
Type(StringConfigurationType)::StringConfiguration | |||
Type(FormationType) :: Formation | |||
Type(ReservoirType)::Reservoir | |||
Type(ShoeType)::Shoe | |||
Type(AccumulatorType)::Accumulator | |||
Type(BopStackSpecificationType)::BopStackSpecification | |||
Type(HoistingType)::Hoisting | |||
Type(PowerType)::Power | |||
Type(PumpSpecificationType)::PumpsSpecification | |||
Type(RigSizeType)::RigSize | |||
Type(CasingLinerChokeType)::CasingLinerChoke | |||
Type(PathGenerationType)::PathGeneration | |||
Type(WellSurveyDataType)::WellSurveyData | |||
Type(MudPropertiesType)::MudProperties | |||
end type ConfigurationType | |||
type(ConfigurationType)::Configuration | |||
contains | |||
end module ConfigurationVariables |
@@ -104,15 +104,11 @@ | |||
<File RelativePath=".\CSharp\Common\CCommon.f90"/> | |||
<File RelativePath=".\CSharp\Common\CCommonVariables.f90"/> | |||
<File RelativePath=".\CSharp\Common\CIActionReference.f90"/> | |||
<File RelativePath=".\CSharp\Common\CLesson.f90"/> | |||
<File RelativePath=".\CSharp\Common\CLessonVariables.f90"/> | |||
<File RelativePath=".\CSharp\Common\CQuery.f90"/> | |||
<File RelativePath=".\CSharp\Common\CScaleRange.f90"/> | |||
<File RelativePath=".\CSharp\Common\CTimer.f90"/> | |||
<File RelativePath=".\CSharp\Common\CTimerLegacy.f90"/></Filter> | |||
<Filter Name="DownHole"> | |||
<File RelativePath=".\CSharp\DownHole\CDownHole.f90"/> | |||
<File RelativePath=".\CSharp\DownHole\CDownHoleActions.f90"/> | |||
<File RelativePath=".\CSharp\DownHole\CDownHoleTypes.f90"/> | |||
<File RelativePath=".\CSharp\DownHole\CDownHoleVariables.f90"/></Filter> | |||
<Filter Name="Equipments"> | |||
@@ -339,8 +335,6 @@ | |||
<File RelativePath=".\FluidFlow\Well_Pressure_Data_Transfer.f90"/></Filter> | |||
<Filter Name="Geo"> | |||
<File RelativePath=".\Geo\GeoMain.f90"/></Filter> | |||
<Filter Name="Simulation"> | |||
<File RelativePath=".\Simulation\CSounds.f90"/></Filter> | |||
<Filter Name="Rop"> | |||
<File RelativePath=".\Rop\Bit_Specification.f90"/> | |||
<File RelativePath=".\Rop\JetImpactForce.f90"/> | |||
@@ -348,6 +342,9 @@ | |||
<File RelativePath=".\Rop\RopMain.f90"/> | |||
<File RelativePath=".\Rop\sROP_Other_Variables.f90"/> | |||
<File RelativePath=".\Rop\sROP_Variables.f90"/></Filter> | |||
<Filter Name="Simulation"> | |||
<File RelativePath=".\Simulation\ConfigurationVariables.f90"/> | |||
<File RelativePath=".\Simulation\CSounds.f90"/></Filter> | |||
<Filter Name="TorqueDrag"> | |||
<Filter Name="TD_DrillingSubs"> | |||
<File RelativePath=".\TorqueDrag\TD_DrillingSubs\MeshGeneration_FluidModule.f90"/> | |||
@@ -1,11 +1,11 @@ | |||
subroutine TD_DrillStemReadData | |||
Use CStringConfigurationVariables | |||
Use TD_DrillStemComponents | |||
Use TD_WellElements | |||
Use TD_WellGeometry | |||
Use TD_StringConnectionData | |||
Use Drawworks_VARIABLES, only: Drawworks | |||
use ConfigurationVariables | |||
Use CStringConfigurationVariables | |||
Use TD_DrillStemComponents | |||
Use TD_WellElements | |||
Use TD_WellGeometry | |||
Use TD_StringConnectionData | |||
Use Drawworks_VARIABLES, only: Drawworks | |||
implicit none | |||
@@ -22,7 +22,7 @@ subroutine TD_DrillStemReadData | |||
!==================================================== | |||
! Set Drill Stem Components Data | |||
!==================================================== | |||
TD_String%StringConfigurationCount = StringConfiguration%StringConfigurationCount | |||
TD_String%StringConfigurationCount = Configuration%StringConfiguration%StringConfigurationCount | |||
TD_String%DrillStemComponentsNumbs = 0 | |||
@@ -42,16 +42,16 @@ subroutine TD_DrillStemReadData | |||
Do i=1, TD_String%StringConfigurationCount | |||
TD_DrillStem(i)%ComponentType = StringConfiguration%StringConfigurations(i)%ComponentType | |||
TD_DrillStem(i)%Numbs = StringConfiguration%StringConfigurations(i)%NumberOfJoint | |||
TD_DrillStem(i)%Id = StringConfiguration%StringConfigurations(i)%NominalId/12.d0 ![ft] | |||
TD_DrillStem(i)%Od = StringConfiguration%StringConfigurations(i)%NominalOd/12.d0 ![ft] | |||
TD_DrillStem(i)%Length = StringConfiguration%StringConfigurations(i)%LengthPerJoint ![ft] | |||
TD_DrillStem(i)%WeightperLength = StringConfiguration%StringConfigurations(i)%WeightPerLength ![lb/ft] | |||
TD_DrillStem(i)%TotalLength = StringConfiguration%StringConfigurations(i)%ComponentLength | |||
TD_DrillStem(i)%ComponentType = Configuration%StringConfiguration%StringConfigurations(i)%ComponentType | |||
TD_DrillStem(i)%Numbs = Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint | |||
TD_DrillStem(i)%Id = Configuration%StringConfiguration%StringConfigurations(i)%NominalId/12.d0 ![ft] | |||
TD_DrillStem(i)%Od = Configuration%StringConfiguration%StringConfigurations(i)%NominalOd/12.d0 ![ft] | |||
TD_DrillStem(i)%Length = Configuration%StringConfiguration%StringConfigurations(i)%LengthPerJoint ![ft] | |||
TD_DrillStem(i)%WeightperLength = Configuration%StringConfiguration%StringConfigurations(i)%WeightPerLength ![lb/ft] | |||
TD_DrillStem(i)%TotalLength = Configuration%StringConfiguration%StringConfigurations(i)%ComponentLength | |||
TD_DrillStem(i)%TotalWeight = TD_DrillStem(i)%TotalLength*TD_DrillStem(i)%WeightperLength | |||
TD_String%DrillStemComponentsNumbs = TD_String%DrillStemComponentsNumbs+StringConfiguration%StringConfigurations(i)%NumberOfJoint | |||
TD_String%DrillStemComponentsNumbs = TD_String%DrillStemComponentsNumbs+Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint | |||
!!=========> Set Separated Drill Stem Components Data | |||
! TD_LastIndex = TD_LastIndex+StringConfigurations(i)%NumberOfJoint | |||
@@ -98,7 +98,7 @@ subroutine TD_DrillStemReadData | |||
Do i=1, TD_String%StringConfigurationCount | |||
TD_LastIndex = TD_LastIndex+StringConfiguration%StringConfigurations(i)%NumberOfJoint | |||
TD_LastIndex = TD_LastIndex+Configuration%StringConfiguration%StringConfigurations(i)%NumberOfJoint | |||
TD_DrillStems(TD_FirstIndex:TD_LastIndex)%ComponentType = TD_DrillStem(i)%ComponentType | |||
TD_DrillStems(TD_FirstIndex:TD_LastIndex)%Id = TD_DrillStem(i)%Id | |||
@@ -2,6 +2,7 @@ subroutine TD_WellElementsReadData | |||
Use CCasingLinerChokeVariables | |||
use CStringConfigurationVariables | |||
use ConfigurationVariables | |||
Use TD_WellElements | |||
Use TD_WellGeometry | |||
@@ -121,7 +122,7 @@ subroutine TD_WellElementsReadData | |||
TD_ROPHole(i)%TopDepth = TD_WellGeo(TD_WellGeneral%WellIntervalsCount)%TopDepth | |||
TD_ROPHole(i)%DownDepth = TD_WellGeo(TD_WellGeneral%WellIntervalsCount)%DownDepth | |||
TD_ROPHole(i)%Length = TD_WellGeo(TD_WellGeneral%WellIntervalsCount)%IntervalLength | |||
TD_ROPHole(i)%Id = StringConfiguration%BitDefinition%BitSize/12.d0 ! unit: [ft] | |||
TD_ROPHole(i)%Id = Configuration%StringConfiguration%BitDefinition%BitSize/12.d0 ! unit: [ft] | |||
End Do | |||