<s> """<STR_LIT>""" <EOL> from openmdao . main . api import Component , Slot <EOL> from openmdao . main . datatypes . api import Float <EOL> from MEflows import MEflows <EOL> class DREAprep ( Component ) : <EOL> """<STR_LIT>""" <EOL> flow_out = Slot ( MEflows ) <EOL> alt = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' , units = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> Mach = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> dTs = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' , units = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> PC = Float ( <NUM_LIT> , iotype = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> deltaPt = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' , units = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> deltaTt = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' , units = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> deltaM = Float ( <NUM_LIT:0.0> , iotype = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> gamma = Float ( <NUM_LIT> , iotype = '<STR_LIT>' , desc = '<STR_LIT>' ) <EOL> def __init__ ( self ) : <EOL> super ( DREAprep , self ) . __init__ ( ) <EOL> self . add ( '<STR_LIT>' , MEflows ( ) ) <EOL> def execute ( self ) : <EOL> """<STR_LIT>""" <EOL> self . flow_out . Pstatic = ( <NUM_LIT> * self . alt ** <NUM_LIT:2> - <NUM_LIT> * self . alt + <NUM_LIT> ) * <NUM_LIT> <EOL> Tstatic = ( - <NUM_LIT> * self . alt + <NUM_LIT> ) + self . dTs <EOL> self . flow_out . sec . Pt = self . flow_out . Pstatic * ( <NUM_LIT:1> + ( self . gamma - <NUM_LIT:1> ) / <NUM_LIT:2> * self . Mach ** <NUM_LIT:2> ) ** ( self . gamma / ( self . gamma - <NUM_LIT:1> ) ) <EOL> self . flow_out . sec . Tt = Tstatic * ( <NUM_LIT:1> + ( self . gamma - <NUM_LIT:1> ) / <NUM_LIT:2> * self . Mach ** <NUM_LIT:2> ) <EOL> self . flow_out . sec . Mach = <NUM_LIT:0.5> <EOL> self . flow_out . pri . Pt = ( <NUM_LIT> + <NUM_LIT> * self . Mach - <NUM_LIT> * self . alt + <NUM_LIT> * self . PC + self . Mach ** <NUM_LIT:2> * <NUM_LIT> + self . Mach * self . alt * - <NUM_LIT> + self . alt ** <NUM_LIT:2> * <NUM_LIT> + self . Mach * self . PC * <NUM_LIT> + self . alt * self . PC * - <NUM_LIT> + self . PC ** <NUM_LIT:2> * <NUM_LIT> ) + self . deltaPt <EOL> self . flow_out . pri . Tt = ( <NUM_LIT> + <NUM_LIT> * self . Mach + <NUM_LIT> * self . alt + <NUM_LIT> * self . PC + self . Mach ** <NUM_LIT:2> * <NUM_LIT> + self . Mach * self . alt * <NUM_LIT> + self . alt ** <NUM_LIT:2> * - <NUM_LIT> + self . Mach * self . PC * - <NUM_LIT> + self . alt * self . PC * - <NUM_LIT> + self . PC ** <NUM_LIT:2> * - <NUM_LIT> ) + self . deltaTt <EOL> self . flow_out . pri . Mach = ( <NUM_LIT> + <NUM_LIT> * self . Mach - <NUM_LIT> * self . alt + <NUM_LIT> * self . PC + self . Mach ** <NUM_LIT:2> * - <NUM_LIT> + self . Mach * self . alt * <NUM_LIT> + self . alt ** <NUM_LIT:2> * - <NUM_LIT> + self . Mach * self . PC * - <NUM_LIT> + self . alt * self . PC * <NUM_LIT> + self . PC ** <NUM_LIT:2> * - <NUM_LIT> ) + self . deltaM <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> MyComp = DREAprep ( ) <EOL> MyComp . dTs = <NUM_LIT:0.0> <EOL> MyComp . APRI = <NUM_LIT> <EOL> MyComp . AsAp = <NUM_LIT> <EOL> MyComp . AR = <NUM_LIT> <EOL> MyComp . XMAR = <NUM_LIT> <EOL> MyComp . Mach = <NUM_LIT:0.0> <EOL> MyComp . alt = <NUM_LIT:0.0> <EOL> MyComp . PC = <NUM_LIT> <EOL> MyComp . deltaPt = <NUM_LIT:0.0> <EOL> MyComp . deltaTt = <NUM_LIT:0.0> <EOL> MyComp . deltaM = <NUM_LIT:0.0> <EOL> MyComp . run ( ) <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' <EOL> print '<STR_LIT>' , MyComp . APRI_DREA <EOL> print '<STR_LIT>' , MyComp . ASEC_DREA <EOL> print '<STR_LIT>' , MyComp . AEXIT_DREA <EOL> print '<STR_LIT>' , MyComp . width <EOL> print '<STR_LIT>' , MyComp . Pstatic <EOL> print '<STR_LIT>' , MyComp . PSEC <EOL> print '<STR_LIT>' , MyComp . TSEC <EOL> print '<STR_LIT>' , MyComp . PPRI <EOL> print '<STR_LIT>' , MyComp . TPRI <EOL> print '<STR_LIT>' , MyComp . MPRI </s>
