Skip to content

Commit

Permalink
add thermodynamics. fix fvm
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat committed Feb 26, 2020
1 parent 5e4afa0 commit 5a7f07a
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 14 deletions.
42 changes: 42 additions & 0 deletions footmult.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{custom}[2013/01/13 Custom Package]

\RequirePackage{alphalph}
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
*%
\or % 2
\dagger
\or % 3
\ddagger
\or % 4
\mathsection
\or % 5
\mathparagraph
\or
\diamond
\or
\aleph
\or
\backepsilon
\or
\flat
\else % >= 7
\@ctrerr
\fi
}%
}
\makeatother

\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
% remove upper boundary by multiplying the symbols if needed

\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}
Binary file modified fvm/fvm_itba.pdf
Binary file not shown.
24 changes: 22 additions & 2 deletions fvm/fvm_itba.tex
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ \subsection{La matriz \texttt{vecindario}}

\begin{figure}[htb!]
\centering
\includegraphics[width=5cm]{fig/nsew.eps}
\includegraphics[width=5cm]{fig/nsew.eps}
\caption{Orientaciones en 2D}
\label{fig:nsew}
\end{figure}
Expand All @@ -79,7 +79,7 @@ \subsection{La matriz \texttt{vecindario}}

Se necesita obtener la matriz \texttt{vecindario} que tiene una fila por cada volumen indicando cada uno de sus vecinos y su posición respecto al volumen en cuestión. Identificaremos los bordes aislados con un $0$, los bordes calientes ($T_H$ aplicada) con un $-1$ y los bordes fríos ($T_C$) con $-2$. Para facilitar el armado de \texttt{vecindario} (y que resulte más visual lo que se está haciendo) se podría armar una matriz del dominio. Para el ejemplo tendría la forma:
\begin{equation*}
\begin{bmatrix}
\texttt{dominio} = \begin{bmatrix}
0 &-1 &-1 &-1 & 0 \\
0 & 1 & 3 & 5 & 0 \\
0 & 2 & 4 & 6 & 0 \\
Expand All @@ -102,6 +102,26 @@ \subsection{La matriz \texttt{vecindario}}
\end{bmatrix}_{\Nvol\times\Ndir}
\end{equation}
osea que los \texttt{vecinos} del volumen 2 son $[1\ms 0\ms 4\ms-2]$. $\Nvol$ es la cantidad de volúmenes y $\Ndir$ es la direccionalidad del problema, en este caso tenemos 4 direcciones porque es un problema plano. Para problemas 3D se tienen 6 direcciones incluyendo las direcciones arriba y abajo [U,N,W,E,S,D].
\clearpage
\begin{lstlisting}[caption = {Armado de la matriz \texttt{vecindario} a partir de la matriz \texttt{dominio}}]
Nvol = max(max(dominio)); % Cantidad de volumenes
[Ny, Nx] = size(dominio(2:end-1,2:end-1));
vecindario = zeros(Nvol,4);
for i=2:Ny+1
y = (i-2)*dy; % Se pueden calcular las coordenadas
for j=2:Nx+1
x = (j-2)*dx; % coordenada x
v = dominio(i,j);
if v<1
continue
end
vecindario(v,1) = dominio(i-1,j);
vecindario(v,2) = dominio(i+1,j);
vecindario(v,3) = dominio(i,j+1);
vecindario(v,4) = dominio(i,j-1);
end
end
\end{lstlisting}

\subsection{Formulación para el método de volúmenes finitos}
Una vez que conocemos el vecindario de los volúmenes se necesita saber que esquema se va aplicar. En este texto se va tratar el esquema implícito o \textit{Euler Backward}.
Expand Down
Binary file not shown.
82 changes: 70 additions & 12 deletions termodinamica/main.tex → termodinamica/termo_itba.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
\documentclass{article}
\usepackage[utf8]{inputenc}
%\usepackage[utf8]{inputenc}

\usepackage[spanish,mexico]{babel}
\usepackage{graphicx}
\graphicspath{{./fig/}}
\usepackage[a4paper,top=2cm,bottom=2cm,left=2cm,right=2cm,marginparwidth=1.75cm,headheight=28pt]{geometry}
\usepackage[utopia]{mathdesign}
\usepackage{graphicx}



