Professional Documents
Culture Documents
Lecture5 FD Implicit
Lecture5 FD Implicit
Meysam Shahraki
computational geodynamics
Goethe University of Frankfurt
Numerical methods in geosciences
Implicit FD schemes
Note:
explicit implicit
Numerical methods in geosciences
Implicit FD schemes
explicit implicit
Implicit FD schemes
= thermal diffusivity
Initial condition
Dirichlet boundary
Boundary condition
condition
Neumann boundary
condition
Numerical methods in geosciences
Step # 1 : discretization
Step # 2 :
replace the continuous derivatives with their finite difference approximations
Step # 3 :
rearrangement of the discretized equation.
Numerical methods in geosciences
Implicit FD schemes
Step # 4 :
specify the boundary conditions.
For example, with a six-node grid, the coefficient matrix A, unknown temperature
vector x and the known right-hand-side vector b are
Implicit FD schemes
Some notes
Matrix A will have a unity entry on the diagonal and zero else for each node
where Dirichlet (fixed temperature) boundary conditions apply.
Matrix A has a special form because most entries off the diagonal are zero.
Such a matrix is called a sparse matrix. It is important to take advantage
of the sparsity.
Once the coefficient matrix has been constructed, its structure can be
visualized with spy(A) command.
The only thing that remains to be done is to solve the system of equations and
find x. MATLAB does this with
x is now filled with new temperatures, and we can go to the next time step.
Numerical methods in geosciences
Program the analytical solution and compare the analytical solution with
the numerical solution with the same initial condition.