Hydrogen
========

The hydrogen model calculates the carbon intensity and other metrics associated
with the production of hydrogen. Hydrogen production is modeled
for both liquid hydrogen (|lh2|) for use as an aircraft energy carrier, and gaseous hydrogen (|gh2|)
for use as a feedstock for e-SAF production and e-methane production via the power-to-liquid (:term:`PtL`) and power-to-gas (:term:`PtG`) pathways, respectively. The two options to produce hydrogen in the
energy model are by electrolysis--often called "green hydrogen" when renewable sources of electricity are used--and by steam methane reforming
(:term:`SMR`)—derived from natural gas and termed "gray hydrogen."
The inputs and outputs within the hydrogen model are as follows:

.. list-table:: - Output Variables
  :header-rows: 1

  * - Variable Name
    - Description
    - Units
  * - :math:`X(\mathrm{SMR},t)`
    - Share of hydrogen produced via :term:`SMR` by year
    - -
  * - :math:`CI_\mathrm{LH_2}(t)`
    - Average carbon intensity of liquid hydrogen production from well to aircraft fueling (well-to-tank)
    - |gco2eqmj|
  * - :math:`CI_\mathrm{GH_2}(t)`
    - Average carbon intensity of gaseous hydrogen production used in the production of e-fuels
    - |gco2eqmj|

.. list-table:: - Input Variables
  :header-rows: 1

  * - Variable Name
    - Description
    - Units
  * - :math:`X(\mathrm{elys},t)`
    - The share of hydrogen produced through electrolysis by year
    - -
  * - :math:`\epsilon_\mathrm{liq}`
    - Liquefaction energy intensity (electricity required per unit energy of hydrogen produced)
    - MJ/MJ
  * - :math:`\epsilon_\mathrm{elys}`
    - Electrolysis energy intensity (electricity required per unit energy of hydrogen produced)
    - MJ/MJ
  * - :math:`\epsilon_\mathrm{SMR}`
    - Electrical energy requirement for SMR per unit energy of hydrogen produced
    - MJ/MJ
  * - :math:`f_\mathrm{BOR}`
    - Hydrogen liquefaction boil-off recovery fraction
    - -
  * - :math:`f_\mathrm{loss}`
    - Fraction of hydrogen vapor loss
    - -
  * - :math:`CI_\mathrm{SMR,const}`
    - Constant carbon intensity of SMR
    - |gco2eqmj|
  * - :math:`CI_\mathrm{H_2,lost}`
    - Equivalent carbon intensity of hydrogen vapor loss during production, transportation, and distribution per unit energy of hydrogen
    - |gco2eqmj|
  * - :math:`CI_\mathrm{elec}(t)`
    - Electricity carbon intensity
    - |gco2eqmj|
  * - :math:`n_\mathrm{liq}`
    - Number of liquefactions
    - -
  * - :math:`CI_\mathrm{GH_2}(\mathrm{htype},t)`
    - Life cycle carbon intensity of a unit of |gh2| by production method
    - |gco2eqmj|
  * - :math:`CI_\mathrm{LH_2,prod}(\mathrm{htype},t)`
    - Life cycle carbon intensity of a unit of *produced* |lh2| by production method
    - |gco2eqmj|
  * - :math:`CI_\mathrm{LH_2,del}(\mathrm{htype},t)`
    - Life cycle carbon intensity of a unit of *delivered* |lh2| by production method
    - |gco2eqmj|
  * - :math:`CI_\mathrm{liq}(t)`
    - Carbon intensity of liquefaction of a unit of hydrogen
    - |gco2eqmj|

Hydrogen System Composition
~~~~~~~~~~~~~~~~~~~~~~~~~~~

The hydrogen model includes two production pathways, steam methane reforming (:term:`SMR`) and electrolysis.
Users specify the market share of hydrogen produced using electrolysis :math:`X(\mathrm{elys,t})` in each year, which implicitly defines the market share of hydrogen produced via SMR through the constraint that they sum to 1 in each year:

.. math::
    :label:

    X(\mathrm{elys}, t) + X(\mathrm{SMR}, t) = 1, \qquad t_\mathrm{start} \leq t \leq t_\mathrm{end}.

The market share of electrolysis may assume any of the functional forms described in :ref:`custom-curves`.

Hydrogen Carbon Intensity
~~~~~~~~~~~~~~~~~~~~~~~~~

The |co2|-equivalent emissions associated with hydrogen production and distribution are split into three components:

#. life cycle emissions from gaseous hydrogen production (via :term:`SMR` or electrolysis)
#. life cycle emissions from hydrogen liquefaction
#. equivalent emissions from hydrogen vapor losses to the atmosphere

The energy and emissions associated with the hydrogen production and distribution value-chain is presented in :numref:`hydrogen-production`.

.. _hydrogen-production:

.. figure:: ../../_static/images/hydrogen/hydrogenProduction.SVG

    \- Hydrogen production and distribution

Emissions from Hydrogen Production
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The emissions associated with production of hydrogen from electrolysis is modeled as consisting solely of
the direct emissions associated with the electricity required to power the electrolyzers:

