KomuraSoft LLC
Chapter 6

Simulator and minimal model — move the conditions and see the right fit

Fold hydrogen amount, upstream carbon intensity, storage mode, end-use mode, handling losses, and safety-design level into a teaching model, and separate how each control parameter affects useful energy, climate score, ease of packaging, and operational risk.

First, move the six control parameters one at a time

The simulator in this chapter folds hydrogen amount, upstream carbon intensity, storage mode, end-use mode, handling losses, and safety-design level into a teaching model. The goal is not rigorous design but to separate which control parameter affects useful energy, climate score, ease of packaging, and operational risk.

  • Hydrogen amount: The starting point of the chemical energy you can extract.
  • Upstream carbon intensity: Represents the effect of production pathway and power mix.
  • Storage mode: Drives ease of packaging and handling complexity.
  • End-use mode: Fuel cell vs. combustion changes the conversion efficiency.
  • Handling losses: Represents leakage, boil-off, and extra conversion losses.
  • Safety-design level: Represents the maturity of ventilation, detection, and training.

Which chapter each of the four presets corresponds to

The four presets above the simulator reproduce, in one click, representative cases discussed in earlier chapters.

  • FCEV passenger car: Chapter 1 ("an option alongside electrification") + Chapter 4 ("700 bar compressed") + Chapter 5 ("PEM fuel cell"). A typical case where short refueling time and volume constraints are the driving issues.
  • Stationary backup: Chapter 1 ("long-duration / high-utilization operation") + Chapter 4 ("350 bar") + Chapter 5 ("PEM fuel cell"). A setting for examining quick start during outages and the storage burden during low-utilization periods.
  • Imported-carrier power: Chapter 3 ("upstream carbon intensity") + Chapter 4 ("ammonia / MCH carrier") + Chapter 5 ("gas turbine"). A long-distance, large-scale setting that highlights losses from added process steps.
  • Hydrogen-engine commercial vehicle: Chapter 4 ("liquid hydrogen / high pressure") + Chapter 5 ("hydrogen engine — combustion use") plus the NOx control issue. A setting where conversion efficiency is lower than a fuel cell, in exchange for continuity with existing combustion technology.

HF101 simulator

This is not a real-plant calculation; it is a teaching model for grasping which control parameter affects useful energy, climate score, ease of packaging, and operational risk.

Chemical energy

0.0 kWh

Useful energy

0.0 kWh

Climate score

0 / 100

Ease of packaging

0 / 100

Operational risk

0 / 100

Reading

The JavaScript of the teaching model

The teaching-side code is also written short, without hiding its assumptions. Values outside the input ranges are not silently rounded — they stop with a RangeError.

function assertFiniteInRange(name, value, min, max) {
  if (!Number.isFinite(value) || value < min || value > max) {
    throw new RangeError(`${name} must be a finite number in [${min}, ${max}]`);
  }
}

function clamp01(value) {
  if (!Number.isFinite(value)) {
    throw new RangeError('value must be finite');
  }
  return Math.min(1, Math.max(0, value));
}

function fuelEnergyLhvKWh(h2Kg) {
  assertFiniteInRange('h2Kg', h2Kg, 1, 12);
  return 33.3 * h2Kg;
}

function storageProfile(mode) {
  const table = {
    '350bar': { packing: 0.45, embeddedLoss: 0.02, complexity: 0.34 },
    '700bar': { packing: 0.62, embeddedLoss: 0.04, complexity: 0.46 },
    'liquid': { packing: 0.82, embeddedLoss: 0.12, complexity: 0.72 },
    'carrier': { packing: 0.70, embeddedLoss: 0.18, complexity: 0.78 },
  };
  const profile = table[mode];
  if (!profile) {
    throw new RangeError(`unknown storage mode: ${mode}`);
  }
  return profile;
}

function endUseProfile(mode) {
  const table = {
    fuelCell: { efficiency: 0.55, endUsePenalty: 0.00 },
    engine: { efficiency: 0.32, endUsePenalty: 0.08 },
    turbine: { efficiency: 0.42, endUsePenalty: 0.04 },
  };
  const profile = table[mode];
  if (!profile) {
    throw new RangeError(`unknown end-use mode: ${mode}`);
  }
  return profile;
}

