Browse Source

Configuration from json is completed

master
mahmood19227 1 year ago
parent
commit
eabb6a146d
16 changed files with 283 additions and 435 deletions
  1. +35
    -0
      CSharp/BasicInputs/Geology/CFormation.f90
  2. +38
    -0
      CSharp/BasicInputs/Geology/CReservoir.f90
  3. +26
    -0
      CSharp/BasicInputs/Geology/CShoe.f90
  4. +37
    -0
      CSharp/BasicInputs/RigSpecifications/CAccumulator.f90
  5. +61
    -0
      CSharp/BasicInputs/RigSpecifications/CBopStack.f90
  6. +25
    -1
      CSharp/BasicInputs/RigSpecifications/CHoisting.f90
  7. +4
    -4
      CSharp/BasicInputs/WellProfile/CPathGeneration.f90
  8. +2
    -370
      CSharp/OperationScenarios/Unity/CUnityOutputs.f90
  9. +11
    -15
      FluidFlow/Well_Pressure_Data_Transfer.f90
  10. BIN
     
  11. +12
    -12
      Simulator.f90
  12. +6
    -10
      Text1.txt
  13. BIN
     
  14. BIN
     
  15. +25
    -23
      helper.ipynb
  16. +1
    -0
      test.sh

+ 35
- 0
CSharp/BasicInputs/Geology/CFormation.f90 View File

@@ -6,6 +6,41 @@ module CFormation
contains
subroutine FormationFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitem,pval
logical::is_found
integer::i,n_children
CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val
call json%get(parent,'Formation',p)
call json%info(p, n_children=n_children)
data%Configuration%Formation%Count = n_children
if (.not. allocated(data%Configuration%Formation%Formations) .or. size(data%Configuration%Formation%Formations)/=n_children) then
ALLOCATE(data%Configuration%Formation%Formations(n_children))
endif
do i=1,n_children
call json%get_child(p, i, pitem, found=is_found)
call json%get(pitem,'Top',pval)
call json%get(pval,data%Configuration%Formation%Formations(i)%Top)
call json%get(pitem,'Thickness',pval)
call json%get(pval,data%Configuration%Formation%Formations(i)%Thickness)
call json%get(pitem,'Drillablity',pval)
call json%get(pval,data%Configuration%Formation%Formations(i)%Drillablity)
call json%get(pitem,'Abrasiveness',pval)
call json%get(pval,data%Configuration%Formation%Formations(i)%Abrasiveness)
call json%get(pitem,'ThresholdWeight',pval)
call json%get(pval,data%Configuration%Formation%Formations(i)%ThresholdWeight)
call json%get(pitem,'PorePressureGradient',pval)
call json%get(pval,data%Configuration%Formation%Formations(i)%PorePressureGradient)
end do
end subroutine
subroutine FormationToJson(parent)
type(json_value),pointer :: parent


+ 38
- 0
CSharp/BasicInputs/Geology/CReservoir.f90 View File

@@ -5,6 +5,44 @@ module CReservoir
contains
subroutine ReservoirFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitem,pval
logical::is_found
integer::i,n_children
CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val
call json%get(parent,'Reservoir',p)
call json%get(p,'FormationNo',pval)
call json%get(pval,data%Configuration%Reservoir%FormationNo)
call json%get(p,'FormationTop',pval)
call json%get(pval,data%Configuration%Reservoir%FormationTop)
call json%get(p,'PressureGradient',pval)
call json%get(pval,data%Configuration%Reservoir%PressureGradient)
call json%get(p,'FormationPermeability',pval)
call json%get(pval,data%Configuration%Reservoir%FormationPermeability)
call json%get(p,'GeothermalGradient',pval)
call json%get(pval,data%Configuration%Reservoir%GeothermalGradient)
call json%get(p,'FluidType',pval)
call json%get(pval,data%Configuration%Reservoir%FluidType)
call json%get(p,'FluidGradient',pval)
call json%get(pval,data%Configuration%Reservoir%FluidGradient)
call json%get(p,'FluidViscosity',pval)
call json%get(pval,data%Configuration%Reservoir%FluidViscosity)
call json%get(p,'InactiveInflux',pval)
call json%get(pval,data%Configuration%Reservoir%InactiveInflux)
call json%get(p,'IsAutoMigrationRateSelected',pval)
call json%get(pval,data%Configuration%Reservoir%IsAutoMigrationRateSelected)
call json%get(p,'AutoMigrationRate',pval)
call json%get(pval,data%Configuration%Reservoir%AutoMigrationRate)
call json%get(p,'MakeKickSinglePacket',pval)
call json%get(pval,data%Configuration%Reservoir%MakeKickSinglePacket)
end subroutine
subroutine ReservoirToJson(parent)
type(json_value),pointer :: parent


