# Energy balance in Suzhou

## Question

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

 ``` ### This code was run from page [[Energy balance in Suzhou#Answer]] library(OpasnetUtils) library(ggplot2) N <- 10 # Number of iterations objects.latest("Op_en5141", code_name = "initiate") balance <- Ovariable("balance", ddata = "Op_en5816.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_string(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)) ```

## 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

Equations(GWh /a?)
ObsYearEquationDummyDescription
12010TP raw coal + TP natural gas + TP oil products + TP coal products + TP other energy + TP heat = TP electricity + TP loss1In energy balance, inputs and outputs cancel out. Balance Thermal Power Plants. 17194.0 + 670.9 + 21.4 + 1145.5 + 198.0 + 54.7 = 7460.4 + 11824.1, respectively (GWh /a?).
22010TP natural gas = 0.039019425*TP raw coal1 Fraction from TP raw coal.
32010TP oil products = 0.001244620*TP raw coal1 Fraction from TP raw coal.
42010TP coal products = 0.066622077*TP raw coal1 Fraction from TP raw coal.
52010TP other energy = 0.011515645*TP raw coal1 Fraction from TP raw coal.
62010TP heat = 0.003181342*TP raw coal1 Fraction from TP raw coal.
72010TP electricity = 0.630948656*TP loss 1 Fraction from TP loss.
82010H raw coal + H natural gas + H oil products + H coal products + H other energy = H heat + H loss-1Balance Heating Supply. In energy balance, inputs and outputs cancle out
92010H natural gas + H oil products + H coal products + H other energy = 0.158111641*H raw coal-1(88,0+38,6+360,3+27,2)/3251,5 Others divided by raw coal. Fraction H raw coal. Sum of other fuels is used as comparison for raw coal
102010H raw coal + H oil products + H coal products + H other energy = 41.79090909*H natural gas-1(3251,5+38,6+360,3+27,2)/88,0 Others divided by natural gas. Fraction H natural gas. Sum of other fuels is used as comparison for natural gas
112010H raw coal + H natural gas + H coal products + H other energy = 96.55440415*H oil products-1(3251,5+88,0+360,3+27,2)/38,6 Others divided by oil products. Sum of other fuels is used as comparison for oil products. Fraction H oil products
122010H raw coal + H natural gas + H oil products + H other energy = 9.451290591*H coal products-1(3251,5+88,0+38,6+27,2)/360,3 Others divided by coal products. Fraction H coal products. Sum of other fuels is used as comparison for coal products
132010H heat = 4.451715651*H loss-13074,8/690,7 heat per loss. Fraction H loss. Amount of heat is used as comparison for loss
142010CP raw coal + CP natural gas + CP oil products = CP coal products + CP loss1Balance Coal Processing. In energy balance, inputs and outputs cancel out
152010CP natural gas + CP oil products = 0.004725972*CP raw coal-1(0,007+0,0172)/5,12064 Others divided by raw coal. Fraction CP raw coal. Sum of other fuels is used as comparison for raw coal
162010CP oil products = 24.57142857*CP natural gas10,01720/0,0007 oil products divided by natural gas. Fraction CP natural gas. Amount of oil products is used as comparison for natural gas
172010CP coal products = 6.341763109*CP loss14,4386/0,6999 coal products per loss. Fraction CP loss. Amount of coal products is used as comparison for loss
182010Loss heat = 0.029823078*H heat191,7/3074,8. Transmission loss heat. Known loss divided by production
192010Loss oil products = 0.953271028*TP oil products120,4/21,4. Transmission loss oil products. Known loss divided by oil products used in TP
202010Loss electricity = 0.085276929*TP electricity1636,2/7460,4. Transmission loss electricity. Known loss divided by production
212010Loss natural gas = 0.3625*H natural gas131,9/88,0. Transmission loss natural gas. Known loss divided by natural gas used in H
222010Bought electricity + TP electricity = Loss electricity + Cons Agri electricity + Cons Ind electricity + Cons Transportation electricity + Cons Commerce electricity + Cons Households electricity1Electricity use balance. In energy balance, inputs and outputs cancel out
232010H heat = Loss heat + Cons Ind heat + Cons Commerce heat1Heat use balance. In energy balance, inputs and outputs cancel out
242010Cons Agri electricity = 25.84685321Consumed electricity agriculture
252010Cons Ind electricity = 7032.0449351Consumed electricity industry
262010Cons Transportation electricity = 49.86642921Consumed electricity transportation
272010Cons Commerce electricity = 684.70502731Consumed electricity commerce
282010Cons Households electricity = 625.38045991Consumed electricity households
292010Cons Ind heat = 2981.3136921Consumed heat industry
302010Cons Commerce heat = 1.7320347691Consumed heat commerce
312010TP electricity = 7460.41Electricity produced by thermal power. Assumes that there is no capacity to increase production.
322010CP coal products = 4.43861Coal products produced
332020TP raw coal + TP natural gas + TP oil products + TP coal products + TP other energy + TP heat = TP electricity + TP loss1In energy balance, inputs and outputs cancel out. Balance Thermal Power Plants.
342020TP natural gas = 0.0390180013341954*TP raw coal1 Fraction from TP raw coal.
352020TP oil products = 0.00124415516846148*TP raw coal1 Fraction from TP raw coal.
362020TP coal products = 0.0666203905225772*TP raw coal1 Fraction from TP raw coal.
372020TP other energy = 0.0115132299117319*TP raw coal1 Fraction from TP raw coal.
382020TP heat = 0.00318231341226894*TP raw coal1 Fraction from TP raw coal.
392020TP electricity = 0.630946878757119*TP loss 1 Fraction from TP loss.
402020H raw coal + H natural gas + H oil products + H coal products + H other energy = H heat + H loss-1Balance Heating Supply. In energy balance, inputs and outputs cancle out
412020H natural gas + H oil products + H coal products + H other energy = 0.158087304841969*H raw coal-1Others divided by raw coal. Fraction H raw coal. Sum of other fuels is used as comparison for raw coal
422020H raw coal + H oil products + H coal products + H other energy = 41.7716151890517*H natural gas-1Others divided by natural gas. Fraction H natural gas. Sum of other fuels is used as comparison for natural gas
432020H raw coal + H natural gas + H coal products + H other energy = 96.6515588433253*H oil products-1Others divided by oil products. Sum of other fuels is used as comparison for oil products. Fraction H oil products
442020H raw coal + H natural gas + H oil products + H other energy = 9.45240021414551*H coal products-1Others divided by coal products. Fraction H coal products. Sum of other fuels is used as comparison for coal products
452020H heat = 4.45146745537653*H loss-1heat per loss. Fraction H loss. Amount of heat is used as comparison for loss
462020CP raw coal + CP natural gas + CP oil products = CP coal products + CP loss1Balance Coal Processing. In energy balance, inputs and outputs cancel out
472020CP natural gas + CP oil products = 0.00349890225051744*CP raw coal-1Others divided by raw coal. Fraction CP raw coal. Sum of other fuels is used as comparison for raw coal
482020CP oil products = 24.1033082706767*CP natural gas1oil products divided by natural gas. Fraction CP natural gas. Amount of oil products is used as comparison for natural gas
492020CP coal products = 6.34159395844515*CP loss1coal products per loss. Fraction CP loss. Amount of coal products is used as comparison for loss
502020Loss heat = 0.0298263751792101*H heat1Transmission loss heat. Known loss divided by production
512020Loss oil products = 0.833579527132038*TP oil products1Transmission loss oil products. Known loss divided by oil products used in TP
522020Loss electricity = 0.0852839003677908*TP electricity1Transmission loss electricity. Known loss divided by production
532020Loss natural gas = 0.414682168778854*H natural gas1Transmission loss natural gas. Known loss divided by natural gas used in H
542020Bought electricity + TP electricity = Loss electricity + Cons Agri electricity + Cons Ind electricity + Cons Transportation electricity + Cons Commerce electricity + Cons Households electricity1Electricity use balance. In energy balance, inputs and outputs cancel out
552020H heat = Loss heat + Cons Ind heat + Cons Commerce heat1Heat use balance. In energy balance, inputs and outputs cancel out
562020Cons Agri electricity = 29.723881181Consumed electricity agriculture
572020Cons Ind electricity = 9844.86290916521Consumed electricity industry
582020Cons Transportation electricity = 89.759572561Consumed electricity transportation
592020Cons Commerce electricity = 787.4107813951Consumed electricity commerce
602020Cons Households electricity = 719.1875288851Consumed electricity households
612020Cons Ind heat = 4173.839168368341Consumed heat industry
622020Cons Commerce heat = 1.9918399840651Consumed heat commerce
632020TP electricity = 11936.58679361Electricity produced by thermal power. Assumes that there is no capacity to increase production.
642020CP coal products = 6.214091155262591Coal products produced

There are no nonlinearities.