Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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