%----------------------- Template de Daniel Coelho (c/ ajuda de Lucas Carvalho) -------------------------
%		Dicas:
%		- Imagens em pdf resultam em menor tempo de compilação (mesmo em 1200 dpi)
%		- 
%		- 
%		- 
%		- 
%		- 
%--- Início das customizações ---------------------------------------------------------------------------
\PassOptionsToPackage{table}{xcolor}
\documentclass[12pt,twoside]{article}                   % Escolher [fonte, a4paper ou draft (rascunho)] artigo, livro, carta, ect.
% 												Command             10pt    11pt    12pt
% 												\tiny               5       6       6
% 												\scriptsize         7       8       8
% 												\footnotesize       8       9       10
% 												\small              9       10      10.95
% 												\normalsize         10      10.95   12
% 												\large              12      12      14.4
% 												\Large              14.4    14.4    17.28
% 												\LARGE              17.28   17.28   20.74
% 												\huge               20.74   20.74   24.88
% 												\Huge               24.88   24.88   24.88
%--- Pacotes essenciais ---------------------------------------------------------------------------
%\select@language{brazilian}
%\usepackage{fontspec}                              % Carregar fontes unicodes
\usepackage[english, french]{babel}                         % Escolher língua do documento
\usepackage[utf8]{inputenc}        			    % Permite caracteres especiais de acentuação
\usepackage[T1]{fontenc}
\usepackage{fancyvrb}
\usepackage{textcomp}
\usepackage{mathrsfs}
%\usepackage{lmodern}
\usepackage{mathpazo}
\usepackage{graphicx}                               % Permite adição de imagens
\usepackage[urlcolor=Black, pdfborder={0 0 0}]{hyperref}    % Altera a aparência dos hyper links (mais sóbria)
\usepackage{indentfirst}                % Espaçamento - Parágrafos
\usepackage{float}                      % Forçar texto após figura.
\usepackage{enumitem}                   % Enumerate with (i), (ii), ...
\usepackage{color,soul}      
% posso usar o
%\usepackage{xcolor} %também - highlight
\usepackage{soul}                       % highlight
\usepackage{soulutf8}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[headheight=15.5pt, top=2.5cm, bottom=2.5cm, left=2cm, right=2cm]{geometry}   % Delimitar margens 
\usepackage{lipsum}                     % Textos genéricos para testes
\usepackage{xargs}                      % Use more than one optional parameter in a new commands
\usepackage[pdftex,dvipsnames]{xcolor} 
\usepackage{xcolor} % Coloured text etc.
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[new]{old-arrows} % hook arrow
\usepackage[math]{blindtext}
\numberwithin{equation}{section}
\usepackage{etoolbox}
\BeforeBeginEnvironment{figure}{\vskip-1ex}
\AfterEndEnvironment{figure}{\vskip-1ex}
%-----box de partes-----------------------------------------------------------------
\usepackage[skins]{tcolorbox}
%-----box cinza pra soluções-----------------------------------------------------------------
\usepackage[noframe]{showframe}
\usepackage{framed}
\usepackage{lipsum}
\renewenvironment{shaded}{%
  \def\FrameCommand{\colorbox{shadecolor}}%\fboxsep=\FrameSep 
  \MakeFramed{\advance\hsize -1.0\width \FrameRestore\FrameRestore}}%
 {\endMakeFramed}
\BeforeBeginEnvironment{shaded}{\vskip0ex}
\AfterEndEnvironment{shaded}{\vskip-3ex}
\definecolor{shadecolor}{gray}{0.9}
\newenvironment{partbox}{%
  \def\FrameCommand{ \colorbox{slategray}}%\fboxsep=\FrameSep
  \MakeFramed{\advance\hsize-\width \FrameRestore\FrameRestore}}%
 {\endMakeFramed}
 \definecolor{partbox}{rgb}{0.44, 0.5, 0.56}
 \usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}
\definecolor{mycolor}{rgb}{0.27, 0.51, 0.71}
\usepackage{tcolorbox}
\newtcolorbox{mybox}{enhanced,width=5in,center upper,
    fontupper=\large\bfseries,drop fuzzy shadow southwest,
    boxrule=0.1pt,sharp corners,colframe=blue!10!white,colback=blue!10!white}
