8 views

Original Title: Finite Differences

Uploaded by hlvijaykumar

- Autumn-2018-19
- JNTU Syllabus
- 2D Finite Difference Method
- Mindspark Presentation by Sudhir Ghodke -30th January, 2010
- QUIZ - Transformations - Jan 2012
- L6 IA 2011 U1 M1
- Index
- 2nd
- 4 ESO Academics - Unit 04 - Exercises 4.4.2 - Other Types of Equations.
- 91-100.pdf
- FEYNMAN-KAC FORMULA FOR LEVY PROCESSES ´ WITH DISCONTINUOUS KILLING RATE
- Slutzky - The Summation of Random Causes as the Source of Cyclic Processes (1937).pdf
- The Role of Symmetry to Solve De
- Elementary Analysis Ross Homework Solutions
- maths2016-1
- Bernoulli Differential Equations
- A of ODE
- Diff ÖnemliB44
- 10.1.1.259.8367
- technical definitions

You are on page 1of 6

This method is sometimes called the method of lines. We apply the method to the

same problem solved with separation of variables. It represents heat transfer in a slab,

which is insulated at x = 0 and whose temperature is kept at zero at x = a. The initial

conditions are that the temperature is 1.0 everywhere.

The problem is sketched in the figure, along with the grid. The solution will be

derived at each grid point, as a function of time.

Next we evaluate the differential equation at the grid points

We can evaluate the second derivative using the standard finite difference expression

for second derivatives. The first term is really

Combining these equations gives the finite difference equation for the internal points.

(1)

At the boundary, x = 0, we also need to use a false boundary and write the boundary

condition as

We evaluate the differential equation at point 1 and insert the boundary values, T

0

=

T

2

, to get

(2)

For the outer boundary we use

(3)

If this equation is incorporated into the N-1-st equation we get

(4)

Thus the problem requires solving Eq. (2) for point 1 and Eq. (1) for n = 2,...,N-2, and

Eq. (4) for N1. The initial conditions are

In these equations there is only one independent variable, so they are ordinary

differential equations.

Since they are first order, and the initial conditions for all variables are known, the

problem is an initial value problem.

The MATLAB program ode45 integrates sets of differential equations using a 4-th

order Runge-Kutta method. The calling sequence is

[t,y] = ode45('rhs',tspan,y0)

The term in quotes, 'rhs', is the name of the script which defines the problem. The

tspan = [t0 tf], where t0 is the starting time, and tf is the ending time. y0 is the set of

initial values. Let us use 5 intervals, or six points, or N-1 = 5. Then we need to set

y0 = [ 1 1 1 1 1]

We also need to prepare a script for the right-hand side of the problem. The

differential equations are (for N = 6)

The script is then

% saved as file rhs

function ydot=rhs(t,y)

global aa

nn=size(y)

n = nn(2)

ydot=zeros(n,1)

ydot(1) = 2*aa*(y(2)-y(1))

for i = 2:n-1

ydot(i) = aa*(y(i+1)-2*y(i)+y(i-1))

end

ydot(n) = aa*(-2*y(n) + y(n-1))

The script is written in a general fashion so that the number of points can be changed

easily. In MATLAB, we would define 'aa' in the calling commands, and use global in

the calling commands, too. The number of terms (which affects the value of aa we

choose) is set by the number of initial conditions for y at time zero.

The problem is solved with a = 2 x 10

-3

cm

2

/sec, L = 1 cm, and T

0

= 1, and it is plotted

in Figure 1 at different times. We see there the gradual change of the solution from the

boundary, where the temperature has been set to zero, as time proceeds. We redo this

solution with 11 points to verify that the solution is adequate. The plots in Figure 2 are

similar to Figure 1 so that we conclude 6 points is sufficient for our purposes. If we

wanted to see the effect of different initial conditions we have only to change them

and rerun the problem. This solution, with 6 points, is adequate if we are interested in

the time intervals plotted; if we are interested in smaller time intervals, though, we

find the solution oscillates from node to node. In that case more points are needed.

Figure 1. Solution with 6 grid points

Figure 2. Solution with 11 grid points

Next consider the diffusion problem.

The finite difference formulation of this problem is

The code is available. Solutions using 5, 9, and 17 grid points are shown in Figures 3-

5. Five is not enough, but 17 grid points gives a good solution.

Figure 3. Diffusion Problem solved with 5 Finite Difference Grid Points

Figure 4. Diffusion Problem solved with 9 Finite Difference Grid Points

Figure 5. Diffusion Problem solved with 17 Finite Difference Grid Points

