Browse Source

Merge remote-tracking branch 'origin/najafi'

master
mahmood19227 1 year ago
parent
commit
5908248fa4
6 changed files with 279 additions and 0 deletions
  1. +64
    -0
      CSharp/BasicInputs/MudProperties.f90
  2. +27
    -0
      CSharp/BasicInputs/RigSpecifications/CPower.f90
  3. +77
    -0
      CSharp/BasicInputs/RigSpecifications/CPumps.f90
  4. +19
    -0
      CSharp/BasicInputs/RigSpecifications/CRigSize.f90
  5. +41
    -0
      CSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90
  6. +51
    -0
      CSharp/BasicInputs/WellProfile/CPathGeneration.f90

+ 64
- 0
CSharp/BasicInputs/MudProperties.f90 View File

@@ -47,6 +47,70 @@ module MudPropertiesModule
call json%add(parent,p)
end subroutine
subroutine MudPropertiesFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitems,pitem,pval,pbit
call json%get(parent,'Mud',p)
call json%get(p,"ActiveMudType",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveMudType)
call json%get(p,"ActiveRheologyModel",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveRheologyModel)
call json%get(p,"ActiveMudVolume",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveMudVolume)
call json%get(p,"ActiveMudVolumeGal",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveMudVolumeGal)
call json%get(p,"ActiveDensity",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveDensity)
call json%get(p,"ActivePlasticViscosity",pitem)
call json%get(pitem,data%Configuration%Mud%ActivePlasticViscosity)
call json%get(p,"ActiveYieldPoint",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveYieldPoint)
call json%get(p,"ActiveThetaThreeHundred",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveThetaThreeHundred)
call json%get(p,"ActiveThetaSixHundred",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveThetaSixHundred)
call json%get(p,"ReserveMudType",pitem)
call json%get(pitem,data%Configuration%Mud%ReserveMudType)
call json%get(p,"ReserveMudVolume",pitem)
call json%get(pitem,data%Configuration%Mud%ReserveMudVolume)
call json%get(p,"ReserveMudVolumeGal",pitem)
call json%get(pitem,data%Configuration%Mud%ReserveMudVolumeGal)
call json%get(p,"ReserveDensity",pitem)
call json%get(pitem,data%Configuration%Mud%ReserveDensity)
call json%get(p,"ReservePlasticViscosity",pitem)
call json%get(pitem,data%Configuration%Mud%ReservePlasticViscosity)
call json%get(p,"ReserveYieldPoint",pitem)
call json%get(pitem,data%Configuration%Mud%ReserveYieldPoint)
call json%get(p,"ReserveThetaThreeHundred",pitem)
call json%get(pitem,data%Configuration%Mud%ReserveThetaThreeHundred)
call json%get(p,"ReserveThetaSixHundred",pitem)
call json%get(pitem,data%Configuration%Mud%ReserveThetaSixHundred)
call json%get(p,"ActiveTotalTankCapacity",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveTotalTankCapacity)
call json%get(p,"ActiveTotalTankCapacityGal",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveTotalTankCapacityGal)
call json%get(p,"ActiveSettledContents",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveSettledContents)
call json%get(p,"ActiveSettledContentsGal",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveSettledContentsGal)
call json%get(p,"ActiveTotalContents",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveTotalContents)
call json%get(p,"ActiveTotalContentsGal",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveTotalContentsGal)
call json%get(p,"ActiveAutoDensity",pitem)
call json%get(pitem,data%Configuration%Mud%ActiveAutoDensity)
call json%get(p,"InitialTripTankMudVolume",pitem)
call json%get(pitem,data%Configuration%Mud%InitialTripTankMudVolume)
call json%get(p,"InitialTripTankMudVolumeGal",pitem)
call json%get(pitem,data%Configuration%Mud%InitialTripTankMudVolumeGal)
call json%get(p,"PedalFlowMeter",pitem)
call json%get(pitem,data%Configuration%Mud%PedalFlowMeter)
end subroutine
subroutine Set_ActiveMudVolume_StudentStation(v)
implicit none


+ 27
- 0
CSharp/BasicInputs/RigSpecifications/CPower.f90 View File

