示例#1
0
    def __init__(self,name='DistillationColumn'):
        UnitOperation.__init__(self)
        self.name = name + str(DistillationColumn.counter) 
        self.type = 'DistillationColumn'
        self.no_of_inputs = 1 
        self.no_of_outputs = 2

        self.compounds = compound_selected

        self.EngStm1 = EngStm(name='EngStm1'+self.name)
        self.EngStm2 = EngStm(name='EngStm2'+self.name)
        self.count = DistillationColumn.counter

        # self.modes_list = ['RR', 'Nout', 'T']
        self.modes_list = []
        self.parameters = ['Nt', 'Ni', 'InT_s', 'Ctype']
        #self.parameters = ['Nt', 'InT_s', 'In_s', 'thermo_package', 'Ctype', 'Pcond', 'Preb']
        self.Cspec_list = ['Reflux Ratio','Product Molar Flow   (mol/s)', 'Temperature  (K)', 'Compound Molar Fraction',    'Compound Molar Flow    (mol/s)']
        self.Rspec_list = ['Product Molar Flow   (mol/s)', 'Temperature  (K)', 'Compound Molar Fraction',    'Compound Molar Flow    (mol/s)']

        type(self).counter += 1  
        self.variables = {
            'Ni'   :            {'name':'Number of Input',          'value':2,              'unit':''},
            'RR'    :           {'name':'Reflux Ratio',             'value':None,           'unit':''},
            'T'     :           {'name':'Temperature',              'value':300,            'unit':'K'},
            'Nout'  :           {'name':'No of Sidedraws',          'value':None,           'unit':''},
            'Nt'    :           {'name':'No of Stages',             'value':12,             'unit':''},
            'InT_s' :           {'name':'Feed Stage',              'value':[],           'unit':''},
            'thermo_package' :   {'name':'Thermo Package',           'value':'Raoults_Law',  'unit':''},
            'Ctype' :           {'name':'Condensor Type',           'value':'',             'unit':''},
            'Pcond' :           {'name':'Condensor Pressure',       'value':101325,         'unit':'Pa'},
            'Preb'  :           {'name':'Reboiler Pressure',        'value':101325,         'unit':'Pa'},
            'C_Spec':           {'name':'Condensor Specification',  'type':'Reflux Ratio',  'value':'',         'comp':'',      'unit':''},
            'R_Spec':           {'name':'Reboiler Specification',   'type':'',              'value':'',         'comp':'',      'unit':''},
        }
    def __init__(self,
                 name='ShortCol',
                 condP=None,
                 rebP=None,
                 LKey=None,
                 HKey=None):
        self.condP = condP
        self.rebP = rebP
        self.LKey = LKey
        self.HKey = HKey
        self.LKeyMolFrac = None
        self.HKeyMolFrac = None
        #self.name = name[0]
        self.name = name + str(ShortcutColumn.counter)
        self.OM_data_eqn = ''
        self.OM_data_init = ''
        self.InputStms = None
        self.OutputStms = None

        self.EngStm1 = EngStm(name='EngStm1' + self.name)
        self.EngStm2 = EngStm(name='EngStm2' + self.name)
        #self.count = name[1]
        self.count = ShortcutColumn.counter
        self.condType = ''
        self.actR = None
        self.thermoPackage = 'Raoults_Law'
        self.type = 'ShortCol'

        # new
        self.no_of_input = 1
        self.no_of_output = 2
        ShortcutColumn.counter += 1
示例#3
0
    def __init__(self,name='DistCol', numStage = None,numFeeds = None,feedStages = None):
        self.numStage = numStage
        self.numFeeds=numFeeds
        self.feedStages=feedStages
        #self.name = name[0]
        self.name = name + str(DistCol.counter) 
        self.OM_data_eqn = ''
        self.OM_data_init = ''
        self.InputStms = None
        self.OutputStms = None
        self.EngStm1 = EngStm(name='EngStm1'+self.name)
        self.EngStm2 = EngStm(name='EngStm2'+self.name)
        #self.count = name[1]
        self.count = DistCol.counter
        self.thermoPackage='Raoults_Law'
        self.type = 'DistCol'
        self.mode = None
        self.condType=''
        self.modeVal = None
        self.condP=None
        self.rebP=None

        # new 
        self.no_of_input = 2 
        self.no_of_output = 2  
        DistCol.counter += 1  
    def __init__(self, name='Heater', PressureDrop=None, eff=None):
        self.PressureDrop = PressureDrop
        self.eff = eff
        #self.name = name
        self.OM_data_eqn = ''
        self.OM_data_init = ''
        self.InputStms = None
        #self.heatAdd=heatAdd
        #self.outT = outT
        self.OutputStms = None
        self.EngStms = EngStm(name='EngStm' + name)
        self.type = 'Heater'
        self.mode = None
        self.modeVal = None

        self.Prop = {
            'pressDrop': None,
            'eff': None,
            'outT': None,
            'tempInc': None,
            'heatAdd': None,
        }

        # new
        self.name = name + str(Heater.counter)
        self.no_of_input = 1
        self.no_of_output = 1
        Heater.counter += 1
    def __init__(self, name='Cooler', PressureDrop=None, eff=None):
        self.PressureDrop = PressureDrop
        self.eff = eff
        # self.name = name
        self.OM_data_eqn = ''
        self.OM_data_init = ''
        self.InputStms = None
        self.OutputStms = None
        #self.heatRem = heatRem
        self.EngStms = EngStm(name='EngStm')
        self.type = 'Cooler'
        self.mode = None
        self.modeVal = None

        self.Prop = {
            'pressDrop': None,
            'eff': None,
            'outT': None,
            'tempDrop': None,
            'heatRem': None,
        }
        # new
        self.name = name + str(Cooler.counter)
        self.no_of_input = 1
        self.no_of_output = 1
        Cooler.counter += 1