- Autumn-2018-19Uploaded byNishal Caleb
- JNTU SyllabusUploaded bygodzilla3456
- 2D Finite Difference MethodUploaded byAnupEkbote
- Mindspark Presentation by Sudhir Ghodke -30th January, 2010Uploaded byBinduei
- QUIZ - Transformations - Jan 2012Uploaded bysarakopp
- L6 IA 2011 U1 M1Uploaded byRonaldo95163
- IndexUploaded byrongsay
- 2ndUploaded byUMER HANEEF
- 4 ESO Academics - Unit 04 - Exercises 4.4.2 - Other Types of Equations.Uploaded byGoheim
- 91-100.pdfUploaded byAlejandra Chaves
- FEYNMAN-KAC FORMULA FOR LEVY PROCESSES ´ WITH DISCONTINUOUS KILLING RATEUploaded byalexandergir
- Slutzky - The Summation of Random Causes as the Source of Cyclic Processes (1937).pdfUploaded byUriel Garcia
- Elementary Analysis Ross Homework SolutionsUploaded byAngelica Maria Querales
- The Role of Symmetry to Solve DeUploaded byhammoudeh13
- maths2016-1Uploaded byvamsi
- Bernoulli Differential EquationsUploaded bychrischov
- A of ODEUploaded bySammas Sham Zea
- Diff ÖnemliB44Uploaded bymemrah2955
- 10.1.1.259.8367Uploaded bySandeep Bhatia
- technical definitionsUploaded byapi-285445237
- PdeUploaded bySingAnn
- Alg Linear Axplusbeqc Negative All(1)Uploaded bytommytan1021
- CBSE Class 12 Outside Mathematics 2004Uploaded byPrerana Sachan
- Algebra Question Paper 1Uploaded byAMIN BUHARI ABDUL KHADER
- Tire Vertical Load ModelUploaded byJason Garner
- 95CF51A4-ECBB-4B08-86EC-637DC89F2FF5Uploaded bysrivastava1984rahul
- Review 1Uploaded bysima_s
- ajp-rphysap_1985_20_5_269_0Uploaded byThakur Kalantry
- CEPastPaperMathNewCh1Uploaded by羅喬峰
- Ald Jh Lap Math y8 Term 2 Week 6 1819Uploaded byEl Arnold

- DEW POINTUploaded byhlvijaykumar
- HumidityUploaded byhlvijaykumar
- Moisture and HumidityUploaded byhlvijaykumar
- Pascal's LawUploaded byhlvijaykumar
- Temperature SensorsUploaded byhlvijaykumar
- Constant Heat of SummationUploaded byhlvijaykumar
- Ther Mist OrUploaded byhlvijaykumar
- Filter Press notesUploaded byhlvijaykumar
- Filter PressUploaded byhlvijaykumar
- The Homogeneous AtmosphereUploaded byhlvijaykumar
- Hydrostatic EquilibriumUploaded byhlvijaykumar
- Temperature MeasurementUploaded byhlvijaykumar
- ThermometerUploaded byhlvijaykumar
- Hydrostatic EquilibriumUploaded byhlvijaykumar
- The Fluid PressureUploaded byhlvijaykumar
- Pressure Depth AnalysisUploaded byhlvijaykumar
- The Barometric FormulaUploaded byhlvijaykumar
- History of BarometerUploaded byhlvijaykumar
- BarometerUploaded byhlvijaykumar
- THERMOCOUPLES Operating PrincipleUploaded byhlvijaykumar
- FiltrationUploaded byhlvijaykumar
- Membrane FiltrationUploaded byhlvijaykumar
- Concepts of ThermometerUploaded byhlvijaykumar
- Raw Materials for ThermometersUploaded byhlvijaykumar
- Deisgn of a ThermometerUploaded byhlvijaykumar
- Infra Red Ear ThermometerUploaded byhlvijaykumar
- Pascals' Law of PhysicsUploaded byhlvijaykumar

- BasicVol20No1,2011Uploaded byIzzatAlsmadi
- Casiraghi.pdfUploaded bySantiago Urgiles
- Icra Report on Recent Changes NbfcUploaded byNayeemLakdawala
- fdn5b9pxy.pdfUploaded byOscar Perez
- Ocjene i PrikaziUploaded bystarigrad
- ModbusNews_Oct2008Uploaded bySocaciu Viorica
- Dhanuka AgritechUploaded byAshok Jain
- Using KyplotUploaded byAli Abdelrahem
- Lecture 3 Ocado Case StudyUploaded byHajrë Hyseni -Ari
- Business Enviornment Assignment FinalUploaded bysaleihasharif
- Vikas ResumeUploaded bydevops devops
- RGuideUploaded bybobbili84
- Visa ProceduresUploaded bysuniljain1990
- Numeros SolutionUploaded bybrooklinbook
- Samenvatting-Applying-Communication-Theory-for-Professional-Life-2ndEdition.pdfUploaded bydrsuresh26
- A Study on Foreign Exchange Operations in Union Bank ofUploaded byNidhi Yadav
- Most common Cause for all Medical Examinations.pdfUploaded bychronos6534
- Effect of Knives Type on Some Operational Characteristics fora Locally Assembly Motorized Vibration Cutter Used for Date Palm Fronds PruningUploaded byIJEAB Journal
- D64258GC11_sg2.pdfUploaded bysoidamientrung
- Comercio ExteriorUploaded byLuan Mazakina Claros
- Strategic Management of an Organisation(Essay).docxUploaded byJay Say
- Hostel Rules Regulation 2014.pdfUploaded byShannil Ariveen Mahendran
- Spongebob Square Pants Theme Song (Sheet Music)Uploaded bySarah
- Mumbai Return TicketUploaded byAnudeep Pati
- The Hong Kong Airport Core ProgramUploaded bylenil27
- ACC Ltd Fundamental Analysis.docxUploaded bySaurabh Jain
- Pneumatic Multi Purpose 2015 DrillUploaded byChockalingam Athilingam
- 117_Master_List_Global (1)Uploaded byFrank Magliozzi
- Ssl ProcessUploaded byKinchit Jain
- Analog SimulationUploaded byOishanee Saha