Skip to content

Functional Unit

The three process functions compose top-down: functional_unit asks var for 1 kg of ingot, var scales the upstream welding and transport stages by 1 / yield_var (the welded-electrode mass per kg of ingot), and every stage's foreground exchanges are unioned — namespaced by stage — into the inventory for one functional unit.

Composition (hand-drawn)

A narrative view of the call chain and the per-kg scaling:

graph TD
    FU(["<b>functional_unit( )</b><br/>1 kg VAR ingot — the functional unit"])
    VAR["<b>var( )</b><br/>arc electricity · cooling water"]
    WELD["<b>welding( )</b><br/>Ti sponge · Al · V · electricity · argon"]
    TRANS["<b>transport( )</b><br/>road freight"]
    INV{{"foreground exchanges<br/>namespaced var/ · welding/ · transport/"}}

    FU -->|"asks VAR for 1 kg ingot"| VAR
    VAR -->|"× 1 / yield_var kg welded electrode"| WELD
    VAR -->|"× 1 / yield_var kg"| TRANS

    WELD --> INV
    TRANS --> INV
    VAR --> INV

Composition (auto-generated from the code)

The same structure extracted by docgen — process functions from each subpackage's __all__, composition edges by AST-scanning each module for calls to its siblings, and foreground flows from every exchanges.yaml. It captures the full call graph and every flow, but not hand-written semantics like the 1 / yield_var scaling:

graph TD
    functional_unit(["functional_unit( )"])
    welding["welding( )"]
    transport["transport( )"]
    var["var( )"]
    var --> transport
    var --> welding
    functional_unit --> var
    plasma_arc_welding__electricity(["electricity"])
    welding --> plasma_arc_welding__electricity
    plasma_arc_welding__argon(["argon"])
    welding --> plasma_arc_welding__argon
    plasma_arc_welding__titanium_sponge(["titanium_sponge"])
    welding --> plasma_arc_welding__titanium_sponge
    plasma_arc_welding__aluminum(["aluminum"])
    welding --> plasma_arc_welding__aluminum
    plasma_arc_welding__vanadium_co2(["vanadium_co2"])
    welding --> plasma_arc_welding__vanadium_co2
    transport__road_freight(["road_freight"])
    transport --> transport__road_freight
    var__electricity(["electricity"])
    var --> var__electricity
    var__cooling_water(["cooling_water"])
    var --> var__cooling_water

Functional unit — cradle-to-ingot foreground LCA for Ti-6Al-4V.

The functional unit is 1 kg of aerospace-grade, vacuum-arc-remelted (VAR) Ti-6Al-4V ingot. The inventory chains three foreground processes — plasma arc welding → transport → vacuum arc remelting — composed by functional_unit.

Vacuum arc remelting is the root process: it produces the ingot. Yielding 1 kg of finished ingot consumes more than 1 kg of welded consumable electrode (hot-top trim and melting loss are discarded), so the upstream electrode mass is

\[ m_\mathrm{electrode} = \frac{m_\mathrm{ingot}}{\mathrm{yield}_\mathrm{var}} \]

For 1 kg of ingot, VAR therefore draws 1 / yield_var kg of welded electrode, which sets the scale of the upstream welding and transport stages; the VAR step itself adds the arc electricity and crucible cooling water for the remelt. The combined foreground exchanges are returned namespaced by stage — var/…, welding/…, transport/… — so each contribution traces back to its process.

functional_unit

functional_unit(output_amount=1.0, *, welding_params: dict, transport_params: dict, var_params: dict) -> dict

Cradle-to-ingot foreground exchanges for output_amount kg of ingot.

The functional unit is conceptually 1 kg of aerospace-grade Ti-6Al-4V VAR-remelted ingot; this function asks VAR for that amount. VAR consumes output_amount / yield_var kg of welded electrode from the upstream welding stage and routes it via road transport before remelting. The returned dict is the union of welding, transport, and VAR exchanges, namespaced by stage.

Works on scalars (deterministic single point) or numpy arrays (Monte Carlo); broadcasting handles both with the same code path.

Parameters:

Name Type Description Default
output_amount float or ndarray

Mass of aerospace Ti-64 ingot produced (kg). Default 1.0.

1.0
welding_params dict

Sampled parameters for the welding stage.

required
transport_params dict

Sampled parameters for the transport stage.

required
var_params dict

Sampled parameters for the VAR stage. Must contain yield_var.

required

Returns:

Type Description
dict of str to dict

Flow path "<stage>/<flow_name>" → exchange dict {name, location, unit, amount}.

Source code in src/acap_ti64/functional_unit.py
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
def functional_unit(
    output_amount=1.0,
    *,
    welding_params: dict,
    transport_params: dict,
    var_params: dict,
) -> dict:
    """Cradle-to-ingot foreground exchanges for ``output_amount`` kg of ingot.

    The functional unit is conceptually 1 kg of aerospace-grade
    Ti-6Al-4V VAR-remelted ingot; this function asks VAR for that
    amount. VAR consumes ``output_amount / yield_var`` kg of welded
    electrode from the upstream welding stage and routes it via road
    transport before remelting. The returned dict is the union of
    welding, transport, and VAR exchanges, namespaced by stage.

    Works on scalars (deterministic single point) or numpy arrays
    (Monte Carlo); broadcasting handles both with the same code path.

    Parameters
    ----------
    output_amount : float or numpy.ndarray, optional
        Mass of aerospace Ti-64 ingot produced (kg). Default 1.0.
    welding_params : dict
        Sampled parameters for the welding stage.
    transport_params : dict
        Sampled parameters for the transport stage.
    var_params : dict
        Sampled parameters for the VAR stage. Must contain
        ``yield_var``.

    Returns
    -------
    dict of str to dict
        Flow path ``"<stage>/<flow_name>"`` → exchange dict
        ``{name, location, unit, amount}``.
    """
    return var(
        output_amount,
        welding_params=welding_params,
        transport_params=transport_params,
        **var_params,
    )