%Transient conduction

clear all; clc;
C1 = 1.1191;
zeta1 = 0.8603;
Fo = 0:0.1:3;
theta_star_o = C1*exp(-zeta1^2*Fo);

%Plot 
figure(1); %Create figure #1
clf; %Clear current figure
h=plot(Fo,theta_star_o,'-k'); 
set(gca,'Box','on','LineWidth',2,...
'FontName','Helvetica',...
'FontSize',14);
%Set axis properties
set(h,'LineWidth',2);
%Set linewidth for curve
xlabel('t');
ylabel('\theta(0,t)');
%title('Transient conduction: Plane wall with convection');
axis square; %Make axis box square

%Read and plot ANSYS results
ANSYS = dlmread('thetao_vs_t_dt_01.txt');
hold on;
h2=plot(ANSYS(:,1),ANSYS(:,2),'--r'); 
set(h2,'LineWidth',2);
%legend('One term series solution','Numerical solution (ANSYS)');

ANSYS2 = dlmread('thetao_vs_t.txt');
hold on;
h2=plot(ANSYS2(:,1),ANSYS2(:,2),':b'); 
set(h2,'LineWidth',2);
legend('One term series solution','\Deltat = 0.01',...
    'ANSYS, Default \Deltat');




