 # Delivered to the U.S. Government in Accordance with Contract FA8650-10-C-7080.
 #
 # EXPORT CONTROLLED
 # ECCN#   EAR99  
 # Warning:  This document contains technical data which is controlled under the
 # Bureau of Industry & Security’s Export Administration Regulations and may not be
 # exported or re-exported without authorization by the Bureau of Industry & Security.
 # Diversion contrary to US law is prohibited.
 #
 # (c) 2011 United Technologies Corp.
 # Developed with the sponsorship of the Defense Advanced Research Projects Agency (DARPA).
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy of this data,
 # including any software or models in source or binary form, as well as any drawings, 
 # specifications, and documentation (collectively "the Data"), to deal in the Data without 
 # restriction, including without limitation the rights to use, copy, modify, merge, publish,
 # distribute, sublicense, and/or sell copies of the Data, and to permit persons to whom the Data
 # is furnished to do so, subject to the following conditions:
 #  
 # The above copyright notice and this permission notice shall be included in all copies or
 # substantial portions of the Data.
 #  
 # THE DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
 # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, SPONSORS, DEVELOPERS, CONTRIBUTORS, OR
 # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE DATA OR THE
 # USE OR OTHER DEALINGS IN THE DATA.


######## Combustor$_g:								# Combustor
var m$_g>=0.1;										# Mass Flow kg/s
var Po$_g>=1;										# Output total Pressure (Pascal)
var To$_g>=1600, <=1700;							# Output total Temperature (Kelvin)
var Q>=1;											# Thermal Power from Fuel (J/s)
var mfuel>=0.01;									# Mass Flow of Fuel (kg/s)
var cp$_g>=900,<=1400;								# Specific Heat at Constant Pressure (J/kg/Kelvin)
var gam$_g>=1.2,<=1.5;								# Ratio of Specific Heats 
var Po_compression>=1;								# Store maximum pressure (Pascal) in engine for Overall Pressure Ratio Calculation 
var m_core>=0.1;									# Store Mass Flow Through Burner (kg/s) for Bypass Ratio Calculation

subject to conPo$_g: Po$_g = Po%_g; 											# Assume there is no pressure loss in burner
subject to conQ: Q = cp$_g*(To$_g-To%_g);										# Calculate the thermal power required to increase air temperature (Anderson, Fundamentals of Aerodynamics)
subject to conmfuel: mfuel = m$_g*Q/(4.3*10^7);									# Calculate the fuel mass flow rate required (Anderson, Fundamentals of Aerodynamics) 
subject to concompression: Po_compression = Po%_g;								# Store maximum pressure for later use 
subject to conm_core: m_core = m$_g;											# Store core mass flow for later use

subject to concp$_g:cp$_g = (2.506*10^(-11)*To$_g^2+1.454*10^(-7)*To$_g^1.5
-4.246*10^(-7)*To$_g+3.162*10^(-5)*To$_g^(0.5)+1.3303-1.512*10^4*To$_g^(-1.5)
+3.063*10^5*To$_g^(-2)-2.212*10^7*To$_g^(-3))*10^3;								# Calculation of specific heat at constant pressure (R. Sonntag et al, Fundamentals of Thermodynamics) 				
subject to congam$_g: gam$_g = cp$_g/(cp$_g-R);									# Calculation of ratio of specific heats from (Anderson, Fundamentals of Aerodynamics)				


subject to conchangeTo$_g: To$_g-To%_g>=0.0001;									# Temperature Out is greater then that in
subject to conThrust$_g: thrust[$_g] = 0;					
