{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/electrical.capacitance/1.1.0/input.json",
  "title": "Capacitance — input",
  "type": "object",
  "oneOf": [
    {
      "title": "plate",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "A_m2",
        "d_m",
        "er"
      ],
      "properties": {
        "mode": {
          "const": "plate",
          "description": "Ideal parallel-plate capacitor C = ε0·εr·A/d"
        },
        "A_m2": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Plate area (m²)"
        },
        "d_m": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Plate separation (m)"
        },
        "er": {
          "type": "number",
          "minimum": 1,
          "description": "Relative permittivity εr ≥ 1 (vacuum or conventional passive dielectric)"
        }
      }
    },
    {
      "title": "parallel",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "capacitors_F"
      ],
      "properties": {
        "mode": {
          "const": "parallel",
          "description": "Parallel network Ceq = Σ Ci"
        },
        "capacitors_F": {
          "type": "array",
          "minItems": 2,
          "items": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "description": "Capacitances in farads. Human UI C1, C2, … normalize to this array before the engine."
        }
      }
    },
    {
      "title": "series",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "capacitors_F"
      ],
      "properties": {
        "mode": {
          "const": "series",
          "description": "Series network 1/Ceq = Σ 1/Ci"
        },
        "capacitors_F": {
          "type": "array",
          "minItems": 2,
          "items": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "description": "Capacitances in farads. Human UI C1, C2, … normalize to this array before the engine."
        }
      }
    }
  ],
  "description": "Parallel-plate and series/parallel capacitance. (calculation_version 1.1.0)"
}
