{
  "node": {
    "id": "block:battery-pem-stack",
    "type": "Block",
    "label": "Reduced PEM fuel-cell stack",
    "properties": {
      "id": "battery-pem-stack",
      "name": "Reduced PEM fuel-cell stack",
      "kind": "studio",
      "summary": "Prescribed gas/temperature Nernst potential with activation, ohmic and limiting-current losses plus an identified polarization lag. No humidity, gas-flow or thermal network states.",
      "behavior": "Computes a reduced PEM stack polarization from prescribed hydrogen/oxygen pressures and temperature. Nernst potential, activation, ohmic and limiting-current losses determine cell voltage. An identified first-order polarization lag adds dynamics. Faraday balance gives reactant consumption.",
      "ports": [
        {
          "name": "current",
          "direction": "input",
          "unit": "A",
          "description": "Stack current; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "current"
        },
        {
          "name": "temperature",
          "direction": "input",
          "unit": "K",
          "description": "Cell temperature; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "temperature"
        },
        {
          "name": "hydrogenPressure",
          "direction": "input",
          "unit": "Pa",
          "description": "Hydrogen partial pressure; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "pressure"
        },
        {
          "name": "oxygenPressure",
          "direction": "input",
          "unit": "Pa",
          "description": "Oxygen partial pressure; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "pressure"
        },
        {
          "name": "voltage",
          "direction": "output",
          "unit": "V",
          "description": "Stack voltage; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "voltage"
        },
        {
          "name": "power",
          "direction": "output",
          "unit": "W",
          "description": "Electrical output power; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "power"
        },
        {
          "name": "heat",
          "direction": "output",
          "unit": "W",
          "description": "Thermoneutral power difference; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "heat"
        },
        {
          "name": "hydrogen",
          "direction": "output",
          "unit": "1",
          "description": "Hydrogen consumption (mol/s); scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "dimensionless"
        },
        {
          "name": "oxygen",
          "direction": "output",
          "unit": "1",
          "description": "Oxygen consumption (mol/s); scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "dimensionless"
        },
        {
          "name": "reversible",
          "direction": "output",
          "unit": "V",
          "description": "Per-cell reversible voltage; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "voltage"
        },
        {
          "name": "polarization",
          "direction": "output",
          "unit": "V",
          "description": "Per-cell polarization state; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "voltage"
        },
        {
          "name": "activationTarget",
          "direction": "output",
          "unit": "V",
          "description": "Steady activation loss; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "voltage"
        },
        {
          "name": "concentration",
          "direction": "output",
          "unit": "V",
          "description": "Concentration loss; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "voltage"
        }
      ],
      "parameters": [
        {
          "key": "seriesCells",
          "label": "Number of series cells",
          "unit": "1",
          "default": 5,
          "description": "Number of series cells. This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "reversibleV",
          "label": "Reference reversible cell voltage (V)",
          "unit": "V",
          "default": 1.229,
          "description": "Reference reversible cell voltage (V). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "temperatureSlopeVPerK",
          "label": "Reversible-voltage temperature slope (V/K)",
          "unit": "V/K",
          "default": -0.00085,
          "description": "Reversible-voltage temperature slope (V/K). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "referenceTemperatureK",
          "label": "Reference temperature (K)",
          "unit": "K",
          "default": 298.15,
          "description": "Reference temperature (K). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "referencePressurePa",
          "label": "Reference pressure (Pa)",
          "unit": "Pa",
          "default": 100000,
          "description": "Reference pressure (Pa). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "waterActivity",
          "label": "Liquid-water activity",
          "unit": "1",
          "default": 1,
          "description": "Liquid-water activity. This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "resistanceOhm",
          "label": "Per-cell ohmic resistance (Ω)",
          "unit": "Ω",
          "default": 0.01,
          "description": "Per-cell ohmic resistance (Ω). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "exchangeCurrentA",
          "label": "Effective exchange current (A)",
          "unit": "A",
          "default": 1,
          "description": "Effective exchange current (A). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "limitingCurrentA",
          "label": "Limiting current (A)",
          "unit": "A",
          "default": 20,
          "description": "Limiting current (A). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "transferCoefficient",
          "label": "Effective transfer coefficient",
          "unit": "1",
          "default": 0.5,
          "description": "Effective transfer coefficient. This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "timeConstantS",
          "label": "Polarization time constant (s)",
          "unit": "s",
          "default": 1,
          "description": "Polarization time constant (s). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "initialPolarizationV",
          "label": "Initial polarization loss (V)",
          "unit": "V",
          "default": 0,
          "description": "Initial polarization loss (V). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "thermoneutralV",
          "label": "Thermoneutral cell voltage (V)",
          "unit": "V",
          "default": 1.48,
          "description": "Thermoneutral cell voltage (V). This is an editable model input; the default belongs to the synthetic worked example."
        }
      ],
      "equations": [
        "Vstack = cells * (E_Nernst - eta_activation - I*R - eta_concentration)",
        "tau*deta_activation/dt = eta_steady - eta_activation",
        "hydrogen mol/s = cells*I/(2*F)",
        "oxygen mol/s = cells*I/(4*F)"
      ],
      "example": {
        "title": "Reduced PEM fuel-cell stack worked example",
        "text": "Use the defaults below with Stack current = 2 A, Cell temperature = 298.15 K, Hydrogen partial pressure = 100000 Pa, Oxygen partial pressure = 100000 Pa. At 0 s, Stack voltage is 6.038232542 V. Additional checks are listed below.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-battery-pem-stack",
        "label": "Open Studio example",
        "checks": [
          {
            "port": "voltage",
            "atS": 0,
            "value": 6.03823254153795,
            "tolerance": 1e-08,
            "label": "Stack voltage",
            "unit": "V"
          },
          {
            "port": "hydrogen",
            "atS": 0,
            "value": 5.1821348283088646e-05,
            "tolerance": 1e-08,
            "label": "Hydrogen consumption (mol/s)",
            "unit": "1"
          },
          {
            "port": "oxygen",
            "atS": 0,
            "value": 2.5910674141544323e-05,
            "tolerance": 1e-08,
            "label": "Oxygen consumption (mol/s)",
            "unit": "1"
          },
          {
            "port": "voltage",
            "atS": 10,
            "value": 5.811795216042423,
            "tolerance": 1e-06,
            "label": "Stack voltage",
            "unit": "V"
          }
        ],
        "inputs": [
          {
            "port": "current",
            "label": "Stack current",
            "value": 2,
            "unit": "A"
          },
          {
            "port": "temperature",
            "label": "Cell temperature",
            "value": 298.15,
            "unit": "K"
          },
          {
            "port": "hydrogenPressure",
            "label": "Hydrogen partial pressure",
            "value": 100000,
            "unit": "Pa"
          },
          {
            "port": "oxygenPressure",
            "label": "Oxygen partial pressure",
            "value": 100000,
            "unit": "Pa"
          }
        ]
      },
      "limits": [
        "Positive gas pressures and temperature are required; current is nonnegative and below the limiting current. No hydration, gas-channel flow, internal thermal or conserving network states. Literature supplies background, not a claim to reproduce a full published model.",
        "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": [
        "netl-fuel-cell-handbook",
        "haddad-pem"
      ],
      "evidence": [
        "docs/glossary/native-block-verification.json"
      ],
      "sourceRepository": "Lemonergy Studio public contract",
      "sourceRevision": "verification-2026-10-27",
      "caseIds": [
        "native-battery-pem-stack"
      ],
      "exampleTraces": [
        {
          "id": "battery-pem-stack",
          "url": "https://lemonergy.com/learn/glossary/api/traces/battery-pem-stack.json?v=0a7e3822b2f0",
          "title": "Reduced PEM fuel-cell stack recorded example",
          "exampleId": "block-battery-pem-stack",
          "source": "Executed synthetic Lemonergy Studio example",
          "recordedOn": "2026-10-28",
          "points": 103,
          "channels": 9,
          "omittedChannels": 0,
          "interpolation": "linear",
          "solver": {
            "method": "dormand-prince-45",
            "reason": "non-stiff-time-scales"
          }
        }
      ],
      "type": "battery-pem-stack",
      "implementationId": "battery-pem-stack",
      "url": "https://lemonergy.com/learn/glossary/blocks/battery-pem-stack/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/battery-pem-stack/",
      "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-pem-stack"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-battery-pem-stack/0",
      "type": "usesBlock",
      "source": "workflow:native-battery-pem-stack",
      "target": "block:battery-pem-stack",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Reduced PEM fuel-cell stack",
        "type": "battery-pem-stack",
        "role": "Computes a reduced PEM stack polarization from prescribed hydrogen/oxygen pressures and temperature. Nernst potential, activation, ohmic and limiting-current losses determine cell voltage. An identified first-order polarization lag adds dynamics. Faraday balance gives reactant consumption.",
        "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-pem-stack/reference:haddad-pem",
      "type": "cites",
      "source": "block:battery-pem-stack",
      "target": "reference:haddad-pem",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    },
    {
      "id": "edge:cites/block:battery-pem-stack/reference:netl-fuel-cell-handbook",
      "type": "cites",
      "source": "block:battery-pem-stack",
      "target": "reference:netl-fuel-cell-handbook",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:native-battery-pem-stack",
      "type": "Workflow",
      "label": "Reduced PEM fuel-cell stack worked example",
      "properties": {
        "id": "native-battery-pem-stack",
        "title": "Reduced PEM fuel-cell stack worked example",
        "kind": "studio",
        "summary": "Prescribed gas/temperature Nernst potential with activation, ohmic and limiting-current losses plus an identified polarization lag. No humidity, gas-flow or thermal network states.",
        "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 Stack current = 2 A, Cell temperature = 298.15 K, Hydrogen partial pressure = 100000 Pa, Oxygen partial pressure = 100000 Pa. At 0 s, Stack voltage is 6.038232542 V. Additional checks are listed below.",
        "observe": "Inspect the outputs and numerical checks on the block reference page.",
        "limits": "Positive gas pressures and temperature are required; current is nonnegative and below the limiting current. No hydration, gas-channel flow, internal thermal or conserving network states. Literature supplies background, not a claim to reproduce a full published model. 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-pem-stack",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    },
    {
      "id": "reference:haddad-pem",
      "type": "Reference",
      "label": "Non-linear dynamic modeling of proton exchange membrane fuel cell",
      "properties": {
        "title": "Non-linear dynamic modeling of proton exchange membrane fuel cell",
        "authors": [
          "A. Haddad",
          "R. Bouyekhf",
          "A. El Moudni",
          "M. Wack"
        ],
        "publisher": "Journal of Power Sources",
        "year": 2006,
        "url": "https://doi.org/10.1016/j.jpowsour.2006.09.012",
        "type": "Research article",
        "scope": "Primary background on dynamic PEM modeling. The Lemonergy prescribed-gas polarization model is a bounded original reduction and does not reproduce the full model.",
        "accessed": "2026-10-27"
      }
    },
    {
      "id": "reference:netl-fuel-cell-handbook",
      "type": "Reference",
      "label": "Fuel Cell Handbook, seventh edition",
      "properties": {
        "title": "Fuel Cell Handbook, seventh edition",
        "publisher": "U.S. Department of Energy / National Energy Technology Laboratory",
        "year": 2004,
        "url": "https://netl.doe.gov/sites/default/files/netl-file/FCHandbook7.pdf",
        "type": "Technical handbook",
        "scope": "Thermodynamic potential, polarization losses, Faraday reactant balances and fuel-cell operating principles; chapters 2–3.",
        "accessed": "2026-10-27"
      }
    }
  ]
}
