{
  "$defs": {
    "AssessmentStatus": {
      "enum": [
        "pass",
        "warn",
        "fail",
        "not_assessed"
      ],
      "title": "AssessmentStatus",
      "type": "string"
    },
    "ModelApplicabilityAssessment": {
      "additionalProperties": false,
      "properties": {
        "active_limitation_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Active Limitation Ids",
          "type": "array"
        },
        "applicability_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Applicability Id",
          "type": "string"
        },
        "applied_default_policy_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Applied Default Policy Ids",
          "type": "array"
        },
        "authority_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Authority Id",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/ModelApplicabilityStatus"
        }
      },
      "required": [
        "authority_id",
        "applicability_id",
        "status"
      ],
      "title": "ModelApplicabilityAssessment",
      "type": "object"
    },
    "ModelApplicabilityStatus": {
      "enum": [
        "applicable",
        "degraded",
        "unsupported"
      ],
      "title": "ModelApplicabilityStatus",
      "type": "string"
    },
    "ThermalClaimApplicability": {
      "enum": [
        "supported",
        "degraded",
        "unsupported"
      ],
      "title": "ThermalClaimApplicability",
      "type": "string"
    },
    "ThermalControllingCase": {
      "additionalProperties": false,
      "properties": {
        "canonical_unit": {
          "enum": [
            "K",
            "m2",
            "W",
            "Wh"
          ],
          "title": "Canonical Unit",
          "type": "string"
        },
        "margin": {
          "title": "Margin",
          "type": "number"
        },
        "metric_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Metric Id",
          "type": "string"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        }
      },
      "required": [
        "metric_id",
        "scenario_id",
        "node_id",
        "margin",
        "canonical_unit"
      ],
      "title": "ThermalControllingCase",
      "type": "object"
    },
    "ThermalHardwareResult": {
      "additionalProperties": false,
      "properties": {
        "available_radiator_area_m2": {
          "default": 0.0,
          "minimum": 0.0,
          "title": "Available Radiator Area M2",
          "type": "number"
        },
        "heater_allocations": {
          "default": [],
          "items": {
            "$ref": "#/$defs/ThermalHeaterAllocation"
          },
          "title": "Heater Allocations",
          "type": "array"
        },
        "heater_assessment_status": {
          "$ref": "#/$defs/AssessmentStatus",
          "default": "not_assessed"
        },
        "heater_failure_code": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Heater Failure Code"
        },
        "heater_uses": {
          "default": [],
          "items": {
            "$ref": "#/$defs/ThermalHeaterScenarioUse"
          },
          "title": "Heater Uses",
          "type": "array"
        },
        "peak_heater_electrical_power_w": {
          "minimum": 0.0,
          "title": "Peak Heater Electrical Power W",
          "type": "number"
        },
        "radiator_allocations": {
          "default": [],
          "items": {
            "$ref": "#/$defs/ThermalRadiatorAllocation"
          },
          "title": "Radiator Allocations",
          "type": "array"
        },
        "radiator_area_margin_m2": {
          "default": 0.0,
          "minimum": 0.0,
          "title": "Radiator Area Margin M2",
          "type": "number"
        },
        "radiator_assessment_status": {
          "$ref": "#/$defs/AssessmentStatus",
          "default": "not_assessed"
        },
        "radiator_failure_code": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Radiator Failure Code"
        },
        "total_hardware_mass_kg": {
          "minimum": 0.0,
          "title": "Total Hardware Mass Kg",
          "type": "number"
        },
        "total_heater_energy_wh": {
          "minimum": 0.0,
          "title": "Total Heater Energy Wh",
          "type": "number"
        },
        "total_radiator_area_m2": {
          "minimum": 0.0,
          "title": "Total Radiator Area M2",
          "type": "number"
        }
      },
      "required": [
        "total_radiator_area_m2",
        "peak_heater_electrical_power_w",
        "total_heater_energy_wh",
        "total_hardware_mass_kg"
      ],
      "title": "ThermalHardwareResult",
      "type": "object"
    },
    "ThermalHeaterAllocation": {
      "additionalProperties": false,
      "properties": {
        "delivered_capacity_w": {
          "minimum": 0.0,
          "title": "Delivered Capacity W",
          "type": "number"
        },
        "electrical_capacity_w": {
          "minimum": 0.0,
          "title": "Electrical Capacity W",
          "type": "number"
        },
        "heater_efficiency": {
          "exclusiveMinimum": 0.0,
          "maximum": 1.0,
          "title": "Heater Efficiency",
          "type": "number"
        },
        "mass_kg": {
          "minimum": 0.0,
          "title": "Mass Kg",
          "type": "number"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "specific_mass_kg_per_w": {
          "minimum": 0.0,
          "title": "Specific Mass Kg Per W",
          "type": "number"
        }
      },
      "required": [
        "node_id",
        "delivered_capacity_w",
        "electrical_capacity_w",
        "heater_efficiency",
        "specific_mass_kg_per_w",
        "mass_kg"
      ],
      "title": "ThermalHeaterAllocation",
      "type": "object"
    },
    "ThermalHeaterScenarioUse": {
      "additionalProperties": false,
      "properties": {
        "delivered_heat_w": {
          "minimum": 0.0,
          "title": "Delivered Heat W",
          "type": "number"
        },
        "duration_s": {
          "anyOf": [
            {
              "exclusiveMinimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Duration S"
        },
        "electrical_energy_wh": {
          "anyOf": [
            {
              "minimum": 0.0,
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Electrical Energy Wh"
        },
        "electrical_power_w": {
          "minimum": 0.0,
          "title": "Electrical Power W",
          "type": "number"
        },
        "heater_efficiency": {
          "exclusiveMinimum": 0.0,
          "maximum": 1.0,
          "title": "Heater Efficiency",
          "type": "number"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        }
      },
      "required": [
        "scenario_id",
        "node_id",
        "delivered_heat_w",
        "electrical_power_w",
        "heater_efficiency"
      ],
      "title": "ThermalHeaterScenarioUse",
      "type": "object"
    },
    "ThermalNodeBalanceResult": {
      "additionalProperties": false,
      "properties": {
        "assessment_status": {
          "$ref": "#/$defs/AssessmentStatus"
        },
        "balance_residual_w": {
          "title": "Balance Residual W",
          "type": "number"
        },
        "cold_design_margin_k": {
          "title": "Cold Design Margin K",
          "type": "number"
        },
        "cold_margin_k": {
          "title": "Cold Margin K",
          "type": "number"
        },
        "conductive_net_heat_w": {
          "title": "Conductive Net Heat W",
          "type": "number"
        },
        "external_heat_w": {
          "minimum": 0.0,
          "title": "External Heat W",
          "type": "number"
        },
        "heater_heat_w": {
          "minimum": 0.0,
          "title": "Heater Heat W",
          "type": "number"
        },
        "hot_design_margin_k": {
          "title": "Hot Design Margin K",
          "type": "number"
        },
        "hot_margin_k": {
          "title": "Hot Margin K",
          "type": "number"
        },
        "internal_heat_w": {
          "minimum": 0.0,
          "title": "Internal Heat W",
          "type": "number"
        },
        "maximum_temperature_c": {
          "minimum": -273.15,
          "title": "Maximum Temperature C",
          "type": "number"
        },
        "minimum_temperature_c": {
          "minimum": -273.15,
          "title": "Minimum Temperature C",
          "type": "number"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "radiated_heat_w": {
          "minimum": 0.0,
          "title": "Radiated Heat W",
          "type": "number"
        },
        "required_cold_margin_k": {
          "minimum": 0.0,
          "title": "Required Cold Margin K",
          "type": "number"
        },
        "required_hot_margin_k": {
          "minimum": 0.0,
          "title": "Required Hot Margin K",
          "type": "number"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        },
        "temperature_c": {
          "minimum": -273.15,
          "title": "Temperature C",
          "type": "number"
        },
        "temperature_k": {
          "exclusiveMinimum": 0.0,
          "title": "Temperature K",
          "type": "number"
        }
      },
      "required": [
        "scenario_id",
        "node_id",
        "temperature_k",
        "temperature_c",
        "minimum_temperature_c",
        "maximum_temperature_c",
        "cold_margin_k",
        "hot_margin_k",
        "required_cold_margin_k",
        "required_hot_margin_k",
        "cold_design_margin_k",
        "hot_design_margin_k",
        "internal_heat_w",
        "external_heat_w",
        "heater_heat_w",
        "conductive_net_heat_w",
        "radiated_heat_w",
        "balance_residual_w",
        "assessment_status"
      ],
      "title": "ThermalNodeBalanceResult",
      "type": "object"
    },
    "ThermalNodeExternalHeatResult": {
      "additionalProperties": false,
      "properties": {
        "albedo_heat_w": {
          "minimum": 0.0,
          "title": "Albedo Heat W",
          "type": "number"
        },
        "contributing_surface_ids": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Contributing Surface Ids",
          "type": "array"
        },
        "earth_ir_heat_w": {
          "minimum": 0.0,
          "title": "Earth Ir Heat W",
          "type": "number"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        },
        "solar_heat_w": {
          "minimum": 0.0,
          "title": "Solar Heat W",
          "type": "number"
        },
        "total_external_heat_w": {
          "minimum": 0.0,
          "title": "Total External Heat W",
          "type": "number"
        }
      },
      "required": [
        "scenario_id",
        "node_id",
        "contributing_surface_ids",
        "solar_heat_w",
        "albedo_heat_w",
        "earth_ir_heat_w",
        "total_external_heat_w"
      ],
      "title": "ThermalNodeExternalHeatResult",
      "type": "object"
    },
    "ThermalRadiatorAllocation": {
      "additionalProperties": false,
      "properties": {
        "allocated_area_m2": {
          "minimum": 0.0,
          "title": "Allocated Area M2",
          "type": "number"
        },
        "available_area_m2": {
          "exclusiveMinimum": 0.0,
          "title": "Available Area M2",
          "type": "number"
        },
        "finish_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Finish Id",
          "type": "string"
        },
        "mass_kg": {
          "minimum": 0.0,
          "title": "Mass Kg",
          "type": "number"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "specific_mass_kg_per_m2": {
          "minimum": 0.0,
          "title": "Specific Mass Kg Per M2",
          "type": "number"
        },
        "surface_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Surface Id",
          "type": "string"
        }
      },
      "required": [
        "surface_id",
        "node_id",
        "finish_id",
        "allocated_area_m2",
        "available_area_m2",
        "specific_mass_kg_per_m2",
        "mass_kg"
      ],
      "title": "ThermalRadiatorAllocation",
      "type": "object"
    },
    "ThermalScenarioResult": {
      "additionalProperties": false,
      "properties": {
        "applicability": {
          "$ref": "#/$defs/ThermalClaimApplicability"
        },
        "assessment_status": {
          "$ref": "#/$defs/AssessmentStatus"
        },
        "iteration_count": {
          "minimum": 1,
          "title": "Iteration Count",
          "type": "integer"
        },
        "maximum_absolute_residual_w": {
          "minimum": 0.0,
          "title": "Maximum Absolute Residual W",
          "type": "number"
        },
        "node_balances": {
          "items": {
            "$ref": "#/$defs/ThermalNodeBalanceResult"
          },
          "minItems": 1,
          "title": "Node Balances",
          "type": "array"
        },
        "node_external_heats": {
          "items": {
            "$ref": "#/$defs/ThermalNodeExternalHeatResult"
          },
          "title": "Node External Heats",
          "type": "array"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        },
        "surface_heats": {
          "items": {
            "$ref": "#/$defs/ThermalSurfaceHeatResult"
          },
          "title": "Surface Heats",
          "type": "array"
        },
        "total_external_heat_w": {
          "minimum": 0.0,
          "title": "Total External Heat W",
          "type": "number"
        }
      },
      "required": [
        "scenario_id",
        "applicability",
        "surface_heats",
        "node_external_heats",
        "node_balances",
        "total_external_heat_w",
        "iteration_count",
        "maximum_absolute_residual_w",
        "assessment_status"
      ],
      "title": "ThermalScenarioResult",
      "type": "object"
    },
    "ThermalSurfaceHeatResult": {
      "additionalProperties": false,
      "properties": {
        "albedo_access_factor": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Albedo Access Factor",
          "type": "number"
        },
        "albedo_flux_w_per_m2": {
          "minimum": 0.0,
          "title": "Albedo Flux W Per M2",
          "type": "number"
        },
        "albedo_heat_w": {
          "minimum": 0.0,
          "title": "Albedo Heat W",
          "type": "number"
        },
        "earth_ir_flux_w_per_m2": {
          "minimum": 0.0,
          "title": "Earth Ir Flux W Per M2",
          "type": "number"
        },
        "earth_ir_heat_w": {
          "minimum": 0.0,
          "title": "Earth Ir Heat W",
          "type": "number"
        },
        "earth_projected_area_m2": {
          "minimum": 0.0,
          "title": "Earth Projected Area M2",
          "type": "number"
        },
        "earth_view_factor": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Earth View Factor",
          "type": "number"
        },
        "gross_area_m2": {
          "exclusiveMinimum": 0.0,
          "title": "Gross Area M2",
          "type": "number"
        },
        "ir_emissivity": {
          "exclusiveMinimum": 0.0,
          "maximum": 1.0,
          "title": "Ir Emissivity",
          "type": "number"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "scenario_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Scenario Id",
          "type": "string"
        },
        "solar_absorptivity": {
          "exclusiveMinimum": 0.0,
          "maximum": 1.0,
          "title": "Solar Absorptivity",
          "type": "number"
        },
        "solar_flux_w_per_m2": {
          "minimum": 0.0,
          "title": "Solar Flux W Per M2",
          "type": "number"
        },
        "solar_heat_w": {
          "minimum": 0.0,
          "title": "Solar Heat W",
          "type": "number"
        },
        "solar_projected_area_m2": {
          "minimum": 0.0,
          "title": "Solar Projected Area M2",
          "type": "number"
        },
        "sun_access_factor": {
          "maximum": 1.0,
          "minimum": 0.0,
          "title": "Sun Access Factor",
          "type": "number"
        },
        "surface_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Surface Id",
          "type": "string"
        },
        "total_external_heat_w": {
          "minimum": 0.0,
          "title": "Total External Heat W",
          "type": "number"
        }
      },
      "required": [
        "scenario_id",
        "surface_id",
        "node_id",
        "solar_absorptivity",
        "ir_emissivity",
        "solar_flux_w_per_m2",
        "solar_projected_area_m2",
        "sun_access_factor",
        "solar_heat_w",
        "albedo_flux_w_per_m2",
        "earth_projected_area_m2",
        "albedo_access_factor",
        "albedo_heat_w",
        "earth_ir_flux_w_per_m2",
        "earth_view_factor",
        "gross_area_m2",
        "earth_ir_heat_w",
        "total_external_heat_w"
      ],
      "title": "ThermalSurfaceHeatResult",
      "type": "object"
    },
    "ThermalWeightedNodeTemperature": {
      "additionalProperties": false,
      "properties": {
        "covered_duration_s": {
          "exclusiveMinimum": 0.0,
          "title": "Covered Duration S",
          "type": "number"
        },
        "node_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Node Id",
          "type": "string"
        },
        "weighted_mean_temperature_c": {
          "minimum": -273.15,
          "title": "Weighted Mean Temperature C",
          "type": "number"
        },
        "weighted_mean_temperature_k": {
          "exclusiveMinimum": 0.0,
          "title": "Weighted Mean Temperature K",
          "type": "number"
        }
      },
      "required": [
        "node_id",
        "covered_duration_s",
        "weighted_mean_temperature_k",
        "weighted_mean_temperature_c"
      ],
      "title": "ThermalWeightedNodeTemperature",
      "type": "object"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:thermal-analysis-result-v2",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "analysis_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Analysis Id",
      "type": "string"
    },
    "applicability": {
      "$ref": "#/$defs/ModelApplicabilityAssessment"
    },
    "assessment_status": {
      "$ref": "#/$defs/AssessmentStatus"
    },
    "controlling_cases": {
      "default": [],
      "items": {
        "$ref": "#/$defs/ThermalControllingCase"
      },
      "title": "Controlling Cases",
      "type": "array"
    },
    "duration_weighted_node_temperatures": {
      "default": [],
      "items": {
        "$ref": "#/$defs/ThermalWeightedNodeTemperature"
      },
      "title": "Duration Weighted Node Temperatures",
      "type": "array"
    },
    "hardware": {
      "$ref": "#/$defs/ThermalHardwareResult"
    },
    "mission_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Mission Id",
      "type": "string"
    },
    "payload_kind": {
      "const": "thermal",
      "default": "thermal",
      "title": "Payload Kind",
      "type": "string"
    },
    "payload_version": {
      "const": "2.0.0",
      "default": "2.0.0",
      "title": "Payload Version",
      "type": "string"
    },
    "projection_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Projection Id",
      "type": "string"
    },
    "result_version": {
      "const": "2.0.0",
      "default": "2.0.0",
      "title": "Result Version",
      "type": "string"
    },
    "scenario_results": {
      "items": {
        "$ref": "#/$defs/ThermalScenarioResult"
      },
      "maxItems": 32,
      "minItems": 1,
      "title": "Scenario Results",
      "type": "array"
    },
    "schema_kind": {
      "const": "thermal_analysis_result_v2",
      "default": "thermal_analysis_result_v2",
      "title": "Schema Kind",
      "type": "string"
    },
    "spacecraft_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Spacecraft Id",
      "type": "string"
    }
  },
  "required": [
    "analysis_id",
    "projection_id",
    "mission_id",
    "spacecraft_id",
    "scenario_results",
    "hardware",
    "assessment_status",
    "applicability"
  ],
  "title": "ThermalAnalysisResultV2",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
