plots.moody module

Plot the moody diagram that relates the friction factor with reynolds number and surface roughness in a circular pipe.

moody diagram

The diagram include all flow regimen, from laminar to fully developed turbulent flow. Support for click interaction, let user save the chart as image and a dialog to calculate the friction factor:

calculate point

Configuration

moody diagram configuration

The diagram let user configure several options like:

  • Equation to use, by default the original Colebrook-White, but it’s possible use one of available in lib.friction

  • Change the friction factor used in plot between the darcy (default) and the fanning factor.

  • Relative roughtness lines plotted in diagram

  • Line style used in plot

  • Line style used in crux when use mouse

  • Grid line visibility and style

API Reference

The module include all related moody chart functionality
plots.moody.translate(context: str, sourceText: str, disambiguation: str = None, n: int = -1) str
plots.moody.calculate(config)[source]

Calculate procedure, the data are saved to file to fast load again

class plots.moody.Config(config=None, parent=None)[source]

Bases: QWidget

Moody chart configuration

Methods

value(config)

Update ConfigParser instance with the config

TITLE = 'Moody chart'
TITLECONFIG = 'Moody diagram configuration'
__init__(config=None, parent=None)[source]
value(config)[source]

Update ConfigParser instance with the config

class plots.moody.Moody(parent=None)[source]

Bases: Chart

Moody chart dialog

Attributes:
note

Methods

calculate()

Define the functionality when click the calculate point button

click(event)

Update input and graph annotate when mouse click over chart

config()

Initialization action in plot don't neccesary to update in plot

createCrux(Re, f, ed)

Create a crux in selected point of plot and show data at bottom right corner

plot()

Plot the Moody chart using the indicate method

widgetConfig

title = 'Moody Diagram'
widgetConfig

alias of Config

note = None
config()[source]

Initialization action in plot don’t neccesary to update in plot

click(event)[source]

Update input and graph annotate when mouse click over chart

static _txt(Re, f, ed)[source]
createCrux(Re, f, ed)[source]

Create a crux in selected point of plot and show data at bottom right corner

plot()[source]

Plot the Moody chart using the indicate method

calculate()[source]

Define the functionality when click the calculate point button

class plots.moody.CalculateDialog(parent=None)[source]

Bases: QDialog

Dialog to calculate a specified point

Methods

calculate()

Calculate point procedure

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

Calculate point procedure