Calculate Carnot efficiencies from heat types
carnot_efficiency.Rd
In societal exergy analysis, converting heat to exergy requires knowledge
of the temperature of that heat and application of the Carnot efficiency.
This function first converts heat types (e.g., "HTH.600.C")
to temperatures by extracting the temperature from the middle of the string,
in a unit-aware manner.
Then, the Carnot efficiency is calculated from the temperature of the heat
by applying the Carnot efficiency equation: abs(1 - T_0/T)
,
where T_0 and T are expected to be in kelvin units.
Details
When the heat temperature is less than T_0
,
the Carnot efficiency is calculated as 1 - (heat temperature)/T_0
.
T_0
can be supplied as a numeric vector of ambient temperatures of
same length as heat_types
.
Examples
carnot_efficiency(c("HTH.600.C", "MTH.200.C", "MTH.100.C", "LTH.20.C", "LTH.-10.C"))
#> [1] 0.65853519 0.36986157 0.20099156 0.01677008 0.11739058
carnot_efficiency("LTH.-30.F")
#> [1] 0.1993776