function air = igm_air(property1, value1, units, property2, value2)
% -------------------------------------------------------------------------
% igm_air
% -------------------------------------------------------------------------
% Fundamentals of Thermodynamics
% A function that uses one independent property of air and the 
% ideal gas model (IGM) and determines as the output air, 
% a structure with all relevant properties at the same state. 
% Since one is using the IGM, only one temperature dependent
% property is needed to properly fix the state.
% -------------------------------------------------------------------------
% Syntax: (using 3 input arguments) 
%         air = igm_air(property1, value1, units)
%
% Inputs: property1 = the name of property1 ('T', 'h', 'u', 's0', 
%         'pr', or 'vr')
%         value1 = the value of property1
%         units = 1 (SI units) or 2 (English units)
% Output: air = the structure with all relevant properties in relevant
%         fields (T, h, u, s0, pr, vr, cp, cv, k, M, R).  
%         
% 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)
%         
% Syntax: (using 5 input arguments)
%         air = igm_air(property1, value1, units, property2, value2)
%
% Additional Inputs: property2 = the name of property2 ('p' or 'v')
%         value2 = the value of property2
%
% Output: air = the structure with all relevant properties in relevant
%         fields (all above and p and v).
%         p - pressure (TBD)
%         v - specific volume (m^3/kg or ft^3/lb)
% 
% -------------------------------------------------------------------------
% Notes: Use consistent SI or English units. 
% All specific properties defined per unit mass. 
%--------------------------------------------------------------------------
% Example
% air = igm_air('T', 300, 1)
% This example corresponds to air as an ideal gas at 300 degrees K.
%--------------------------------------------------------------------------
% Simon Ruiz, Undergraduate student, Mechanical Engineering
% Dr.Priya Goeser, Professor
% Robyn Callaghan, Undergraduate student, Mechanical Engineering
% Chance Borgeson, Undergraduate student, Mechanical Engineering
% Original: May 13, 2013
% Modified: May 31, 2016
% Copyright (c) 2013 Simon Ruiz, All Rights Reserved.
% Engineering Studies Program, Armstrong State University.
% -------------------------------------------------------------------------