# opencr.models.hydrogen_molecular

*module*

Molecular hydrogen: H2 resolved in its vibrational levels, with H, H+ and H2+.

``hydrogen/molecular/basic`` (step 1 of the molecules): the states H2(X, v=0..v_max),
the excited electronic states B, C, EF, a and d, H(n=1), H+ and H2+, with

* electron-impact vibrational excitation ``v -> v+1, v+2`` and its inverse by
  detailed balance: the fits of ``0 -> 1`` and ``0 -> 2`` (Janev, Reiter and
  Samm 2003, eq. (74)) scaled to the other levels as for a harmonic
  oscillator, ``(v+1) sigma_01`` and ``(v+1)(v+2)/2 sigma_02``, shifted to
  the thresholds of the real ladder;
* electron-impact excitation of B, C, EF, a and d, dissociation through the
  triplets b, c and e, ionization and dissociative ionization (eqs. (80),
  (81), (95), (106), (107)) from every level, with the ``v = 0`` cross
  section shifted to the lower threshold of the excited level;
* the radiative decays B, C -> X(v=0), EF -> B, a -> b -> H + H (the
  continuum) and d -> a (the Fulcher band).

``hydrogen/molecular/ions`` adds the negative and molecular ions (step 2):
dissociative attachment ``e + H2(v) -> H- + H`` per level (eq. (124)), the
destruction of H- by electrons (eq. (58)), by H+ (eq. (63)), by H2+ and H3+
and by atoms (eq. (71)), the conversion ``H2+ + H2 -> H3+ + H`` and the
dissociative recombination of H2+ and H3+. Optional wall losses (``wall_loss``,
s^-1 by state) stand in for transport.

The drivers of the quasi-static solve are H2(X, v=0), H(n=1), H+ and H2+;
with the ions, H3+ + H- makes the system nonlinear, which the steady solver
handles (but not `effective_rates`). The model's
assumptions list what is simplified; its coverage is in the guide
"Molecular hydrogen".

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/models/hydrogen_molecular.py#L1-L1)

## opencr.models.hydrogen_molecular.ASSUMPTIONS

*attribute* · *module attribute*

```python
ASSUMPTIONS = ("H2(X) resolved in v = 0..14 with rotations summed; the electronic states B, C, EF, a and d unresolved in v; the other singlets (B', B'', D, D', HH, GK, I) omitted (they decay back to X).", 'Vibrational excitation of v > 0 scaled from 0 -> 1 and 0 -> 2 as for a harmonic oscillator; no V-V or V-T relaxation, no wall de-excitation or recombination.', 'Electronic excitation, ionization and dissociation from v > 0 use the v = 0 cross section shifted to the lower threshold (the Franck-Condon dependence on v is neglected).', 'B and C decay to X(v=0): the vibrational excitation through the radiative cascade (EV process) is not resolved, which underestimates the high v.', 'Excitation of the triplets b, c and e dissociates (c and e cascade to b); a decays to the b continuum and dissociates.', 'Atoms only in H(n=1): dissociative excitation to H(n >= 2) is omitted; merge with hydrogen/atomic/basic for the atomic levels.', 'Optically thin; electron collisions only for H2 (no heavy-particle excitation).')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/models/hydrogen_molecular.py#L74-L90)

## opencr.models.hydrogen_molecular.ION_ASSUMPTIONS

*attribute* · *module attribute*

```python
ION_ASSUMPTIONS = ('H-, H2+ and H3+ unresolved; mutual neutralization goes to ground-state atoms and molecules.', 'Dissociative recombination of H2+ and H3+, and mutual neutralization of H- with H2+ and H3+, from representative literature rates (factor 2).', 'H- + H associative detachment forms H2(X, v=0) (it forms hot v in reality).')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/models/hydrogen_molecular.py#L92-L98)

## opencr.models.hydrogen_molecular.ION_CHEMISTRY_PROVENANCE

*attribute* · *module attribute*

```python
ION_CHEMISTRY_PROVENANCE = {'conversion': Provenance(Reference('J. K. Theard and W. T. Huntress, Ion-molecule reactions and vibrational deactivation of H2+ ions in mixtures of hydrogen and helium, J. Chem. Phys. 60, 2840 (1974)', doi='10.1063/1.1681453'), units='m^3/s', conversions=('2.1e-9 cm^3/s -> 2.1e-15 m^3/s'), uncertainty=0.2, licence='published-fit'), 'h3_recombination': Provenance(Reference('B. J. McCall et al., An enhanced cosmic-ray flux towards zeta Persei inferred from a laboratory study of the H3+ - e- recombination rate, Nature 422, 500 (2003)', doi='10.1038/nature01498'), units='m^3/s against eV', conversions=('2.6e-7 (T/300 K)^-0.48 cm^3/s with T in eV'), uncertainty=0.3, notes='branching 3H : H2 + H = 0.75 : 0.25', licence='published-fit'), 'h2_recombination': Provenance(Reference(JANEV_2003.citation, url=JANEV_2003.url, detail='magnitude of the dissociative recombination of H2+ (not a fit)'), units='m^3/s against eV', uncertainty=1.0, uncertainty_note='factor 2: depends on the vibrational state of H2+', licence='published-fit'), 'neutralization': Provenance(Reference("E. G. Thorsteinsson and J. T. Gudmundsson, A global (volume averaged) model of a chlorine discharge, and J. T. Gudmundsson's hydrogen global models; the value of H+ + H- at room temperature", detail='2e-7 (T/300 K)^-0.5 cm^3/s'), units='m^3/s against eV', uncertainty=1.0, uncertainty_note='factor 2, assumed equal for H2+ and H3+', licence='published-fit')}
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/models/hydrogen_molecular.py#L112-L161)

## opencr.models.hydrogen_molecular.molecular_hydrogen_network

*function*

```python
def molecular_hydrogen_network(v_max: int = NUM_VIBRATIONAL_LEVELS - 1, electronic: bool = True, ions: bool = False, wall_loss: Mapping[str, float] | None = None, max_energy: float = 10000.0) -> ReactionNetwork
```

Return the network of ``hydrogen/molecular/basic`` (or ``.../ions`` with ``ions``).

**Parameters**

- `v_max` (`int`) (default: `NUM_VIBRATIONAL_LEVELS - 1`) — The highest vibrational level of H2(X), at most 14.
- `electronic` (`bool`) (default: `True`) — Resolve the excited electronic states B, C, EF, a and d.
- `ions` (`bool`) (default: `False`) — Add H- and H3+ and their chemistry.
- `wall_loss` (`Mapping[str, float] | None`) (default: `None`) — Loss frequencies in s^-1 by state name (e.g. ``{"H-": 1e4}``), each a ``wall_loss`` reaction that removes the state.
- `max_energy` (`float`) (default: `10000.0`) — The last tabulated cross-section energy in eV.

The frequencies and the energy also take astropy quantities or strings
such as ``"1e4 1/s"``.

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/models/hydrogen_molecular.py#L429-L487)
