7

Click here to load reader

Fdm 1d Explicit Implicit

Embed Size (px)

Citation preview

Page 1: Fdm 1d Explicit Implicit

Cooling Sill Problem using Excel

The purpose of this lab is to investigate the rates of sill cooling for different intrusion widths using the finite difference method. We will be solving the following one–dimensional conductive heat transport equation using both the explicit and implict methods. We will investigate the stability of the explicit scheme. The governing conduction equation is given by:

where T = Temperature (°C) ρ = rock density (kg/m3) c – rock heat capacity of the fluid phase λ – rock thermal conductivity (J/kg–°C) z – elevation (m) t – time (sec) We will solve this equation subject to the following boundary conditions. At the land surface, we have:

T = To ( z = 2500 m) = 10 oC (2) At the base of the solution domain, we will impose a specified heat flux boundary condition:

Page 2: Fdm 1d Explicit Implicit

Our first step is to construct our finite difference approximations for the temporal and spatial derivatives. For the temporal derivative:

where k denotes the current time step and “k+1” denotes the new time level. For the spatial derivative, consider the following forwards and backwards difference approximations of T using our Taylor Series: Forwards approximations:

H.O.T. – higher order terms in the Taylor Series. Backward approximations:

If we add the forward and backward difference approximations we get:

Neglecting the higher order terms and solving for the second derivative yields:

Substituting these approximations into our governing differential equation yields:

(9)

Page 3: Fdm 1d Explicit Implicit

Putting all unknowns on the left side to the differential equation we see:

(10)

This results in a system of linear algebraic equations:

(11) Lets consider a problem comprised of four unknowns (T1 – T4) with a specified temperature at the land surface (To) and a specified heat flux at the bottom of the domain (T4).

Page 4: Fdm 1d Explicit Implicit

Expanding our matrix:

where

writing this out in long hand we have: Note that To is a known quantity and will need to be moved to the right-hand-side of equation 1.

(15) For the heat flux boundary condition, we write a finite difference approximation of Fourier’s Law:

We now substitute this into our last finite difference equation:

(17)

−aTok+1 + 1+ 2a( )T1k+1 − aT2

k+1 = T1k

−aT1k+1 + 1+ 2a( )T2k+1 − aT3

k+1 = T2k

−aT2k+1 + 1+ 2a( )T3k+1 − aT4

k+1 = T3k (14)

−aT3k+1 + 1+ 2a( )T4k+1 − aT5

k+1 = T4k

Page 5: Fdm 1d Explicit Implicit

Rewriting our system of equations in matrix form yields:

Solving the system with Microsoft Excel The system of equations we saw earlier can be solved Iteratively using Excel. Lets consider our system of equations: We can rearrange this to solve for the diagonal node ( ). The first unknown is the node below the land surface. For the bottom most node, we have

Start with the template Excel file I’ve placed in the short course folder (sill_implicit_fdm_template.xls). Note that columns represent space and rows represent time. I’ve set up two templates with sill thicknesses of 300 m and 100 m. In order to iterate, be sure that the Tools>Options>Calculations feature is set to iterate.

Page 6: Fdm 1d Explicit Implicit

Explicit Method What if we now wrote our spatial derivative at the “k” rather than the “k+1” time level? Then we would have:

Substituting the expression into our governing equation yields:

Putting all the knowns on the right hand side and all the unknowns on the left yields:

Note that we don’t need to solve a matrix to update Ti

k+1. In this situation, we start a one boundary and sweep through the solution domain to move to the next time level. Note that "Tik+1" at the new time level depends only on "Tik" at the old time level and its two neighbors at the old time level.

We shall see that this explicit formulation has some important advantages as well as shortcomings.

Page 7: Fdm 1d Explicit Implicit

Paramter Set Up λ = 2.0 W/m-°C (ρc)* = 2.0e6 J/m3-°C L = 2300 m Δz = 50 m

Δt = 5 yrs, 10 yrs, 50 yrs Initial condition: T(z,0) = 10° + (L-z)*0.03 geothermal gradient T(1000 < z < 1300, 0) Sill – Run 1 T(1200 < z < 1300, 0) Sill – Run 2 Boundary Conditions: T (z=0,t) = 10° J (z=2300, t) = 0.06 W/m-°C Total Number of Time Steps 2500 Time Step Size 50 years (1261440000 seconds) Number of Nodes 51 Change the time step size from 5 years to 10 years to 50 years in cell B2. What happens to the computed temperatures when you go from Δt = 10 yrs to Δt = 50 yrs? By choosing too large of a time step size, our solution becomes unstable. Studies of error analysis have demonstrated that the following stability criteria must be met for explicit schemes:

λΔtρcΔz2

≤12

As it turns out, there is no stability criteria when using an implicit scheme. As such, the latter schemes are generally preferred over the explicit method.