示例#6
0
 def __init__(self,CompNames = [],name='compoundseparator',SepFact=['Molar_Flow','Mass_Flow'],SepStrm=1,SepFactValue=[]):
     self.SepFact = json.dumps(SepFact).replace('[','{').replace(']','}')
     self.SepStrm = str(SepStrm)
     self.SepFactValue = json.dumps(SepFactValue).replace('[','{').replace(']','}')
     self.name = name
     self.OM_data_eqn = ''
     self.OM_data_init = ''
     self.InputStms = []
     self.OutputStms = []
     self.type = 'CompSep'
     self.EngStms = EngStm(name='EngStm')
示例#7
0
    def __init__(self, CompNames = [], name='ShortcutColumn'):
        UnitOperation.__init__(self)
        self.name = name + str(ShortcutColumn.counter) 
        self.type = 'ShortcutColumn'
        self.no_of_inputs = 1 
        self.no_of_outputs = 2  
        self.EngStm1 = EngStm(name='EngStm1'+self.name)
        self.EngStm2 = EngStm(name='EngStm2'+self.name)
        self.count = ShortcutColumn.counter

        self.extra = ['ShortcutColumn']
        self.for_naming = ['ShortcutColumn']
        self.thermo_pack_req = True

        self.parameters = ['HKey', 'LKey', 'HKey_x_pc', 'LKey_x_pc', 'Ctype', 'Pcond', 'Preb', 'RR']
        self.result_parameters = ['RRmin', 'Ntmin', 'Nt', 'Intray', 'Fliqstrip', 'Fliqrec', 'Fvapstrip', 'Fvaprec', 'Qc', 'Qr']
        type(self).counter += 1

        self.variables = {
            'HKey'  :           {'name':'Heavy Key',                    'value':None,           'unit':''},
            'LKey'  :           {'name':'Light Key',                    'value':None,           'unit':''},
            'HKey_x_pc' :       {'name':'Heavy Key Mole Fraction',      'value':0.01,           'unit':'mol/s'},
            'LKey_x_pc' :       {'name':'Light Key Mole Fraction',      'value':0.01,           'unit':'mol/s'},
            'Ctype' :           {'name':'Condensor Type',               'value':None,           'unit':''},
            'thermo_package' :  {'name':'Thermo Package',               'value':'Raoults_Law',  'unit':''},
            'Pcond' :           {'name':'Condensor Pressure',           'value':101325,         'unit':'Pa'},
            'Preb'  :           {'name':'Reboiler Pressure',            'value':101325,         'unit':'Pa'},
            'RR'    :           {'name':'Reflux Ratio',                 'value':1.5,            'unit':''},
            
            'RRmin' :           {'name':'Minimum Reflux Ratio',         'value': None ,     'unit':''},
            'Ntmin' :           {'name':'Minimum Number of Stages',     'value': None,      'unit':''},
            'Nt'    :           {'name':'Actual Number of Stages',      'value': None,      'unit':''},
            'Intray'   :        {'name':'Optimal Feed Stage',           'value': None,      'unit':''},
            'Fliqstrip' :       {'name':'Stripping Liquid',             'value': None,      'unit':'mol/s'},
            'Fliqrec'   :       {'name':'Rectification Liquid',         'value': None,      'unit':'mol/s'},
            'Fvapstrip' :       {'name':'Stripping Vapor',              'value': None,      'unit':'mol/s'},
            'Fvaprec'   :       {'name':'Recification Vapour',          'value': None,      'unit':'mol/s'},
            'Qc'    :           {'name':'Conderser Duty',               'value': None,      'unit':'W'},
            'Qr'    :           {'name':'Reboiler Duty',                'value': None,      'unit':'W'},

        } 
 def __init__(self, name=('AdiaExp', 1), eff=None):
     self.eff = eff
     self.name = name[0]
     self.OM_data_eqn = ''
     self.OM_data_init = ''
     self.InputStms = None
     self.OutputStms = None
     self.EngStms = EngStm(name='EngStm' + self.name)
     self.count = name[1]
     self.type = 'AdiaExp'
     self.thermoPackage = "Raoults_Law"
     self.mode = None
     self.modeVal = None
 def __init__(self, name='Pump', eff=None):
     self.eff = eff
     self.name = name
     self.OM_data_eqn = ''
     self.OM_data_init = ''
     self.InputStms = None
     #self.heatAdd=heatAdd
     #self.outT = outT
     self.OutputStms = None
     self.EngStms = EngStm(name='EngStm' + name)
     self.type = 'Pump'
     self.mode = None
     self.modeVal = None
 def __init__(self,
              name=('DistCol', 1),
              numStage=None,
              numFeeds=None,
              feedStages=None):
     self.numStage = numStage
     self.numFeeds = numFeeds
     self.feedStages = feedStages
     self.name = name[0]
     self.OM_data_eqn = ''
     self.OM_data_init = ''
     self.InputStms = None
     self.OutputStms = None
     self.EngStm1 = EngStm(name='EngStm1' + self.name)
     self.EngStm2 = EngStm(name='EngStm2' + self.name)
     self.count = name[1]
     self.thermoPackage = 'Raoults_Law'
     self.type = 'DistCol'
     self.mode = None
     self.condType = ''
     self.modeVal = None
     self.condP = None
     self.rebP = None
