Units

Every lifecycle analysis starts with the specification of the system under scrutiny, and its associated functional unit. More precisely, the functional unit has two roles.

First, the functional unit qualifies the service provided by the system. For instance, the purpose of the process electricity_fossil_production is to provide a quantity of energy. We say that the dimension of the functional unit is energy.

process fossil_based_electricity_production {
    products {
        1 kWh electricity_fossil
    }
    // rest omitted in this example
}

Second, the functional unit quantifies the service provided by the system. The functional unit serves as the nominal quantity all the impacts are referred to. For instance, in the process hydroelectric_production, the functional unit is 1 MJ (one megajoule). For 1 MJ of electricity_hydro, the process captures 1 MJ of energy_potential. It is implicitly assumed that 2 MJ of electricity_hydro will capture 2 MJ of energy_potential.

process hydroelectric_production {
    products {
        1 MJ electricity_hydro
    }
    
    resources {
        1 MJ energy_potential
    }
    // rest omitted in this example
}

We can compare the services provided by two systems when their functional units have the same dimension. Hence, the processes fossil_based_electricity_production and hydroelectric_production can be compared, although their functional units are not literally the same.

Unit aliases

One usually chooses the functional units that best fit the problem at hand. For instance, let's try to model a process that produces electricity from burning oil. We know that one barrel of oil is equivalent to 1700 kWh.

process oil_burning {
    variables {
        energy_per_oil_barrel = 1700 kWh
    }
    products {
        energy_per_oil_barrel electricity
    }
    inputs {
        1.0 piece physical_oil_barrel
    }
}

Let's run that process. You should get the following results.

ItemQuantityUnitphysical_oil_barrel [piece]
electricity from oil_burning{}{}1kWh5.88235294117647E-4

As you can see, the functional unit of this process is 1 kWh. This may not, however, be the most convenient unit to work with.

You can declare a new unit by writing a unit block.

unit oil_barrel {
    symbol = "oil_barrel"
    alias_for = 1700 kWh
}

This creates a new unit named oil_barrel equivalent to 1700 kWh. In particular, the associated dimension is that of kWh, i.e., energy. This unit can be used, like any other units, in exchanges and formulae. Let's refactor the process oil_burning to use this unit.

process oil_burning {
    products {
        1 oil_barrel electricity
    }
    inputs {
        1 piece physical_oil_barrel
    }
}

If you run this process, you get the following results.

ItemQuantityUnitphysical_oil_barrel [piece]
electricity from oil_burning{}{}1.0oil_barrel1.0

Now, the results are much easier to read.

Custom dimensions

In the previous example, the unit oil_barrel is aliased for a multiple of an existing unit (kWh), and has the same dimension (energy). There are some cases, however, where one wants to create a specific dimension.

For instance, let's write a process that models a one night stay in a hotel. One may use a dimensionless unit, such as piece, as the functional unit.

process hotel {
    products {
      1 piece night
    }
    // for the sake of simplicity, we add a fake emission.
    emissions {
        1 piece night_stay
    }
}

Now, let's model a hotel customer. The hotel price per guest per night is 100 dollars. The customer wants to book one night for two guests, her friend and herself. She has a budget of 200 dollars Assuming the customer spends all her budget, she should consume one night from the hotel. One could write the following.

process customer {
    variables {
        budget = 200 piece
        price_per_guest_night = 100 piece
        nb_guests = 2 piece
        nb_nights = budget / price_per_guest_night * nb_guests
    }

    products {
        1 piece customer
    }

    inputs {
        nb_nights night from hotel
    }
}

Assess the process. Did you spot the error? Here it is.

    variables {
        /*
            wrong formula (missing parenthesis):
                nb_nights = budget / price_per_guest_night * nb_guests
        */
        nb_nights = budget / (price_per_guest_night * nb_guests)
    }

The error is relatively hard to spot because all the quantities involved are dimensionless.

We can define a unit with a custom dimension as follows, and refactor the process hotel accordingly

unit night {
    symbol = "night"
    dimension = "night"
}

process hotel {
    products {
        1 night night
    }
    emissions {
        1 piece night_stay
    }
}

The process customer should contain an error now. Try to fix it.

Solution
unit guest {
    symbol = "guest"
    dimension = "guest"
}

unit dollar {
    symbol = "dollar"
    dimension = "dollar"
}

process customer {
    variables {
        budget = 200 dollar
        price_per_guest_night = 100 dollar / (guest * night)
        nb_guests = 2 guest
        nb_nights = budget / ( price_per_guest_night * nb_guests )
    }

    products {
        1 piece customer
    }

    inputs {
        nb_nights night from hotel
    }
}

The dimensions help to check that the formulae are correct. If you try to remove the parenthesis on an expression, you will be notified with an error.