storageProfile represents ease of packaging and embedded losses, while endUseProfile represents the conversion-efficiency side. Rather than being real design numbers, this is a decomposition that makes it easier to trace which chapter's discussion corresponds to which parameter.

Where the coefficients come from (relative ordering, not absolute values)

The packing field of storageProfile (ease of packaging, normalized to 0–1) reflects the relative ordering of volumetric efficiency discussed in Chapter 4: 350 bar < 700 bar < carrier (room-temperature liquid) < liquid hydrogen, in increasing order. embeddedLoss (the embedded loss from compression, liquefaction, or carrier conversion) and complexity (operational complexity from added equipment) similarly express relative magnitudes for grasping the picture, not exact figures.

  • '350bar': moderate compression work, simplest equipment → packing 0.45 / embeddedLoss 0.02 / complexity 0.34.
  • '700bar': more compression work, higher container-strength requirements → 0.62 / 0.04 / 0.46.
  • 'liquid': best volumetric efficiency, but liquefaction work (literature commonly puts it at roughly 25–30 % of hydrogen LHV) and boil-off are large → 0.82 / 0.12 / 0.72.
  • 'carrier': can be transported as a room-temperature liquid, but the round trip of synthesis + dehydrogenation incurs large losses → 0.70 / 0.18 / 0.78.

The efficiency field of endUseProfile uses representative LHV-based values. fuelCell: 0.55 sits at the middle of the overall efficiency range often quoted for commercial PEM fuel-cell vehicles and stationary systems (roughly 0.50–0.60). turbine: 0.42 is a representative value taken from the net efficiency range of medium-to-large gas turbines on a simple cycle (not combined cycle). engine: 0.32 is set close to the upper end of the net thermal efficiency of hydrogen reciprocating engines, and is somewhat optimistic as a teaching value (0.25–0.30 is often considered more realistic for production-vehicle baselines). When you select engine in the simulator, the difference may therefore look modest; if you want to check sensitivity, lowering the value locally to around 0.28 and comparing the behavior is also a useful exercise.

How the code maps to the UI

Each function and coefficient corresponds to specific simulator-UI fields as follows.

  • fuelEnergyLhvKWh(h2Kg) → "Chemical energy" output (kWh). The "Hydrogen amount" slider is the direct input.
  • storageProfile(mode).packing → "Ease of packaging" output (0–100). The "Storage mode" select is the input.
  • storageProfile(mode).embeddedLoss + the "Handling losses" slider → loss side of the "Useful energy" output.
  • storageProfile(mode).complexity + the "Safety-design level" slider → "Operational risk" output.
  • endUseProfile(mode).efficiency → conversion-efficiency side of the "Useful energy" output. The "End-use mode" select is the input.
  • The "Upstream carbon intensity" slider → multiplied by hydrogen amount to drive the "Climate score" output. The end-use and storage embeddedLoss values feed in indirectly here too (because more upstream H₂ is required to deliver the same useful energy).

Comprehension check — simulator and minimal model

Check how to read the simulator and the code policy of the minimal model.

Q1. If you raise only upstream carbon intensity in the simulator, which metric is most directly likely to drop?

This is the control parameter that represents the upstream supply-chain burden.

Q2. If you hold hydrogen amount and storage mode fixed and switch the end-use mode from fuel cell to hydrogen engine, which is most directly likely to change?

What end-use mode mainly changes is the conversion-efficiency side.

Q3. When you pick a carrier mode in the simulator, which trade-off are you most likely making?

Carriers trade ease of transport against extra process steps.

Q4. In this teaching JavaScript implementation, what is thrown when an input violates a precondition?

The policy was not to silently fix invalid inputs.

Chapter 6 takeaways

  • The split — upstream carbon intensity mainly drives the climate score, end-use mode mainly drives useful energy, and storage mode mainly drives ease of packaging — shows up directly on the simulator.
  • Carrier modes tend to trade ease of transport against extra losses and operational complexity.
  • The minimal model writes out its equations and assumptions, and throws a RangeError on out-of-range inputs rather than silently rounding.