Challenge

Project 4

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{subcaption}
\usepackage{hyperref}

\title{\textbf{Project-4}: To compare discretization schemes in OpenFoam using a customized test case scalarTransport}
\author{Nagothu Venkatesh}
\date{February 2023}


\begin{document}
\maketitle

\begin{abstract}
In this project we built a customised test case {\fontfamily{qcr}\selectfont scalarTransport}, using the existing tutorial test cases {\fontfamily{qcr}\selectfont \$FOAM\_TUTORIALS/compressible/sonicFoam/laminar/shockTube} and \newline {\fontfamily{qcr}\selectfont \$FOAM\_TUTORIALS/basic/scalarTransportFoam/pitzDaily}.
This case has been solved for pure diffusion with different values of diffusion coefficients to study the diffusion. Similarly the case has been solved for pure convection with different divergence schemes, to compare the results obtained from different schemes and effects of numerical diffusion. And finally, plot in a graph.
\end{abstract}


\begin{itemize}
\item\section*{Introduction}
\end{itemize}

The {\fontfamily{qcr}\selectfont scalarTransportFoam} solver solves the incompressible flow for scalar transport equations for any {\fontfamily{qcr}\selectfont volScalarField} $\phi$. Here $\phi$ is T.
The Scalar Transport equation for temperature is as:
\begin{equation}
\frac{\partial T}{\partial t} + (U.\nabla) T = \nabla.(DT \nabla T)
\end{equation}
If \textit{U}= 0 then the above scalar transport equation reduces to a pure diffusion equation as,
\begin{equation}
\frac{\partial T}{\partial t} = \nabla.(DT \nabla T)
\end{equation}
\newline If \textit{DT}= 0 then the above scalar transport equation reduces to pure convection (Advection) equation as,
\begin{equation}
\frac{\partial T}{\partial t} + (U.\nabla) T = 0
\end{equation}\newline

\begin{itemize}
\item\section*{Problem case setup}
\end{itemize}

Copy the existing tutorial case
\newline {\fontfamily{qcr}\selectfont \$FOAM\_TUTORIALS/compressible/sonicFoam/laminar/shockTube} to {\fontfamily{qcr} \selectfont \$FOAM\_RUN} directory

Remove the {\fontfamily{qcr} \selectfont Allrun} and {\fontfamily{qcr} \selectfont Allclean} scripts using command \newline {\fontfamily{qcr} \selectfont rm All*}
\newline Rename the {\fontfamily{qcr}\selectfont 0.orig} directory to the {\fontfamily{qcr}\selectfont 0} by using rename command and remove the initial pressure file {\fontfamily{qcr} \selectfont p} from it. Commands are as follows:
\newline {\fontfamily{qcr} \selectfont mv 0.orig 0}
\newline {\fontfamily{qcr} \selectfont rm 0/p}
\newline Add the files {\fontfamily{qcr} \selectfont transportProperties} into {\fontfamily{qcr} \selectfont constant} directory.\newpage
Now get the into the {\fontfamily{qcr}\selectfont system} directory and Keep the existing file {\fontfamily{qcr}\selectfont blockMeshDict and setFieldsDict} as it is.
\newline Remove the existing files {\fontfamily{qcr}\selectfont controlDict,fvSchemes,fvSolution} and {\fontfamily{qcr}\selectfont sample} as these will be replaced by corresponding files from the tutorial case,\newline {\fontfamily{qcr}\selectfont \$FOAM\_TUTORIALS/basic/scalarTransportFoam/pitzDaily}.

\begin{itemize}
\item\section*{Modifcation of the file system/setFeildDict }
\end{itemize}

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

\begin{itemize}
\item\section*{Modifcation of the file system/fvSchemes }
\end{itemize}

\begin{figure}[!ht]
\centering
\includegraphics[width=0.5\textwidth]{fvsechems.png}
\label{fig:2}
\end{figure}
\newpage
\begin{itemize}
\item\section*{Modifcation of the file system/fvSolution }
\end{itemize}

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

