View source: R/energy_to_exergy.R
extend_fu_details_to_exergy | R Documentation |
The details matrices contain (in row and column names) details about the move from the final energy stage to the useful energy stage. Four pieces of information are provided in row and column names:
final energy product,
final demand sector,
useful energy product, and
final-to-useful machine.
extend_fu_details_to_exergy(
.fu_details_mats = NULL,
Y_fu_details = Recca::psut_cols$Y_fu_details,
U_eiou_fu_details = Recca::psut_cols$U_eiou_fu_details,
clean_up_df = TRUE,
phi = Recca::psut_cols$phi,
.exergy_suffix = "_exergy",
mat_piece = "noun",
phi_piece = "all",
energy_type = Recca::psut_cols$energy_type,
mat_col_notation = RCLabels::from_notation,
mat_colname_preposition =
RCLabels::prepositions_list[[which(RCLabels::prepositions_list == "from")]],
Y_fu_details_colname = Recca::psut_cols$Y_fu_details,
U_eiou_fu_details_colname = Recca::psut_cols$U_eiou_fu_details,
phi_colname = Recca::psut_cols$phi,
energy = Recca::energy_types$e,
exergy = Recca::energy_types$x,
industry_type = IEATools::row_col_types$industry,
product_type = IEATools::row_col_types$product
)
.fu_details_mats |
A data frame containing details matrices. |
Y_fu_details |
The name of the column of |
U_eiou_fu_details |
The name of the column of |
clean_up_df |
When |
phi |
The name of the column of |
.exergy_suffix |
The string suffix to be appended to exergy versions of ECC matrices. |
mat_piece |
The piece of details matrix column names
which are to be matched against names in the |
phi_piece |
The piece of names in the |
energy_type |
The name of the EnergyType column in |
mat_col_notation |
The notation for the column labels of the details matrices.
Default is |
mat_colname_preposition |
The prepositions to be used for details matrix column notation.
Default is |
Y_fu_details_colname |
The name of the column in |
U_eiou_fu_details_colname |
The name of the column in |
phi_colname |
The name of the column in |
energy , exergy |
String representing energy and exergy in the |
industry_type , product_type |
Industry and product row and column types.
Defaults are |
Two details matrices are available:
Y_fu_details
and
U_EIOU_fu_details
.
The two matrices correspond to the two ways in which final energy
is converted into useful energy:
in final demand (Y_fu_details
) and
in energy industry own use (U_EIOU_fu_details
).
The format for the row and column names for both details matrices is identical:
row names
RCLabels::arrow_notation
prefix: final energy product
suffix: final demand sector
example: "Aviation gasoline -> Domestic aviation"
column names
RCLabels::from_notation
noun: useful energy product
object of from: final-to-useful machine
example: "HPL [from Electric pumps]"
The row and column types match the row and column names.
row types
RCLabels::arrow_notation
prefix: "Product"
suffix: "Industry"
specifically: "Product -> Industry"
column types
RCLabels::from_notation
noun: "Product"
object of from: "Industry"
specifically: "Product [from Industry]"
The energy stage of the entries in the details matrices are indicated
by the entry in the EnergyType
column,
typically "Useful".
If either of the energy details matrices are NULL
,
the exergy matrix returned from this function is also NULL
.
A version of .fu_details_mats
containing details matrices in exergy terms.
details_mat <- Matrix::sparseMatrix(
i = c(1, 2, 3),
j = c(1, 3, 2),
x = c(10, 20, 100),
dimnames = list(c("Electricity -> Households",
"Electricity -> Industry",
"Natural gas -> Households"),
c("Light [from Electric lamps]",
"MTH.100.C [from Furnaces]",
"KE [from Fans]"))) |>
matsbyname::setrowtype("Product -> Industry") |>
matsbyname::setcoltype("Product [from Industry]")
phi_vec <- Matrix::sparseMatrix(
i = c(1, 2, 3, 4),
j = c(1, 1, 1, 1),
x = c(1.0, 1-(25+273.15)/(100+273.15), 0.96, 1-(25+273.15)/(1000+273.15)),
dimnames = list(c("KE", "MTH.100.C", "Light", "HTH.1000.C"),
"phi")) |>
matsbyname::setrowtype("Product") |>
matsbyname::setcoltype("phi")
extend_fu_details_to_exergy(Y_fu_details = details_mat,
U_eiou_fu_details = details_mat,
phi = phi_vec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.