{
  "node": {
    "id": "block:battery-heater-controller",
    "type": "Block",
    "label": "Battery heater controller",
    "properties": {
      "id": "battery-heater-controller",
      "name": "Battery heater controller",
      "kind": "studio",
      "summary": "Controls the hottest cooling channel or coldest heating channel with hysteresis.",
      "behavior": "Uses the hottest channel for cooling or the coldest channel for heating. Separate on and off thresholds provide hysteresis. Enable gates the commanded coolant mass flow or heater power.",
      "ports": [
        {
          "name": "temperature",
          "direction": "input",
          "unit": "K",
          "description": "Cell temperatures; 3 channels at the default configuration.",
          "shape": [
            3
          ],
          "elementType": "real",
          "quantity": "temperature"
        },
        {
          "name": "enable",
          "direction": "input",
          "unit": "true / false",
          "description": "Enable; scalar.",
          "shape": [],
          "elementType": "bool",
          "quantity": "dimensionless"
        },
        {
          "name": "command",
          "direction": "output",
          "unit": "W",
          "description": "Heater power request; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "power"
        },
        {
          "name": "active",
          "direction": "output",
          "unit": "true / false",
          "description": "Active; scalar.",
          "shape": [],
          "elementType": "bool",
          "quantity": "dimensionless"
        }
      ],
      "parameters": [
        {
          "key": "sampleTimeS",
          "label": "Sample interval (s)",
          "unit": "s",
          "default": 1,
          "description": "Positive sample interval. Initialization has zero elapsed time; subsequent accepted samples update memory."
        },
        {
          "key": "cells",
          "label": "Number of measurement channels",
          "unit": "1",
          "default": 3,
          "description": "Number of measurement channels. This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "onK",
          "label": "Turn-on temperature (K)",
          "unit": "K",
          "default": 280,
          "description": "Turn-on temperature (K). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "offK",
          "label": "Turn-off temperature (K)",
          "unit": "K",
          "default": 285,
          "description": "Turn-off temperature (K). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "command",
          "label": "Heater power request (W)",
          "unit": "W",
          "default": 10,
          "description": "Heater power request (W). This is an editable model input; the default belongs to the synthetic worked example."
        }
      ],
      "equations": [
        "cooling uses max(cell temperatures); heating uses min(cell temperatures)",
        "command = active ? configured command : 0"
      ],
      "example": {
        "title": "Battery heater controller worked example",
        "text": "Use the defaults below with Cell temperatures = [275, 282, 283] K, Enable = 1 true / false. At 0 s, Heater power request is 10 W. Additional checks are listed below.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-battery-heater-controller",
        "label": "Open Studio example",
        "checks": [
          {
            "port": "command",
            "atS": 0,
            "value": 10,
            "tolerance": 1e-08,
            "label": "Heater power request",
            "unit": "W"
          }
        ],
        "inputs": [
          {
            "port": "temperature",
            "label": "Cell temperatures",
            "value": [
              275,
              282,
              283
            ],
            "unit": "K"
          },
          {
            "port": "enable",
            "label": "Enable",
            "value": 1,
            "unit": "true / false"
          }
        ]
      },
      "limits": [
        "The controller emits a request. Fluid transport and heater heat delivery require connected plant models.",
        "The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks."
      ],
      "availability": {
        "status": "released",
        "label": "Available in Lemonergy Studio",
        "detail": "The bundled example is available in the production release verified on 28 October 2026. The parameters and examples here are synthetic teaching fixtures, not a characterized cell or a validated operating limit."
      },
      "references": [
        "openstax-heat"
      ],
      "evidence": [
        "docs/glossary/native-block-verification.json"
      ],
      "sourceRepository": "Lemonergy Studio public contract",
      "sourceRevision": "verification-2026-10-27",
      "caseIds": [
        "native-battery-heater-controller"
      ],
      "exampleTraces": [
        {
          "id": "battery-heater-controller",
          "url": "https://lemonergy.com/learn/glossary/api/traces/battery-heater-controller.json?v=4bf40ff203ae",
          "title": "Battery heater controller recorded example",
          "exampleId": "block-battery-heater-controller",
          "source": "Executed synthetic Lemonergy Studio example",
          "recordedOn": "2026-10-28",
          "points": 2,
          "channels": 2,
          "omittedChannels": 0,
          "interpolation": "step",
          "solver": {
            "method": "dormand-prince-45",
            "reason": "no-continuous-states"
          }
        }
      ],
      "type": "battery-heater-controller",
      "implementationId": "battery-heater-controller",
      "url": "https://lemonergy.com/learn/glossary/blocks/battery-heater-controller/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/battery-heater-controller/",
      "sourceFile": "block-library.json",
      "reviewed": "2026-10-27",
      "releaseEvidence": {
        "environment": "production",
        "status": "verified",
        "revision": "e76cadfc203e15eb41f3478d8b1044a5b851953d",
        "verifiedOn": "2026-10-28",
        "exampleUrls": [
          "https://design.lemonergy.com/cosim.html?example=block-battery-heater-controller"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-battery-heater-controller/0",
      "type": "usesBlock",
      "source": "workflow:native-battery-heater-controller",
      "target": "block:battery-heater-controller",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Battery heater controller",
        "type": "battery-heater-controller",
        "role": "Uses the hottest channel for cooling or the coldest channel for heating. Separate on and off thresholds provide hysteresis. Enable gates the commanded coolant mass flow or heater power.",
        "settings": [
          "Use the parameter values in the block reference.",
          "Bundled example verified on the production release of 28 October 2026."
        ]
      }
    }
  ],
  "outgoing": [
    {
      "id": "edge:cites/block:battery-heater-controller/reference:openstax-heat",
      "type": "cites",
      "source": "block:battery-heater-controller",
      "target": "reference:openstax-heat",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:native-battery-heater-controller",
      "type": "Workflow",
      "label": "Battery heater controller worked example",
      "properties": {
        "id": "native-battery-heater-controller",
        "title": "Battery heater controller worked example",
        "kind": "studio",
        "summary": "Controls the hottest cooling channel or coldest heating channel with hysteresis.",
        "steps": [
          "Review the block inputs, units and model limits.",
          "Open the Studio example and run its bundled model.",
          "Compare the output channels with the numerical checks; change one input and run again."
        ],
        "example": "Use the defaults below with Cell temperatures = [275, 282, 283] K, Enable = 1 true / false. At 0 s, Heater power request is 10 W. Additional checks are listed below.",
        "observe": "Inspect the outputs and numerical checks on the block reference page.",
        "limits": "The controller emits a request. Fluid transport and heater heat delivery require connected plant models. The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-battery-heater-controller",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    },
    {
      "id": "reference:openstax-heat",
      "type": "Reference",
      "label": "University Physics Volume 2, §1.6: Mechanisms of Heat Transfer",
      "properties": {
        "title": "University Physics Volume 2, §1.6: Mechanisms of Heat Transfer",
        "publisher": "OpenStax, Rice University",
        "url": "https://openstax.org/books/university-physics-volume-2/pages/1-6-mechanisms-of-heat-transfer",
        "type": "Textbook section",
        "scope": "Conduction, convection, radiation and thermal resistance.",
        "accessed": "2026-10-27"
      }
    }
  ]
}
