tools.UI_psychrometry module

This tool show a psychrometry (humid air) chart.

UI_psychrometry

The chart let user click to get the properties. Furthermore it’s possible define a point using the lateral panel and any of the input pair availables:

  • Dry bulb temperature - Humidity Ratio

  • Dry bulb temperature - Relative humidity

  • Dry bulb temperature - Wet bulb temperature

  • Dry bulb temperature - Dew point temperature

  • Dew point temperature - Relative humidity

  • Wet bulb temperature - Relative humidity

Also it’s possible change the pressure of the chart, or the altitude using the standard ASHRAE atmosphere equation

The chart can be saved as image file using the apropiate button.

Configuration

The chart can be configurated using the dialog

configuration

Chart type

There is two kind of psychrometric chart used in engineering, both supported, the normal ASHRAE chart with humidity ratio vs dry bulb temperature and the Mollier Chart with inverted axes.

Equation to use

By default use the ideal equation of state. The other option using the virial equation of state are unimplemented, only the external CoolProp library is now working

Line Style

For each kind of line it’s possible configure the line style, width, linestyle, color, marker …

Units

The units used in chart are the used in the last project open in main program. So it’s configurable using the project units configuration dialog.

API reference

The module include all related psychrometry chart functionality

and its configuration

tools.UI_psychrometry.translate(context: str, sourceText: str, disambiguation: str = None, n: int = -1) str
class tools.UI_psychrometry.PsychroPlot(*args, **kwargs)[source]

Bases: PlotWidget

Plot widget for psychrometric chart

Add custom margins Define a point for text state properties, to easy remove and redraw

Methods

clearCrux()

Clear crux lines for click interaction in plot

clearPointData()

Delete point data from plot

config(config)

Apply configuration to plot

createCrux(state, chart)

Update horizontal and vertical lines to show click point

showPointData(state[, chart])

Update data of current cursor point in plot annotates

__init__(*args, **kwargs)[source]
config(config)[source]

Apply configuration to plot

createCrux(state, chart)[source]

Update horizontal and vertical lines to show click point

clearCrux()[source]

Clear crux lines for click interaction in plot

showPointData(state, chart=True)[source]

Update data of current cursor point in plot annotates

clearPointData()[source]

Delete point data from plot

class tools.UI_psychrometry.PsychroInput(state=None, readOnly=False, parent=None)[source]

Bases: QWidget

Widget with parameter for psychrometric state

Methods

changeAltitude(value)

Change pressure through altitude and ICAO equation

changePressure(value)

Change pressure to global plot and for states

setReadOnly(readOnly)

Set readOnly all widget

setState(state)

Fill data input with state properties

updateInputs(index)

Update inputs appearance to highlight active

updateKwargs(key, value)

Update kwargs of state instance, if its correctly defined show it

pressureChanged

stateChanged

parameters = ['tdb', 'twb', 'tdp', 'w', 'HR', 'v', 'h']
stateChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

pressureChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

__init__(state=None, readOnly=False, parent=None)[source]

constructor optional state parameter to assign initial psychrometric state

updateInputs(index)[source]

Update inputs appearance to highlight active

setReadOnly(readOnly)[source]

Set readOnly all widget

updateKwargs(key, value)[source]

Update kwargs of state instance, if its correctly defined show it

setState(state)[source]

Fill data input with state properties

changePressure(value)[source]

Change pressure to global plot and for states

changeAltitude(value)[source]

Change pressure through altitude and ICAO equation

class tools.UI_psychrometry.UI_Psychrometry(parent=None)[source]

Bases: QDialog

Psychrometric charts tool

Methods

click(event)

Update input and graph annotate when mouse click over chart

configure()

Show configuration dialog

createState(x, y)

Create psychrometric state from click or mouse position

drawlabel(name, t, W, label, unit)

Draw annotation for isolines

plot()

Plot chart

setProgressValue(value)

Update progress bar with new value

showToolBar(checked)

Show/Hide left toolbar with additional funcionality

__init__(parent=None)[source]
configure()[source]

Show configuration dialog

showToolBar(checked)[source]

Show/Hide left toolbar with additional funcionality

drawlabel(name, t, W, label, unit)[source]
Draw annotation for isolines

name: name of isoline t: x array of line W: y array of line label: text value to draw unit: text units to draw

plot()[source]

Plot chart

click(event)[source]

Update input and graph annotate when mouse click over chart

createState(x, y)[source]

Create psychrometric state from click or mouse position

setProgressValue(value)[source]

Update progress bar with new value

class tools.UI_psychrometry.Config(config, parent=None)[source]

Bases: QWidget

Phychrometric chart configuration

Methods

value(config)

Return value for main dialog

lineas = [('IsoTdb', <class 'lib.unidades.Temperature'>, 'Iso dry bulb temperature'), ('IsoW', <class 'float'>, 'Iso absolute humidity'), ('IsoHR', <class 'float'>, 'Iso relative humidity'), ('IsoTwb', <class 'lib.unidades.Temperature'>, 'Iso wet bulb temperature'), ('Isochor', <class 'lib.unidades.SpecificVolume'>, 'Isochor')]
__init__(config, parent=None)[source]

constructor, config optional parameter to input project config

value(config)[source]

Return value for main dialog

class tools.UI_psychrometry.ConfigDialog(config=None, parent=None)[source]

Bases: QDialog

Dialog to config thermal method calculations

Methods

value(config)

Function result for wizard

__init__(config=None, parent=None)[source]
value(config)[source]

Function result for wizard