Cooler Classes

mcycle.components.coolers.clr_basic.ClrBasic(…) Basic expansion defined by a pressure ratio and isentropic efficiency.
mcycle.components.coolers.clr_basic.ClrBasicConstP(…) Basic constant pressure heat addition.
mcycle.components.coolers.clr_basic.ClrBasicConstV(…) Basic constant volume heat addition.

ClrBasic Class

class mcycle.components.coolers.clr_basic.ClrBasic(double Q, double effThermal=1.0, FlowState flowIn=None, FlowState flowOut=None, FlowState ambient=None, unicode sizeAttr=u'pRatio', list sizeBounds=[1, 50], list sizeUnitsBounds=[], unicode name=u'ClrBasic instance', unicode notes=u'No notes/model info.', Config config=Config())

Bases: mcycle.bases.component.Component11

Basic expansion defined by a pressure ratio and isentropic efficiency.

Parameters:

pRatio : float

Pressure increase ratio [-].

effIsentropic : float, optional

Isentropic efficiency [-]. Defaults to 1.

flowIn : FlowState, optional

Incoming FlowState. Defaults to None.

flowOut : FlowState, optional

Outgoing FlowState. Defaults to None.

ambient : FlowState, optional

Ambient environment flow state. Defaults to None.

sizeAttr : string, optional

Default attribute used by size(). Defaults to “pRatio”.

sizeBounds : float or list of float, optional

Bracket containing solution of size(). Defaults to [1, 50].

  • if sizeBounds=[a,b]: scipy.optimize.brentq is used.
  • if sizeBounds=a or [a]: scipy.optimize.newton is used.

name : string, optional

Description of Component object. Defaults to “ExpBasic instance”.

notes : string, optional

Additional notes on the component such as model numbers. Defaults to “No notes/model info.”.

config : Config, optional

Configuration parameters. Defaults to the default Config object.

kwargs : optional

Arbitrary keyword arguments.

Attributes

Q Q: ‘double’
ambient ambient: mcycle.bases.flowstate.FlowState
config config: mcycle.bases.config.Config
effThermal effThermal: ‘double’
flowIn Alias for self.flowsIn[0]
flowInSf Alias for self.flowsIn[1]
flowInWf Alias for self.flowsIn[0]
flowOut Alias for self.flowsOut[0]
flowOutSf Alias for self.flowsOut[1]
flowOutWf Alias for self.flowsOut[0]
flowsIn flowsIn: list
flowsOut flowsOut: list
m Alias for self.flowsIn[0].m
mWf Alias for self.flowsIn[0].m
name name: unicode
notes notes: unicode
runBounds runBounds: ‘double [2]’
sizeAttr sizeAttr: unicode
sizeBounds sizeBounds: list
sizeUnitsBounds sizeUnitsBounds: list

Methods

copy(self, dict kwargs={}) Return a new copy of a class object.
dpSf(self) float: Pressure drop of the secondary fluid [Pa]. Defaults to 0.
dpWf(self) float: Pressure drop of the working fluid [Pa]. Defaults to 0.
run(self)
size(self, unicode attr=u, list bounds=[], …)
sizeUnits(self, unicode attr, list bounds)
summary(self, bool printSummary=True[, …]) Returns (and prints) a summary of the component attributes/properties/flows.
update(self, dict kwargs) Update (multiple) class variables from a dictionary of keyword arguments.
Q

Q: ‘double’

ambient

ambient: mcycle.bases.flowstate.FlowState

config

config: mcycle.bases.config.Config

copy(self, dict kwargs={})

Return a new copy of a class object. Kwargs (as dict) are passed to update() as a shortcut of simultaneously copying and updating.

Parameters:

kwargs : dict, optional

Dictionary of attributes and their updated value.

dpSf(self) → double

float: Pressure drop of the secondary fluid [Pa]. Defaults to 0.

dpWf(self) → double

float: Pressure drop of the working fluid [Pa]. Defaults to 0.

effThermal

effThermal: ‘double’

flowIn

Alias for self.flowsIn[0]

flowInSf

Alias for self.flowsIn[1]

flowInWf

Alias for self.flowsIn[0]

flowOut

Alias for self.flowsOut[0]

flowOutSf

Alias for self.flowsOut[1]

flowOutWf

Alias for self.flowsOut[0]

flowsIn

flowsIn: list

flowsOut

flowsOut: list

