business.gravity.mixins package

Submodules

business.gravity.mixins.airlock module

Provide ‘air-lock’ calculations in a tree-like topology.

class business.gravity.mixins.airlock.OpenEndsTrunkStretchAirlockMixin

Bases: object

Mixin gathering algorithms to detect the onset of an ‘air-lock’ in

the pipes.

hgl_is_vapour_compliant()

Boolean test checking whether a Trunk will suffer from ‘air-lock’. limits.

hgl_prevents_air_locks()

TODO:

property hgl_is_vapour_compliant
Returns

  • True – if the hydraulic pressure along the entire trunk length remains above the minimal value that prevents air-lock formation

  • False – otherwise

property hgl_prevents_air_locks
Returns

  • True – if the hydraulic pressure along the entire trunk length remains above the minimal value that prevents air-lock formation

  • False – otherwise

business.gravity.mixins.crawl module

class business.gravity.mixins.crawl.TrunkSolverStretchMixin

Bases: object

property crawl_pipes

business.gravity.mixins.energy module

Provide ‘hydraulic energy’ calculations in a tree-like topology.

class business.gravity.mixins.energy.BaseEnergyMixin

Bases: object

Algorithms for ‘hydraulic energy’ calculations in a gravity system.

class business.gravity.mixins.energy.CheckEnergyNetworkMixin

Bases: business.gravity.mixins.energy.BaseEnergyMixin

Algorithms for hydraulic energy calculations needed when solving the hydraulic check problem.

class business.gravity.mixins.energy.EnergyDesignMixin

Bases: business.gravity.mixins.energy.BaseEnergyMixin

Algorithms for hydraulic energy calculations needed when solving the ‘hydraulic design problem’.

business.gravity.mixins.flows module

Provide water flow calculations in a tree-like topology.

class business.gravity.mixins.flows.FlowDesignMixin

Bases: object

Algorithms for ‘water flow’ calculations in a gravity system.

Functionality: evaluate the water demand as a sum of the water demand for each downstream Trunk.

Ancestor of ZoningMixin and ZoningMixin.

Notes

Flows must be set before solving the ‘hydraulic design problem’. The Trunks have the demand defined at their ‘head end’. The demand at a ‘tail end’ is not part of this model since such demand is the ‘head end’ demand of the parent Trunk. The spring intake has no demand, since this has no impact on the calculations of the pipes.

business.gravity.mixins.topology module

Provide algorithms and methods pertaining to the tree-like topology of the water supply.

class business.gravity.mixins.topology.BaseTrunksNetworkMixin

Bases: object

Algorithms for common topographical calculations to BaseGravity.

Ancestor of CheckTrunksNetworkMixin and DesignTrunksNetworkMixin.

class business.gravity.mixins.topology.CheckTrunksNetworkMixin

Bases: business.gravity.mixins.topology.BaseTrunksNetworkMixin

Topology algorithms specific to the hydraulic check problem.

class business.gravity.mixins.topology.DesignTrunksNetworkMixin

Bases: business.gravity.mixins.topology.BaseTrunksNetworkMixin

Topology algorithms specific to the ‘hydraulic design problem’.

business.gravity.mixins.trimming module

Collection of algorithms that slice a Subtrunk into subsections.

class business.gravity.mixins.trimming.TrunkStretchTrimmingMixin

Bases: object

Mixin gathering methods used to slice the Subtrunk profile or its piped segments.

Slicing is required because a Subtrunk may have sections where the hydraulic pressure limits are exceeded. It is therefore necessary to slice a Subtrunk into valid and unacceptable sections.

business.gravity.mixins.zoning module

Define the concept of ‘splitting’ a tree into independent subtrees.

class business.gravity.mixins.zoning.ZoningMixin

Bases: object

Algorithms for pressure zone calculations.

Functionality: split the dendridic network in subnetworks. Each subnetwork originates from an atmospheric ‘tail end’.

Ancestor of ZoningMixin and ZoningMixin.

Notes

The hydraulic design and check problems are solved separately within each subtrunk. From a mathematical perspective, each subtrunk is a water supply system, with water under pressure.