Subject Engineering Mechanical Engineering

Question

See Question.pdf

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

function Tf=adil(xdiv,delt,f,time)
clc;
delx=1/xdiv; %delta x
x=0:delx:1; %one dimensional spatial array
t=0:delt:time; %time array
size(t)
T(numel(t),numel(x))=zeros; %a two dimensional array holding temperature values T(time,place)
%Assigning initial temperatures
for dis=1:numel(x)
    T(1,dis)=1;
end
%Assigning boundary conditions
for tim=2:(numel(t))
    T(tim,1)=0;
    T(tim,numel(x))=0;
end
%% Crank Nicolson f=0.5...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Related Homework Solutions

Get help from a qualified tutor
Live Chats