%Unsteady 1D conduction HW: Post-processing clear all; clc; t=0:0.1:3; theta_series = exp(-t); %REPLACE EXPRESSION WITH ONE TERM SERIES SOLUTION %Plot one-term series solution figure(1); %Create figure #1 clf; %Clear current figure h=plot(t,theta_series,'-k'); set(gca,'Box','on','LineWidth',2,... %Make plot pretty 'FontName','Helvetica',... 'FontSize',14); set(h,'LineWidth',2); %Set linewidth for curve xlabel('t'); ylabel('\theta(0,t)'); title('Unsteady 1D Conduction, Bi=5'); axis square; %Make axis box square %Read and plot ANSYS result for Delta_t=0.01 ANSYS1 = dlmread('ANSYS1.txt'); %GENERATE ANSYS1.txt FROM ANSYS RESULTS hold on; h2=plot(ANSYS1(:,1),ANSYS1(:,2),'--r'); set(h2,'LineWidth',2); legend('One term series solution','ANSYS \Deltat = 0.01'); %Read and plot ANSYS result for default Delta_t % ANSYS2 = dlmread('ANSYS2.txt'); %GENERATE ANSYS2.txt FROM ANSYS RESULTS % h2=plot(ANSYS2(:,1),ANSYS2(:,2),':g'); % set(h2,'LineWidth',2); % legend('One term series solution','ANSYS \Deltat = 0.01', ... % 'ANSYS, Default \Deltat');