close('all')
clear
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load data
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[x, rho, u, pres, tau, q, T]...
  = textread('ns_shock_structure.dat','%f %f %f %f %f %f %f','headerlines',1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Generate a plot.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(1)

Plot_LineWidth  = 1.5;
 
subplot(2,3,1)
hold on; axis('square'); hold on; grid; title('\rho');
xlabel('x'); ylabel('Density \rho');
plot(x,rho,'k-','LineWidth',Plot_LineWidth);

subplot(2,3,2)
hold on; axis('square'); hold on; grid; title('u')
xlabel('x'); ylabel('Velocity u');
plot(x,u,'k-','LineWidth',Plot_LineWidth);

subplot(2,3,3)
hold on; axis('square'); hold on; grid; title('p')
xlabel('x'); ylabel('Pressure p');
plot(x,pres,'k-','LineWidth',Plot_LineWidth);

subplot(2,3,4)
hold on; axis('square'); hold on; grid; title('T')
xlabel('x'); ylabel('Temperature T');
plot(x,T,'k-','LineWidth',Plot_LineWidth);

subplot(2,3,5)
hold on; axis('square'); hold on; grid; title('\tau')
xlabel('x'); ylabel('Viscous stress \tau');
plot(x,tau,'k-','LineWidth',Plot_LineWidth);

subplot(2,3,6)
hold on; axis('square'); hold on; grid; title('q')
xlabel('x'); ylabel('Heat flux q');
plot(x,q,'k-','LineWidth',Plot_LineWidth);

  str_eps     = '.eps'; 
name = 'viscous_shock_solution'
print('-deps','-f1',[name str_eps])

  str_jpg     = '.jpg'; 
print('-djpeg','-f1',[name str_jpg])