m

Alias for self.flowsIn[0].m

mWf

Alias for self.flowsIn[0].m

name

name: unicode

notes

notes: unicode

run(self) → void
runBounds

runBounds: ‘double [2]’

size(self, unicode attr=u'', list bounds=[], list unitsBounds=[])
sizeAttr

sizeAttr: unicode

sizeBounds

sizeBounds: list

sizeUnits(self, unicode attr, list bounds) → void
sizeUnitsBounds

sizeUnitsBounds: list

summary(self, bool printSummary=True, propertyKeys=u'all', flowKeys=u'none', unicode name=u'', int rstHeading=0)

Returns (and prints) a summary of the component attributes/properties/flows.

Parameters:

printSummary : bool, optional

If true, the summary string is printed as well as returned. Defaults to True.

propertyKeys : list or str, optional

Keys of component properties to be included. The following strings are also accepted as inputs:

  • ‘all’: all properties in _properties are included,

  • ‘none’: no properties are included.

    Defaults to ‘all’.

flowKeys : list or str, optional

Keys of component flows to be included. The following strings are also accepted as inputs:

  • ‘all’: all flows are included,

  • ‘none’: no flows are included.

    Defaults to ‘none’.

name : str, optional

Name of instance used in summary heading. If None, the name property of the instance is used. Defaults to None.

rstHeading : int, optional

Level of reStructuredText heading to give the summary, 0 being the top heading. Heading style taken from mcycle.DEFAULTS.RSTHEADINGS. Defaults to 0.

update(self, dict kwargs) → void

Update (multiple) class variables from a dictionary of keyword arguments.

Parameters:

kwargs : dict

Dictionary of attributes and their updated value; kwargs={‘key’: value}.

class mcycle.components.coolers.clr_basic.ClrBasicConstP(double Q, double effThermal=1.0, FlowState flowIn=None, FlowState flowOut=None, FlowState ambient=None, unicode sizeAttr=u'pRatio', list sizeBounds=[1, 50], list sizeUnitsBounds=[], unicode name=u'ClrBasic instance', unicode notes=u'No notes/model info.', Config config=Config())

Bases: mcycle.components.coolers.clr_basic.ClrBasic

Basic constant pressure heat addition.

Parameters:

Q : float

Heat added [W].

effThermal : float, optional

Thermal efficiency [-]. Defaults to 1.

flowIn : FlowState, optional

Incoming FlowState. Defaults to None.

flowOut : FlowState, optional

Outgoing FlowState. Defaults to None.

sizeAttr : string, optional

Default attribute used by size(). Defaults to “effThermal”.

sizeBounds : float or list of float, optional

Bracket containing solution of size(). Defaults to [0.1, 1.0].

  • if sizeBounds=[a,b]: scipy.optimize.brentq is used.
  • if sizeBounds=a or [a]: scipy.optimize.newton is used.

name : string, optional

Description of Component object. Defaults to “ClrBasicConstP instance”.

notes : string, optional

Additional notes on the component such as model numbers. Defaults to “No notes/model info.”.

config : Config, optional

Configuration parameters. Defaults to the default Config object.

kwargs : optional

Arbitrary keyword arguments.

Attributes

Q Q: ‘double’
ambient ambient: mcycle.bases.flowstate.FlowState
config config: mcycle.bases.config.Config
effThermal effThermal: ‘double’
flowIn Alias for self.flowsIn[0]
flowInSf Alias for self.flowsIn[1]
flowInWf Alias for self.flowsIn[0]
flowOut Alias for self.flowsOut[0]
flowOutSf Alias for self.flowsOut[1]
flowOutWf Alias for self.flowsOut[0]
flowsIn flowsIn: list
flowsOut flowsOut: list
m Alias for self.flowsIn[0].m
mWf Alias for self.flowsIn[0].m
name name: unicode
notes notes: unicode
runBounds runBounds: ‘double [2]’
sizeAttr sizeAttr: unicode
sizeBounds sizeBounds: list
sizeUnitsBounds sizeUnitsBounds: list

Methods

copy(self, dict kwargs={}) Return a new copy of a class object.
dpSf(self) float: Pressure drop of the secondary fluid [Pa]. Defaults to 0.
dpWf(self) float: Pressure drop of the working fluid [Pa]. Defaults to 0.
run(self) Compute outgoing FlowState from component attributes.
size(self, unicode attr=u, list bounds=[], …)
sizeUnits(self, unicode attr, list bounds)
summary(self, bool printSummary=True[, …]) Returns (and prints) a summary of the component attributes/properties/flows.
update(self, dict kwargs) Update (multiple) class variables from a dictionary of keyword arguments.
Q

