Challenge

Project 3- Adding a temperature dictionary to the incompressible icoFoam case to solve the energy equation

\documentclass{article}

% Set page size and margins
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage{subfigure}
\usepackage{caption}
\usepackage{subcaption}

\title{\textbf{Project-3:To add a temperature dictionary to the incompressible icoFoam solver to solve the energy equation}}
\author{Nagothu Venkatesh}


\begin{document}
\maketitle

\begin{abstract}
In this project, the existing icoFoam solver will be modified to include the temperature equation, creating icoTempFoam. The updated tutorial case cavityTemp is then used to test this icoTemp-Foam. The outcomes of the effective application of the improved solver are displayed.
\end{abstract}
\section*{Introduction }
The icoFoam solver solves the incompressible flow equations for mass and momentum:
\begin{equation}
\nabla.U=0
\end{equation}
\begin{equation}
\frac{\partial u}{\partial t} + \nabla.U = - \nabla p + \nabla.(\nu \nabla u) + g
\end{equation}
Our goal is to add an equation for temperature as:
\begin{equation}
\frac{\partial T}{\partial t} + (U.\nabla) T = \nabla.(\kappa \nabla T)
\end{equation}
where $\kappa $ is the heat diffusion coefficient,
\newline into the existing icoFoam solver which then will become the icoTempFoam solver,as the name suggests the temperature equations are added to the icoFoam Solver
\begin{itemize}
\item\section*{Steps for executing the new solver}
\end{itemize}

\begin{enumerate}
\item{first copy the icoFoam source code form \newline
\newline {\fontfamily{qcr} \selectfont cd \$WM\_PROJECT\_USER\_DIR/my\_solvers} }
\newline {\fontfamily{qcr} \selectfont cp -r \$FOAM\_SOLVERS/incompressible/icoFoam icoTempFoam}\newline
\item Rename the {\fontfamily{qcr}\selectfont icoFoam.C} file to the {\fontfamily{qcr}\selectfont icoTempFoam.C}\newline
{\fontfamily{qcr} \selectfont mv icoFoam.C icoTempFoam.C}
\item {now let's modify files make/files }


\begin{figure}[!ht]
\centering
\includegraphics[width=0.93\textwidth]{files.png}
\label{fig:1}
\end{figure}
\newpage
\item The {\fontfamily{qcr}\selectfont icoTempFoam.C} file is modified by adding the {\fontfamily{qcr}\selectfont fvScalarMatrix TEqn} into it.

\begin{figure}[!ht]
\centering
\includegraphics[width=1\textwidth]{temp eqn.png}
\label{fig:2}
\end{figure}

\item {To add dictionary reader for kappa ($\kappa$) and IOobject for {\fontfamily{qcr}\selectfont volScalarField T} into the {\fontfamily{qcr}\selectfont createFields.H}}

\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{adding varible.png}
\label{fig:3}
\end{figure}

\item The {\fontfamily{qcr}\selectfont icoTempFoam} solver is compiled by running the {\fontfamily{qcr}\selectfont wmake} command into the \\{\fontfamily{qcr}\selectfont \$WM\_PROJECT\_USER\_DIR/my\_solver/icoTempFoam} directory

\begin{figure} [!ht]
\centering
\includegraphics[width=1\linewidth]{compile.png}
\end{figure}

\item The {\fontfamily{qcr}\selectfont \$FOAM\_USER\_APPBIN} directory is checked for the presence of newly compiled solver is compiled icoTempFoam

\end{enumerate}


\begin{itemize}
\item\section*{Steps for modification of case set up }
\end{itemize}

\begin{enumerate}
\item Copy the tutorial case from existing {\fontfamily{qcr}\selectfont icoFoam/cavity/cavity} case to run floder.
\newline
\newline {\fontfamily{qcr} \selectfont cd \$FOAM\_RUN}
\newline {\fontfamily{qcr} \selectfont cp -r \$FOAM\_TUTORIALS/incompressible/icoFoam/cavity/cavity cavityTemp}
\newline{\fontfamily{qcr} \selectfont mv cavity cavityTemp}
\item Copy the pressure(p) file and rename to T(temperature).And make the change to the specific initial and boundary condition for the Temperature


\begin{figure}[!ht]
\centering
\includegraphics[scale=0.5]{T.png}
\end{figure}

\item To add the {\fontfamily{qcr}\selectfont kappa} entry into the constant/transportProperties.
\begin{figure}[!ht]
\centering
\includegraphics[scale=0.6]{transporties.png}
\end{figure}

\item {Now change the solver name into the {\fontfamily{qcr}\selectfont system/controlDict} file.}

\begin{figure}[!ht]
\centering
\includegraphics[scale=0.9]{controldict.png}
\end{figure}

\item {adding the divergence and laplacian scheme for temperature into the {\fontfamily{qcr}\selectfont system/fvSchemes} file.}

\begin{figure}[!ht]
\centering
\includegraphics[width=0.9\linewidth]{fvschems.png}
\end{figure}


\item {Now let's add the solver settings for temperature in the {\fontfamily{qcr}\selectfont system/fvSolution} file }

\begin{figure}[!ht]
\centering
\includegraphics[width=0.9\linewidth]{fvsol.png}
\end{figure}


\item {now we test the solver {\fontfamily{qcr}\selectfont icoTempFoam}for the modification we done according to the problem statement ( {\fontfamily{qcr}\selectfont cavityTemp} tutorial case. })\newline
\newpage
\end{enumerate}

\section*{Results}
\begin{figure}[!ht]
\centering
\includegraphics[scale=0.5]{pressure.png}
\caption{Pressure Contour}
\label{fig: Pressure }
\end{figure}

\begin{figure}[!ht]
\centering
\includegraphics[scale=0.5]{vel.png}
\caption{Velocity Contour}
\label{fig: Velocity contour}
\end{figure}

\begin{figure}[!ht]
\centering
\includegraphics[scale=0.5]{temp.png}
\caption{Temperature Contour}
\label{fig: Temperature contour}
\end{figure}
\newpage

\section*{Conclusion}

\begin{itemize}
\item As expected, the Pressure and Velocity contours resemble the outcomes of the icoFoam/cavity/cavity tutorial case.\newline
\item As the temperature is more convected on the downstream side of the moving wall than on the upstream side, the temperature contours exhibit signs of convection and diffusion. Additionally, there is a minor diffusion of temperature to the bottom and sides.\newline
\item As a result, we were able to properly test the icoFoam solver by adding the temperature equation and using the test case cavityTemp.
\end{itemize}
\item

\end{document}

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.