.. math::
    :label: hydrogen_electrolysis_CI

    CI_\mathrm{GH_2}(\mathrm{elys},t) = \epsilon_{\mathrm{elys}}CI_\mathrm{elec}(t).

Here, the carbon intensity of electricity generation, :math:`CI_\mathrm{elec}(t)`, can either be obtained directly from the electricity model
(representing the use of electricity from the grid for hydrogen production) or can be set to a custom time-varying array (representing the use of a dedicated off-grid electricity source), specified using any of the functional forms described in :ref:`custom-curves`.

Alternatively, users can supply a preset carbon intensity array :math:`CI_\mathrm{H_2,preset}(t)` that directly specifies the production carbon intensity of hydrogen from electrolysis as a time-varying array, bypassing the parametric calculation above.
The preset CI assumes zero leakage; when used, vapor loss penalties are added on top:

.. math::
    :label:

    CI_\mathrm{GH_2}(\mathrm{elys},t) = \frac{CI_\mathrm{H_2,preset}(t)}{1 - f_\mathrm{loss}} + f_\mathrm{loss} \cdot CI_\mathrm{H_2,lost}.

For steam methane reforming (:term:`SMR`), the emissions associated with production take a similar form but with the addition of a constant term :math:`CI_\mathrm{SMR,const}`:

.. math::
    :label: eq:hydrogen_SMR_CI

    CI_\mathrm{GH_2}(\mathrm{SMR},t) = \epsilon_\mathrm{SMR}CI_\mathrm{elec}(t) + CI_\mathrm{SMR,const}.


Emissions from Liquefaction
~~~~~~~~~~~~~~~~~~~~~~~~~~~

The carbon intensity of liquefaction is the product of the electrical energy intensity of
liquefaction and the carbon intensity of the electricity source. An additional multiplier
is added for the number of times the hydrogen must undergo liquefaction in its supply chain;
this is relevant because reliquification may be necessary after
transporting hydrogen a significant distance before it can be used on an aircraft.
By default, the value of this number is one.
The resultant expression is

.. math::
    :label:

    CI_\mathrm{liq}(t) = n_\mathrm{Liq}\epsilon_\mathrm{liq}CI_\mathrm{elec}(t).

Note that this term is identical regardless of whether the production method for gaseous hydrogen is :term:`SMR` or electrolysis.

Effective Emissions due to Vapor Loss and Recovery
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In the production of liquid hydrogen there is potential for loss of hydrogen
via boiloff throughout the production and distribution process. Some of this hydrogen
can potentially be recaptured by including a boiloff recovery system at the expense of
additional liquefaction energy. To account for both the loss and recovery of hydrogen,
the fractional loss, :math:`f_\mathrm{loss}`, and fractional boiloff recovery terms, :math:`f_\mathrm{BOR}`,
are included within the hydrogen model. As a result of the loss and recovery terms,
the mass of hydrogen delivered, :math:`\dot{m}_\mathrm{H_2,del}`, differs from the mass of hydrogen produced, :math:`\dot{m}_\mathrm{H_2,prod}`, as follows:

.. math::
    :label: eq:hydrogen_vapor_loss_boiloff_recovery

    \frac{\dot{m}_\mathrm{H_2,del}}{\dot{m}_\mathrm{H_2,prod}} = 1 - f_\mathrm{loss}(1 - f_\mathrm{BOR}).

Similarly, a term can be defined for how much additional hydrogen is captured and re-liquified using a boiloff recovery system:

.. math::
    :label:

    \frac{\dot{m}_\mathrm{H2,liq}}{\dot{m}_\mathrm{H_2,prod}} = (1 + f_\mathrm{BOR}f_\mathrm{loss}).

Given that hydrogen is itself a greenhouse gas, an emissions term for the warming associated
with the direct loss of hydrogen into the atmosphere due to leakage is included.
Note that we assume most losses in a hydrogen production system result from the challenges related to handling
it in a cryogenic state. Leaks of hydrogen in a gaseous system are assumed to be manageable with
adequate passive controls (e.g. leak detection, sealing) and hence are not modeled.
These emissions are a function of the effective warming potential of the hydrogen
per unit mass directly emitted to the atmosphere, :math:`CI_\mathrm{H_2,lost}`, and the mass of
unrecoverable hydrogen, :math:`\dot{m}_\mathrm{H2,lost}`, which is related to the mass of produced hydrogen by

.. math::
    :label: hydrogen_ratio_lost_to_produced

    \frac{\dot{m}_\mathrm{H2,lost}}{\dot{m}_\mathrm{H_2,prod}} = f_\mathrm{loss}(1 - f_\mathrm{BOR}).



Overall Emissions
~~~~~~~~~~~~~~~~~

The general form for the carbon intensity of a liquid hydrogen production method is the sum of emissions contributions from
gaseous hydrogen production, hydrogen liquefaction, and direct losses of hydrogen to the atmosphere. We first calculate the carbon intensity per unit of hydrogen *produced* by

