Simulation of a 1D Super-sonic nozzle flow simulation using Macormack Method
Objective: NON CONSERVATIVE FORM clear all close all clc %simulation of 1d super sonic nozzle flow %inputs n=31; x=linspace(0,3,n); dx=x(2)-x(1); gamma=1.4; %inigtial profiles rho=1-0.3146*x; t=1-0.2314*x; v=(0.1+(1.09*x)).*t.^0.5; %area a=1+2.2*(x-1.5).^2; %tme step %tme step CFL=0.25; for z=1:n dt_ini=CFL*(dx/(t(z)^0.5+v(z)));…