The differential equation describing the ice build-up (on a lake for example) is
ID: 3027341 • Letter: T
Question
The differential equation describing the ice build-up (on a lake for example) is given by h^2 d^2h/dt^2 + 2(dh/dt)^2 + 4 L(1 + h/2 + h)h/dt - 4L/2 + h = 0, where h is the thermal resistance of the ice slab (thickness divided by thermal conductivity), t is a dimensionless latent heat for which 0.5 is a reasonable value, and t is a non-dimensional time. Appropriate initial conditions are h(0)= 0.001 h'(0) = 0.5. Solve the problem for all values of t until t = 25. Plot the results for both h and h' as a function of time. Interpret the results. To solve this problem decompose it as a system of first order ODEs. You do not need to program you own time integration scheme, instead use Matlab function ode45. In order to understand how the program works, use the set up NormControl on, relative tolerance to 10^-8, absolute tolerance to 10^-10. and the maximum order of time integration scheme to 4.Explanation / Answer
Function file,
function [ dhdt ] = myfunctionode45( t,h )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
dhdt = [h(2);(-2)/(h^2)*(h(2))^2-((4l)/(h(2)^2))*((1+y)/(2+h))*h(2)+((4l)/(2+h))];
l=0.5;
end
Script file
clear all
clc
[x,y]=ode45(@myfunction,[0 25],[0.001;0.5]);
plot(x,y(:,1)),title('y-distance')
figure
plot(x,y(:,2)),title('y_dot-change with respect to x')