How to use the gekko.chemical.MassflowObj function in gekko

To help you get started, we’ve selected a few gekko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BYU-PRISM / GEKKO / gekko / chemical.py View on Github external
def massflow(self,y=None,sn=''):
        '''
        massflow(mo=None)

        Inputs:
          y = Massflow Object
            mdot = massflow (kg)
            stream = ''
          sn = Stream name if already created
        '''
        self._thermo_obj = True
        if y==None:
            y = MassflowObj()
            
        # create mass object
        y.name = self.add_obj('Massflow')
                
        # stream
        if sn=='':
            y.stream = self.stream(fixed=True)
            self.connect(y.stream,y.name+'.stream')
        else:
            # connection
            self.connect(sn,y.name+'.stream')
            y.stream = sn

        # massflow
        y.mdot = self.cxn(y.mdot,1.0,y.name + '.mdot',fixed=False)
github BYU-PRISM / GEKKO / gekko / chemical.py View on Github external
def massflows(self,y=None,sn=''):
        '''
        massflows(mo=None)

        Inputs:
          y = Massflow Object
            mdot = massflow (kg)
            mdoti = massflow of components (kg)
            stream = ''
          sn = Stream name if already created
        '''
        self._thermo_obj = True
        if y==None:
            y = MassflowObj()
            
        # create mass object
        y.name = self.add_obj('Massflows')
                
        # stream
        if sn=='':
            y.stream = self.stream(fixed=True)
            self.connect(y.stream,y.name+'.stream')
        else:
            # connection
            self.connect(sn,y.name+'.stream')
            y.stream = sn

        # massflow
        y.mdot = self.cxn(y.mdot,1.0,y.name + '.mdot',fixed=False)
        # component massflow