Q: ‘double’

ambient

ambient: mcycle.bases.flowstate.FlowState

config

config: mcycle.bases.config.Config

copy(self, dict kwargs={})

Return a new copy of a class object. Kwargs (as dict) are passed to update() as a shortcut of simultaneously copying and updating.

Parameters:

kwargs : dict, optional

Dictionary of attributes and their updated value.

dpSf(self) → double

float: Pressure drop of the secondary fluid [Pa]. Defaults to 0.

dpWf(self) → double

float: Pressure drop of the working fluid [Pa]. Defaults to 0.

effThermal

effThermal: ‘double’

flowIn

Alias for self.flowsIn[0]

flowInSf

Alias for self.flowsIn[1]

flowInWf

Alias for self.flowsIn[0]

flowOut

Alias for self.flowsOut[0]

flowOutSf

Alias for self.flowsOut[1]

flowOutWf

Alias for self.flowsOut[0]

flowsIn

flowsIn: list

flowsOut

flowsOut: list

m

Alias for self.flowsIn[0].m

mWf

Alias for self.flowsIn[0].m

name

name: unicode

notes

notes: unicode

run(self) → void

Compute outgoing FlowState from component attributes.

runBounds

runBounds: ‘double [2]’

size(self, unicode attr=u'', list bounds=[], list unitsBounds=[])
sizeAttr

sizeAttr: unicode

sizeBounds

sizeBounds: list

sizeUnits(self, unicode attr, list bounds) → void
sizeUnitsBounds

sizeUnitsBounds: list

summary(self, bool printSummary=True, propertyKeys=u'all', flowKeys=u'none', unicode name=u'', int rstHeading=0)

Returns (and prints) a summary of the component attributes/properties/flows.

Parameters:

printSummary : bool, optional

If true, the summary string is printed as well as returned. Defaults to True.

propertyKeys : list or str, optional

Keys of component properties to be included. The following strings are also accepted as inputs:

  • ‘all’: all properties in _properties are included,

  • ‘none’: no properties are included.

    Defaults to ‘all’.

flowKeys : list or str, optional

Keys of component flows to be included. The following strings are also accepted as inputs:

  • ‘all’: all flows are included,

  • ‘none’: no flows are included.

    Defaults to ‘none’.

name : str, optional

Name of instance used in summary heading. If None, the name property of the instance is used. Defaults to None.

rstHeading : int, optional

Level of reStructuredText heading to give the summary, 0 being the top heading. Heading style taken from mcycle.DEFAULTS.RSTHEADINGS. Defaults to 0.

update(self, dict kwargs) → void

Update (multiple) class variables from a dictionary of keyword arguments.

Parameters:

kwargs : dict

Dictionary of attributes and their updated value; kwargs={‘key’: value}.

class mcycle.components.coolers.clr_basic.ClrBasicConstV(double Q, double effThermal=1.0, FlowState flowIn=None, FlowState flowOut=None, FlowState ambient=None, unicode sizeAttr=u'pRatio', list sizeBounds=[1, 50], list sizeUnitsBounds=[], unicode name=u'ClrBasic instance', unicode notes=u'No notes/model info.', Config config=Config())

Bases: mcycle.components.coolers.clr_basic.ClrBasic

Basic constant volume heat addition.

Parameters:

Q : float

Heat added [W].

effThermal : float, optional

Thermal efficiency [-]. Defaults to 1.

flowIn : FlowState, optional

Incoming FlowState. Defaults to None.

flowOut : FlowState, optional

Outgoing FlowState. Defaults to None.

sizeAttr : string, optional

Default attribute used by size(). Defaults to “effThermal”.

sizeBounds : float or list of float, optional

Bracket containing solution of size(). Defaults to [0.1, 1.0].

  • if sizeBounds=[a,b]: scipy.optimize.brentq is used.
  • if sizeBounds=a or [a]: scipy.optimize.newton is used.

name : string, optional

Description of Component object. Defaults to “ClrBasicConstV instance”.

notes : string, optional

Additional notes on the component such as model numbers. Defaults to “No notes/model info.”.

