Default Carbon Relations¶
PyGREET fills in the carbon relations of a stationary process with a default matrix only when you select Estimate in the stationary process. Nothing runs automatically. Estimate builds the matrix from the carbon mass of each input and output stream. Each entry estimates how strongly an input contributes carbon to an output. PyGREET normalizes the whole matrix so the entries form a probability-like distribution.
Each matrix entry \(C_{o,i}\) links an output \(o\) to an input \(i\). PyGREET builds it in three steps: compute the carbon mass of every stream, score each input and output interaction, then normalize.
Carbon Mass of a Stream¶
The carbon mass of a stream is its carbon ratio times its amount expressed on a mass basis:
| Symbol | Meaning | Dimension |
|---|---|---|
| \(C^{\text{in}}_i\) | Carbon mass of input \(i\) | \([\text{mass}]\) |
| \(C^{\text{out}}_o\) | Carbon mass of output \(o\) | \([\text{mass}]\) |
| \(cr_i\), \(cr_o\) | Carbon ratio of the input/output flow | \([\text{mass}]/[\text{mass}]\) |
| \(m_i\), \(m_o\) | Stream amount expressed in mass | \([\text{mass}]\) |
PyGREET sets a stream's carbon mass to \(0\) (so it does not interact) when:
- The flow's state is energy, or it has no carbon ratio (or a carbon ratio of \(0\)). This applies to inputs and outputs.
- For an input only: the input is an internal product, or it comes directly from the well (a primary resource) but the flow is not biogenic.
- Outputs used for displacement are excluded entirely. Only allocated outputs count.
For an input that belongs to an input group, the amount is the share times the group allocation amount (see Input Group Shares).
Interaction Score¶
Each input and output pair gets an asymmetric, nonlinear, bounded interaction score:
| Symbol | Meaning | Dimension |
|---|---|---|
| \(f(i,o)\) | Interaction score between input \(i\) and output \(o\) | dimensionless |
| \(C^{\text{in}}_{\max}\) | Largest carbon mass among all inputs | \([\text{mass}]\) |
| \(C^{\text{out}}_{\max}\) | Largest carbon mass among all outputs | \([\text{mass}]\) |
| \(\alpha\) | Power-law exponent (\(0.5\) by default) | dimensionless |
| \(\varepsilon\) | Small constant to avoid division by zero (\(\approx 10^{-12}\)) | \([\text{mass}]\) |
The score has these properties:
- It is \(0\) whenever either the input or the output carbon mass is \(0\).
- It always lies in \([0, 1]\).
- The first factor is an asymmetry term. It favors inputs whose carbon mass is large relative to the output.
- The power-law exponent \(\alpha\) adds nonlinearity to the normalized product of the two carbon masses.
Normalization¶
Each matrix entry is its interaction score divided by the sum of all scores, so the whole matrix sums to one:
| Symbol | Meaning | Dimension |
|---|---|---|
| \(C_{o,i}\) | Default carbon relation between output \(o\) and input \(i\) | dimensionless |
| \(S\) | Sum of all interaction scores | dimensionless |
If \(S = 0\) (no interacting carbon, for example when no stream carries carbon), every entry is \(0\). The \(C_{o,i}\) values become the carbon relations of the process. They are the edge weights for biogenic carbon propagation.