示例#11
0
 def __init__(self,name='Heat_Exchanger', heatLoss = None, deltap_hot = None, deltap_cold = None, mode = '',calc_method = ''):
     self.heatLoss = heatLoss
     self.deltap_hot = deltap_hot
     self.deltap_cold = deltap_cold
     self.mode = mode
     self.calc_method = calc_method
     self.name = name
     self.OM_data_eqn = ''
     self.OM_data_init = ''
     self.InputStms = None
     self.OutputStms = None
     self.EngStms = EngStm(name='EngStm'+name)
     self.type = 'Heat_Exchanger'
     self.modeVal = None
示例#12
0
 def __init__(self,
              name=("ShortcutCol", 1),
              condP=None,
              rebP=None,
              LKey=None,
              HKey=None):
     self.condP = condP
     self.rebP = rebP
     self.LKey = LKey
     self.HKey = HKey
     self.LKeyMolFrac = None
     self.HKeyMolFrac = None
     self.name = name[0]
     self.OM_data_eqn = ''
     self.OM_data_init = ''
     self.InputStms = None
     self.OutputStms = None
     self.EngStm1 = EngStm(name='EngStm1' + self.name)
     self.EngStm2 = EngStm(name='EngStm2' + self.name)
     self.count = name[1]
     self.condType = ''
     self.actR = None
     self.thermoPackage = 'Raoults_Law'
     self.type = 'ShortCol'
示例#13
0
    def __init__(self,CompNames = [],name='CompSep',SepFact=['Molar_Flow','Mass_Flow'],SepStrm=1,SepFactValue=[]):
        self.SepFact = json.dumps(SepFact).replace('[','{').replace(']','}')
        self.SepStrm = str(SepStrm)
        self.SepFactValue = json.dumps(SepFactValue).replace('[','{').replace(']','}')
        #self.name = name
        self.OM_data_eqn = ''
        self.OM_data_init = ''
        self.InputStms = []
        self.OutputStms = []
        self.type = 'CompSep'
        self.EngStms = EngStm(name='EngStm')

         # new 
        self.name = name + str(CompSep.counter) 
        self.no_of_input = 1 
        self.no_of_output = 2  
        CompSep.counter += 1  
 def __init__(self, name='Pump', eff=None):
     self.eff = eff
     #self.name = name
     self.OM_data_eqn = ''
     self.OM_data_init = ''
     self.InputStms = None
     #self.heatAdd=heatAdd
     #self.outT = outT
     self.OutputStms = None
     self.EngStms = EngStm(name='EngStm' + name)
     self.type = 'Pump'
     self.mode = None
     self.modeVal = None
     # new
     self.name = name + str(Pump.counter)
     self.no_of_input = 1
     self.no_of_output = 1
     Pump.counter += 1
    def __init__(self, name='AdiabaticExpander', eff=None):
        self.eff = eff
        #self.name = name[0]
        self.name = name + str(AdiabaticExpander.counter)
        self.OM_data_eqn = ''
        self.OM_data_init = ''
        self.InputStms = None
        self.OutputStms = None
        self.EngStms = EngStm(name='EngStm' + self.name)
        #self.count = name[1]
        self.count = AdiabaticExpander.counter
        self.type = 'AdiabaticExpander'
        self.thermoPackage = "RaoultsLaw"
        self.mode = None
        self.modeVal = None

        # new
        self.no_of_input = 1
        self.no_of_output = 1
        AdiabaticExpander.counter += 1
    def __init__(self, name='cooler', PressureDrop=None, eff=None):
        self.PressureDrop = PressureDrop
        self.eff = eff
        self.name = name
        self.OM_data_eqn = ''
        self.OM_data_init = ''
        self.InputStms = None
        self.OutputStms = None
        #self.heatRem = heatRem
        self.EngStms = EngStm(name='EngStm')
        self.type = 'Cooler'
        self.mode = None
        self.modeVal = None

        self.Prop = {
            'pressDrop': None,
            'eff': None,
            'outT': None,
            'tempDrop': None,
            'heatRem': None,
        }