﻿{
  "$id": "https://drillplan.slb.com/cementing-v3.json",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "DrillPlan cementing program",
  "description": "DrillPlan cementing program. AEA input type name: cementing-v3",
  "type": "object",
  "definitions": {
    "CementingLayer": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "length": {
          "description": "(Length,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "top_md": {
          "description": "Top MD (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "top_tvd": {
          "description": "Top TVD (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "control_property": {
          "description": "ControlProperty"
        },
        "annular_volume": {
          "description": "Annular Volume (CementingVolume,cubic meter,m3)",
          "type": [
            "number",
            "null"
          ]
        },
        "fluid_type": {
          "description": "Fluid Type"
        },
        "comment": {
          "description": "Comment",
          "type": [
            "string",
            "null"
          ]
        },
        "is_fluid": {
          "description": "Is Fluid",
          "type": "boolean"
        },
        "is_slurry": {
          "description": "Is Slurry",
          "type": "boolean"
        },
        "sacks_equivalent": {
          "description": "Sacks Equivalent (DryCement,kilogram,kg)",
          "type": [
            "number",
            "null"
          ]
        },
        "sacks_yield": {
          "description": "Sacks Yield (Yield,cubic meter per kilogram,m3/kg)",
          "type": [
            "number",
            "null"
          ]
        },
        "pumped_excess_volume": {
          "description": "Pumped Excess Volume % (Percent,dimensionless)",
          "type": [
            "number",
            "null"
          ]
        },
        "errors": {
          "$ref": "#/definitions/CementingLayerErrors"
        },
        "annotations": {
          "$ref": "#/definitions/LayerAnnotations"
        },
        "is_cement": {
          "description": "Is Cement",
          "type": "boolean"
        },
        "name": {
          "description": "Name",
          "type": [
            "string",
            "null"
          ]
        },
        "density": {
          "description": "Density (MudDensity,kilogram per cubic meter,kg/m3)",
          "type": [
            "number",
            "null"
          ]
        },
        "volume": {
          "description": "Volume (CementingVolume,cubic meter,m3)",
          "type": [
            "number",
            "null"
          ]
        },
        "pump_rate": {
          "description": "Pump Rate (CementUnitOutput,cubic meter per second,m3/s)",
          "type": [
            "number",
            "null"
          ]
        },
        "total_time": {
          "description": "Time (Minute,second,s)",
          "type": [
            "number",
            "null"
          ]
        },
        "cumulative_time": {
          "description": "Cumulative Time (Minute,second,s)",
          "type": [
            "number",
            "null"
          ]
        },
        "contingency_time": {
          "description": "Contingency time (Minute,second,s)",
          "type": [
            "number",
            "null"
          ]
        },
        "required_thickening_time": {
          "description": "Required Thickening Time (Minute,second,s)",
          "type": [
            "number",
            "null"
          ]
        },
        "pump_index": {
          "description": "Pump Index",
          "type": [
            "integer",
            "null"
          ]
        },
        "fluid_properties": {
          "$ref": "#/definitions/FluidProperties"
        }
      },
      "required": [
        "length",
        "top_md",
        "top_tvd",
        "control_property",
        "annular_volume",
        "fluid_type",
        "comment",
        "is_fluid",
        "is_slurry",
        "sacks_equivalent",
        "sacks_yield",
        "pumped_excess_volume",
        "errors",
        "annotations",
        "is_cement",
        "name",
        "density",
        "volume",
        "pump_rate",
        "total_time",
        "cumulative_time",
        "contingency_time",
        "required_thickening_time",
        "pump_index",
        "fluid_properties"
      ]
    },
    "CementingLayerErrors": {
      "description": "Errors",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "length": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "top_md": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "top_tvd": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "sacks_equivalent": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "sacks_yield": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "pumped_excess_volume": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "annular_volume": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "density": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "volume": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "pump_rate": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "total_time": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "contingency_time": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "required": [
        "length",
        "top_md",
        "top_tvd",
        "sacks_equivalent",
        "sacks_yield",
        "pumped_excess_volume",
        "annular_volume",
        "density",
        "volume",
        "pump_rate",
        "total_time",
        "contingency_time"
      ]
    },
    "CementingProgram": {
      "description": "Cementing Program",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "cementing_program_type": {
          "description": "Type"
        },
        "landing_collar_distance_to_shoe": {
          "description": "Landing collar distance to the shoe (Length,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "landing_collar_top_md": {
          "description": "Landing collar top measured depth (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "shoe_track_volume": {
          "description": "Shoe track volume (CementingVolume,cubic meter,m3)",
          "type": [
            "number",
            "null"
          ]
        },
        "stage_collar_distance_to_shoe": {
          "description": "Stage collar distance to the shoe (Length,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "stage_collar_md": {
          "description": "Stage collar measured depth (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "waiting_time": {
          "description": "Waiting on cement (DayTime,second,s)",
          "type": [
            "number",
            "null"
          ]
        },
        "is_stab_in": {
          "description": "Stab-in cementing method",
          "type": "boolean"
        },
        "is_inner_string": {
          "description": "Inner string cementing",
          "type": "boolean"
        },
        "show_sacks": {
          "description": "Show volumes in sacks equivalent",
          "type": "boolean"
        },
        "apply_pumped_excess_only_to_open_hole": {
          "description": "Apply pumped excess only to open hole",
          "type": "boolean"
        },
        "annular_openhole_excess": {
          "description": "Annular Open Hole Excess % (Percent,dimensionless)",
          "type": [
            "number",
            "null"
          ]
        },
        "annular_openhole_excess_volume": {
          "description": "Annular Open Hole Excess Volume (CementingVolume,cubic meter,m3)",
          "type": [
            "number",
            "null"
          ]
        },
        "effective_openhole_diameters": {
          "description": "Effective Open Hole Diameter(s) (CylinderDiameter,meter,m)",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "number"
          }
        },
        "inherit_all_fluids": {
          "description": "Inherit All Fluids",
          "type": "boolean"
        },
        "hydraulic_isolation_depth_defined_by_type": {
          "description": "Hydraulic isolation depth defined by type"
        },
        "hydraulic_isolation_depth_percentage": {
          "description": "Hydraulic isolation depth percentage",
          "type": [
            "number",
            "null"
          ]
        },
        "hydraulic_isolation_depth_offset": {
          "description": "Hydraulic isolation depth offset (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "hydraulic_isolation_depth_md": {
          "description": "Hydraulic isolation depth md (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "hydraulic_isolation_depth_tvd": {
          "description": "Hydraulic isolation depth tvd (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "stage_anchor_formation_top": {
          "description": "Stage formation top",
          "type": [
            "string",
            "null"
          ]
        },
        "stage_offset_md_from_formation_top": {
          "description": "Stage offset MD from formation top (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "stage_collar_tvd": {
          "description": "Stage collar TVD (StandardDepthIndex,meter,m)",
          "type": [
            "number",
            "null"
          ]
        },
        "stage_collar_md_tie_to_type": {
          "description": "Stage collar MD tie to type"
        },
        "errors": {
          "$ref": "#/definitions/CementingProgramErrors"
        },
        "locked_shoe_track_length": {
          "description": "Locked shoe track length",
          "type": "boolean"
        },
        "use_automated_shoe_track_length": {
          "description": "Use Automated Shoe Track Length",
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "cementing_program_type",
        "landing_collar_distance_to_shoe",
        "landing_collar_top_md",
        "shoe_track_volume",
        "stage_collar_distance_to_shoe",
        "stage_collar_md",
        "waiting_time",
        "is_stab_in",
        "is_inner_string",
        "show_sacks",
        "apply_pumped_excess_only_to_open_hole",
        "annular_openhole_excess",
        "annular_openhole_excess_volume",
        "effective_openhole_diameters",
        "inherit_all_fluids",
        "hydraulic_isolation_depth_defined_by_type",
        "hydraulic_isolation_depth_percentage",
        "hydraulic_isolation_depth_offset",
        "hydraulic_isolation_depth_md",
        "hydraulic_isolation_depth_tvd",
        "stage_anchor_formation_top",
        "stage_offset_md_from_formation_top",
        "stage_collar_tvd",
        "stage_collar_md_tie_to_type",
        "errors",
        "locked_shoe_track_length",
        "use_automated_shoe_track_length"
      ]
    },
    "CementingProgramErrors": {
      "description": "Errors",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "stage_collar_md": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "shoe_track_length_validation_error": {
          "$ref": "#/definitions/ShoeTrackLengthValidationError"
        }
      },
      "required": [
        "stage_collar_md",
        "shoe_track_length_validation_error"
      ]
    },
    "ContractRelation": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "parent_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "run_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "section_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "wellbore_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "well_id": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "parent_id",
        "run_id",
        "section_id",
        "wellbore_id",
        "well_id"
      ]
    },
    "DisplacementLayer": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "layer_type": {
          "description": "Layer Type"
        },
        "is_fluid": {
          "description": "Is Fluid",
          "type": "boolean"
        },
        "is_slurry": {
          "description": "Is Slurry",
          "type": "boolean"
        },
        "errors": {
          "$ref": "#/definitions/DisplacementLayerErrors"
        },
        "name": {
          "description": "Name",
          "type": [
            "string",
            "null"
          ]
        },
        "density": {
          "description": "Density",
          "type": [
            "number",
            "null"
          ]
        },
        "volume": {
          "description": "Volume",
          "type": [
            "number",
            "null"
          ]
        },
        "pump_rate": {
          "description": "Pump Rate",
          "type": [
            "number",
            "null"
          ]
        },
        "total_time": {
          "description": "Time",
          "type": [
            "number",
            "null"
          ]
        },
        "cumulative_time": {
          "description": "Cumulative Time",
          "type": [
            "number",
            "null"
          ]
        },
        "contingency_time": {
          "description": "Contingency time",
          "type": [
            "number",
            "null"
          ]
        },
        "required_thickening_time": {
          "description": "Required Thickening Time",
          "type": [
            "number",
            "null"
          ]
        },
        "pump_index": {
          "description": "Pump Index",
          "type": [
            "integer",
            "null"
          ]
        },
        "fluid_properties": {
          "$ref": "#/definitions/FluidProperties"
        }
      },
      "required": [
        "layer_type",
        "is_fluid",
        "is_slurry",
        "errors",
        "name",
        "density",
        "volume",
        "pump_rate",
        "total_time",
        "cumulative_time",
        "contingency_time",
        "required_thickening_time",
        "pump_index",
        "fluid_properties"
      ]
    },
    "DisplacementLayerErrors": {
      "description": "Errors",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "density": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "volume": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "pump_rate": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "total_time": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "contingency_time": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "required": [
        "density",
        "volume",
        "pump_rate",
        "total_time",
        "contingency_time"
      ]
    },
    "FluidProperties": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "rheology": {
          "$ref": "#/definitions/Rheology"
        }
      },
      "required": [
        "rheology"
      ]
    },
    "LayerAnnotations": {
      "description": "Annotations",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "density": {
          "type": [
            "string",
            "null"
          ]
        },
        "length": {
          "type": [
            "string",
            "null"
          ]
        },
        "top_md": {
          "type": [
            "string",
            "null"
          ]
        },
        "top_tvd": {
          "type": [
            "string",
            "null"
          ]
        },
        "volume": {
          "type": [
            "string",
            "null"
          ]
        },
        "sacks_equivalent": {
          "type": [
            "string",
            "null"
          ]
        },
        "sacks_yield": {
          "type": [
            "string",
            "null"
          ]
        },
        "pumped_excess_volume": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "density",
        "length",
        "top_md",
        "top_tvd",
        "volume",
        "sacks_equivalent",
        "sacks_yield",
        "pumped_excess_volume"
      ]
    },
    "PumpSummary": {
      "description": "Pump Summary",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "total_pump_time": {
          "description": "(Minute,second,s)",
          "type": [
            "number",
            "null"
          ]
        },
        "total_pump_time_errors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "cement_displacement_time": {
          "description": "(Minute,second,s)",
          "type": [
            "number",
            "null"
          ]
        },
        "cement_displacement_time_errors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "total_displacement_volume": {
          "description": "(CementingVolume,cubic meter,m3)",
          "type": [
            "number",
            "null"
          ]
        },
        "total_displacement_volume_errors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "required": [
        "total_pump_time",
        "total_pump_time_errors",
        "cement_displacement_time",
        "cement_displacement_time_errors",
        "total_displacement_volume",
        "total_displacement_volume_errors"
      ]
    },
    "PumpSummary-1": {
      "description": "2nd Stage Pump Summary",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "total_pump_time": {
          "type": [
            "number",
            "null"
          ]
        },
        "total_pump_time_errors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "cement_displacement_time": {
          "type": [
            "number",
            "null"
          ]
        },
        "cement_displacement_time_errors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "total_displacement_volume": {
          "type": [
            "number",
            "null"
          ]
        },
        "total_displacement_volume_errors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "required": [
        "total_pump_time",
        "total_pump_time_errors",
        "cement_displacement_time",
        "cement_displacement_time_errors",
        "total_displacement_volume",
        "total_displacement_volume_errors"
      ]
    },
    "Rheology": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "rheology_input": {},
        "api": {
          "$ref": "#/definitions/RheologyApi"
        },
        "herschel_bulkley": {
          "$ref": "#/definitions/RheologyHerschelBulkley"
        }
      },
      "required": [
        "rheology_input",
        "api",
        "herschel_bulkley"
      ]
    },
    "RheologyApi": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "temperature": {
          "description": "(Temperature,kelvin,K)",
          "type": [
            "number",
            "null"
          ]
        },
        "r3": {
          "type": [
            "number",
            "null"
          ]
        },
        "r6": {
          "type": [
            "number",
            "null"
          ]
        },
        "r30": {
          "type": [
            "number",
            "null"
          ]
        },
        "r60": {
          "type": [
            "number",
            "null"
          ]
        },
        "r100": {
          "type": [
            "number",
            "null"
          ]
        },
        "r200": {
          "type": [
            "number",
            "null"
          ]
        },
        "r300": {
          "type": [
            "number",
            "null"
          ]
        },
        "hb_consistency_factor": {
          "type": [
            "number",
            "null"
          ]
        },
        "hb_power_index": {
          "type": [
            "number",
            "null"
          ]
        },
        "hb_yield_stress": {
          "description": "(ShearStress,pascal,Pa)",
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "temperature",
        "r3",
        "r6",
        "r30",
        "r60",
        "r100",
        "r200",
        "r300",
        "hb_consistency_factor",
        "hb_power_index",
        "hb_yield_stress"
      ]
    },
    "RheologyHerschelBulkley": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "hb_consistency_factor": {
          "type": [
            "number",
            "null"
          ]
        },
        "hb_power_index": {
          "type": [
            "number",
            "null"
          ]
        },
        "hb_yield_stress": {
          "description": "(ShearStress,pascal,Pa)",
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "hb_consistency_factor",
        "hb_power_index",
        "hb_yield_stress"
      ]
    },
    "ShoeTrackLengthValidationError": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "severity": {},
        "message": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "severity",
        "message"
      ]
    },
    "StabInString": {
      "description": "Stab-in String",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "components": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/definitions/StabInStringComponent"
          }
        }
      },
      "required": [
        "components"
      ]
    },
    "StabInStringComponent": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "tool_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "properties": {},
        "image_uri": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "tool_type",
        "properties",
        "image_uri"
      ]
    }
  },
  "properties": {
    "stab_in_string": {
      "$ref": "#/definitions/StabInString"
    },
    "id": {
      "type": [
        "string",
        "null"
      ]
    },
    "section_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "cementing_program": {
      "$ref": "#/definitions/CementingProgram"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "cementing_layers": {
      "description": "Cementing Layers",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/CementingLayer"
      }
    },
    "displacement_layers": {
      "description": "Displacement Layers",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/DisplacementLayer"
      }
    },
    "pump_summary": {
      "$ref": "#/definitions/PumpSummary"
    },
    "cementing_layers_second_stage": {
      "description": "2nd Stage Cementing Layers",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/CementingLayer"
      }
    },
    "displacement_layers_second_stage": {
      "description": "2nd Stage Displacement Layers",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/definitions/DisplacementLayer"
      }
    },
    "pump_summary_second_stage": {
      "$ref": "#/definitions/PumpSummary-1"
    },
    "wellbore_geometry_errors": {
      "description": "Wellbore Geometry Errors",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "run_definition_errors": {
      "description": "Run Definition Errors",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "__relation__": {
      "$ref": "#/definitions/ContractRelation"
    }
  },
  "required": [
    "stab_in_string",
    "id",
    "section_id",
    "cementing_program",
    "name",
    "cementing_layers",
    "displacement_layers",
    "pump_summary",
    "cementing_layers_second_stage",
    "displacement_layers_second_stage",
    "pump_summary_second_stage",
    "wellbore_geometry_errors",
    "run_definition_errors",
    "__relation__"
  ]
}