.. math::
    :label: ci-lh2-uncorrected

    CI_\mathrm{LH_2,prod}(\mathrm{htype},t) = CI_\mathrm{GH_2}(\mathrm{htype},t) + \frac{\dot{m}_\mathrm{H2,liq}}{\dot{m}_\mathrm{H_2,prod}} CI_\mathrm{liq}(t) + \frac{\dot{m}_\mathrm{H2,lost}}{\dot{m}_\mathrm{H2,prod}} CI_\mathrm{H_2,lost}.

To convert this to the carbon intensity of a unit of *delivered* hydrogen,
we multiply by the mass ratio of hydrogen produced to hydrogen delivered in order to account for the emissions associated
with the production and distribution of additional hydrogen to make up for losses. The carbon intensity per unit of hydrogen *delivered* is therefore given by

.. math::
    :label:

    CI_\mathrm{LH_2,del}(\mathrm{htype},t) = \frac{\dot{m}_\mathrm{H2,prod}}{\dot{m}_\mathrm{H2,del}} \cdot CI_\mathrm{LH_2,prod}(\mathrm{htype},t).

Substituting :eq:`ci-lh2-uncorrected`, we have

.. math::
    :label:

    CI_\mathrm{LH_2,del}(\mathrm{htype},t) = \frac{\dot{m}_\mathrm{H2,prod}}{\dot{m}_\mathrm{H2,del}} \cdot \left(CI_\mathrm{GH_2}(\mathrm{htype},t) + \frac{\dot{m}_\mathrm{H2,liq}}{\dot{m}_\mathrm{H_2,prod}} \cdot CI_\mathrm{liq}(t) + \\
    \frac{\dot{m}_\mathrm{H2,lost}}{\dot{m}_\mathrm{H2,prod}} \cdot CI_\mathrm{H_2,lost}\right).

Further substituting :eq:`eq:hydrogen_SMR_CI`--:eq:`hydrogen_ratio_lost_to_produced` into this equation leads to the final generalized form of the equation for the carbon intensity of delivered liquid hydrogen in terms of only model inputs,

.. math::
    :label:

    CI_\mathrm{LH_2,del}(\mathrm{htype},t) = \atop
    \frac{CI_\mathrm{htype,const} + CI_\mathrm{elec}(t) \cdot (\epsilon_\mathrm{htype} + n_\mathrm{liq} \\
    \cdot (1 + f_\mathrm{BOR} \cdot f_\mathrm{loss}) \cdot \epsilon_\mathrm{liq}) + (1 - f_\mathrm{BOR}) \cdot f_\mathrm{loss} \cdot CI_\mathrm{H_2,lost}}{1 - f_\mathrm{loss} \cdot (1 - f_\mathrm{BOR})},

where for the case of electrolysis, it is assumed that :math:`CI_\mathrm{elys,const} = 0`.

The general form for the life cycle carbon intensity of a gaseous hydrogen production method excludes terms for liquefaction energy, direct emissions
from hydrogen losses (recall that this term primarily covers losses from boiloff/venting while the fuel is in a cryogenic state),
and boiloff recovery; it only includes the term for hydrogen production:

.. math::
    :label:

    CI_\mathrm{GH_2}(\mathrm{htype},t) = CI_\mathrm{htype,const} + \epsilon_\mathrm{htype} \cdot CI_\mathrm{elec}(t).

Once this model is run for all hydrogen production methods, the aggregate carbon intensity of |lh2|  and |gh2|  production
are calculated as the weighted average of emissions intensities of hydrogen from each production method by its market share each year:

.. math::
    :label: ci-gaseous-hydrogen

    CI_\mathrm{GH_2}(t) = \sum_\mathrm{htype} X(\mathrm{htype},t) \cdot CI_\mathrm{GH_2}(\mathrm{htype},t),

.. math::
    :label:

    CI_\mathrm{LH_2}(t) = \sum_\mathrm{htype} X(\mathrm{htype},t) \cdot CI_\mathrm{LH_2}(\mathrm{htype},t).

These quantities define the carbon intensities of hydrogen used for e-fuels production and hydrogen used in hydrogen aircraft, respectively.

.. _hydrogen-data-sources:

Data Sources
~~~~~~~~~~~~

Default values for hydrogen model parameters can be found in the :ref:`Hydrogen Ambition Levels<ambition-levels-hydrogen>` section, while bounds on these parameters are given in :ref:`Scenarios and Data<energy-hydrogen-parameter-bounds>`.
The table below documents the data sources used for fixed (non-user configurable) technical parameters in the hydrogen production model.

.. list-table:: - Data Sources
  :header-rows: 1

  * - Variable
    - Symbol
    - Units
    - Default Value
    - Reference
    - Notes
  * - SMR energy intensity
    - :math:`\epsilon_\mathrm{SMR}`
    - MJ/MJ
    - 0.045
    - :cite:p:`ANL`
    -
  * - Carbon intensity of hydrogen produced by SMR (constant)
    - :math:`CI_\mathrm{SMR,const}`
    - |gco2eqmj|
    - 85.95
    - :cite:p:`ANL`
    -
  * - Equivalent carbon intensity of hydrogen vapor loss
    - :math:`CI_\mathrm{H_2,lost}`
    - |gco2eqmj|
    - 90
    - :cite:p:`Sand`
    - Calculated from a GWP100 of 11.6
