|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- # 1 "/mnt/c/Projects/VSIM/SimulationCore2/CSharp/BasicInputs/RigSpecifications/CAccumulator.f90"
- module CAccumulator
- use SimulationVariables
- ! use CAccumulatorVariables
- use json_module
- implicit none
- 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
- type(json_value),pointer :: p
-
- call json%create_object(p,'Accumulator')
-
- call json%add(p,'AccumulatorMinimumOperatingPressure',data%Configuration%Accumulator%AccumulatorMinimumOperatingPressure)
- call json%add(p,'AccumulatorSystemSize',data%Configuration%Accumulator%AccumulatorSystemSize)
- call json%add(p,'AirPlungerPumpOutput',data%Configuration%Accumulator%AirPlungerPumpOutput)
- call json%add(p,'ElectricPumpOutput',data%Configuration%Accumulator%ElectricPumpOutput)
- call json%add(p,'NumberOfBottels',data%Configuration%Accumulator%NumberOfBottels)
- call json%add(p,'OilTankVolume',data%Configuration%Accumulator%OilTankVolume)
- call json%add(p,'PrechargePressure',data%Configuration%Accumulator%PrechargePressure)
- call json%add(p,'StartPressure',data%Configuration%Accumulator%StartPressure)
- call json%add(p,'StartPressure2',data%Configuration%Accumulator%StartPressure2)
- call json%add(p,'StopPressure',data%Configuration%Accumulator%StopPressure)
- call json%add(p,'StopPressure2',data%Configuration%Accumulator%StopPressure2)
-
- call json%add(parent,p)
- end subroutine
-
- end module CAccumulator
|