plots.moody module¶
Plot the moody diagram that relates the friction factor with reynolds number and surface roughness in a circular pipe.
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:
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
Moody: Chart dialogcalculate(): Calculate procedureCalculateDialog: Dialog to calculate a specified point and its configurationConfig: Moody chart configuration
- 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:
QWidgetMoody chart configuration
Methods
value(config)Update ConfigParser instance with the config
- TITLE = 'Moody chart'¶
- TITLECONFIG = 'Moody diagram configuration'¶
- class plots.moody.Moody(parent=None)[source]¶
Bases:
ChartMoody chart dialog
- Attributes:
- note
Methods
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
- title = 'Moody Diagram'¶
- locLogo = (0.3, 0.15, 0.1, 0.1)¶
- note = None¶