+ 26
- 0
CSharp/BasicInputs/Geology/CShoe.f90 View File

@@ -6,6 +6,32 @@ module CShoe
public
contains
subroutine ShoeFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitem,pval
logical::is_found
integer::i,n_children
CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val
call json%get(parent,'Shoe',p)
call json%get(p,'FormationNo',pval)
call json%get(pval,data%Configuration%Shoe%FormationNo)
call json%get(p,'ShoeDepth',pval)
call json%get(pval,data%Configuration%Shoe%ShoeDepth)
call json%get(p,'LeakOff',pval)
call json%get(pval,data%Configuration%Shoe%LeakOff)
call json%get(p,'Breakdown',pval)
call json%get(pval,data%Configuration%Shoe%Breakdown)
call json%get(p,'FracturePropagation',pval)
call json%get(pval,data%Configuration%Shoe%FracturePropagation)
call json%get(p,'InactiveFracture',pval)
call json%get(pval,data%Configuration%Shoe%InactiveFracture)
end subroutine
subroutine ShoeToJson(parent)
type(json_value),pointer :: parent


+ 37
- 0
CSharp/BasicInputs/RigSpecifications/CAccumulator.f90 View File

@@ -6,6 +6,43 @@ module CAccumulator
public
contains
subroutine AccumulatorFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitem,pval
logical::is_found
integer::i,n_children
CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val
call json%get(parent,'Accumulator',p)
call json%get(p,'NumberOfBottels',pval)
call json%get(pval,data%Configuration%Accumulator%NumberOfBottels)
call json%get(p,'AccumulatorSystemSize',pval)
call json%get(pval,data%Configuration%Accumulator%AccumulatorSystemSize)
call json%get(p,'OilTankVolume',pval)
call json%get(pval,data%Configuration%Accumulator%OilTankVolume)
call json%get(p,'PrechargePressure',pval)
call json%get(pval,data%Configuration%Accumulator%PrechargePressure)
call json%get(p,'AccumulatorMinimumOperatingPressure',pval)
call json%get(pval,data%Configuration%Accumulator%AccumulatorMinimumOperatingPressure)
call json%get(p,'ElectricPumpOutput',pval)
call json%get(pval,data%Configuration%Accumulator%ElectricPumpOutput)
call json%get(p,'StartPressure',pval)
call json%get(pval,data%Configuration%Accumulator%StartPressure)
call json%get(p,'StopPressure',pval)
call json%get(pval,data%Configuration%Accumulator%StopPressure)
call json%get(p,'AirPlungerPumpOutput',pval)
call json%get(pval,data%Configuration%Accumulator%AirPlungerPumpOutput)
call json%get(p,'StartPressure2',pval)
call json%get(pval,data%Configuration%Accumulator%StartPressure2)
call json%get(p,'StopPressure2',pval)
call json%get(pval,data%Configuration%Accumulator%StopPressure2)
end subroutine
subroutine AccumulatorToJson(parent)
type(json_value),pointer :: parent
type(json_core) :: json


+ 61
- 0
CSharp/BasicInputs/RigSpecifications/CBopStack.f90 View File

