preferences#

preferences: DisplayPreferences = <biosteam._preferences.DisplayPreferences object>#
class DisplayPreferences[source]#

All preferences for BioSTEAM diagram and results display.

Examples

>>> from biosteam import preferences
>>> preferences.show()
DisplayPreferences:
label_streams: True
autodisplay: True
minimal_nodes: False
number_path: False
profile: False
raise_exception: False
background_color: 'transparent'
stream_color: '#90918e'
label_color: '#90918e'
depth_colors: ['#f98f609f']
stream_width: 'F_mass'
unit_color: '#555f69'
unit_label_color: 'white'
unit_periphery_color: '#90918e'
fill_cluster: False
graphviz_format: 'svg'
tooltips_full_results: False
graphviz_html_height: {'big-system': ('600px', '900px'), 'system': ('400px', '600px'), 'unit': ('225px', '400px')}
show_all_streams: True
flow: 'kmol/hr:.3g'
T: 'K:.5g'
P: 'Pa:.6g'
composition: False
N: 7
sort: False
label_streams: bool#

Whether to label the ID of streams with sources and sinks in process flow diagrams.

autodisplay: bool#

Whether to automatically generate diagrams when displaying an object in the IPython console.

minimal_nodes: bool#

Whether to ignore unit graphics and display unit nodes as dots in process flow diagrams.

number_path: bool#

Whether to number unit operations according to their order in the system path.

profile: bool#

Whether to clock the simulation time of unit operations in diagrams.

raise_exception: bool#

Whether to raise exception regarding problems displaying graphviz diagrams.

background_color: str#

Background color in graphviz diagrams.

stream_color: str#

Color of streams in graphviz diagrams.

label_color: str#

Color of stream labels in graphviz diagrams.

depth_colors: list[str]#

Color of subsystem clusters in BioSTEAM graphviz diagrams.

stream_width: str#

Property to scale stream widths in BioSTEAM graphviz diagrams.

unit_color: str#

Unit node fill color in BioSTEAM graphviz diagrams.

unit_label_color: str#

Unit node label color in BioSTEAM graphviz diagrams.

unit_periphery_color: str#

Unit node periphery color in BioSTEAM graphviz diagrams.

fill_cluster: bool#

Whether to fill subsystem boxes in BioSTEAM ‘cluster’ diagrams.

graphviz_format: str#

Image format of BioSTEAM graphviz diagrams.

tooltips_full_results: bool#

Whether to add full results in tooltips by inserting java script into graphviz html outputs.

graphviz_html_height: dict[str, tuple[str, str]]#

Displayed height of graphviz html diagrams without and with full results.

show_all_streams#

Whether to show all streams, including empty feeds and products.

temporary()[source]#

Return a TemporaryPreferences object that will revert back to original preferences after context management.

reset(save=False)[source]#

Reset to BioSTEAM defaults.

property flow: str#

Flow rate units and notation.

property T: str#

Temperature units and notation.

property P: str#

Pressure units and notation.

property composition: bool#

Whether to show composition.

property sort: bool#

Whether to sort flows in decreasing order.

property N: int#

Number of compounds to display.

classic_mode(stream='#90918e', label='#90918e', bg='transparent', cluster=('#f98f609f',), unit_color='#555f69', unit_label_color='white', unit_periphery_color='none', fill_cluster=False, save=False)[source]#

Set diagram display colors to classic mode.

dark_mode(stream='#98a2ad', label='#e5e5e5', bg='transparent', cluster=['#5172512f', '#1111112f'], unit_color='#555f69', unit_label_color='white', unit_periphery_color='none', fill_cluster=True, save=False)[source]#

Set diagram display colors to dark mode.

light_mode(stream='#4e4e4e', label='#4e4e4e', bg='#ffffffff', cluster=['#d5edf02f', '#ffffffdf'], unit_color='white:#CDCDCD', unit_label_color='black', unit_periphery_color='#4e4e4e', fill_cluster=True, save=False)[source]#

Set diagram display colors to light mode.

night_mode(stream='#98a2ad', label='#e5e5e5', bg='transparent', cluster=['#5172512f', '#1111112f'], unit_color='#555f69', unit_label_color='white', unit_periphery_color='none', fill_cluster=True, save=False)#

Set diagram display colors to dark mode.

day_mode(stream='#4e4e4e', label='#4e4e4e', bg='#ffffffff', cluster=['#d5edf02f', '#ffffffdf'], unit_color='white:#CDCDCD', unit_label_color='black', unit_periphery_color='#4e4e4e', fill_cluster=True, save=False)#

Set diagram display colors to light mode.

to_dict()[source]#

Return dictionary of all preferences.

save()[source]#

Save preferences.

show()[source]#

Print all specifications.