{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "https://drillplan.slb.com/casing-integrity-results-v1.json",
  "type": "object",
  "description": "Casing Integrity analysis results under various load cases.",
  "properties": {
    "design_name": {
      "type": "string",
      "description": "Casing Design object name."
    },
    "date": {
      "type": "string",
      "description": "Date of analysis."
    },
    "well_strings": {
      "type": "array",
      "description": "Array of well strings with analysis results.",
      "items": {
        "type": "object",
        "description": "Well string element.",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "Id of well string element."
          },
          "string_description": {
            "type": "string",
            "description": "Description of well string. This description is a first component description in case of multiple components in the string."
          },
          "load_cases": {
            "type": "array",
            "description": "Array of analysis results by load case.",
            "items": {
              "type": "object",
              "description": "Load case.",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Load case type."
                },
                "loadcase_name": {
                  "type": "string",
                  "description": "Load case name."
                },
                "segment_results_array": {
                  "type": "object",
                  "description": "Detailed load case results by segment.",
                  "properties": {
                    "md_tops": {
                      "type": "array",
                      "description": "Array of segment top Measured depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Segment top Measured depth (StandardDepthIndex,meter,m)."
                      }
                    },
                    "tvd_tops": {
                      "type": "array",
                      "description": "Array of segment top True Vertical depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Segment top TVD (StandardDepthIndex,meter,m)."
                      }
                    },
                    "md_bases": {
                      "type": "array",
                      "description": "Array of segment base Measured depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Segment base Measured depth (StandardDepthIndex,meter,m)."
                      }
                    },
                    "tvd_bases": {
                      "type": "array",
                      "description": "Array of segment base True Vertical depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Segment base True Vertical depth (StandardDepthIndex,meter,m)."
                      }
                    },
                    "axial_forces": {
                      "type": "object",
                      "description": "Axial forces.",
                      "properties": {
                        "total_axial_force_tops": {
                          "type": "array",
                          "description": "Array of segment top Total Axial Forces.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Total Axial Force (Force,newton,N)."
                          }
                        },
                        "total_axial_force_bases": {
                          "type": "array",
                          "description": "Array of segment base Total Axial Forces.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Total Axial Force (Force,newton,N)."
                          }
                        },
                        "von_mises_equivalent_force_tops": {
                          "type": "array",
                          "description": "Array of segment top Von Mises Equivalent Forces.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Von Mises Equivalent Force (Force,newton,N)."
                          }
                        },
                        "von_mises_equivalent_force_bases": {
                          "type": "array",
                          "description": "Array of segment base Von Mises Equivalent Forces",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Von Mises Equivalent Force (Force,newton,N)."
                          }
                        }
                      }
                    },
                    "stress": {
                      "type": "object",
                      "description": "Stress.",
                      "properties": {
                        "normalized_von_mises_equivalent_tops": {
                          "type": "array",
                          "description": "Array of segment top Normalized Von Mises Equivalents.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Normalized Von Mises Equivalent (Pressure,pascal,Pa)."
                          }
                        },
                        "normalized_von_mises_equivalent_bases": {
                          "type": "array",
                          "description": "Array of segment base Normalized VMEs.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Normalized Von Mises Equivalent (Pressure,pascal,Pa)."
                          }
                        }
                      }
                    },
                    "body_design_factors": {
                      "type": "object",
                      "description": "Body Design Factors.",
                      "properties": {
                        "burst_collapse_tops": {
                          "type": "array",
                          "description": "Array of segment top Burst/Collapse Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Burst/Collapse Design Factor."
                          }
                        },
                        "burst_collapse_bases": {
                          "type": "array",
                          "description": "Array of segment base Burst/Collapse Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Burst/Collapse Design Factors."
                          }
                        },
                        "leak_test_tops": {
                          "type": "array",
                          "description": "Array of segment top Leak Test Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Leak Test Design Factor."
                          }
                        },
                        "leak_test_bases": {
                          "type": "array",
                          "description": "Array of segment base Leak Test Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Leak Test Design Factor."
                          }
                        },
                        "tension_compression_tops": {
                          "type": "array",
                          "description": "Array of segment top Tension/Compression Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Tension/Compression Design Factor."
                          }
                        },
                        "tension_compression_bases": {
                          "type": "array",
                          "description": "Array of segment base Tension/Compression Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Tension/Compression Design Factor."
                          }
                        },
                        "average_von_mises_equivalent_tops": {
                          "type": "array",
                          "description": "Array of segment top Average Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Average Von Mises Equivalent Design Factor."
                          }
                        },
                        "average_von_mises_equivalent_bases": {
                          "type": "array",
                          "description": "Array of segment base Average Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Average Von Mises Equivalent Design Factor."
                          }
                        },
                        "peak_von_mises_equivalent_tops": {
                          "type": "array",
                          "description": "Array of segment top Peak Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Peak Von Mises Equivalent Design Factor."
                          }
                        },
                        "peak_von_mises_equivalent_bases": {
                          "type": "array",
                          "description": "Array of segment base Peak Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Peak Von Mises Equivalent Design Factor."
                          }
                        }
                      }
                    },
                    "connection_design_factors": {
                      "type": "object",
                      "description": "Connection Design Factors.",
                      "properties": {
                        "burst_collapse_tops": {
                          "type": "array",
                          "description": "Array of segment top Burst/Collapse Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Burst/Collapse Design Factor."
                          }
                        },
                        "burst_collapse_bases": {
                          "type": "array",
                          "description": "Array of segment base Burst/Collapse Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Burst/Collapse Design Factors."
                          }
                        },
                        "leak_test_tops": {
                          "type": "array",
                          "description": "Array of segment top Leak Test Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Leak Test Design Factor."
                          }
                        },
                        "leak_test_bases": {
                          "type": "array",
                          "description": "Array of segment base Leak Test Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Leak Test Design Factor."
                          }
                        },
                        "tension_compression_tops": {
                          "type": "array",
                          "description": "Array of segment top Tension/Compression Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Tension/Compression Design Factor."
                          }
                        },
                        "tension_compression_bases": {
                          "type": "array",
                          "description": "Array of segment base Tension/Compression Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Tension/Compression Design Factor."
                          }
                        },
                        "average_von_mises_equivalent_tops": {
                          "type": "array",
                          "description": "Array of segment top Average Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Average Von Mises Equivalent Design Factor."
                          }
                        },
                        "average_von_mises_equivalent_bases": {
                          "type": "array",
                          "description": "Array of segment base Average Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Average Von Mises Equivalent Design Factor."
                          }
                        },
                        "peak_von_mises_equivalent_tops": {
                          "type": "array",
                          "description": "Array of segment top Peak Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment top Peak Von Mises Equivalent Design Factor."
                          }
                        },
                        "peak_von_mises_equivalent_bases": {
                          "type": "array",
                          "description": "Array of segment base Peak Von Mises Equivalent Design Factors.",
                          "items": {
                            "type": ["number", "null"],
                            "description": "Segment base Peak Von Mises Equivalent Design Factor."
                          }
                        }
                      }
                    }
                  }
                },
                "external_pressures": {
                  "type": "object",
                  "description": "External pressure profile.",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "Number of profile points."
                    },
                    "pressure": {
                      "type": "array",
                      "description": "Array of Pressures.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Pressure (Pressure,pascal,Pa)."
                      }
                    },
                    "md": {
                      "type": "array",
                      "description": "Array of Measured depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Measured depth (StandardDepthIndex,meter,m)."
                      }
                    },
                    "tvd": {
                      "type": "array",
                      "description": "Array of True Vertical depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "True Vertical depth (StandardDepthIndex,meter,m)."
                      }
                    }
                  }
                },
                "internal_pressures": {
                  "type": "object",
                  "description": "Internal pressure profile.",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "Number of profile points."
                    },
                    "pressure": {
                      "type": "array",
                      "description": "Array of Pressures.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Pressure (Pressure,pascal,Pa)."
                      }
                    },
                    "md": {
                      "type": "array",
                      "description": "Array of Measured depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Measured depth (StandardDepthIndex,meter,m)."
                      }
                    },
                    "tvd": {
                      "type": "array",
                      "description": "Array of True Vertical depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "True Vertical depth (StandardDepthIndex,meter,m)."
                      }
                    }
                  }
                },
                "temperatures": {
                  "type": "object",
                  "description": "Temperature profile.",
                  "properties": {
                    "count": {
                      "type": "integer",
                      "description": "Number of profile points."
                    },
                    "temp": {
                      "type": "array",
                      "description": "Array of Temperatures.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Temperature (Temperature,kelvin,K)."
                      }
                    },
                    "md": {
                      "type": "array",
                      "description": "Array of Measured depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "Measured depth (StandardDepthIndex,meter,m)."
                      }
                    },
                    "tvd": {
                      "type": "array",
                      "description": "Array of True Vertical depth.",
                      "items": {
                        "type": ["number", "null"],
                        "description": "True Vertical depth (StandardDepthIndex,meter,m)."
                      }
                    }
                  }
                }
              }
            }
          },
          "components": {
            "type": "array",
            "description": "Casing components in the well string.",
            "items": {
              "type": "object",
              "description": "Casing components.",
              "properties": {
                "description": {
                  "type": "string",
                  "description": "Component description from Catalog."
                },
                "type": {
                  "type": "string",
                  "description": "Casing type.",
                  "x-enumNames": [
                    "Riser",
                    "SurfaceCasing",
                    "IntermediateCasing",
                    "ConductorCasing",
                    "ProductionCasing",
                    "DrillingLiner",
                    "ProductionLiner",
                    "DrillingTieback",
                    "ProductionTieback",
                    "Tubing",
                    "Packer",
                    "Accessory",
                    "OpenHole",
                    "Unknown"
                  ],
                  "enum": [
                    "Riser",
                    "SurfaceCasing",
                    "IntermediateCasing",
                    "ConductorCasing",
                    "ProductionCasing",
                    "DrillingLiner",
                    "ProductionLiner",
                    "DrillingTieback",
                    "ProductionTieback",
                    "Tubing",
                    "Packer",
                    "Accessory",
                    "OpenHole",
                    "Unknown"
                  ]
                },
                "percent_wear": {
                  "type": ["number", "null"],
                  "description": "Percent wear as % of wall thickness. Anticipated removal of pipe body material due to drilling wear or corrosion, expressed as a percentage of the nominal wall thickness. Recommended range 5 to 15."
                },
                "dimensions": {
                  "type": "object",
                  "description": "Pipe dimensions.",
                  "properties": {
                    "top_md": {
                      "type": ["number", "null"],
                      "description": "Casing top Measured depth (StandardDepthIndex,meter,m)."
                    },
                    "bottom_md": {
                      "type": ["number", "null"],
                      "description": "Casing bottom Measured depth (StandardDepthIndex,meter,m)."
                    },
                    "inside_diameter": {
                      "type": ["number", "null"],
                      "description": "Casing inside diameter (CylinderDiameter,meter,m)."
                    },
                    "outside_diameter": {
                      "type": ["number", "null"],
                      "description": "Casing outside diameter (CylinderDiameter,meter,m)."
                    },
                    "coupling_outside_diameter": {
                      "type": ["number", "null"],
                      "description": "Coupling outside diameter (CylinderDiameter,meter,m)."
                    },
                    "drift_diameter": {
                      "type": ["number", "null"],
                      "description": "Casing drift diameter (CylinderDiameter,meter,m)."
                    },
                    "outside_diameter_tolerance_factor": {
                      "type": ["number", "null"],
                      "description": "Acceptable variance factor in outside diameter. The amount of variance allowed in the outside diameter of the pipe. Acceptable range [1.0 to 1.02] (up to 2% diameter increase)."
                    },
                    "wall_thickness": {
                      "type": ["number", "null"],
                      "description": "Wall thickness CylinderDiameter,meter,m)."
                    },
                    "wall_tolerance_factor": {
                      "type": ["number", "null"],
                      "description": "Wall thickness tolerance as a percentage deviation from 100%. Lowest % of acceptable wall thickness. API standards allow a max. deviation of thinning of 12.5%. Acceptable range [-12.5 to 0] (87.5% thickness to 100%)."
                    }
                  }
                },
                "material": {
                  "type": "object",
                  "description": "Material properties of the casing.",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "Material name."
                    },
                    "density": {
                      "type": ["number", "null"],
                      "description": "Density (Density,kilogram per cubic meter,kg/m3)."
                    },
                    "elastic_modulus": {
                      "type": ["number", "null"],
                      "description": "Elastic modulus (ElasticModulus,pascal,Pa)."
                    },
                    "poisson_ratio": {
                      "type": ["number", "null"],
                      "description": "Poisson ratio (dimensionless)."
                    },
                    "thermal_expansion_coefficient": {
                      "type": ["number", "null"],
                      "description": "Thermal expansion coefficient (ThermalExpansionCoefficient,inverse degree Celsius,1/degC)."
                    },
                    "anisotropy": {
                      "type": ["number", "null"],
                      "description": "Consider anisotropy. Set 1.0 only if the CRA (corrosion-resistant alloy) is cold-worked to increase its yield strength. Default 0.0."
                    },
                    "grade": {
                      "type": "string",
                      "description": "The casing grade.",
                      "x-enumNames": [
                        "B",
                        "H40",
                        "X42",
                        "X46",
                        "X52",
                        "J55",
                        "K55",
                        "X56",
                        "X60",
                        "M65",
                        "X65",
                        "X70",
                        "C75",
                        "E75",
                        "L80",
                        "X80",
                        "N80",
                        "C90",
                        "T95",
                        "C95",
                        "X95",
                        "G105",
                        "P105",
                        "C110",
                        "P110",
                        "Q125",
                        "S135",
                        "K70",
                        "SC85",
                        "O95",
                        "U140",
                        "D0075",
                        "D01",
                        "D015",
                        "E0075",
                        "E01",
                        "E015",
                        "K01",
                        "K015",
                        "L0075",
                        "L01",
                        "L015",
                        "M0075",
                        "M01",
                        "M015",
                        "P0075",
                        "P01",
                        "P015",
                        "T0075",
                        "T01",
                        "T015",
                        "TN100SS",
                        "TN110HC",
                        "TN110HS",
                        "TN110LT",
                        "TN110SS",
                        "TN125HC",
                        "TN125LT",
                        "TN140DW",
                        "TN140HC",
                        "TN150DW",
                        "TN55CS",
                        "TN55LT",
                        "TN70CS",
                        "TN75CS",
                        "TN80HC",
                        "TN80HS",
                        "TN80LT",
                        "TN80SS",
                        "TN90SS",
                        "TN95HC",
                        "TN95HS",
                        "TN95LT",
                        "TN95SS",
                        "USER"
                      ],
                      "enum": [
                        "B",
                        "H40",
                        "X42",
                        "X46",
                        "X52",
                        "J55",
                        "K55",
                        "X56",
                        "X60",
                        "M65",
                        "X65",
                        "X70",
                        "C75",
                        "E75",
                        "L80",
                        "X80",
                        "N80",
                        "C90",
                        "T95",
                        "C95",
                        "X95",
                        "G105",
                        "P105",
                        "C110",
                        "P110",
                        "Q125",
                        "S135",
                        "K70",
                        "SC85",
                        "O95",
                        "U140",
                        "D0075",
                        "D01",
                        "D015",
                        "E0075",
                        "E01",
                        "E015",
                        "K01",
                        "K015",
                        "L0075",
                        "L01",
                        "L015",
                        "M0075",
                        "M01",
                        "M015",
                        "P0075",
                        "P01",
                        "P015",
                        "T0075",
                        "T01",
                        "T015",
                        "TN100SS",
                        "TN110HC",
                        "TN110HS",
                        "TN110LT",
                        "TN110SS",
                        "TN125HC",
                        "TN125LT",
                        "TN140DW",
                        "TN140HC",
                        "TN150DW",
                        "TN55CS",
                        "TN55LT",
                        "TN70CS",
                        "TN75CS",
                        "TN80HC",
                        "TN80HS",
                        "TN80LT",
                        "TN80SS",
                        "TN90SS",
                        "TN95HC",
                        "TN95HS",
                        "TN95LT",
                        "TN95SS",
                        "USER"
                      ]
                    }
                  }
                },
                "ratings": {
                  "type": "object",
                  "description": "Casing material and performance ratings. The rating values are affected by certain changes to Pipe, any changes to the pipe OD, wall, grade, or connection is likely to result in a change in the ratings.",
                  "properties": {
                    "tensile_stress": {
                      "type": ["number", "null"],
                      "description": "Minimum tensile strength of pipe body. For example, Q-125 minimum tensile strength is 135,000 psi (in accordance with API 5CT), (Pressure,pascal,Pa)."
                    },
                    "yield_stress": {
                      "type": ["number", "null"],
                      "description": "Minimum yield strength of pipe body. For example, Q-125 minimum yield strength is 125,000 psi (in accordance with API 5CT), (Pressure,pascal,Pa)."
                    },
                    "connection_burst": {
                      "type": ["number", "null"],
                      "description": "Connection burst pressure rating (Pressure,pascal,Pa)."
                    },                    
                    "body_burst": {
                      "type": ["number", "null"],
                      "description": "Pipe burst pressure rating (Pressure,pascal,Pa)."
                    },
                    "connection_collapse": {
                      "type": ["number", "null"],
                      "description": "Connection collapse pressure rating (Pressure,pascal,Pa)."
                    },                    
                    "body_collapse": {
                      "type": ["number", "null"],
                      "description": "Body collapse pressure rating (Pressure,pascal,Pa)."
                    },
                    "connection_tension": {
                      "type": ["number", "null"],
                      "description": "Axial tension rating on connection (Force,newton,N)."
                    },                   
                    "body_tension": {
                      "type": ["number", "null"],
                      "description": "Axial tension rating of the body (Force,newton,N)."
                    },
                    "connection_compression": {
                      "type": ["number", "null"],
                      "description": "Axial compression rating on connection (Force,newton,N)."
                    },                   
                    "body_compression": {
                      "type": ["number", "null"],
                      "description": "Axial compression rating of the body (Force,newton,N)."
                    }
                  }
                },
                "pipe_standard": {
                  "type": "string",
                  "description": "The pipe standard. API, Gost, Kgt or undefined."
                },
                "connection_name": {
                  "type": "string",
                  "description": "The connection name."
                },
                "connection_type": {
                  "type": "string",
                  "description": "The connection type."
                },
                "is_api_connection": {
                  "type": "boolean",
                  "description": "Is an api standard casing component."
                },
                "mass_per_unit_length": {
                  "type": ["number", "null"],
                  "description": "Liner weight of casing (MassPerLength,kilogram per meter,kg/m)."
                }
              }
            }
          },
          "casing_hole_sizes": {
            "type": "object",
            "description": "The casing hole size profile. IDs of outer casings or openhole diameter visible to the casing.",
            "properties": {
              "diameter": {
                "type": "array",
                "description": "The diameters of each interval in the profile.",
                "items": {
                  "type": ["number", "null"],
                  "description": "Diameter (CylinderDiameter,meter,m)."
                }
              },
              "count": {
                "type": "integer",
                "description": "The number of entries in the profile."
              },
              "md": {
                "type": "array",
                "description": "The interval end Measured depth.",
                "items": {
                  "type": ["number", "null"],
                  "description": "Interval end Measured depth (StandardDepthIndex,meter,m)."
                }
              },
              "tvd": {
                "type": "array",
                "description": "The interval end True Vertical depth.",
                "items": {
                  "type": ["number", "null"],
                  "description": "Interval end True Vertical depth (StandardDepthIndex,meter,m)."
                }
              }
            }
          },
          "section": {
              "type": "object",
              "description": "Related section properties.",
              "properties": {
                  "id": {
                      "type": "string",
                      "description": "Section id."
                  },
                  "size": {
                      "type": ["number", "null"],
                      "description": "Section size (CylinderDiameter,meter,m)."
                  },
                  "start_md": {
                      "type": ["number", "null"],
                      "description": "Section start Measured depth (StandardDepthIndex,meter,m)."
                  },
                  "end_md": {
                      "type": ["number", "null"],
                      "description": "Section end Measured depth (StandardDepthIndex,meter,m)."
                  }                  
              }
          }
        }
      }
    },
    "msl_ref_elevation": {
      "type": ["number", "null"],
      "description": "Elevation above MSL (StandardDepthIndex,meter,m)."
    },
    "computation_error": {
      "type": "string",
      "description": "Computation errors."
    }
  }
}