@@ -5,6 +5,67 @@ module CBopStack
public
contains
subroutine BopStackFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitem,pval
logical::is_found
integer::i,n_children
CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val
call json%get(parent,'BopStack',p)
call json%get(p,'AboveAnnularHeight',pval)
call json%get(pval,data%Configuration%BopStack%AboveAnnularHeight)
call json%get(p,'AnnularPreventerHeight',pval)
call json%get(pval,data%Configuration%BopStack%AnnularPreventerHeight)
call json%get(p,'UpperRamHeight',pval)
call json%get(pval,data%Configuration%BopStack%UpperRamHeight)
call json%get(p,'LowerRamHeight',pval)
call json%get(pval,data%Configuration%BopStack%LowerRamHeight)
call json%get(p,'BlindRamHeight',pval)
call json%get(pval,data%Configuration%BopStack%BlindRamHeight)
call json%get(p,'KillHeight',pval)
call json%get(pval,data%Configuration%BopStack%KillHeight)
call json%get(p,'KillOpen',pval)
call json%get(pval,data%Configuration%BopStack%KillOpen)
call json%get(p,'KillClose',pval)
call json%get(pval,data%Configuration%BopStack%KillClose)
call json%get(p,'GroundLevel',pval)
call json%get(pval,data%Configuration%BopStack%GroundLevel)
call json%get(p,'LowerRamOpen',pval)
call json%get(pval,data%Configuration%BopStack%LowerRamOpen)
call json%get(p,'LowerRamClose',pval)
call json%get(pval,data%Configuration%BopStack%LowerRamClose)
call json%get(p,'ChokeOpen',pval)
call json%get(pval,data%Configuration%BopStack%ChokeOpen)
call json%get(p,'ChokeClose',pval)
call json%get(pval,data%Configuration%BopStack%ChokeClose)
call json%get(p,'BlindRamOpen',pval)
call json%get(pval,data%Configuration%BopStack%BlindRamOpen)
call json%get(p,'BlindRamClose',pval)
call json%get(pval,data%Configuration%BopStack%BlindRamClose)
call json%get(p,'UpperRamOpen',pval)
call json%get(pval,data%Configuration%BopStack%UpperRamOpen)
call json%get(p,'UpperRamClose',pval)
call json%get(pval,data%Configuration%BopStack%UpperRamClose)
call json%get(p,'AnnularPreventerOpen',pval)
call json%get(pval,data%Configuration%BopStack%AnnularPreventerOpen)
call json%get(p,'AnnularPreventerClose',pval)
call json%get(pval,data%Configuration%BopStack%AnnularPreventerClose)
call json%get(p,'RamStringDrag',pval)
call json%get(pval,data%Configuration%BopStack%RamStringDrag)
call json%get(p,'AnnularStringDrag',pval)
call json%get(pval,data%Configuration%BopStack%AnnularStringDrag)
call json%get(p,'ChokeLineLength',pval)
call json%get(pval,data%Configuration%BopStack%ChokeLineLength)
call json%get(p,'ChokeLineId',pval)
call json%get(pval,data%Configuration%BopStack%ChokeLineId)
end subroutine
subroutine BopStackToJson(parent)
type(json_value),pointer :: parent


+ 25
- 1
CSharp/BasicInputs/RigSpecifications/CHoisting.f90 View File

@@ -5,8 +5,32 @@ module CHoisting
public
contains
subroutine HoistingToJson(parent)
subroutine HoistingFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitem,pval
logical::is_found
integer::i,n_children
CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val
call json%get(parent,'Hoisting',p)
call json%get(p,'DriveType',pval)
call json%get(pval,data%Configuration%Hoisting%DriveType)
call json%get(p,'TravelingBlockWeight',pval)
call json%get(pval,data%Configuration%Hoisting%TravelingBlockWeight)
call json%get(p,'TopDriveWeight',pval)
call json%get(pval,data%Configuration%Hoisting%TopDriveWeight)
call json%get(p,'KellyWeight',pval)
call json%get(pval,data%Configuration%Hoisting%KellyWeight)
call json%get(p,'NumberOfLine',pval)
call json%get(pval,data%Configuration%Hoisting%NumberOfLine)
call json%get(p,'DrillingLineBreakingLoad',pval)
call json%get(pval,data%Configuration%Hoisting%DrillingLineBreakingLoad)
end subroutine
subroutine HoistingToJson(parent)
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p


