Question: Please use python Consider the following differencing of the heat equation: u j n + 1 - u j n t = D [ u

Please use python
Consider the following differencing of the heat equation:
ujn+1-ujnt=D[uj+1n+1+uj-1n+1-2ujn+1x2]
Spot the difference. What has changed with respect to the FTCS scheme?
This scheme is known as a "fully implicit" scheme, or "backward time" as the spatial derivatives are evaulated at timestep n+1, i.e. the timestep in the future.
We can rearrange the equation to the following form:
-uj-1n+1+(1+2)ujn+1-uj+1n+1=ujn,
where:
=Dt(x)2.
This is in the form of a matrix equation:
Ax=b,
where A is a constant coefficient matrix, b is known (the values ujn) and x are our unknowns (the values ujn+1).
We therefore have three steps:
1Set up the coefficient matrix A
2Set up the initial conditions u(x,0)(as we did for FTCS)
3At each time step solve the linear algebra problem Ax=b for x.
asketch a diagram showing how the n+1 row depends on row n.
Please use python Consider the following

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!