Power/Loss diagram

With the to [out=...,in=...] syntax one can make the corners smoother.

\documentclass[tikz,border=20pt]{standalone}
\usepackage{mathptmx}
\usepackage[outline]{contour}
\usetikzlibrary{calc,arrows.meta,patterns,backgrounds}

\begin{document}

\begin{tikzpicture}
\shade[left color=black!10, right color=black!80]
(0,0)-- ++(1,0) to [out=0,in=90] 
++(0.2,-0.25) --  ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{cus}(t)$}
-- ++(0.5,0.5) -- ++(-0.25,0) to [out=90,in=180] ++(0.3,0.5)-- ++(0.7,0)to [out=0,in=90]
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{fe}(t)$}
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=180] ++(0.3,0.5)-- ++(1.7,0)to [out=0,in=90] 
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{cur}(t)$}
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=180] ++(0.3,0.5)-- ++(1.7,0)to [out=0,in=90]
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{Perdas por atrito} 
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=180] ++(0.3,0.5)-- ++(0.7,0)to [out=0,in=90]
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{Outras perdas} 
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=180] ++(0.3,0.5)-- ++(0.7,0)-- 
++(0,-0.5)-- ++(1.5,1.5) node[anchor=west]{$P_o(t)$} -- ++(-1.5,1.5)-- ++(0,-0.5)-- (0,3.25)-- ++(0,-3.25);

\draw (0.0,1.5) node[anchor=east]{$P(t)$};
\draw[thick, dashed] (4.50,0)--(4.50,3.75) node[anchor=south]{Entreferro};
\draw[thick, dashed] (7.2,0.25)--(7.2,3.75) node[anchor=south]{$P_e(t)$};
\end{tikzpicture}

\end{document}

enter image description here

\documentclass[tikz,border=20pt]{standalone}
\usepackage{mathptmx}
\usepackage[outline]{contour}
\usetikzlibrary{calc,arrows.meta,patterns,backgrounds}

\begin{document}

\begin{tikzpicture}
\shade[left color=black!10, right color=black!80]
(0,0)-- ++(1,0) to [out=0,in=90] 
++(0.2,-0.25) --  ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{cus}(t)$}
-- ++(0.5,0.5) -- ++(-0.25,0) to [out=90,in=0] ++(-0.25,0.5)-- ++(1,0)to [out=0,in=90]
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{fe}(t)$}
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=0] ++(-0.25,0.5)-- ++(2,0)to [out=0,in=90] 
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{cur}(t)$}
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=0] ++(-0.25,0.5)-- ++(2,0)to [out=0,in=90]
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{Perdas por atrito} 
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=0] ++(-0.25,0.5)-- ++(1,0)to [out=0,in=90]
++(0.2,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{Outras perdas} 
-- ++(0.5,0.5)-- ++(-0.25,0)to [out=90,in=0] ++(-0.25,0.5)-- ++(1,0)-- 
++(0,-0.5)-- ++(1.5,1.5) node[anchor=west]{$P_o(t)$} -- ++(-1.5,1.5)-- ++(0,-0.5)-- (0,3.25)-- ++(0,-3.25);

\draw (0.0,1.5) node[anchor=east]{$P(t)$};
\draw[thick, dashed] (4.0,0)--(4.0,3.75) node[anchor=south]{Entreferro};
\draw[thick, dashed] (6.5,0.25)--(6.5,3.75) node[anchor=south]{$P_e(t)$};
\end{tikzpicture}

\end{document}

enter image description here


One could also just switch on and off rounded corners along the path. The advantage is that one does not need to know the angles of the path.

\documentclass[tikz,border=20pt]{standalone}
\usepackage{mathptmx}
\begin{document}
\begin{tikzpicture}
\shade[left color=black!10, right color=black!80]
    (0,0)[rounded corners]-- ++(1,0)[sharp corners]  --
    ++(0,-0.25)  -- ++(-0.25,0) -- ++(0.5,-0.5) node[anchor=north]{$P_{cus}(t)$} 
    -- ++(0.5,0.5)-- ++(-0.25,0)[rounded corners] -- ++(0,0.5)-- 
    ++(1,0)[rounded corners=0]--
    ++(0,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{fe}(t)$} -- ++(0.5,0.5)
    -- ++(-0.25,0)[rounded corners]-- ++(0,0.5)-- ++(2,0) [sharp corners]--
    ++(0,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{$P_{cur}(t)$} 
    -- ++(0.5,0.5)-- ++(-0.25,0)[rounded corners]-- ++(0,0.5)-- ++(2,0) [sharp corners]--
    ++(0,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{Perdas por atrito} -- ++(0.5,0.5)
    -- ++(-0.25,0)[rounded corners]-- ++(0,0.5)-- ++(1,0)[sharp corners]--
    ++(0,-0.25)-- ++(-0.25,0)-- ++(0.5,-0.5) node[anchor=north]{Outras perdas} -- ++(0.5,0.5)
    -- ++(-0.25,0)[rounded corners]-- ++(0,0.5)-- ++(1,0)[sharp corners]-- 
    ++(0,-0.5)-- ++(1.5,1.5) node[anchor=west]{$P_o(t)$} -- ++(-1.5,1.5)
    [rounded corners]-- ++(0,-0.5)[sharp corners]
    -- ++(-10.5,0)-- ++(0,-3.25);

    \draw (0.0,1.5) node[anchor=east]{$P(t)$};
    \draw[thick, dashed] (4.0,0)--(4.0,3.75) node[anchor=south]{Entreferro};
    \draw[thick, dashed] (6.5,0.25)--(6.5,3.75) node[anchor=south]{$P_e(t)$};
\end{tikzpicture}
\end{document}

enter image description here

Tags:

Tikz Pgf