% 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, both shocks are % reactive, i.e. the computed states behind both the incident and reflected % shocks are EQUILIBRIUM states. clear; clc; display('demo_reflected_eq') P1 = 100000; T1 = 300; u1 = 0; q = 'H2:2 O2:1 N2:3.76'; mech = 'h2air_highT.cti'; fig_num = 0; [cj_speed,R2] = CJspeed(P1, T1, q, mech, fig_num); UI = cj_speed; [gas2] = PostShock_eq(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('Initial Conditions'); display([' Pressure ',num2str(P1),' (Pa)']); display([' Temperature ',num2str(T1),' (K)']); display(['Computing equilibrium post-reflected-shock state for ',q,' using ',mech]); [p3,UR,gas3] = reflected_eq(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)']);