function air = igm_isentropic_air(property12, value1, temperature1, value2, units) 
% -------------------------------------------------------------------------
% igm_isentropic_air
% -------------------------------------------------------------------------
% Fundamentals of Thermodynamics
% A function that uses the ideal gas model (IGM) for air undergoing an
% isentropic process to fix the two states given the temperature at one
% state and the pressure or volume at both states either independently or
% as a ratio.  
% -------------------------------------------------------------------------
% Syntax: air = igm_isentropic_air(property12, value1, temperature1, 
%         value2, units)
% Inputs: property12 = the name of the property which is known at both 
%         states either independently or as a ratio (Pressure, Specific 
%         Volume or Volume)
%         value1 = the value of the above property at state 1
%         temperature1 = the value of the temperature at state 1
%         value2 = the value of the same property at state 2
%         units = 1 (SI units) or 2 (English units)
% Output: air = structure array with all relevant properties in relevant
%         fields (T, h, u, s0, pr, vr, cp, cv, k, M, R).  
%         Also included are fields p and v if known. 
%         1st element in structure array represents properties at state 1
%         2nd element in structure array represents properties at state 2
%         
% Valid properties and units:
%         T - temperature (K or R)
%         h - specific enthalpy (kJ/kg or Btu/lb)
%         u - specific internal energy (kJ/kg or Btu/lb)
%         s0 - specific entropy at atm pressure (kJ/kg*K or Btu/lb*R)
%         pr - pressure ratio (unitless)
%         vr - specific volume ratio (unitless)
%         cp - specific heat at constant pressure (kJ/kg*K or Btu/lb*R)
%         cv - specific heat at constant volume (kJ/kg*K or Btu/lb*R)
%         k - specific heat ratio (unitless)
%         M - molecular weight (kg/kmol or lb/lbmol)
%         R - gas constant (TBD)
%         p - pressure (TBD)
%         v - specific volume (m^3/kg or ft^3/lb)
%         V - total volume (m^3 or ft^3)
%
% -------------------------------------------------------------------------
% Notes: Use consistent SI or English units.
%--------------------------------------------------------------------------
% Example
% TBD
%--------------------------------------------------------------------------
% Robyn Callaghan, Undergraduate student, Mechanical Engineering 
% Dr.Priya Goeser, Professor
% Original: May 12th, 2016
% Modified: July 21, 2016
% Copyright (c) 2016 Robyn Callaghan, All Rights Reserved.
% Engineering Studies Program, Armstrong State University. 
% -------------------------------------------------------------------------