\newtcolorbox{partbox1}{enhanced,width=(.65\linewidth),center upper,
    fontupper=\large\bfseries,
    boxrule=0.1pt,sharp corners,colframe=slategray,colback=slategray}   
\newtcolorbox{solutionbox}{enhanced,width=(1.0\linewidth),drop fuzzy shadow southwest,boxrule=0.1pt,sharp corners,colframe=gray!3,colback=gray!3}
\BeforeBeginEnvironment{solutionbox}{\vskip.5ex}
\AfterEndEnvironment{solutionbox}{\vskip-.5ex}
\newtcolorbox{codebox}{enhanced,width=(1.0\linewidth),boxrule=0.0pt,sharp corners,colframe=cadet,colback=slategray}
\BeforeBeginEnvironment{codebox}{\vskip1.ex}
\AfterEndEnvironment{codebox}{\vskip-3ex}
% \newmdenv[innerlinewidth=0.5pt, roundcorner=4pt,linecolor=mycolor,innerleftmargin=6pt,
% innerrightmargin=6pt,innertopmargin=6pt,innerbottommargin=6pt]{mybox}
%--- Adicionando mais subdivisões com \paragraph e \subparagraph-----------------------------
\usepackage{titlesec}
\usepackage{hyperref}
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
\titleformat{\subsubsubsection}
  {\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
  {3.25ex \@plus1ex \@minus.2ex}%
  {-1em}%
  {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
  {3.25ex \@plus1ex \@minus .2ex}%
  {-1em}%
  {\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%-------- Flow Charts ------------------------------------------------------------------
\usepackage{tikz}
\usetikzlibrary{calc,shapes.geometric,arrows,positioning}
\tikzstyle{intt}=[draw,text centered,minimum size=6em,text width=5.25cm,text height=0.34cm]
\tikzstyle{intl}=[draw,text centered,minimum size=1em,text width=1cm,text height=0.3cm]
\tikzstyle{intm}=[draw,text centered,minimum size=1em,text width=2.25cm,text height=0.3cm]
\tikzstyle{int}=[draw,minimum size=2.5em,text centered,text width=3.5cm]
\tikzstyle{intg}=[draw,minimum size=3em,text centered,text width=6.cm]
\tikzstyle{sum}=[draw,shape=circle,inner sep=2pt,text centered,node distance=3.5cm]
\tikzstyle{summ}=[drawshape=circle,inner sep=4pt,text centered,node distance=3.cm]
%--- Ambiente python -----------------------------------------------------------------------
%\usepackage{listings} % Python code import - Ambiente de python
% % Default fixed font does not support bold face
% \DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{12} % for bold
% \DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{12}  % for normal
          \newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}
          \usepackage[parfill]{}   % "parskip" dentro - para tirar o esp. de parágrafo
          % Custom colors
          \usepackage{color}
          \DeclareFixedFont{\ttb}{T1}{mathpazo}{bx}{n}{12} % for bold
          \DeclareFixedFont{\ttm}{T1}{mathpazo}{m}{n}{12}  % for normal
          \definecolor{deepblue}{rgb}{0,0,0.5}
          \definecolor{deepred}{rgb}{0.6,0,0}
          \definecolor{deepgreen}{rgb}{0,0.5,0}
          \usepackage{listings}
          % Python style for highlighting -----------------
          \newcommand\pythonstyle{\lstset{
              language=Python,
              basicstyle=\footnotesize,
              otherkeywords={self},             
              keywordstyle=\footnotesize\color{deepblue},
              emph={__init__},          
              emphstyle=\footnotesize\color{deepred},    
              stringstyle=\color{deepgreen},
              frame=single,                         
              showstringspaces=false  ,
              breaklines=true,
              numbers=left,
              numberstyle=\small,
              tabsize=3,
              breakatwhitespace=false
          }}
          % \newcommand\pythonstyle{\lstset{
          % language=Python,
          % basicstyle=\ttm,
          % otherkeywords={self},             % Add keywords here
          % keywordstyle=\ttb\color{deepblue},
          % emph={MyClass,__init__},          % Custom highlighting
          % emphstyle=\ttb\color{deepred},    % Custom highlighting style
          % stringstyle=\color{deepgreen},
          % frame=tb,                         % Any extra options here
          % showstringspaces=false            % 
          % }}
          % Python environment
          \lstnewenvironment{python}[1][]
          {
          \pythonstyle
          \lstset{#1}
          }
          {}
          % Python for external files
          \newcommand\pythonexternal[2][]{{
          \pythonstyle
          \lstinputlisting[#1]{#2}}}
          % Python for inline
          \newcommand\pythoninline[1]{{\pythonstyle\lstinline!#1!}}
          
          
          
%\renewcommand{\ttdefault}{pcr}
\usepackage{inconsolata}
%\renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style          
          
\usepackage{listings}
\usepackage{color}
\definecolor{cadet}{rgb}{0.33, 0.41, 0.47}
\definecolor{default}{rgb}{1,1,1}
\definecolor{numbcolor}{rgb}{0,0,0}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.15,0.38,0.61}
\definecolor{aquamarine}{rgb}{0.5, 1.0, 0.83}
\definecolor{pastelmagenta}{rgb}{0.96, 0.6, 0.76}
\definecolor{paleaqua}{rgb}{0.78, 0.88, 0.98}
\definecolor{slategray}{rgb}{0.40, 0.45, 0.51}
\definecolor{ff}{rgb}{0.161, 0.5215, 0.4624}
\lstdefinestyle{mystyle}{
    backgroundcolor=\color{slategray},   
    frame=none,
    commentstyle=\color{paleaqua},
    keywordstyle=\color{pastelmagenta},
    numberstyle=\footnotesize\color{numbcolor},
    stringstyle=\color{aquamarine},
    basicstyle=\ttfamily\normalsize\color{default},
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                                     
    numbers=left,    
    numbersep=4pt,
    stepnumber=1,
    showspaces=false,
    keepspaces=false,
    showstringspaces=false,
    showtabs=true,                  
    tabsize=2,
    prebreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
    rulecolor=\color{backcolour}
}
 
\lstset{style=mystyle}    
%------------------------------------------------------------------------------------------ 
          \usepackage[colorinlistoftodos,prependcaption,textsize=normalsize, textwidth=3.0cm]{todonotes}
          \newcommandx{\balao}[2][1=]{\todo[linecolor=red,backgroundcolor=red!25,bordercolor=red,#1]{#2}}
          \newcommandx{\change}[2][1=]{\todo[linecolor=blue,backgroundcolor=blue!25,bordercolor=blue,#1]{#2}}
          \newcommandx{\info}[2][1=]{\todo[linecolor=OliveGreen,backgroundcolor=OliveGreen!25,bordercolor=OliveGreen,#1]{#2}}
          \newcommandx{\improvement}[2][1=]{\todo[linecolor=Plum,backgroundcolor=Plum!25,bordercolor=Plum,#1]{#2}}
          \newcommandx{\thiswillnotshow}[2][1=]{\todo[disable,#1]{#2}}
%           \usepackage{amsmath}
%           \usepackage{MnSymbol}
          \usepackage{wasysym} 
%---------- Alterar nome do sumário, lista de figuras e figuras ---------------------------------------
\addto\captionsenglish{% Replace "english" with the language you use
  \renewcommand{\contentsname}%
    {Sumário}}
\addto\captionsenglish{%
   \renewcommand\listfigurename{Lista de Figuras}}
\addto\captionsenglish{\renewcommand{\figurename}{Figura}}
\addto\captionsenglish{\renewcommand{\tablename}{Tabela}}
\addto\captionsenglish{\renewcommand{\partname}{Parte}}
\addto\captionsfrench{% Replace "french" with the language you use
  \renewcommand{\contentsname}%
    {Sumário}}
\addto\captionsfrench{%
   \renewcommand\listfigurename{Lista de Figuras}}
\addto\captionsfrench{\renewcommand{\figurename}{Figura}}
\addto\captionsfrench{\renewcommand{\tablename}{Tabela}}
\addto\captionsfrench{\renewcommand{\partname}{\color{paleaqua}Parte}}
\addto\captionsfrench{\renewcommand{\refname}{Referências}}
\usepackage[labelsep=quad]{caption}
%- Cabeçalho e rodapé -----------------------------------------------------------
\usepackage{blindtext}
\usepackage{fancyhdr}
% \fancyhead[R]{\leftmark}
% \fancyhead[C,L]{}
% \fancyfoot[R]{\thepage}
% \fancyfoot[C]{}
% \fancyfoot[L]{\textit{Trabalho sobre Trocadores de Calor}}
% \renewcommand{\footrulewidth}{0.4pt}
% \fancypagestyle{plain}{%
% \fancyhf{}
% \fancyfoot[R]{\thepage}
% \fancyfoot[C]{\textit{thesistitle}}
% \renewcommand{\headrulewidth}{0pt}
% \renewcommand{\footrulewidth}{0.4pt}}
% \pagestyle{fancy}   %%<----------- this added
\usepackage{etoolbox}
%\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}%to make chapter's first page fancy
\usepackage{fancyhdr}%to add horizental link to header&foofter
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[LE,RO]{\thepage}
\fancyhead[RE]{\footnotesize\itshape Trabalho sobre Trocadores de Calor}      
\fancyhead[LO]{\leftmark}
\renewcommand{\footrulewidth}{0.2pt}%the widht of foot line
\renewcommand{\headrulewidth}{0.2pt}%the widht of header line
%==========to make chapter title fancy===========%
% \usepackage{titlesec}
% \makeatletter%to make chapter titles fancy
% \titleformat{\chapter}[frame]
% {\normalfont}{\filright\enspace \@chapapp~\thechapter\enspace}
% {20pt}{\normalsize\bfseries\filcenter}%20pt the small line that close the box
% \titlespacing*{\chapter}
% {0pt}{-20pt}{20pt}%{}{between header and box}{space after box}
% \makeatother
%==========Custmizing plain page style==========%
\fancypagestyle{plain}{
\fancyhf{} %Clear Everything.
\fancyfoot[L]{\thepage} %Page Number
\renewcommand{\headrule}{\hrule height 0pt \vspace{0mm}\hrule height 0pt}
\renewcommand{\footrulewidth}{0.pt}
\fancyfoot[C]{}
\fancyfoot[R]{}
\fancyhead[LE]{}
\fancyhead[RO]{}
}
%%%%%%
%====to remove the header====
\fancypagestyle{nofooter}{%
\fancyfoot{}%
}
\fancypagestyle{noheader}{%
\fancyhead{}%
}
%- Cabeçalho e rodapé -----------------------------------------------------------
% \usepackage{kantlipsum}
% \usepackage{fancyhdr}
% \pagestyle{fancy}
% \fancypagestyle{mypagestyle}{%
% \fancyhf{}
% \fancyfoot[LO,RE]{\thepage}
% \fancyhead[LO]{\itshape \textcolor{gray}{Trabalho sobre Trocadores de Calor}}
% \fancyhead[RE]{\itshape\textcolor{gray}{ Departamento de Engenharia Mecânica}}}
% \pagestyle{mypagestyle}
% \renewcommand{\headrulewidth}{0.1pt}          % Caso não deseje uma linha {0.0pt}
% \renewcommand{\footrulewidth}{0.1pt} 
% \definecolor{lightgray}{gray}{0.2}  
% \newcommand\VRule{\color{blue}\vrule width 0.5pt}            % Cor da linha
%- Adicionar "Parte" -----------------------------------------------------------
\renewcommand{\today}{\ifnum\number\day<10 0\fi \number\day \space%
\ifcase \month \or January\or February\or March\or April\or May%
\or June\or July\or August\or September\or October\or November\or December\fi,%
\number \year} 
%- Adicionar "Parte" -----------------------------------------------------------
\usepackage{tocloft}                          % Adicionar "parte"
% \makeatletter
% \@addtoreset{section}{part}  Faz com q resete a ordem dos cap a/p de nova parte
% \makeatother
\newlength\mylen
\renewcommand\thepart{\Roman{part}}
\renewcommand{\cftpartpresnum}{\color{default}}
\settowidth\mylen{\bfseries\cftpartpresnum}
\addtolength\cftpartnumwidth{\mylen}
%\renewcommand{\cftdot}{}                     % Adicionando "..." ao sumário
%\renewcommand{\cftpartleader}{\cftdotfill{\cftdotsep}} % for parts
% \renewcommand{\cftdotsep}{0}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} 
% \renewcommand{\cftsubsecleader}{\cftdotfill{0}} 
% \renewcommand{\cftsubsubsecleader}{\cftdotfill{0}} 
% \renewcommand{\cftsubsubsubsecleader}{\cftdotfill{0}} 
%-------------------------------------------------------------------------------------------------------------------------------------------------------------------
%                 !!!!!!!!!!     BEGIN DOCUMENT	   !!!!!!!!!!
%------------------------------------------------------------------------------------------------------------------------------------------------------------------
\begin{document}
%\inputencoding{utf8}
%---------------------------------------------------------------------------------
%\usepackage[obeyDraft]{todonotes}%
\begin{titlepage}
\newcommand{\HRule}{\rule{\linewidth}{0.1mm}} % Defines a new command for the horizontal lines, change thickness here
\center % Center everything on the page
%------------------------------------------------------------------------------
%	                          1ª seção de LOGO
%------------------------------------------------------------------------------
\begin{minipage}{0.44\textwidth}
\includegraphics[width=7.0cm]{Logos/uerj-fen.png} % \\[4.0cm]Include a department/universitylogo - this will require the graphicx package 
\end{minipage}
\begin{minipage}{0.55\textwidth}
\begin{flushleft}
\textsc{\Large Universidade do Estado}\\[0.2cm]\textsc{{\Large do Rio de Janeiro}}\\[0.2cm]{{\large Faculdade de Engenharia}}\\[0.1cm]{{\large Departamento de Engenharia Mecânica}}
\end{flushleft}
\end{minipage}\\[5cm]
%------------------------------------------------------------------------------
%	                    Título e subtítulo, autor, data, ect
%-----------------------------------------------------------------------------
%\textsc{\LARGE Universidade do Estado do Rio de Janeiro}\\[3cm] % Name of your university/college
\textsc{\large Trabalho de Transmissão de Calor II sobre} % Major heading such as course name
% \textsc{\large Minor Heading}\\[0.5cm] % Minor heading such as course title
%------------------------------------------------------------------------------
%	                             Seção de título
%------------------------------------------------------------------------------
\HRule \\[0.4cm]
% {\huge \bfseries Trabalho:}\\[0.08cm]
\begin{partbox1}
{\bfseries\Huge\color{paleaqua}{Trocadores de calor}}\\[0.25cm] % Title of your document
% \HRule \\[1.0cm]
%Mathematical Biology - J.D. Murray, 1989
\end{partbox1}
%----------------------------------------------------------------------------------------
%	                              Seção de Autor
%----------------------------------------------------------------------------------------
\vfill {
\begin{minipage}{1.0\textwidth}
\begin{flushright} \large
\textbf{Alunos}:\\
Daniel Lessa \textsc{Coelho}\\
Douglas \textsc{Amaral}\\% Your name
% Lucas Carvalho \textsc{Sousa} % Your name
\textbf{Prof.}: \\
Gustavo \textsc{Rabello}
\end{flushright}
\end{minipage}
~
\begin{minipage}{0.0\textwidth}
\begin{flushright} \large
\emph{}
 % Your name
% 201320520111 % Your name
\end{flushright}
\end{minipage}\\[0.4cm]
\begin{minipage}{.5\textwidth}
\begin{flushright}
% \begin{flushleft} \large
% \emph{\textbf{Professor:}} \\
% José Roberto Moraes \textsc{D'almeida} % Supervisor's Name
\end{flushright}
\end{minipage}
~
\begin{minipage}{0.5\textwidth}
\begin{flushleft} \large
% \textbf{Professor}: \\
% José Roberto Moraes \textsc{D'almeida} % Supervisor's Name
\end{flushleft}
\end{minipage}\\[0.5cm]
% If you don't want a supervisor, uncomment the two lines below and remove the section above
%\Large \emph{Author:}\\
%John \textsc{Smith}\\[3cm] % Your name
}
%----------------------------------------------------------------------------------------
%	Seção de Data
%----------------------------------------------------------------------------------------
%\large Dia da semana do mês}
{13 de Março de 2018} % Date, change the \today to a set date if you want to be precise	
%\@date{21.~October 2041}
%----------------------------------------------------------------------------------------
%	Seção de LOGO ( Caso deseje colocar abaixo do título )
%----------------------------------------------------------------------------------------
%\includegraphics[width=6cm]{Logos/UERJ.png}\\[1cm] % Include a department/university logo - this will require the graphicx package
%----------------------------------------------------------------------------------------
%\vfill % Fill the rest of the page with whitespace
\end{titlepage}
%------------------------------------------------------------------------------------------
% \vfill
% \vspace{0.5\textheight}
% \textit{Agradeço ...}
%-------------------------------------------------------------------------------------------------------------------------------------------------------------------
\thispagestyle{empty}  % remover o nº da página do sumário
\vspace*{\stretch{5}}
\begin{minipage}[t]{0.5\textwidth}
\raggedright
\begin{flushleft}
Trabalho realizado para a disciplina de Transmissão de Calor II como segunda avaliação.
\end{flushleft}
\end{minipage}
\clearpage
\tableofcontents
\listoffigures
% \listoffigures
\thispagestyle{empty}  % remover o nº da página do sumário
% \clearpage
\clearpage
%------ Primeira Parte ------------------------------------------------------------------------------------		
% \thispagestyle{empty}
% \noindent Os problemas resolvidos aqui podem ser encontrados nas notas de aula sobre trocador de calor (\href{http://www.gesar.uerj.br/media/pdf/courses/transcal2/heatExchanger.pdf}{pdf}$\hookleftarrow$), onde se realiza uma análise discreta do mesmo. Portanto, os dados utilizados aqui são os mesmos encontrados nas notas e as comparações dizem respeito a literatura indicada, inclusa nas referências. 
% \clearpage
\setcounter{page}{1} % Set the page counter to 1
\begin{partbox1}
\part[Tipos de Trocadores]{\textcolor{paleaqua}{Tipos de Trocadores}} 
\end{partbox1}
\noindent Os trocadores de calor são dispositivos que permitem a troca de calor entre dois fluidos escoando a temperaturas distintas. Essa troca se dá através da parede sólida do tubo que separa os escoamentos e é em função do sentido destes que se classificam os trocadores, concêntricos e de um passe, estudados a seguir: os de corrente paralela e os contra correntes.\\
%--- Seção ------------------------------------------------------------------------------------------
\section{Problema 1: \textit{Cálculo das temperaturas de saída}}
\noindent Neste exemplo, deseja-se calcular as temperaturas de saída dos fluido de processo $(T_{saip})$ e serviço $(T_{sais})$ conhecendo algumas caracteíristicas do trocador de correntes paralelas:
\begin{itemize}[label=$\bullet$]
\item Coeficiente global de transfviadoerência de calor $U = 1200[J]/[s][m^{2}][K]$
\item Comprimento do trocador $L = 150[m]$
\item Diâmetro do tudbo do trocador $D = 0.015[m]$
\end{itemize}
\noindent Além das características do trocador, sabe-se também:\\
\\
\noindent Água - fluido de serviço;
\begin{itemize}[label=$\bullet$]
\item Temperatura de entrada $T_{ents} = 110[K]$
\item Capacidade térmica $cp_{s} = 4180[J]/[kg][K]$
\item Fluxo de massa $\dot{m}_{s} = 2.0[kg]/[s]$
\end{itemize}
\noindent Químico - fluido de processo;
\begin{itemize}[label=$\bullet$]
\item Temperatura de entrada $T_{entp} = 20[K]$
\item Capacidade térmica $cp_{p} = 1800[J]/[kg][K]$
\item Fluxo de massa $\dot{m}_{p} = 3.0[kg]/[s]$
\end{itemize}
\section*{Correntes Paralelas}
\addcontentsline{toc}{section}{Correntes Paralelas}
\noindent Nessa configuração, os fluidos quente e frio entram na mesma extremidade ($x = 0$) do trocador e o deixam, também, na mesma extremidade ($x = L$). Portanto, o escoamento de ambos ocorrem no {\itshape mesmo sentido}.
% * <douglaslopes54@yahoo.com.br> 2018-03-10T17:16:20.406Z:
%
% ^.
\subsection{Esquema e malha}
\begin{figure}[H]
	\vspace{-1.4em}
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/trocadorparalelo.png}
    \vspace{-2em}
    \caption{Esquema de trocador de calor.}
    \vspace{-0.5em}
\end{figure}
\begin{figure}[H]
	\vspace{-2.em}
    \centering
    \includegraphics[height=0.65\linewidth, angle=90]{Figures/pa.pdf}
    \vspace{-2em}
    \caption{Malha do trocador de calor.}
    \vspace{-0.5em}
\end{figure}
\clearpage
\subsection{Código em {\itshape Python}}
\lstinputlisting[language=Python]{Codigos/TrocadorParalelo.py}
\clearpage
\subsection{\textit{Solução numérica}}
Abaixo, os gráficos obtidos pela biblioteca \textit{matplotlib} através do python.
\begin{figure}[H]
    \begin{subfigure}{.5\textwidth}
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/Paralelo3.pdf}
    \caption{3 elementos.}
    \end{subfigure}
    \begin{subfigure}{.5\textwidth}
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/Paralelo20.pdf}
    \caption{20 elementos.}
    \end{subfigure}
    \caption{Distribuição de temperatura de um trocador de calor de correntes paralelas.}
\end{figure}
\clearpage
\section*{Contra-Corrente}
\addcontentsline{toc}{section}{Contra-Corrente}
\noindent Nessa configuração, os fluidos quente e frio entram e deixam o trocador em extremidades opostas. Portanto, o escoamento de ambos ocorrem em {\itshape sentidos contrários}.
\subsection{Esquema e malha}
\begin{figure}[H]
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/trocadorcc.png}
    \caption{Esquema de trocador de calor contra corrente.}
\end{figure}
\begin{figure}[H]
	\vspace{-1.em}
    \centering
    \includegraphics[height=0.65\linewidth, angle=90]{Figures/cc.pdf}
    \vspace{-2em}
    \caption{Malha do trocador de calor contracorrente.}
    \vspace{-.5em}
\end{figure}
\clearpage
%\textcolor{white}{cateroide viado} \\[1.cm]
\subsection{Código em \textit{Python}}
\lstinputlisting[language=Python]{Codigos/Trocadorcontracorrente.py}
\clearpage
\subsection{\textit{Solução numérica}}
\begin{figure}[H]
    \begin{subfigure}{.5\textwidth}
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/contracorrente3.pdf}
    \caption{3 elementos.}
    \end{subfigure}
    \begin{subfigure}{.5\textwidth}
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/contracorrente20.pdf}
    \caption{20 elementos.}
    \end{subfigure}
    \caption{Distribuição de temperatura de um trocador de calor contra-corrente.}
\end{figure}
\section*{Comparações}
\addcontentsline{toc}{section}{Comparações}
\noindent Embora o cálculo de $\Delta T_{lmtd}$ só seja possível se nós conhecermos, previamente, três temperaturas e/ou, equivalentemente, a troca de calor $Q$ envolvida no processo, podemos comparar a eficiência desses dois tipos de trocadores..
\noindent As perdas foram desconsideradas nos problemas acima e portanto, a quantidade de calor $Q_{trocada}$ cedida pelo fluido de trabalho (água) para o  fluido de processo (químico) pode ser calculada como:
\begin{equation}
\dot{Q}_{trocada} = \underbrace{\dot{m}_{ff}c_{pff}(T_{out/ff}-T_{ff})}_{Fluido\;de\; processo} = \underbrace{\dot{m}_{fq}c_{pfq}(T_{fq}-T_{out/fq})}_{Fluido\; de\; servi\mbox{\footnotesizeç}o}
\label{eq1}
\end{equation}
\noindent Onde:
\begin{align*}
& T_{out/ff} = \mbox{\ttfamily{temp[npt-1]}}\; (ambos)\\
&T_{out/fq} = \mbox{\ttfamily{temp[nel]}}\; (paralelo)\; e\; T_{out/fq} = \mbox{\ttfamily{temp[0]}}\; (contracorrente)\\
\end{align*}
Utilizando a equação \ref{eq1} e as dados explicitados no código para os dois casos, temos:
\begin{itemize}
\item[] Paralelo:
\begin{equation*}
\dot{Q}_{trocada/P} = 273.020313355\;\mbox{kW}
\end{equation*}
\item[] Contra-corrente:
\begin{equation*}
\dot{Q}_{trocada/CC} = 329.28785435\;\mbox{kW}
\end{equation*}
\item[] Eficiência
\begin{equation*}
\eta = \frac{\dot{Q}_{trocada/CC}}{\dot{Q}_{trocada/P}}-1 \approx 0.2060928738 \approx 20,6\%
\end{equation*}
\end{itemize}
\noindent Os resultados nos levam a concluir que o trocador contra corrente fornece uma quantidade de calor trocada maior para um mesmo $L$, ou seja, é em torno de 20,6\% mais eficiente que o trocador de calor de correntes paralelas.
\noindent Os valores foram retirados da solução numérica de ambos os casos com discretização em 1000 elementos. Apenas a título de precisão, abaixo está o gráfico:
\begin{figure}[H]
    \begin{subfigure}{.5\textwidth}
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/Paralelo1000.pdf}
    \caption{Correntes paralelas.}
    \end{subfigure}
    \begin{subfigure}{.5\textwidth}
    \centering
    \includegraphics[width=1.0\linewidth, angle=0]{Figures/contracorrente1000.pdf}
    \caption{Contra-corrente.}
    \end{subfigure}
    \caption{Distribuição de temperatura nos trocadores paralelo (a) e contra corrente (b).}
\end{figure}
\clearpage
\section{Problema 2: \textit{Dimensionamento de um Trocador}}
\noindent Um trocador de calor contra corrente casco-tubo (tubo duplo) deve aquecer a água de $20$º$C$ a $80$º$C$ a uma vazão mássica  $\dot{m} = 1.2 kg/s$. O aquecimento é obtido por água geotérmica disponível à $160$º$C$ com vazão mássica $\dot{m} = 2 kg/s$. O tubo interno tem uma parede fina de diâmetro $D = 1.5 cm$. Considerando que o coeficiente global de transferência de calor do trocador é $U = 640 W/m^{2}K$, determine o comprimento $L$ do trocador de calor necessário para alcançar o aquecimento desejado e obtenha a distribuição de temperatura dos dois fluidos ao longo do trocador de calor através de análise discreta.\\ 
\begin{itemize}[label=$\bullet$]
\item $D = 0.015[m]$
\item $U = 640W/m^{2}K$
\end{itemize}
\noindent Água - fluido de trabalho;
\begin{itemize}[label=$\bullet$]
\item $T_{entt} = 20$º$C$
\item $T_{sait} = 80$º$C$
\item $\dot{m}_{t} = 1.2[kg]/[s]$
\item $cp_{t} = 4180[J]/[kg][K]$
\end{itemize}
\noindent Água geotérmica - fluido de serviço;
\begin{itemize}[label=$\bullet$]
\item $T_{ents} = 160$º$C$
\item $cp_{s} = 4310[J]/[kg][K]$
\item $\dot{m}_{s} = 2.0[kg]/[s]$
\end{itemize}
\subsection{Código em {\itshape Python}}
A equação para o cálculo analítico de $L$ considerando os dados do problema segue abaixo:
\begin{equation} 
Q_{trocada}=UA\Delta T_{lmtd}\quad \mbox{onde}\quad A = \pi DL\quad\Rightarrow\quad \boxed{L=\frac{Q_{trocada}}{U\pi D\Delta T_{lmtd}}}
\end{equation}
Na resolução desse exercício, tomamos a liberdade de excluir os comentários que apenas indicariam os \textit{inputs}, funções e matrizes apresentadas nos código anteriores. A versão simplificada é: 
\lstinputlisting[language=Python]{Codigos/dimensionamento.py}
\subsection{Resultado: {\itshape analítico} vs. {\itshape numérico}}
O \textit{output} abaixo foi obtido para o código acima, que contempla o resultado analítico e o compara com o numérico.
\begin{solutionbox}
\begin{verbatim}
Comprimento L escolhido aleatoriamente para inicio das iteracoes: 163 m
Qual o numero de elementos? 1000
Numero de pontos da malha: 2002
Media logaritmica das diferencas de temperatura: 91.9734467186
Temperatura de saida do fluido quente (Toutfq): 125.085846863 K
Numero de iteracoes necessarias: 53
Erro absoluto: 8.70358007887e-09
--- Comprimento do Trocador CC (analitico): 108.498868851 m ---
--- Comprimento do Trocador CC (numerico): 108.498868175 m ---
Quantidade de calor trocada é: 300.960000044 kW
\end{verbatim}
\end{solutionbox}
\section{Dificuldades}
\noindent O maior dos problemas foi a aprendizagem em \textit{python} sem o contato prévio com a linguagem ao longo do curso de engenharia mecânica.
%--- FIM ---------------------------------------------------------------
\nocite{*}
\bibliography{ref}
\bibliographystyle{unsrt}
\end{document}
\end{document}