+ 4
- 4
CSharp/BasicInputs/WellProfile/CPathGeneration.f90 View File

@@ -56,8 +56,8 @@ module CPathGeneration
call json%get(p,'Items',pitems)
call json%info(pitems, n_children=n_children)
if (.not. allocated(data%Configuration%Path%Items) .or. size(data%Configuration%Configuration%Path%Items)/=n_children) then
ALLOCATE(data%Configuration%Configuration%Path%Items(n_children))
if (.not. allocated(data%Configuration%Path%Items) .or. size(data%Configuration%Path%Items)/=n_children) then
ALLOCATE(data%Configuration%Path%Items(n_children))
endif
do i=1,n_children
call json%get_child(pitems, i, pitem, found=is_found)
@@ -80,8 +80,8 @@ module CPathGeneration
call json%get(p,'DataPoints',dpoints)
call json%info(dpoints, n_children=n_children)
if (.not. allocated(data%Configuration%Path%DataPoints) .or. size(data%Configuration%Configuration%Path%DataPoints)/=n_children) then
ALLOCATE(data%Configuration%Configuration%Path%DataPoints(n_children))
if (.not. allocated(data%Configuration%Path%DataPoints) .or. size(data%Configuration%Path%DataPoints)/=n_children) then
ALLOCATE(data%Configuration%Path%DataPoints(n_children))
endif
do i=1,n_children
call json%get_child(dpoints, i, dpoint, found=is_found)


+ 2
- 370
CSharp/OperationScenarios/Unity/CUnityOutputs.f90 View File

