v0.3.2 - Carnot’s Colors (June, 10, 2020)#
New features#
Colored printouts are available in the
print_results()
method of the network class. There are three different color codes available with default settings:user specified parameters (
'set'
, blue)component parameters specified as variables (
'var'
, green)faulty parameters (
'err'
, red)
In order to change the colors, simply import
coloring
from thetespy.tools.global_vars
module and adjust the escape codes. For example, to reset all colors to white text:from tespy.tools.global_vars import coloring coloring['set'] = '\033[0m' coloring['err'] = '\033[0m' coloring['var'] = '\033[0m'
Bug fixes#
Readd method for
T_mix_ps
calculation for pure fluids: In case the fluid propagation did not go through (e.g. due to availability of good starting values) the fluid composition at a turbomachine’s inlet and outlet may not be equal (PR #207).Fix the calculation of mixture density: The density is calculated as sum of the densities of the mixture components at their respective partial pressure and the mixture temperature (PR #207). With the old method, the specific volume was calculated according to Amagat’s law, which produced incorrect values if one or more components of the mixture were liquid at the mixture’s temperature and pressure. See discussion about humid air propreties here: Issue #206.