module CTanks use SimulationVariables use CManifolds implicit none public contains subroutine TankToJson(parent) type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p,pform integer :: i call json%create_array(p,'Tank') call json%create_object(pform,'') call json%add(pform,"WaterRate",data%EquipmentControl%Tank%WaterRate) call json%add(pform,"CementTankVolume",data%EquipmentControl%Tank%CementTankVolume) call json%add(pform,"CementTankDensity",data%EquipmentControl%Tank%CementTankDensity) call json%add(pform,"TripTankVolume",data%EquipmentControl%Tank%TripTankVolume) call json%add(pform,"TripTankDensity",data%EquipmentControl%Tank%TripTankDensity) call json%add(pform,"ManualPumpPower",data%EquipmentControl%Tank%ManualPumpPower) call json%add(pform,"Valve1",data%EquipmentControl%Tank%Valve1) call json%add(pform,"Valve2",data%EquipmentControl%Tank%Valve2) call json%add(pform,"Valve3",data%EquipmentControl%Tank%Valve3) call json%add(pform,"Valve4",data%EquipmentControl%Tank%Valve4) call json%add(pform,"Valve5",data%EquipmentControl%Tank%Valve5) call json%add(pform,"Valve6",data%EquipmentControl%Tank%Valve6) call json%add(pform,"Valve7",data%EquipmentControl%Tank%Valve7) call json%add(pform,"Valve8",data%EquipmentControl%Tank%Valve8) call json%add(pform,"Valve9",data%EquipmentControl%Tank%Valve9) call json%add(pform,"Valve10",data%EquipmentControl%Tank%Valve10) call json%add(pform,"Valve11",data%EquipmentControl%Tank%Valve11) call json%add(parent,p) end subroutine subroutine Set_ManualPumpPower(v) use CManifolds, only:ChangeValve implicit none logical, intent(in) :: v data%EquipmentControl%Tank%ManualPumpPower = v call ChangeValve(43, v) #ifdef deb print*, 'ManualPumpPower=', data%EquipmentControl%Tank%ManualPumpPower #endif end subroutine end module CTanks