config : Config, optional

Configuration parameters. Defaults to the default Config object.

kwargs : optional

Arbitrary keyword arguments.

Attributes

Q Q: ‘double’
ambient ambient: mcycle.bases.flowstate.FlowState
config config: mcycle.bases.config.Config
effThermal effThermal: ‘double’
flowIn Alias for self.flowsIn[0]
flowInSf Alias for self.flowsIn[1]
flowInWf Alias for self.flowsIn[0]
flowOut Alias for self.flowsOut[0]
flowOutSf Alias for self.flowsOut[1]
flowOutWf Alias for self.flowsOut[0]
flowsIn flowsIn: list
flowsOut flowsOut: list
m Alias for self.flowsIn[0].m
mWf Alias for self.flowsIn[0].m
name name: unicode
notes notes: unicode
runBounds runBounds: ‘double [2]’
sizeAttr sizeAttr: unicode
sizeBounds sizeBounds: list
sizeUnitsBounds sizeUnitsBounds: list

Methods

copy(self, dict kwargs={}) Return a new copy of a class object.
dpSf(self) float: Pressure drop of the secondary fluid [Pa]. Defaults to 0.
dpWf(self) float: Pressure drop of the working fluid [Pa]. Defaults to 0.
run(self) Compute outgoing FlowState from component attributes.
size(self, unicode attr=u, list bounds=[], …)
sizeUnits(self, unicode attr, list bounds)
summary(self, bool printSummary=True[, …]) Returns (and prints) a summary of the component attributes/properties/flows.
update(self, dict kwargs) Update (multiple) class variables from a dictionary of keyword arguments.
Q

Q: ‘double’

ambient

ambient: mcycle.bases.flowstate.FlowState

config

config: mcycle.bases.config.Config

copy(self, dict kwargs={})

Return a new copy of a class object. Kwargs (as dict) are passed to update() as a shortcut of simultaneously copying and updating.

Parameters:

kwargs : dict, optional

Dictionary of attributes and their updated value.

dpSf(self) → double

float: Pressure drop of the secondary fluid [Pa]. Defaults to 0.

dpWf(self) → double

float: Pressure drop of the working fluid [Pa]. Defaults to 0.

effThermal

effThermal: ‘double’

flowIn

Alias for self.flowsIn[0]

flowInSf

Alias for self.flowsIn[1]

flowInWf

Alias for self.flowsIn[0]

flowOut

Alias for self.flowsOut[0]

flowOutSf

Alias for self.flowsOut[1]

flowOutWf

Alias for self.flowsOut[0]

flowsIn

flowsIn: list

flowsOut

flowsOut: list

m

Alias for self.flowsIn[0].m

mWf

Alias for self.flowsIn[0].m

name

name: unicode

notes

notes: unicode

run(self) → void

Compute outgoing FlowState from component attributes.

runBounds

runBounds: ‘double [2]’

size(self, unicode attr=u'', list bounds=[], list unitsBounds=[])
sizeAttr

sizeAttr: unicode

sizeBounds

sizeBounds: list

sizeUnits(self, unicode attr, list bounds) → void
sizeUnitsBounds

sizeUnitsBounds: list

summary(self, bool printSummary=True, propertyKeys=u'all', flowKeys=u'none', unicode name=u'', int rstHeading=0)

Returns (and prints) a summary of the component attributes/properties/flows.

Parameters:

printSummary : bool, optional

If true, the summary string is printed as well as returned. Defaults to True.

propertyKeys : list or str, optional

Keys of component properties to be included. The following strings are also accepted as inputs:

  • ‘all’: all properties in _properties are included,

  • ‘none’: no properties are included.

    Defaults to ‘all’.

flowKeys : list or str, optional

Keys of component flows to be included. The following strings are also accepted as inputs:

  • ‘all’: all flows are included,

  • ‘none’: no flows are included.

    Defaults to ‘none’.

name : str, optional

Name of instance used in summary heading. If None, the name property of the instance is used. Defaults to None.

rstHeading : int, optional

Level of reStructuredText heading to give the summary, 0 being the top heading. Heading style taken from mcycle.DEFAULTS.RSTHEADINGS. Defaults to 0.

update(self, dict kwargs) → void

Update (multiple) class variables from a dictionary of keyword arguments.

Parameters:

kwargs : dict

Dictionary of attributes and their updated value; kwargs={‘key’: value}.