Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Project: My Project
Views: 25Image: ubuntu2204
% LaTeX document was generated by GPT-4o1% Created 2024-10-20 19:24:5223\documentclass[letterpaper, 10pt, conference]{IEEEtran}45% Packages6\usepackage{amsmath, amssymb, amsfonts}7\usepackage{graphicx}8\usepackage{pythontex}9\usepackage{cite}1011% Title and Author12\title{Title of Research Article}13\author{Author Name}1415\begin{document}16\maketitle1718\begin{abstract}19This abstract summarizes the research article. It provides an overview of the findings, methodology, and significance of the heat equation solved using finite differences in 2-D.20\end{abstract}2122\section{Introduction}23This section introduces the historical context of the heat equation and its significance in mathematical physics and engineering.2425\section{Mathematical Background}26The heat equation is a parabolic partial differential equation given by:2728\begin{equation}29\frac{\partial u}{\partial t} = \alpha \nabla^2 u30\end{equation}3132where \( u = u(x, y, t) \) represents the temperature distribution, \( t \) is time, and \( \alpha \) is the thermal diffusivity constant.3334\section{Numerical Solution Using Finite Differences}35The finite difference method approximates derivatives by differences and provides a way to solve partial differential equations numerically.3637\subsection{Discretization}38The 2-D spatial domain is discretized into a grid and finite difference approximations are applied.3940\begin{equation}41u_{i, j}^{n+1} = u_{i, j}^n + \frac{\alpha \Delta t}{(\Delta x)^2} \left( u_{i+1, j}^n - 2u_{i, j}^n + u_{i-1, j}^n \right) + \frac{\alpha \Delta t}{(\Delta y)^2} \left( u_{i, j+1}^n - 2u_{i, j}^n + u_{i, j-1}^n \right)42\end{equation}4344\section{Implementation in Python}45The problem is implemented using Python and visualized with PythonTeX.4647\begin{pycode}48import numpy as np49import matplotlib.pyplot as plt5051# Parameters52nx, ny = 50, 5053nt = 10054alpha = 0.155dx, dy = 1/nx, 1/ny56dt = (dx*dy)/(2*alpha*(dx+dy))5758# Initial Condition59u = np.zeros((ny, nx))60u[20:30, 20:30] = 100 # Initial hot spot6162# Time-stepping63for n in range(nt):64u_new = u.copy()65for i in range(1, nx-1):66for j in range(1, ny-1):67u_new[j, i] = u[j, i] + alpha * dt * (68(u[j+1, i] - 2*u[j, i] + u[j-1, i]) / dy**2 +69(u[j, i+1] - 2*u[j, i] + u[j, i-1]) / dx**2 )70u = u_new7172plt.imshow(u, cmap='hot', interpolation='none')73plt.title('Temperature Distribution')74plt.colorbar(label='Temperature')75plt.xlabel('x')76plt.ylabel('y')7778plt.savefig('heat_equation.png')79\end{pycode}8081\begin{figure}[h]82\centering83\includegraphics[width=\linewidth]{heat_equation.png}84\caption{Heat distribution after time evolution}85\label{fig:heat_dist}86\end{figure}8788\section{Conclusion}89Summarizes the findings and discusses implications and future work in solving PDEs using finite differences.9091\section*{Acknowledgments}92Acknowledgment of any assistance or funding.9394\bibliographystyle{IEEEtran}95\bibliography{references}9697\end{document}9899