Solving Stefan's Law of Cooling using Euler-Trapezoid Method for Differential Equations - , Study notes of Mathematics

How to solve stefan's law of cooling for a glowing hot mass using euler-trapezoid method for stiff differential equations. The method of solution, matlab implementation of euler-trapezoid, and numerical experiments. It also suggests using matlab solvers ode45, ode23s, and others for solving differential equations.

Typology: Study notes

Pre 2010

Uploaded on 03/10/2009

koofers-user-fgt
koofers-user-fgt 🇺🇸

4

(1)

10 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Differential Equation Model.
Stefan's law of cooling for a glowing hot mass
ut =c(usur4- u4).
For large values of u this will be a stiff differential
equation.
pf3
pf4
pf5
pf8

Partial preview of the text

Download Solving Stefan's Law of Cooling using Euler-Trapezoid Method for Differential Equations - and more Study notes Mathematics in PDF only on Docsity!

Differential Equation Model.

Stefan's law of cooling for a glowing hot mass

ut =c(usur^4 - u^4 ).

For large values of u this will be a stiff differential

equation.

Method of Solution.

Euler's method for Newton law of cooling is

(uk+1^ -uk)/h = c(usur - uk).

Solve for uk+1^ to get

uk+1^ =(1 - hc)uk^ + husurc.

Need 1- ch > 0.

Matlab Implementation of Euler-trapezoid.

function feuls = feuls(t,x) feuls = .6941(1 - (x/273)^4);*

%your name, your student number, lesson number clear; % %Euler-Trapezoid Algorithm with Picard Solver. % eps = .0001; maxm = 10; u(1) = 973.; T = 100; KK = 40 h = T/KK; t(1)= 0.;

%Begin Time Loop, % for k = 1:KK oldfeuls =feuls(t(k),u(k)); oldu = u(k) + holdfeuls; t(k+1) = t(k) + h; % %Begin Picard Loop. % for m=1:maxm newu = u(k) + h.5(oldfeuls + feuls(t(k+1),oldu)); if abs(newu-oldu)<eps break; end oldu = newu; end u(k+1) = newu; end*

Numerical Experiments.

The following system for two functions has known

solutions

y 1 (t) = exp(-4t) and y 2 (t) = exp(-t).

y 1 ' = -10004 y 1 + 10000 y 24

y 2 ' = y 1 - y 2 - y 24.

Matlab Solvers ode45, ode23s and Others.

One can use either Matlab’s

odedemo (buiode), or

ypcstiff.m and cstiff.m files.