@@ -47,25 +47,7 @@ module CUnityOutputs
logical function Get_BlowoutFromString()
implicit none
Get_BlowoutFromString = UnityOutputs%BlowoutFromString
end function
subroutine Set_BlowoutFromString_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_BlowoutFromString_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_BlowoutFromString_WN' :: Set_BlowoutFromString_WN
implicit none
logical, intent (in) :: v
call Set_BlowoutFromString(v)
end subroutine
logical function Get_BlowoutFromString_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: Get_BlowoutFromString_WN
!DEC$ ATTRIBUTES ALIAS: 'Get_BlowoutFromString_WN' :: Get_BlowoutFromString_WN
implicit none
Get_BlowoutFromString_WN = UnityOutputs%BlowoutFromString
!Get_BlowoutFromString = .TRUE.
end function
end function
subroutine Set_BlowoutFromAnnular(v)
implicit none
@@ -81,21 +63,6 @@ module CUnityOutputs
Get_BlowoutFromAnnular = UnityOutputs%BlowoutFromAnnular
end function
subroutine Set_BlowoutFromAnnular_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_BlowoutFromAnnular_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_BlowoutFromAnnular_WN' :: Set_BlowoutFromAnnular_WN
implicit none
logical, intent (in) :: v
call Set_BlowoutFromAnnular(v)
end subroutine
logical function Get_BlowoutFromAnnular_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: Get_BlowoutFromAnnular_WN
!DEC$ ATTRIBUTES ALIAS: 'Get_BlowoutFromAnnular_WN' :: Get_BlowoutFromAnnular_WN
implicit none
Get_BlowoutFromAnnular_WN = UnityOutputs%BlowoutFromAnnular
end function
@@ -115,23 +82,6 @@ module CUnityOutputs
end function
subroutine Set_FlowFromReturnLine_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowFromReturnLine_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_FlowFromReturnLine_WN' :: Set_FlowFromReturnLine_WN
implicit none
logical, intent (in) :: v
call Set_FlowFromReturnLine(v)
end subroutine
logical function Get_FlowFromReturnLine_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowFromReturnLine_WN
!DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromReturnLine_WN' :: Get_FlowFromReturnLine_WN
implicit none
Get_FlowFromReturnLine_WN = UnityOutputs%FlowFromReturnLine
!Get_FlowFromReturnLine_WN = .FALSE.
end function
subroutine Set_FlowFromKelly(v)
implicit none
@@ -148,25 +98,6 @@ module CUnityOutputs
end function
subroutine Set_FlowFromKelly_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowFromKelly_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_FlowFromKelly_WN' :: Set_FlowFromKelly_WN
implicit none
real, intent (in) :: v
call Set_FlowFromKelly(v)
end subroutine
real function Get_FlowFromKelly_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowFromKelly_WN
!DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromKelly_WN' :: Get_FlowFromKelly_WN
implicit none
#ifdef deb
print*, 'FlowFromKellyR=', UnityOutputs%FlowFromKelly
#endif
Get_FlowFromKelly_WN = UnityOutputs%FlowFromKelly
!Get_FlowFromKelly = .FALSE.
end function
@@ -185,25 +116,6 @@ module CUnityOutputs
end function
subroutine Set_FlowFromFillupHead_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowFromFillupHead_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_FlowFromFillupHead_WN' :: Set_FlowFromFillupHead_WN
implicit none
real, intent (in) :: v
call Set_FlowFromFillupHead(v)
end subroutine
real function Get_FlowFromFillupHead_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowFromFillupHead_WN
!DEC$ ATTRIBUTES ALIAS: 'Get_FlowFromFillupHead_WN' :: Get_FlowFromFillupHead_WN
implicit none
#ifdef deb
print*, 'FlowFromFillupHeadR=', UnityOutputs%FlowFromFillupHead
#endif
Get_FlowFromFillupHead_WN = UnityOutputs%FlowFromFillupHead
!Get_FlowFromFillupHead = .FALSE.
end function
@@ -223,23 +135,6 @@ module CUnityOutputs
end function
subroutine Set_FlowKellyDisconnect_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowKellyDisconnect_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_FlowKellyDisconnect_WN' :: Set_FlowKellyDisconnect_WN
implicit none
logical, intent (in) :: v
call Set_FlowKellyDisconnect(v)
end subroutine
logical function Get_FlowKellyDisconnect_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowKellyDisconnect_WN
!DEC$ ATTRIBUTES ALIAS: 'Get_FlowKellyDisconnect_WN' :: Get_FlowKellyDisconnect_WN
implicit none
Get_FlowKellyDisconnect_WN = UnityOutputs%FlowKellyDisconnect
!Get_FlowKellyDisconnect_WN = .false.
end function
subroutine Set_FlowPipeDisconnect(v)
@@ -255,49 +150,6 @@ module CUnityOutputs
implicit none
Get_FlowPipeDisconnect = UnityOutputs%FlowPipeDisconnect
end function
subroutine Set_FlowPipeDisconnect_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowPipeDisconnect_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_FlowPipeDisconnect_WN' :: Set_FlowPipeDisconnect_WN
implicit none
logical, intent (in) :: v
call Set_FlowPipeDisconnect(v)
end subroutine
logical function Get_FlowPipeDisconnect_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: Get_FlowPipeDisconnect_WN
!DEC$ ATTRIBUTES ALIAS: 'Get_FlowPipeDisconnect_WN' :: Get_FlowPipeDisconnect_WN
implicit none
Get_FlowPipeDisconnect_WN = UnityOutputs%FlowPipeDisconnect
!Get_FlowPipeDisconnect_WN = .false.
end function
subroutine Set_BlowoutFromStringPercent(v)
implicit none
@@ -313,31 +165,6 @@ module CUnityOutputs
GetBlowoutFromStringPercent = UnityOutputs%BlowoutFromStringPercent
end function
subroutine Set_BlowoutFromStringPercent_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_BlowoutFromStringPercent_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_BlowoutFromStringPercent_WN' :: Set_BlowoutFromStringPercent_WN
implicit none
real(8), intent (in) :: v
call Set_BlowoutFromStringPercent(v)
end subroutine
real(8) function GetBlowoutFromStringPercent_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: GetBlowoutFromStringPercent_WN
!DEC$ ATTRIBUTES ALIAS: 'GetBlowoutFromStringPercent_WN' :: GetBlowoutFromStringPercent_WN
implicit none
GetBlowoutFromStringPercent_WN = UnityOutputs%BlowoutFromStringPercent
!GetBlowoutFromStringPercent_WN = 0d0
end function
subroutine Calc_KellyHoseVibrationRate(spm1, spm2)
use CScaleRange
implicit none
@@ -353,17 +180,7 @@ module CUnityOutputs
real(8) function GetKellyHoseVibrationRate()
implicit none
GetKellyHoseVibrationRate = UnityOutputs%KellyHoseVibrationRate
end function
real(8) function GetKellyHoseVibrationRate_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: GetKellyHoseVibrationRate_WN
!DEC$ ATTRIBUTES ALIAS: 'GetKellyHoseVibrationRate_WN' :: GetKellyHoseVibrationRate_WN
implicit none
GetKellyHoseVibrationRate_WN = UnityOutputs%KellyHoseVibrationRate
end function
end function
subroutine Set_Pedal(v)
implicit none
@@ -379,26 +196,6 @@ module CUnityOutputs
GetPedal = UnityOutputs%Pedal
end function
subroutine Set_Pedal_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_Pedal_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_Pedal_WN' :: Set_Pedal_WN
implicit none
real(8), intent (in) :: v
call Set_Pedal(v)
end subroutine
real(8) function GetPedal_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: GetPedal_WN
!DEC$ ATTRIBUTES ALIAS: 'GetPedal_WN' :: GetPedal_WN
implicit none
GetPedal_WN = UnityOutputs%Pedal
!GetPedal = 50d0
end function
subroutine Set_FlowRate(v)
implicit none
real(8), intent (in) :: v
@@ -413,27 +210,6 @@ module CUnityOutputs
implicit none
GetFlowRate = UnityOutputs%FlowRate
end function
subroutine Set_FlowRate_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_FlowRate_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_FlowRate_WN' :: Set_FlowRate_WN
implicit none
real(8), intent (in) :: v
call Set_FlowRate(v)
end subroutine
real(8) function GetFlowRate_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: GetFlowRate_WN
!DEC$ ATTRIBUTES ALIAS: 'GetFlowRate_WN' :: GetFlowRate_WN
implicit none
GetFlowRate_WN = UnityOutputs%FlowRate
!GetFlowRate_WN = 50d0
end function
subroutine Set_RotaryRpm(v)
implicit none
real(8), intent (in) :: v
@@ -447,148 +223,4 @@ module CUnityOutputs
implicit none
GetRotaryRpm = UnityOutputs%RotaryRpm
end function
subroutine Set_RotaryRpm_WN(v)
!DEC$ ATTRIBUTES DLLEXPORT :: Set_RotaryRpm_WN
!DEC$ ATTRIBUTES ALIAS: 'Set_RotaryRpm_WN' :: Set_RotaryRpm_WN
implicit none
real(8), intent (in) :: v
call Set_RotaryRpm(v)
end subroutine
real(8) function GetRotaryRpm_WN()
!DEC$ ATTRIBUTES DLLEXPORT :: GetRotaryRpm_WN
!DEC$ ATTRIBUTES ALIAS: 'GetRotaryRpm_WN' :: GetRotaryRpm_WN
implicit none
GetRotaryRpm_WN = UnityOutputs%RotaryRpm
end function
logical function GetSignal1()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal1
!DEC$ ATTRIBUTES ALIAS: 'GetSignal1' :: GetSignal1
implicit none
!GetSignal1 = Signal1
GetSignal1 = .false.
end function
logical function GetSignal2()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal2
!DEC$ ATTRIBUTES ALIAS: 'GetSignal2' :: GetSignal2
implicit none
!GetSignal2 = Signal2
GetSignal2 = .false.
end function
logical function GetSignal3()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal3
!DEC$ ATTRIBUTES ALIAS: 'GetSignal3' :: GetSignal3
implicit none
!GetSignal3 = Signal3
GetSignal3 = .false.
end function
logical function GetSignal4()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal4
!DEC$ ATTRIBUTES ALIAS: 'GetSignal4' :: GetSignal4
implicit none
!GetSignal4 = Signal4
GetSignal4 = .false.
end function
logical function GetSignal5()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal5
!DEC$ ATTRIBUTES ALIAS: 'GetSignal5' :: GetSignal5
implicit none
!GetSignal5 = Signal5
GetSignal5 = .false.
end function
logical function GetSignal6()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal6
!DEC$ ATTRIBUTES ALIAS: 'GetSignal6' :: GetSignal6
implicit none
!GetSignal6 = Signal6
GetSignal6 = .false.
end function
logical function GetSignal7()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal7
!DEC$ ATTRIBUTES ALIAS: 'GetSignal7' :: GetSignal7
implicit none
!GetSignal7 = Signal7
GetSignal7 = .false.
end function
logical function GetSignal8()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal8
!DEC$ ATTRIBUTES ALIAS: 'GetSignal8' :: GetSignal8
implicit none
!GetSignal8 = Signal8
GetSignal8 = .false.
end function
logical function GetSignal9()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal9
!DEC$ ATTRIBUTES ALIAS: 'GetSignal9' :: GetSignal9
implicit none
!GetSignal9 = Signal9
GetSignal9 = .false.
end function
logical function GetSignal10()
!DEC$ ATTRIBUTES DLLEXPORT :: GetSignal10
!DEC$ ATTRIBUTES ALIAS: 'GetSignal10' :: GetSignal10
implicit none
!GetSignal10 = Signal10
GetSignal10 = .false.
end function
end module CUnityOutputs

