Simulation of a 1D Super-sonic nozzle flow simulation using Macormack Method
Objective: 1) Non conservative form clear all close all clc n=31; x=linspace(0,3,n); dx=x(2)-x(1); gamma=1.4; % calculate initial profiles rho = 1-0.3146*x; t= 1-0.2314*x; v=(0.1+1.09*x).*t.^0.5; a=1+2.2*(x-1.5).^2; n_throat=find(a-1<0.001); nt=900; dt=0.01; % outer time loop for k=1:nt rho_old=rho; v_old=v; t_old=t; a_old=sqrt(t_old);…