@@ -29,5 +29,32 @@ module CPower
call json%add(parent,p)
end subroutine
subroutine PowerFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitems,pitem,pval,pbit
call json%get(parent,'Power',p)
call json%get(p,"CementPump",pitem)
call json%get(pitem,data%Configuration%Power%CementPump)
call json%get(p,"Drawworks",pitem)
call json%get(pitem,data%Configuration%Power%Drawworks)
call json%get(p,"GeneratorPowerRating",pitem)
call json%get(pitem,data%Configuration%Power%GeneratorPowerRating)
call json%get(p,"MudPump1",pitem)
call json%get(pitem,data%Configuration%Power%MudPump1)
call json%get(p,"MudPump2",pitem)
call json%get(pitem,data%Configuration%Power%MudPump2)
call json%get(p,"NumberOfgenerators",pitem)
call json%get(pitem,data%Configuration%Power%NumberOfgenerators)
call json%get(p,"RotaryTable",pitem)
call json%get(pitem,data%Configuration%Power%RotaryTable)
call json%get(p,"TopDrive",pitem)
call json%get(pitem,data%Configuration%Power%TopDrive)
end subroutine
end module CPower

+ 77
- 0
CSharp/BasicInputs/RigSpecifications/CPumps.f90 View File

@@ -55,6 +55,83 @@ module CPumps
call json%add(parent,p)
end subroutine
subroutine PumpsFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitems,pitem,pval,pbit
call json%get(parent,'Pumps',p)
call json%get(p,"MudPump1LinerDiameter",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1LinerDiameter)
call json%get(p,"MudPump1Stroke",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1Stroke)
call json%get(p,"MudPump1MechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1MechanicalEfficiency)
call json%get(p,"MudPump1VolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1VolumetricEfficiency)
call json%get(p,"MudPump1Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1Output)
call json%get(p,"MudPump1OutputBblStroke",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1OutputBblStroke)
call json%get(p,"MudPump1Maximum",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1Maximum)
call json%get(p,"MudPump1ReliefValvePressure",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1ReliefValvePressure)
call json%get(p,"MudPump2LinerDiameter",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2LinerDiameter)
call json%get(p,"MudPump2Stroke",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2Stroke)
call json%get(p,"MudPump2MechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2MechanicalEfficiency)
call json%get(p,"MudPump2VolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2VolumetricEfficiency)
call json%get(p,"MudPump2Output",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2Output)
call json%get(p,"MudPump2OutputBblStroke",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2OutputBblStroke)
call json%get(p,"MudPump2Maximum",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2Maximum)
call json%get(p,"MudPump2ReliefValvePressure",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2ReliefValvePressure)
call json%get(p,"CementPumpLinerDiameter",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpLinerDiameter)
call json%get(p,"CementPumpStroke",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpStroke)
call json%get(p,"CementPumpMechanicalEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpMechanicalEfficiency)
call json%get(p,"CementPumpVolumetricEfficiency",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpVolumetricEfficiency)
call json%get(p,"CementPumpOutput",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpOutput)
call json%get(p,"CementPumpOutputBblStroke",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpOutputBblStroke)
call json%get(p,"CementPumpMaximum",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpMaximum)
call json%get(p,"CementPumpReliefValvePressure",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpReliefValvePressure)
call json%get(p,"MudPump1ReliefValveIsSet",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump1ReliefValveIsSet)
call json%get(p,"MudPump2ReliefValveIsSet",pitem)
call json%get(pitem,data%Configuration%Pumps%MudPump2ReliefValveIsSet)
call json%get(p,"CementPumpReliefValveIsSet",pitem)
call json%get(pitem,data%Configuration%Pumps%CementPumpReliefValveIsSet)
call json%get(p,"ManualPumpPower",pitem)
call json%get(pitem,data%Configuration%Pumps%ManualPumpPower)
call json%get(p,"Valve1",pitem)
call json%get(pitem,data%Configuration%Pumps%Valve1)
call json%get(p,"Valve2",pitem)
call json%get(pitem,data%Configuration%Pumps%Valve2)
call json%get(p,"Valve3",pitem)
call json%get(pitem,data%Configuration%Pumps%Valve3)
call json%get(p,"Valve4",pitem)
call json%get(pitem,data%Configuration%Pumps%Valve4)
call json%get(p,"Valve5",pitem)
call json%get(pitem,data%Configuration%Pumps%Valve5)
end subroutine
subroutine OpenPump1()
use CManifolds


+ 19
- 0
CSharp/BasicInputs/RigSpecifications/CRigSize.f90 View File

@@ -25,4 +25,23 @@ module CRigSize
call json%add(parent,p)
end subroutine
subroutine RigSizeFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitems,pitem,pval,pbit
call json%get(parent,'RigSize',p)
call json%get(p,"RigType",pitem)
call json%get(pitem,data%Configuration%RigSize%RigType)
call json%get(p,"CrownHeight",pitem)
call json%get(pitem,data%Configuration%RigSize%CrownHeight)
call json%get(p,"MonkeyBoandHeight",pitem)
call json%get(pitem,data%Configuration%RigSize%MonkeyBoandHeight)
call json%get(p,"RigFloorHeight",pitem)
call json%get(pitem,data%Configuration%RigSize%RigFloorHeight)
end subroutine
end module CRigSize

+ 41
- 0
CSharp/BasicInputs/WellProfile/CCasingLinerChoke.f90 View File

@@ -36,5 +36,46 @@ module CCasingLinerChoke
call json%add(parent,p)
end subroutine
subroutine CasingLinerChokeFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitems,pitem,pval,pbit
call json%get(parent,'CasingLinerChoke',p)
call json%get(p,"CasingDepth",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%CasingDepth)
call json%get(p,"CasingId",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%CasingId)
call json%get(p,"CasingOd",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%CasingOd)
call json%get(p,"CasingWeight",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%CasingWeight)
call json%get(p,"CasingCollapsePressure",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%CasingCollapsePressure)
call json%get(p,"CasingTensileStrength",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%CasingTensileStrength)
call json%get(p,"LinerTopDepth",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%LinerTopDepth)
call json%get(p,"LinerLength",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%LinerLength)
call json%get(p,"LinerId",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%LinerId)
call json%get(p,"LinerOd",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%LinerOd)
call json%get(p,"LinerWeight",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%LinerWeight)
call json%get(p,"LinerCollapsePressure",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%LinerCollapsePressure)
call json%get(p,"LinerTensileStrength",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%LinerTensileStrength)
call json%get(p,"OpenHoleId",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%OpenHoleId)
call json%get(p,"OpenHoleLength",pitem)
call json%get(pitem,data%Configuration%CasingLinerChoke%OpenHoleLength)
end subroutine
end module CCasingLinerChoke

+ 51
- 0
CSharp/BasicInputs/WellProfile/CPathGeneration.f90 View File

@@ -42,4 +42,55 @@ module CPathGeneration
call json%add(parent,ppath)
end subroutine
subroutine PathGenerationFromJson(parent)
use json_module,IK =>json_ik
type(json_value),pointer :: parent
type(json_core) :: json
type(json_value),pointer :: p,pitems,pitem,pval,pbit,dpoints,dpoint
logical::is_found
type(CStringItem) :: item
integer::i,n_children
CHARACTER(KIND=JSON_CK, LEN=:), ALLOCATABLE :: val
call json%get(parent,'Path',p)
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))
endif
do i=1,n_children
call json%get_child(pitems, i, pitem, found=is_found)
call json%get(pitem,"HoleType",pval)
call json%get(pval,data%Configuration%Path%Items(i)%HoleType)
call json%get(pitem,"Angle",pval)
call json%get(pval,data%Configuration%Path%Items(i)%Angle)
call json%get(pitem,"Length",pval)
call json%get(pval,data%Configuration%Path%Items(i)%Length)
call json%get(pitem,"FinalAngle",pval)
call json%get(pval,data%Configuration%Path%Items(i)%FinalAngle)
call json%get(pitem,"TotalLength",pval)
call json%get(pval,data%Configuration%Path%Items(i)%TotalLength)
call json%get(pitem,"MeasuredDepth",pval)
call json%get(pval,data%Configuration%Path%Items(i)%MeasuredDepth)
call json%get(pitem,"TotalVerticalDepth",pval)
call json%get(pval,data%Configuration%Path%Items(i)%TotalVerticalDepth)
end do
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))
endif
do i=1,n_children
call json%get_child(dpoints, i, dpoint, found=is_found)
call json%get(dpoint,"X",pval)
call json%get(pval,data%Configuration%Path%DataPoints(i)%X)
call json%get(dpoint,"Y",pval)
call json%get(pval,data%Configuration%Path%DataPoints(i)%Y)
end do
end subroutine
end module CPathGeneration

Loading…
Cancel
Save