+ 11
- 15
FluidFlow/Well_Pressure_Data_Transfer.f90 View File

@@ -17,24 +17,20 @@ SUBROUTINE WellPressureDataTransfer
USE FricPressDropVarsModule
use MudSystemModule
USE MudSystemVARIABLES
use SimulationVariables !@@@
use SimulationVariables !@@@
USE GeoElements_FluidModule
USE Fluid_Flow_Startup_Vars
use KickVARIABLESModule
USE CMudPropertiesVariables
USE CBopStackVariables
USE sROP_Variables
USE CHOKEVARIABLES
use SimulationVariables !@, PI2 => PI
use CChokeManifoldVariables
use SimulationVariables
USE CBitProblemsVariables
USE CChokeProblemsVariables
USE CStringConfigurationVariables
use SimulationVariables !@
use CDataDisplayConsole
use SimulationVariables
use SimulationVariables
! USE CMudPropertiesVariables
! USE CBopStackVariables
! USE sROP_Variables
! USE CHOKEVARIABLES
! use CChokeManifoldVariables
! use SimulationVariables
! USE CBitProblemsVariables
! USE CChokeProblemsVariables
! USE CStringConfigurationVariables
! use CDataDisplayConsole
IMPLICIT NONE


BIN
View File


+ 12
- 12
Simulator.f90 View File