%% MATH
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage{cancel}
Expand All @@ -12,7 +19,7 @@
\newcommand{\ctegas}{k}
\newcommand{\cte}{\textrm{cte}}
\newcommand{\cp}{c_{p}}
\newcommand{\cv}{c_{v}}
\newcommand{\cv}{c_{\text{v}}}
\newcommand{\snaught}{s^{0}}
\newcommand{\agitacion}{\textrm{Agit.}}
\newcommand{\inicial}{i}
Expand Down Expand Up @@ -43,6 +50,54 @@
\mathchardef\mhyphen="2D
\newcommand{\hyph}{\,\mhyphen}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}

%% FOOTNOTE
%%%%%%%%%%%%%
% FOOTNOTES %
%%%%%%%%%%%%%
% \usepackage{footmult}
\makeatletter
\newcommand*{\myfnsymbolsingle}[1]{%
\ensuremath{%
\ifcase#1% 0
\or % 1
*%
\or % 2
\dagger
\or % 3
\ddagger
\or % 4
\mathsection
\or % 5
\mathparagraph
\or
\diamond
\or
\aleph
\or
\backepsilon
\or
\flat
\else % >= 7
\@ctrerr
\fi
}%
}
\makeatother

\newcommand*{\myfnsymbol}[1]{%
\myfnsymbolsingle{\value{#1}}%
}
% remove upper boundary by multiplying the symbols if needed
\usepackage{alphalph}
\newalphalph{\myfnsymbolmult}[mult]{\myfnsymbolsingle}{}
\renewcommand*{\thefootnote}{%
\myfnsymbolmult{\value{footnote}}%
}




\begin{document}

\maketitle
Expand Down Expand Up @@ -202,7 +257,7 @@ \subsection{Expansión con roce constante}
Se puede entonces concluir que para roce constante $W_{\textrm{roce}}>0$.

\section{Ciclos Fríos}
Un ciclo frió tiene la virtud de ocurrir a $\ctegas$ constante, o mejor dicho, $c_p$ y $c_v$ constante (\textit{gas perfecto}). En este documento se van a tratar ciclos cerrados \textit{estándares}\footnote{Reversibles} con gases ideales.
Un ciclo frió tiene la virtud de ocurrir a $\ctegas$ constante, o mejor dicho, $\cp$ y $\cv$ constante (\textit{gas perfecto}). En este documento se van a tratar ciclos cerrados \textit{estándares}\footnote{Reversibles} con gases ideales.

Como sabemos, la ley para gases ideales es:
\begin{equation}
Expand All @@ -217,14 +272,14 @@ \section{Ciclos Fríos}
\frac{T_\final}{T_\inicial} = \left[ \frac{p_\final}{p_\inicial}\right]^{\frac{\ctegas-1}{\ctegas}} \qquad\qquad\qquad \frac{T_\final}{T_\inicial} = \left[ \frac{V_\inicial}{V_\final} \right]^{\ctegas-1}\!\!
\end{equation}

donde $\ctegas=\frac{c_p}{c_v}$ es constante.\footnote{Se hace énfasis que $\ctegas$ es constante para ciclos fríos por tratarse de gases ideales.} En el caso que $c_p$ o $c_v$ no fueran constantes en el trayecto se tiene que recurrir a una tabla para efectuar cálculos con
donde $\ctegas=\frac{\cp}{\cv}$ es constante.\footnote{Se hace énfasis que $\ctegas$ es constante para ciclos fríos por tratarse de gases ideales.} En el caso que $\cp$ o $\cv$ no fueran constantes en el trayecto se tiene que recurrir a una tabla para efectuar cálculos con
\[
\frac{p^a(T_\final)}{p^a(T_\inicial)}=\frac{p_\final}{p_\inicial}\qquad \qquad \qquad \frac{v^a(T_\final)}{v^a(T_\inicial)}=\frac{v_\final}{v_\inicial}
\]

En los trayectos verticales del diagrama $p-V$ existe solo intercambio de calor dado que es a \textit{volumen constante.} Para calcular el calor se puede optar por usar $c_v$, también conocido como el \textit{calor especifico a volumen constante}.
En los trayectos verticales del diagrama $p-V$ existe solo intercambio de calor dado que es a \textit{volumen constante.} Para calcular el calor se puede optar por usar $\cv$, también conocido como el \textit{calor especifico a volumen constante}.
\[
Q_{\inicial\hyph\final} = c_v (T_\final - T_\inicial)
Q_{\inicial\hyph\final} = \cv (T_\final - T_\inicial)
\]
si da positivo es porque el calor está siendo entregado a la maquina (como por ejemplo,\textit{ una combustión})

Expand All @@ -250,11 +305,11 @@ \subsection{Rendimiento térmico}

\subsection{Ciclo Otto}
\[
Q_{23}=c_v(T_3-T_2) \qquad \qquad Q_{41}=c_v(T_1-T_4)
Q_{23}=\cv(T_3-T_2) \qquad \qquad Q_{41}=\cv(T_1-T_4)
\]
viendo de aplicar la formula de rendimiento\ldots
\[
\eta_O=\frac{|c_v(T_3-T_2)|-|c_v(T_1-T_4)|}{c_v(T_3-T_2)}=\frac{(T_3-T_2)-(T_4-T_1)}{T_3-T_2}=1-\frac{T_1\left(\frac{T_4}{T_1}-1\right)}{T_2 \left( \frac{T_3}{T_2}-1\right)}
\eta_O=\frac{|\cv(T_3-T_2)|-|\cv(T_1-T_4)|}{\cv(T_3-T_2)}=\frac{(T_3-T_2)-(T_4-T_1)}{T_3-T_2}=1-\frac{T_1\left(\frac{T_4}{T_1}-1\right)}{T_2 \left( \frac{T_3}{T_2}-1\right)}
\]
usando las relaciones \eqref{eq:relacionisoentrop} para volúmenes\footnote{Tener en cuenta que $V_2=V_3$ y $V_1=V_4$.} se puede llegar a la relación
\[
Expand All @@ -266,9 +321,10 @@ \subsection{Ciclo Otto}
\end{equation}

donde $\rc$ es la relación de compresión $\rc=\frac{V_1}{V_2}>1$

\begin{figure}[htb!]
\centering
\includegraphics[width=8cm]{fig/ciclootto.eps}
\includegraphics[width=8cm]{ciclootto.eps}
\caption{Ciclo Otto ideal. $q_{51}=q_{41}$}
\label{fig:ottoideal}
\end{figure}
Expand All @@ -281,7 +337,7 @@ \subsection{Ciclo Diesel}
donde $\rc=\frac{V_1}{V_2}$ y $\rv$ es la relación de \textit{cut-off} para el trayecto plano: $\rv=\frac{V_3}{V_2}>1$
\begin{figure}[htb!]
\centering
\includegraphics[width=10cm]{fig/ciclodiesel.eps}
\includegraphics[width=8cm]{ciclodiesel.eps}
\caption{Ciclo Diésel ideal.}
\label{fig:dieselideal}
\end{figure}
Expand All @@ -296,9 +352,11 @@ \subsection{Ciclo Dual o Sabathé}
\eta_S=1-\frac{1}{\rc^{\ctegas -1}}\cdot \frac{\rp(\rv)^\ctegas-1}{(\rp -1)+\ctegas\rp(\rv-1)}
\end{equation}
$\rc=\frac{V_1}{V_2}$, $\rv=\frac{V_4}{V_2}=\frac{V_4}{V_3}$ y $\rp=\frac{p_3}{p_2}=\frac{p_4}{p_2}$ es la relación de presiones en la etapa a volumen constante.


\begin{figure}[htb!]
\centering
\includegraphics[width=10cm]{fig/ciclodual.eps}
\includegraphics[width=8cm]{ciclodual.eps}
\caption{Ciclo Sabathé ideal.}
\label{fig:dualideal}
\end{figure}
Expand Down

0 comments on commit 5a7f07a

Please sign in to comment.