{
  "$defs": {
    "CoilDrive": {
      "description": "A driven coil under ``COIL_MAGNETOSTATICS`` (body target): bodies sharing this condition become one massive CoilSolver ``Component`` normalized to ``current``.\n\nReverse the drive by swapping the terminal roles, not with a negative current.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "coil_magnetostatics",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "body",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "coil_drive",
          "default": "coil_drive",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "current": {
          "description": "`I_coil` `[A]`: The total coil current CoilSolver normalizes this coil's solved distribution to.",
          "title": "Current",
          "type": "string",
          "x-unit-dimensionality": "[current]"
        }
      },
      "required": [
        "current"
      ],
      "title": "CoilDrive",
      "type": "object"
    },
    "CoilTerminal": {
      "description": "One end of an open coil's terminal pair, Elmer's ``Coil Start`` or ``Coil End`` marker (``COIL_MAGNETOSTATICS``, boundary target).\n\nThe electrode's end face must lie on the domain boundary (``GeometryConfig.terminate_electrodes``); positive coil current flows from start to end.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "coil_magnetostatics",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "boundary",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "coil_terminal",
          "default": "coil_terminal",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "role": {
          "description": "Which end of the coil this electrode is; CoilSolver's normalized current flows start -> end.",
          "enum": [
            "start",
            "end"
          ],
          "title": "Role",
          "type": "string"
        }
      },
      "required": [
        "role"
      ],
      "title": "CoilTerminal",
      "type": "object"
    },
    "ConditionTarget": {
      "description": "Whether a condition attaches to a 3D body or a 2D boundary.",
      "enum": [
        "body",
        "boundary"
      ],
      "title": "ConditionTarget",
      "type": "string"
    },
    "Convection": {
      "description": "Convective (Newton-cooling) boundary condition (thermal, boundary target); ``external_only`` \u2014 a film BC on an interior interface would bypass the conduction path.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "thermal",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "boundary",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "convection",
          "default": "convection",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "coefficient": {
          "description": "`h` `[W/(m\u00b2\u00b7K)]`: Convective heat-transfer coefficient.",
          "title": "Coefficient",
          "type": "string",
          "x-unit-dimensionality": "[power]/[length]**2/[temperature]"
        },
        "ext_temperature": {
          "description": "`T_amb` `[K]`: External (ambient) temperature the boundary exchanges with.",
          "title": "Ext Temperature",
          "type": "string",
          "x-unit-dimensionality": "[temperature]"
        }
      },
      "required": [
        "coefficient",
        "ext_temperature"
      ],
      "title": "Convection",
      "type": "object"
    },
    "CurrentDensity": {
      "description": "Uniform signed azimuthal current density J = N\u00b7I/A over a winding window (axisymmetric magnetostatics, body target), the homogenized stranded-coil drive.\n\nRequires ``frame=Axisymmetric()``.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "magnetostatics_2d",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "body",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "current_density",
          "default": "current_density",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "value": {
          "description": "`J` `[A/m\u00b2]`: Azimuthal current density (signed) imposed uniformly over the body.",
          "title": "Value",
          "type": "string",
          "x-unit-dimensionality": "[current]/[length]**2"
        }
      },
      "required": [
        "value"
      ],
      "title": "CurrentDensity",
      "type": "object"
    },
    "FixedPotential": {
      "description": "Dirichlet electric-potential boundary condition (current conduction, boundary target), one electrode of a phase's terminal pair.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "current_conduction",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "boundary",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "fixed_potential",
          "default": "fixed_potential",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "value": {
          "description": "`V` `[V]`: Electric potential imposed on the electrode boundary; the keyword is the solver variable's name (Elmer Dirichlet semantics), single-sourced via the enum.",
          "title": "Value",
          "type": "string",
          "x-unit-dimensionality": "[mass]*[length]**2/[current]/[time]**3"
        }
      },
      "required": [
        "value"
      ],
      "title": "FixedPotential",
      "type": "object"
    },
    "FixedTemperature": {
      "description": "Dirichlet temperature boundary condition (thermal, boundary target).",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "thermal",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "boundary",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "fixed_temperature",
          "default": "fixed_temperature",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "value": {
          "description": "`T` `[K]`: Fixed temperature imposed on the boundary.",
          "title": "Value",
          "type": "string",
          "x-unit-dimensionality": "[temperature]"
        }
      },
      "required": [
        "value"
      ],
      "title": "FixedTemperature",
      "type": "object"
    },
    "ForceComponent": {
      "description": "An Elmer ``Component`` lumping CalcFields' magnetic force and torque over the bodies this condition's tag matches (magnetic physics, body target).",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "magnetostatics",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "body",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "force_component",
          "default": "force_component",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The Component's ``Name``; None uses the authoring tag's name.",
          "title": "Label"
        },
        "calculate_magnetic_force": {
          "default": true,
          "description": "Lump the nodal magnetic force over the master bodies.",
          "title": "Calculate Magnetic Force",
          "type": "boolean"
        },
        "calculate_magnetic_torque": {
          "default": false,
          "description": "Also lump the magnetic torque (requires ``torque_origin``/``torque_axis``).",
          "title": "Calculate Magnetic Torque",
          "type": "boolean"
        },
        "torque_origin": {
          "anyOf": [
            {
              "description": "3D vector {x, y, z}",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "z": {
                  "type": "number"
                }
              },
              "required": [
                "x",
                "y",
                "z"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`r_0` `[m]`: Torque pivot point.",
          "title": "Torque Origin"
        },
        "torque_axis": {
          "anyOf": [
            {
              "description": "Unit direction {x, y, z}, normalized on load",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "z": {
                  "type": "number"
                }
              },
              "required": [
                "x",
                "y",
                "z"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Torque axis direction.",
          "title": "Torque Axis"
        }
      },
      "title": "ForceComponent",
      "type": "object"
    },
    "HeatFlux": {
      "description": "Prescribed heat flux boundary condition (thermal, boundary target).",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "thermal",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "boundary",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "heat_flux",
          "default": "heat_flux",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "value": {
          "description": "`q_s` `[W/m\u00b2]`: Heat flux through the boundary.",
          "title": "Value",
          "type": "string",
          "x-unit-dimensionality": "[power]/[length]**2"
        }
      },
      "required": [
        "value"
      ],
      "title": "HeatFlux",
      "type": "object"
    },
    "HeatSource": {
      "description": "Volumetric heat source in W/m\u00b3 (thermal, body target).\n\nWith ``temperature_coefficient`` set, the source scales linearly with the local temperature, the \u03c3(T) Joule feedback of a prescribed-current winding.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "thermal",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "body",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "heat_source",
          "default": "heat_source",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "power_density": {
          "description": "`q` `[W/m\u00b3]`: Heat generation density at ``reference_temperature`` when a coefficient is set, else the constant source.",
          "title": "Power Density",
          "type": "string",
          "x-unit-dimensionality": "[power]/[length]**3"
        },
        "temperature_coefficient": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`\u03b1` `[1/K]`: Linear coefficient in q(T) = power_density\u00b7(1 + \u03b1\u00b7(T \u2212 reference_temperature)); None emits the constant.",
          "title": "Temperature Coefficient"
        },
        "reference_temperature": {
          "anyOf": [
            {
              "description": "pint quantity with dimensionality [temperature]",
              "type": "string",
              "x-unit-dimensionality": "[temperature]"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "`T_ref` `[K]`: The temperature ``power_density`` holds at; required with ``temperature_coefficient``.",
          "title": "Reference Temperature"
        }
      },
      "required": [
        "power_density"
      ],
      "title": "HeatSource",
      "type": "object"
    },
    "JouleHeat": {
      "description": "Joule heat source body force (coupled current->thermal, body target): HeatSolve integrates StatCurrentSolve's loss density as the heat source.\n\nCarries no value \u2014 the magnitude is the solved current field itself.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "joule_heating",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "body",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "joule_heat",
          "default": "joule_heat",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        }
      },
      "title": "JouleHeat",
      "type": "object"
    },
    "Magnetization": {
      "description": "Permanent-magnet body force (magnetostatics, body target).\n\nThe direction is per-region and lives here; the magnitude ``|M| = B\u1d63/\u03bc\u2080`` is a material property passed into ``to_elmer``.",
      "properties": {
        "physics": {
          "$ref": "#/$defs/Physics",
          "default": "magnetostatics",
          "description": "The physics whose solve this condition feeds."
        },
        "target": {
          "$ref": "#/$defs/ConditionTarget",
          "default": "body",
          "description": "Whether the condition attaches to a body or a boundary."
        },
        "kind": {
          "const": "magnetization",
          "default": "magnetization",
          "description": "Discriminator that names this condition type in a serialized config.",
          "title": "Kind",
          "type": "string"
        },
        "direction": {
          "anyOf": [
            {
              "description": "Unit direction {x, y, z}, normalized on load",
              "properties": {
                "x": {
                  "type": "number"
                },
                "y": {
                  "type": "number"
                },
                "z": {
                  "type": "number"
                }
              },
              "required": [
                "x",
                "y",
                "z"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "Magnetization direction in the authored model's frame, None for an unmagnetized body; magnitude comes from the material.",
          "title": "Direction"
        }
      },
      "required": [
        "direction"
      ],
      "title": "Magnetization",
      "type": "object"
    },
    "Physics": {
      "description": "Which physics preset the sif writer wires; the string values double as the serialized spelling.",
      "enum": [
        "magnetostatics",
        "magnetostatics_2d",
        "thermal",
        "electrostatics",
        "current_conduction",
        "joule_heating",
        "coil_magnetostatics",
        "linear_elasticity"
      ],
      "title": "Physics",
      "type": "string"
    },
    "TagDict": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object"
    }
  },
  "description": "A per-region override matched to a mesh entity by its authored tags; carries the region's self-describing `conditions`.",
  "properties": {
    "selector": {
      "$ref": "#/$defs/TagDict",
      "description": "Compound-key selector: a mesh entity matches when its tag dict contains ALL of these key=value pairs (an empty selector matches every entity)."
    },
    "conditions": {
      "description": "Composable, self-describing conditions (body forces / boundary conditions) this region carries.",
      "items": {
        "discriminator": {
          "mapping": {
            "coil_drive": "#/$defs/CoilDrive",
            "coil_terminal": "#/$defs/CoilTerminal",
            "convection": "#/$defs/Convection",
            "current_density": "#/$defs/CurrentDensity",
            "fixed_potential": "#/$defs/FixedPotential",
            "fixed_temperature": "#/$defs/FixedTemperature",
            "force_component": "#/$defs/ForceComponent",
            "heat_flux": "#/$defs/HeatFlux",
            "heat_source": "#/$defs/HeatSource",
            "joule_heat": "#/$defs/JouleHeat",
            "magnetization": "#/$defs/Magnetization"
          },
          "propertyName": "kind"
        },
        "oneOf": [
          {
            "$ref": "#/$defs/Magnetization"
          },
          {
            "$ref": "#/$defs/CurrentDensity"
          },
          {
            "$ref": "#/$defs/FixedTemperature"
          },
          {
            "$ref": "#/$defs/HeatFlux"
          },
          {
            "$ref": "#/$defs/Convection"
          },
          {
            "$ref": "#/$defs/HeatSource"
          },
          {
            "$ref": "#/$defs/FixedPotential"
          },
          {
            "$ref": "#/$defs/JouleHeat"
          },
          {
            "$ref": "#/$defs/CoilDrive"
          },
          {
            "$ref": "#/$defs/CoilTerminal"
          },
          {
            "$ref": "#/$defs/ForceComponent"
          }
        ]
      },
      "title": "Conditions",
      "type": "array"
    },
    "mesh_size": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "`h` `[m]`: Target mesh size for this region, such as a finer air gap; None inherits ``MeshConfig.global_mesh_size``.",
      "title": "Mesh Size"
    }
  },
  "title": "EntityTag",
  "type": "object"
}