@@ -500,18 +500,18 @@ module Simulator
call jsonfile%get('Configuration',p,is_found)

call StringConfigurationFromJson(p)
! call FormationFromJson(p)
! call ReservoirFromJson(p)
! call ShoeFromJson(p)
! call AccumulatorFromJson(p)
! call BopStackFromJson(p)
! call HoistingFromJson(p)
! call PowerFromJson(p)
! call PumpsFromJson(p)
! call RigSizeFromJson(p)
! call CasingLinerChokeFromJson(p)
! call PathGenerationFromJson(p)
! call MudPropertiesFromJson(p)
call FormationFromJson(p)
call ReservoirFromJson(p)
call ShoeFromJson(p)
call AccumulatorFromJson(p)
call BopStackFromJson(p)
call HoistingFromJson(p)
call PowerFromJson(p)
call PumpsFromJson(p)
call RigSizeFromJson(p)
call CasingLinerChokeFromJson(p)
call PathGenerationFromJson(p)
call MudPropertiesFromJson(p)

! 3. add new node to parent
call json%add(parent,p)


+ 6
- 10
Text1.txt View File

@@ -1,10 +1,6 @@
integer :: BitType
real(8) :: BitSize
integer :: BitCodeHundreds
integer :: BitCodeTens
integer :: BitCodeOnes
real(8) :: BitNozzleSize
real(8) :: BitLength
real(8) :: BitWeightPerLength
integer :: BitNozzleNo
logical :: FloatValve
integer :: DriveType
real(8) :: TravelingBlockWeight
real(8) :: TopDriveWeight
real(8) :: KellyWeight
integer :: NumberOfLine
real(8) :: DrillingLineBreakingLoad

