import numpy as np
import pylab as p

#design variables
#    hl.Mach_bypass = .95
#    hl.Mach_pod_max = .90
#    hl.Mach_c1_in = .65
#    hl.c1_PR_des = 13

#    #initial guesses
#    hl.compress.W_in = .35
#    hl.flow_limit.radius_tube = hl.pod.radius_tube_inner = 178
#    hl.compress.Ts_tube = hl.flow_limit.Ts_tube = hl.tube_wall_temp.tubeWallTemp = 322 
#    hl.compress.c2_PR_des = 5 

#Mach, TubeA, PodA, AR
data = np.array([
[0.69999999999999996, 0.70999999999999996, 0.71999999999999997, 0.72999999999999998, 0.73999999999999999, 0.75, 0.76000000000000001, 0.77000000000000002, 0.78000000000000003, 0.79000000000000004, 0.80000000000000004, 0.81000000000000005, 0.82000000000000006, 0.83000000000000007, 0.84000000000000008, 0.85000000000000009, 0.8600000000000001, 0.87000000000000011, 0.88000000000000012, 0.89000000000000012, 0.90000000000000013, 0.91000000000000014, 0.92000000000000015, 0.93000000000000016],
[83.156043046646786, 89.919124480239134, 97.034965647950742, 104.95709812657404, 113.85299085282642, 123.88966366301631, 135.26495877017936, 148.56654384507465, 163.70387331687544, 181.23691241067303, 201.76018285160967, 226.19275858487774, 255.41011137370754, 290.18462142498629, 333.39214647786082, 387.10813913420969, 454.10610660916313, 541.86479617110228, 660.3961490885473, 818.47792541561, 1051.4859747275368, 1414.3152708682705, 2038.7122417785774, 3333.6069398475001],
[20.012488159259789, 20.01253761717021, 20.01240801027399, 20.012248609776531, 20.012074767504707, 20.011884990241896, 20.011674612653344, 20.011597354348368, 20.011422562032912, 20.011236633844096, 20.011056118410583, 20.010928847455673, 20.010799843355894, 20.010581285812442, 20.010465661183325, 20.010353028574407, 20.010113771631577, 20.009967648046011, 20.009774513475381, 20.009533577919736, 20.009309379405821, 20.009140566791963, 20.008933786486356, 20.00881244451902],
[4.1552076076142708, 4.4931395608266582, 4.8487401215353412, 5.2446429270971393, 5.689214745374584, 6.1908043007156408, 6.7593023266854226, 7.4240222414225352, 8.1805215401061009, 9.0567572472835227, 10.082435512535801, 11.303461239063745, 12.763613317461187, 14.5015588143223, 16.660888962948082, 19.345392786495399, 22.693829320098683, 27.079743740815882, 33.003677709801785, 40.904398007497278, 52.54983841719983, 70.683459199418564, 101.89009886951018, 166.6069362732554]
])
p.tick_params(axis='both', which='major', labelsize=15)
p.ylabel('Max Pod Mach', fontsize=18)
p.xlabel('Area Ratio (TubeA/podA)', fontsize=18)
p.title('Area Ratio vs Max Pod Mach', fontsize=20)
p.plot(data[3],data[0], label="Area Ratio vs. Mach", lw=3)
p.ylim([0.79,0.92])
p.xlim([0,100])
p.legend(loc="best")
    
p.gcf().set_size_inches(11,5.5)
#p.gcf().savefig('test2png.png',dpi=130)
p.show()
import numpy as np
import pylab as p

#design variables
#    hl.Mach_bypass = .95
#    hl.Mach_pod_max = .90
#    hl.Mach_c1_in = .65
#    hl.c1_PR_des = 13

#    #initial guesses
#    hl.compress.W_in = .35
#    hl.flow_limit.radius_tube = hl.pod.radius_tube_inner = 178
#    hl.compress.Ts_tube = hl.flow_limit.Ts_tube = hl.tube_wall_temp.tubeWallTemp = 322 
#    hl.compress.c2_PR_des = 5 

#Mach, TubeA, PodA, AR
data = np.array([
[0.69999999999999996, 0.70999999999999996, 0.71999999999999997, 0.72999999999999998, 0.73999999999999999, 0.75, 0.76000000000000001, 0.77000000000000002, 0.78000000000000003, 0.79000000000000004, 0.80000000000000004, 0.81000000000000005, 0.82000000000000006, 0.83000000000000007, 0.84000000000000008, 0.85000000000000009, 0.8600000000000001, 0.87000000000000011, 0.88000000000000012, 0.89000000000000012, 0.90000000000000013, 0.91000000000000014, 0.92000000000000015, 0.93000000000000016],
[83.156043046646786, 89.919124480239134, 97.034965647950742, 104.95709812657404, 113.85299085282642, 123.88966366301631, 135.26495877017936, 148.56654384507465, 163.70387331687544, 181.23691241067303, 201.76018285160967, 226.19275858487774, 255.41011137370754, 290.18462142498629, 333.39214647786082, 387.10813913420969, 454.10610660916313, 541.86479617110228, 660.3961490885473, 818.47792541561, 1051.4859747275368, 1414.3152708682705, 2038.7122417785774, 3333.6069398475001],
[20.012488159259789, 20.01253761717021, 20.01240801027399, 20.012248609776531, 20.012074767504707, 20.011884990241896, 20.011674612653344, 20.011597354348368, 20.011422562032912, 20.011236633844096, 20.011056118410583, 20.010928847455673, 20.010799843355894, 20.010581285812442, 20.010465661183325, 20.010353028574407, 20.010113771631577, 20.009967648046011, 20.009774513475381, 20.009533577919736, 20.009309379405821, 20.009140566791963, 20.008933786486356, 20.00881244451902],
[4.1552076076142708, 4.4931395608266582, 4.8487401215353412, 5.2446429270971393, 5.689214745374584, 6.1908043007156408, 6.7593023266854226, 7.4240222414225352, 8.1805215401061009, 9.0567572472835227, 10.082435512535801, 11.303461239063745, 12.763613317461187, 14.5015588143223, 16.660888962948082, 19.345392786495399, 22.693829320098683, 27.079743740815882, 33.003677709801785, 40.904398007497278, 52.54983841719983, 70.683459199418564, 101.89009886951018, 166.6069362732554]
])
p.tick_params(axis='both', which='major', labelsize=15)
p.ylabel('Max Pod Mach', fontsize=18)
p.xlabel('Area Ratio (TubeA/podA)', fontsize=18)
p.title('Area Ratio vs Max Pod Mach', fontsize=20)
p.plot(data[3],data[0], label="Area Ratio vs. Mach", lw=3)
p.ylim([0.79,0.92])
p.xlim([0,100])
p.legend(loc="best")
    
p.gcf().set_size_inches(11,5.5)
#p.gcf().savefig('test2png.png',dpi=130)
p.show()
#design variables #    hl.Mach_bypass = .95 #    hl.Mach_pod_max = .90 #    hl.Mach_c1_in = .65 #    hl.c1_PR_des = 13 #    #initial guesses #    hl.compress.W_in = .35 #    hl.flow_limit.radius_tube = hl.pod.radius_tube_inner = 178 #    hl.compress.Ts_tube = hl.flow_limit.Ts_tube = hl.tube_wall_temp.tubeWallTemp = 322 #    hl.compress.c2_PR_des = 5 #Mach, TubeA, PodA, AR #p.gcf().savefig('test2png.png',dpi=130)