10.07.2015 Views

Numerical Methods Library for OCTAVE

Numerical Methods Library for OCTAVE

Numerical Methods Library for OCTAVE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 3: Solution of the Advection equation with x ∈ [0, 1] and t ∈ [0, 0.6].F initial condition U(0,X) = F(X).ReturnsT grid of NT intervals.X grid of NX intervals.U solution array.3.10.3 2-D solver <strong>for</strong> Heat equationHeat equation :u t = cu xx (21)[T, X, U] = PDE_HEAT_EXP(N, DX, K, DT, C, F, ALPHA, BETA) solves the heatequation D U/DT = C D2U/DX2 with the explicit method on [0,1]x[0,1]. Initialcondition is U(0,X) = F and boundary conditions are U(t,0) = ALPHA and U(t,1)= beta. C is a positive constant. N is the number of space integrationintervals and K is the number of time-integration intervals. DX is the sizeof a space integration interval and DT is the size of time-integration intervals.ParametersNX number of space integration intervals.DX size of a space integration interval.NT number of time-integration intervals.DT size of time-integration intervals.F initial condition U(0,X) = F(X).C positive constant.28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!