View source: R/energy_to_exergy.R
extend_to_exergy | R Documentation |
An energy conversion chain can be represented in energy or exergy quantifications of energy. This function moves from an energy quantification to an exergy quantification, given the matrices for the energy quantification and phi (exergy-to-energy ratio) vectors.
extend_to_exergy(
.sutmats = NULL,
clean_up_df = TRUE,
R = Recca::psut_cols$R,
U = Recca::psut_cols$U,
U_feed = Recca::psut_cols$U_feed,
U_eiou = Recca::psut_cols$U_eiou,
r_eiou = Recca::psut_cols$r_eiou,
V = Recca::psut_cols$V,
Y = Recca::psut_cols$Y,
phi = Recca::psut_cols$phi,
.exergy_suffix = "_exergy",
mat_piece = "all",
phi_piece = "all",
notation = RCLabels::bracket_notation,
prepositions = RCLabels::prepositions_list,
R_name = Recca::psut_cols$R,
U_name = Recca::psut_cols$U,
U_feed_name = Recca::psut_cols$U_feed,
U_eiou_name = Recca::psut_cols$U_eiou,
r_eiou_name = Recca::psut_cols$r_eiou,
V_name = Recca::psut_cols$V,
Y_name = Recca::psut_cols$Y,
phi_name = Recca::psut_cols$phi,
energy_type = Recca::psut_cols$energy_type,
S_units = Recca::psut_cols$S_units,
energy = Recca::energy_types$e,
exergy = Recca::energy_types$x
)
.sutmats |
An optional data frame of energy conversion chain matrices. |
clean_up_df |
When |
R , U , U_feed , U_eiou , r_eiou , V , Y , phi |
Names of columns in |
.exergy_suffix |
The string suffix to be appended to exergy versions of ECC matrices. |
mat_piece |
The piece of matrix row and column names for |
phi_piece |
The piece of names in the |
notation |
The nomenclature for the row and column labels. Default is |
prepositions |
The prepositions to be used row and column notation.
Default is |
R_name , U_name , U_feed_name , U_eiou_name , r_eiou_name , V_name , Y_name , phi_name , energy_type , S_units |
Names of output matrices |
energy , exergy |
See |
Internally, this function uses matsindf::apply()
, so
the ECC matrices can be provided
as individual matrices,
in a named list, or
or in a data frame
(in which case the arguments should
given the string names of columns in the .sutmats
data frame, the default).
The vector phi
is considered to be a store of values
to be applied to each type of energy carrier.
To determine which entry in the phi
vector is matched against which energy carrier,
mat_piece
and phi_piece
are consulted.
mat_piece
and phi_piece
can be any of
"all", "pref", "suff", "noun", or one of many prepositions given in suffixes
A data frame or list of matrices that represents the exergy version of the ECC.
sutmats <- UKEnergy2000mats %>%
# Put in wide-by-matrix format.
tidyr::spread(key = matrix.name, value = matrix) %>%
# Eliminate services ECCs.
dplyr::filter(LastStage %in% c("Final", "Useful")) %>%
dplyr::mutate(
phi = RCLabels::make_list(Recca::phi_vec, n = nrow(.), lenx = 1)
)
extend_to_exergy(sutmats)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.