# Energy balance in Basel

## Question

What are the amounts of energy produced, consumed, imported, and exported in Basel?

 ``` ## This code was run from page [[Energy balance in Basel#Answer]] library(OpasnetUtils) library(ggplot2) N <- 10 # Number of iterations objects.latest("Op_en5141", code_name = "initiate") balance <- Ovariable("balance", ddata = "Op_en6349.equations") nonlinearity <- Ovariable("nonlinearity", ddata = "Op_en5141", subset = "No nonlinearities") directinput <- Ovariable("directinput", ddata = "Op_en5141", subset = "No modelled upstream variables") energy.balance <- EvalOutput(energy.balance) oprint(summary(energy.balance)) ggplot(energy.balance@output, aes(x = energybalanceVars, y = energy.balanceResult)) + geom_boxplot() + facet_wrap(~Year, ncol = 1) + theme_grey(base_size = 24) + theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust= 0.2)) + ggtitle("Energy balance in Basel") ggplot(energy.balance@output, aes(x = Year, y = energy.balanceResult, fill = Year)) + geom_boxplot() + facet_wrap(~energybalanceVars, scales = "free") + theme_grey(base_size = 24) + theme(axis.text.x = element_blank(), axis.title.x = element_blank()) + ggtitle("Energy balance variable-time comparison") ```

## Rationale

There are several energy transformations that each describe a specific process of energy production or use. Per unit activity, there is a constant amount of different inputs and outputs into and from this process, respectively. These unit processes are used for Suzhou in such a way that one critical input or output from each relevant energy transformation is listed here; all other inputs and outputs logically follow from the nature of the transformation process.

### Data

Data updated successfully!

Equations(TJ)
ObsYearEquationDummy
12010H_other_in + H_oil_in + H_gas_in + H_electricity_in + H_environment_in = H_electricity_out + H_heat_out + H_loss0
22010H_other_in + H_gas_in + H_electricity_in + H_environment_in = 18.759336099585 * H_oil_in0
32010H_other_in + H_oil_in + H_electricity_in + H_environment_in = 1.00505263157895 * H_gas_in0
42010H_other_in + H_oil_in + H_gas_in + H_environment_in = 94.2399999999989 * H_electricity_in0
52010H_other_in + H_oil_in + H_gas_in + H_electricity_in = 92.3725490196079 * H_environment_in0
62010H_heat_out = 4.04461371055495 * H_loss0
72010H_electricity_out = 0.137105549510337 * H_loss0
82010Loss_electricity = 10.6690825426753 * H_electricity_out0
92010Loss_oil = 0.0445888958928925 * H_oil_in0
102010Loss_gas = 0.00967082506829371 * H_gas_in0
112010Loss_heat = 0.142050040355125 * H_heat_out0
122010Import_electricity + H_electricity_out + Recovery_electricity = Loss_electricity + Household_electricity + Industry_electricity + Commerce_electricity + Transport_electricity0
132010Recovery_heat + H_heat_out = Loss_heat + Household_heat + Industry_heat + Commerce_heat0
142010Household_electricity = 1344.10958904110
152010Industry_electricity = 1341.964285714290
162010Commerce_electricity = 2940.971428571430
172010Transport_electricity = 2600
182010Household_heat = 9320
192010Industry_heat = 3330
202010Commerce_heat = 16330
212010H_heat_out = 3175.009002029180
222010Recovery_electricity = 50.9655865482360
232020H_other_in + H_oil_in + H_gas_in + H_electricity_in + H_environment_in = H_electricity_out + H_heat_out + H_loss0
242020H_other_in + H_gas_in + H_electricity_in + H_environment_in = 18.7593360995851 * H_oil_in0
252020H_other_in + H_oil_in + H_electricity_in + H_environment_in = 1.00505263157895 * H_gas_in0
262020H_other_in + H_oil_in + H_gas_in + H_environment_in = 94.24 * H_electricity_in0
272020H_other_in + H_oil_in + H_gas_in + H_electricity_in = 92.3725490196077 * H_environment_in0
282020H_heat_out = 4.04461371055495 * H_loss0
292020H_electricity_out = 0.137105549510337 * H_loss0
302020Loss_electricity = 11.5997703806749 * H_electricity_out0
312020Loss_oil = 0.0346903754680064 * H_oil_in0
322020Loss_gas = 0.0052086734616975 * H_gas_in0
332020Loss_heat = 0.142050040355125 * H_heat_out0
342020Import_electricity + H_electricity_out + Recovery_electricity = Loss_electricity + Household_electricity + Industry_electricity + Commerce_electricity + Transport_electricity0
352020Recovery_heat + H_heat_out = Loss_heat + Household_heat + Industry_heat + Commerce_heat0
362020Household_electricity = 2037.586130136990
372020Industry_electricity = 2515.17656250
382020Commerce_electricity = 3505.320
392020Transport_electricity = 286.650
402020Household_heat = 1541.2950
412020Industry_heat = 367.13250
422020Commerce_heat = 1800.38250
432020H_heat_out = 4139.402858681650
442020Recovery_electricity = 72.242385501630

There are no nonlinearities.

### Dependencies

 Urgenche pages Urgenche main page · Category:Urgenche · Urgenche project page (password-protected) City Kuopio Climate change policies and health in Kuopio (assessment) · Climate change policies in Kuopio (plausible city-level climate policies) · Health impacts of energy consumption in Kuopio · Building stock in Kuopio · Cost curves for energy (prioritization of options) · Energy balance in Kuopio (energy data) · Energy consumption and GHG emissions in Kuopio by sector · Energy consumption classes (categorisation) · Energy consumption of heating of buildings in Kuopio · Energy transformations (energy production and use processes) · Fuels used by Haapaniemi energy plant · Greenhouse gas emissions in Kuopio · Haapaniemi energy plant in Kuopio · Land use in Kuopio · Building data availability in Kuopio · Password-protected pages: File:Heat use in Kuopio.csv · Kuopio housing City Basel Buildings in Basel (password-protected)