Computer Project
Computer Project
Computer Project 2
Due 11/11/24
You must email me your project by the end of the day (11:59PM) on 11/11/24.
My email is peter.balogh@njit.edu
• A .pdf file describing your answers to the questions, any plots of your results,
discussion, etc. You can use any text editor (i.e. Word, Latex, etc.) to detail any
equations, discretizations, etc. you need to work out. Alternatively, if you prefer
to work things out on paper, you can just take a picture of each page and load
that into the pdf.
• All computer code files. I do not want screenshots of your code, or your code
copy and pasted into a word document. I want the actual computer code files
you have made (i.e. your .f or .f90 files if you use fortran, your .m files if you use
matlab, etc.)
in the square domain (1 x 1) as shown below, with initial condition 𝐶(𝑥, 𝑦, 𝑡 = 0), 𝛼 = 1, and
boundary conditions also as shown below.
y
Ctop = 1
C(x,y,t)
Cleft = 0 1
Cright = 0
x
Cbottom = 0
1. Using the Crank Nicolson scheme for time discretization and 2nd order central
diQerencing for spatial discretization, solve this transient diQusion equation
numerically using the direct matrix inversion algorithm described in class.
3. Plot C versus time at a location (0.5, 0.5). The solution should reach a steady value as t
increases.
Note that this is a time marching problem, and you are to use the direct matrix inversion
algorithm to solve for the updated C field at each timestep.