BIN
View File


BIN
View File


+ 25
- 23
helper.ipynb View File

@@ -913,39 +913,41 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\t\tcall json%get(pbit,'BitType',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitType)\n",
"\t\tcall json%get(pbit,'BitSize',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitSize)\n",
"\t\tcall json%get(pbit,'BitCodeHundreds',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitCodeHundreds)\n",
"\t\tcall json%get(pbit,'BitCodeTens',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitCodeTens)\n",
"\t\tcall json%get(pbit,'BitCodeOnes',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitCodeOnes)\n",
"\t\tcall json%get(pbit,'BitNozzleSize',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitNozzleSize)\n",
"\t\tcall json%get(pbit,'BitLength',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitLength)\n",
"\t\tcall json%get(pbit,'BitWeightPerLength',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitWeightPerLength)\n",
"\t\tcall json%get(pbit,'BitNozzleNo',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%BitNozzleNo)\n",
"\t\tcall json%get(pbit,'FloatValve',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%FloatValve)\n"
"\t\tcall json%get(p,'NumberOfBottels',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%NumberOfBottels)\n",
"\t\tcall json%get(p,'AccumulatorSystemSize',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%AccumulatorSystemSize)\n",
"\t\tcall json%get(p,'OilTankVolume',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%OilTankVolume)\n",
"\t\tcall json%get(p,'PrechargePressure',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%PrechargePressure)\n",
"\t\tcall json%get(p,'AccumulatorMinimumOperatingPressure',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%AccumulatorMinimumOperatingPressure)\n",
"\t\tcall json%get(p,'ElectricPumpOutput',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%ElectricPumpOutput)\n",
"\t\tcall json%get(p,'StartPressure',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%StartPressure)\n",
"\t\tcall json%get(p,'StopPressure',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%StopPressure)\n",
"\t\tcall json%get(p,'AirPlungerPumpOutput',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%AirPlungerPumpOutput)\n",
"\t\tcall json%get(p,'StartPressure2',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%StartPressure2)\n",
"\t\tcall json%get(p,'StopPressure2',pval)\n",
"\t\tcall json%get(pval,data%Configuration%Accumulator%StopPressure2)\n"
]
}
],
"source": [
"pattern=\"\"\"\t\tcall json%get(pbit,'@@@',pval)\n",
"\t\tcall json%get(pval,data%Configuration%StringConfiguration%BitDefinition%@@@)\"\"\"\n",
"pattern=\"\"\"\t\tcall json%get(p,'@@@',pval)\n",
"\t\tcall json%get(pval,data%Configuration%BopStack%@@@)\"\"\"\n",
"\n",
"input = open(\"Text1.txt\")\n",
"lines = input.readlines()\n",


+ 1
- 0
test.sh
File diff suppressed because it is too large
View File


Loading…
Cancel
Save