




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 8
This page cannot be seen from the preview
Don't miss anything!





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.