\begin{itemize}
\item No change in the rest of the files\newline
{\fontfamily{qcr}\selectfont {system/blockMeshDict}\newline
{\fontfamily{qcr}\selectfont {0/T}\newline
{\fontfamily{qcr}\selectfont {0/U}
\end{itemize}

\newpage

\begin{itemize}
\item \section*{Pure Diffusion case}
\end{itemize}
Making duplicates of the case {\fontfamily{qcr}\selectfont scalarTransport} {\fontfamily{qcr}\selectfont constant/transportProperties} file with varying values of the diffusion coefficient \textit{DT}\newline
case 1 \textit{DT} =0\newline
case 2 \textit{DT} =0.001\newline
case 3 \textit{DT} =0.01\newline
case 4 \textit{DT} =1\newline
\begin{figure}[!ht]
\centering
\includegraphics[width=0.7\textwidth]{transportProperties.png}
\label{fig:4}
\end{figure}

\begin{itemize}
\item \section*{Results}
\end{itemize}

\section{For DT=0}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{dt0.png}
\label{fig:5}
\end{figure}

\newpage
\section{For DT=0.0001}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{dt0.0001.png}
\label{fig:6}
\end{figure}

\section{For DT=0.01}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{dt0.01.png}
\label{fig:7}
\end{figure}

\newpage

\section{For DT=1}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{dt1.png}
\label{fig:8}
\end{figure}
\begin{itemize}
\item \section*{Let's combined results of all the pure diffusion cases}
\end{itemize}

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

\newpage

\begin{itemize}
\item \section*{Conclusion}
\end{itemize}

\begin{enumerate}
\item The temperature graphs and initial and final outlines show no differences since the diffusion coefficient DT=0.

\item The initial and end temperature contours show a tiny difference when we set DT=0.0001, indicating temperature diffusion.

\item Indicators of high-temperature diffusion include the significant discrepancies between the initial and final temperature contours. As the diffusion coefficient DT is set to 0.01, the final temperature contours are more diffused at the boundaries.

\item As the diffusion coefficient DT is set to 1, the final temperature contours are entirely diffused at the boundaries due to the extremely high-temperature diffusion rate.\newline
\newline

\end{enumerate}


\begin{itemize}
\item \section*{Pure Convection case}
\end{itemize}

Making duplicates of the case {\fontfamily{qcr}\selectfont shockTude} {\fontfamily{qcr}\selectfont system/fvSchemes} file with varying different \newline {\fontfamily{qrc}\selectfont divSchemes} follow as :\newline\newline
\textbf{UPWIND}\newline


\section*{Case 1 : For Upwind}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{upwind.png}
\label{fig:10}
\end{figure}

\section*{Case 2 : For Linear Upwind}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{linear upwind.png}
\label{fig:11}
\end{figure}

\newpage

\section*{Case 3 : For CUBIC}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{cubic.png}
\label{fig:12}
\end{figure}

\section*{Case 4 : For QUICK}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{quick.png}
\label{fig:13}
\end{figure}

\section*{Case 5 : For vanLeer}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{vanLeer.png}
\label{fig:14}
\end{figure}

\section*{Case 6 : For MUSCL}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{muscl.png}
\label{fig:15}
\end{figure}

\newpage

\begin{itemize}
\item \section*{Results}
\end{itemize}

\section*{When T=0 (initial condition) }
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{CONV.png}
\label{fig:16}
\end{figure}

\section*{When T=5 }
\section*{ For Upwind}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{UPWINDCONV.png}
\label{fig:16}
\end{figure}

\newpage

\section*{ For Linear Upwind}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{LINEARUPWINDCONV.png}
\label{fig:17}
\end{figure}

\section*{ For CUBIC}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{CUBICCONV.png}
\label{fig:18}
\end{figure}

\newpage

\section*{ For QUICK}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{QUICKCONV.png}
\label{fig:19}
\end{figure}

\section*{ For vanLeer}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.8\textwidth]{VANLEERCONV.png}
\label{fig:20}
\end{figure}

\newpage

\section*{ For MUSCL}
\begin{figure}[!ht]
\centering
\includegraphics[width=0.7\textwidth]{MUSCLCONV.png}
\label{fig:21}
\end{figure}

\begin{itemize}
\item \section*{Let's combined results of all the pure Convection cases}
\end{itemize}

\section*{When T=0 (initial condition) }
\begin{figure}[!ht]
\centering
\includegraphics[width=1\textwidth]{CONVINSTIAL.png}
\label{fig:22}
\end{figure}
\newpage

\section*{When T=5 }
\begin{figure}[!ht]
\centering
\includegraphics[width=1\textwidth]{CONVFINAL.png}
\label{fig:23}
\end{figure}

\begin{itemize}
\item \section*{ Discussion about the errors in an analysis }
\end{itemize}

\section*{Numerical Dissipation}
the term {\fontfamily{qcr}\selectfon \(\frac{\partial^2u}{\partial t^2}\) } in truncation error appearing here acts as a dissipative term, much like the viscous terms in the Navier-Stokes equations. However, the term is a consequence of the numerical discretization embodied in the difference equation., and is therefore purely of numerical origin, with no physical significance. For this reason, the appearance of this term within the framework of a numerical solution is called \textbf{numerical dissipation}. In turn, the coefficient in this term acts much like the physical viscosity, and its therefore called the \textbf{artificial viscosity}.

\section*{Numerical Dispersion}
somewhat related to the above concepts is the effect of numerical dispersion, which creates a numerical behavior different from that of numerical dissipation. \textbf{Dispersion} results in a distortion of the propagation of different phases of a wave which show up \textbf{wiggles} in front of and behind the wave. Numerical dispersion is the direct result of the odd-order derivatives. Since the right-hand side of the \textbf{truncation error}.
\newpage

\begin{itemize}
\item \section*{Conclusion}
\end{itemize}


\begin{enumerate}
\item he first-order \textbf{Upwind}scheme presents more stability and overcomes the streamwise diffusion but the higher-order schemes do not deal at all with the cross-stream diffusion.

\item The numerical oscillations for divergence scheme \textbf{LinearUpwind} are diminished quickly. This is the advantage of this scheme.

\item The numerical oscillations for divergence \textbf{cubic} schemes are observed to be reflected back from the inlet boundary due to zeroGradinet boundary condition at the inlet boundary and got amplified. Thus the type of boundary conditions used influence the numerical oscillations in the solution

\item For \textbf{QUICK} schemes the accuracy is been mentioned but the numerical oscillations for the divergence scheme are diminished as we go forward through the timestep.

\item Thus the divergence schemes, \textbf{vanLeer}, and \textbf{MUSCL} are a better choice to minimize the numerical diffusion issue as they have better accuracy than others and no wiggles.

\end{enumerate}

\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.