% Shock and Detonation Toolboox % http://www.galcit.caltech.edu/EDL/public/cantera/html/SD_Toolbox/ % % Calculates post-relected-shock state for a specified shock speed % speed and a specified initial mixture. In this demo, there is no % reaction, i.e. both the incident and reflected shocks are FROZEN. clear; clc; display('demo_reflected_fr') P1 = 100000; T1 = 300; UI = 2000; u1 = 0; q = 'H2:2 O2:1 N2:3.76'; mech = 'h2air_highT.cti'; [gas2] = PostShock_fr(UI, P1, T1, q, mech); gas1 = importPhase(mech); gas3 = importPhase(mech); set(gas1, 'T', T1, 'P', P1, 'X', q); display(['Incident shock speed ',num2str(UI),' (m/s)']); display(['pressure ',num2str(P1),' (Pa)']); display(['temperature ',num2str(T1),' (K)']); display(['Computing frozen post-reflected-shock state for ',q,' using ',mech]); [p3,UR] = reflected_fr(gas1,gas2,gas3,UI); disp(['Reflected Shock Speed UR = ', num2str(UR), ' (m/s)']); display('State 3'); display([' Pressure ',num2str(p3),' (Pa)']); display([' Temperature ',num2str(temperature(gas3)),' (K)']);