| 1 |
\begin{tikzpicture} |
| 2 |
% font choice |
| 3 |
\renewcommand\rmdefault{txr}\rmfamily\footnotesize |
| 4 |
\sisetup{ |
| 5 |
round-mode=places, |
| 6 |
round-precision=1, |
| 7 |
add-decimal-zero, |
| 8 |
round-pad=true, |
| 9 |
} |
| 10 |
\begin{sankeydiagram} |
| 11 |
\colorlet{energy}{blue!30!cyan!80!black} |
| 12 |
\colorlet{lost energy}{red!50!orange!90!black} |
| 13 |
\sankeyset{ |
| 14 |
ratio=13em/100, |
| 15 |
minimum radius=1em, |
| 16 |
start style=simple,end style=simple, |
| 17 |
draw/.style={draw=none,line width=0}, |
| 18 |
energy/.style={ |
| 19 |
fill/.style={ |
| 20 |
draw=energy, |
| 21 |
line width=0, |
| 22 |
fill=energy, |
| 23 |
} |
| 24 |
}, |
| 25 |
lost energy/.style={ |
| 26 |
fill/.style={ |
| 27 |
draw=lost energy, |
| 28 |
line width=0, |
| 29 |
fill=lost energy, |
| 30 |
} |
| 31 |
} |
| 32 |
} |
| 33 |
|
| 34 |
\newcommand\abovelabel[2]{ % valname, label |
| 35 |
\node[anchor=south east,align=center,inner xsep=0] at (#1.left) {#2}; |
| 36 |
} |
| 37 |
|
| 38 |
\newcommand\energylabel[1]{ % valname |
| 39 |
\node[anchor=north east,text=energy,inner xsep=0] at (#1.right) |
| 40 |
{\num{\sankeygetnodeqty{#1}}}; |
| 41 |
} |
| 42 |
|
| 43 |
\newcommand\lostenergylabel[2]{ % valname, label |
| 44 |
\node[anchor=north,text=lost energy] at ([yshift=-2.5mm]#1.center) |
| 45 |
(value) |
| 46 |
{\num{\sankeygetnodeqty{#1}}}; |
| 47 |
\node[anchor=north,inner sep=0,align=center] at (value.south) {#2}; |
| 48 |
} |
| 49 |
|
| 50 |
\newcommand\lostenergylabelbottom[2]{ % valname, label |
| 51 |
\draw[draw=lost energy,dashed,thick] |
| 52 |
([yshift=-3mm]#1.center) coordinate (#1) -- ([yshift=-3mm]#1.center); |
| 53 |
\lostenergylabel{#1}{#2} |
| 54 |
} |
| 55 |
|
| 56 |
\sankeynode{name=Co,quantity=100.0} |
| 57 |
\path (Co.right) ++(0,-7mm) coordinate (c); |
| 58 |
|
| 59 |
\newcommand\turnandstop[2]{ % valname, label |
| 60 |
\begingroup |
| 61 |
\sankeyset{lost energy} |
| 62 |
\sankeyturnright{#1}{90} |
| 63 |
\sankeynode{as=#1,name=#1-stop,at={#1 |- c}} |
| 64 |
\sankeyoutin{#1}{#1-stop} |
| 65 |
\sankeynode{as=#1-stop,name=#1} |
| 66 |
\sankeyend{#1} |
| 67 |
\lostenergylabel{#1}{#2} |
| 68 |
\endgroup |
| 69 |
} |
| 70 |
|
| 71 |
\newcommand\turnandstopbottom[2]{ % valname, label |
| 72 |
\begingroup |
| 73 |
\sankeyset{lost energy} |
| 74 |
\sankeyturnright{#1}{90} |
| 75 |
\sankeynode{as=#1,name=#1-stop,at={#1 |- c}} |
| 76 |
\sankeyoutin{#1}{#1-stop} |
| 77 |
\sankeynode{as=#1-stop,name=#1} |
| 78 |
\sankeyend{#1} |
| 79 |
\lostenergylabelbottom{#1}{#2} |
| 80 |
\endgroup |
| 81 |
} |
| 82 |
|
| 83 |
\def\hshift{6.25em} |
| 84 |
|
| 85 |
\sankeyadvance[energy]{Co}{1.2*\hshift} |
| 86 |
\abovelabel{Co}{\textbf{Coal}\\(Primary energy)} |
| 87 |
\energylabel{Co} |
| 88 |
\sankeyfork{Co}{35/El1,65/Pg} |
| 89 |
\turnandstop{Pg}{Power generation} |
| 90 |
|
| 91 |
\sankeyadvance[energy]{El1}{1.8*\hshift} |
| 92 |
\abovelabel{El1}{\textbf{Electricity}\\(Secondary energy)} |
| 93 |
\energylabel{El1} |
| 94 |
\sankeyfork{El1}{33.5/El2,1.5/Tr} |
| 95 |
\turnandstopbottom{Tr}{Transmission} |
| 96 |
|
| 97 |
\sankeyadvance[energy]{El2}{.65*\hshift} |
| 98 |
\energylabel{El2} |
| 99 |
\sankeyfork{El2}{31.5/El3,2.0/Di} |
| 100 |
\turnandstop{Di}{Distribution} |
| 101 |
|
| 102 |
\sankeyadvance[energy]{El3}{.65*\hshift} |
| 103 |
\energylabel{El3} |
| 104 |
\sankeyfork{El3}{31.0/El4,0.5/Wi} |
| 105 |
\turnandstopbottom{Wi}{Wiring} |
| 106 |
|
| 107 |
\sankeyadvance[energy]{El4}{.65*\hshift} |
| 108 |
\abovelabel{El4}{\textbf{Electricity}\\(Final energy)} |
| 109 |
\energylabel{El4} |
| 110 |
\sankeyfork{El4}{3.0/Lr1,28.0/Lb} |
| 111 |
\turnandstop{Lb}{Lightbulb} |
| 112 |
|
| 113 |
\sankeyadvance[energy]{Lr1}{1.1*\hshift} |
| 114 |
\abovelabel{Lr1}{\textbf{Light radiation}\\(Useful energy)} |
| 115 |
\energylabel{Lr1} |
| 116 |
\sankeyfork{Lr1}{2.0/Lr2,1.0/Ls} |
| 117 |
\turnandstopbottom{Ls}{Lampshade} |
| 118 |
|
| 119 |
\sankeyadvance[energy]{Lr2}{.6*\hshift} |
| 120 |
\energylabel{Lr2} |
| 121 |
\sankeyfork{Lr2}{1.0/Il,1.0/Id} |
| 122 |
\turnandstop{Id}{Idle} |
| 123 |
|
| 124 |
\sankeyadvance[energy]{Il}{.6*\hshift} |
| 125 |
\abovelabel{Il}{\textbf{Illumination}\\(Energy services)} |
| 126 |
\energylabel{Il} |
| 127 |
\sankeyend[energy]{Il} |
| 128 |
\end{sankeydiagram} |
| 129 |
\end{tikzpicture} |