IrregularSectionOpenChannel

Class for the analysis of irregular shaped sections of open channel.\ Unit is disregarded in this class as the inputs can all be unit independent.

Constructors

this
this()

Empty constructor

this
this(Unknown u)

Constructor specifying the unknown.

Members

Functions

addPoint
void addPoint(Point p)

Methods + Add a single point

getAvailableUnknowns
Unknown[] getAvailableUnknowns()

Returns all the available unknowns for this class.

getMaxWaterElevation
float getMaxWaterElevation()

Get the elevation of the lower bank. Either from left or right.

getNewPoints
Point[] getNewPoints()

Returns the adjusted points.

getPoints
Point[] getPoints()

Returns the list of points

getWaterElevation
float getWaterElevation()

Returns the water elevation.

setPoints
void setPoints(Point[] pts)

Set the points with an array of Point objects.

setWaterElevation
void setWaterElevation(float we)

Sets the water elevation.

solve
bool solve()

Method to be called for the analysis regardless of the unknown.

Variables

availableUnknowns
Unknown[] availableUnknowns;

Available unknowns for this class.

maxWaterElevation
float maxWaterElevation;

Maximum allowed water elevation based on the lowest bank.

newPoints
Point[] newPoints;

Part of the <b>points</b> variable that is used and manipulated during the calculation.

points
Point[] points;

List of points that defines the channel shape.

waterElevation
float waterElevation;

Water elevation.

Inherited Members

From OpenChannel

GRAVITY_METRIC
auto GRAVITY_METRIC;

Gravitational acceleration in metric.

ERROR
auto ERROR;

Trial error max to 0.01%

Units
enum Units

Units options

FlowType
enum FlowType

Flow types. These are the categories in which the calculated froude number is compared to.

Unknown
enum Unknown

General available unknowns for open channel.

unit
Units unit;

Unit of measurement.\ All calculations will be done in metric but both metric and imperial system are supported.

discharge
double discharge;

Discharge (Flow Rate)

bedSlope
double bedSlope;

Rise over run of the channel.

waterDepth
double waterDepth;

Depth of water measured from the deepest point of the channel.

manningRoughness
float manningRoughness;

Manning's roughness coefficient.

wettedPerimeter
double wettedPerimeter;

Total length of the channel section covered with water.

wettedArea
double wettedArea;

Total area of the channel section covered with water.

hydraulicRadius
double hydraulicRadius;

wettedArea / wettedPerimeter

averageVelocity
double averageVelocity;

Average velocity over the whole cross section of the channel.

froudeNumber
float froudeNumber;

Froude number.

unknown
Unknown unknown;

Enum type. (e.g. DISCHARGE, WATER_DEPTH, etc.)

flowType
FlowType flowType;

Flow type reconned from the Enum type FlowType

hydraulicDepth
double hydraulicDepth;

Hydraulic depth

dischargeIntensity
double dischargeIntensity;

Discharge intensity. Discharge divided by the top channel width.

criticalDepth
double criticalDepth;

Depth of flow that will give critical flow.

criticalSlope
double criticalSlope;

Bed slope that will give critical flow.

availableUnknowns
Unknown[] availableUnknowns;

Available unknowns

isCalculationSuccess
bool isCalculationSuccess;

Variable that tells if the calculation has no error.

errorMessage
string errorMessage;

The error or warning message that helps debug or give information about the calculation results.

intialize
void intialize()

Put all the initializations here.

getDischarge
double getDischarge()

Returns the rate of flow in either cubic meter per second (metric) or cubic feet per second (english).

getAverageVelocity
double getAverageVelocity()

Returns the average velocity in the channel in either meter per second (metric) or feet per second (english).

getBedSlope
double getBedSlope()

Returns the bed (bottom) slope of the channel.

getWaterDepth
double getWaterDepth()

Returns the water depth in either meter or feet.

getWettedPerimeter
double getWettedPerimeter()

Returns the wet perimeter in either meter of feet.

getWettedArea
double getWettedArea()

Returns the wet area in either square meter or square foot.

getHydraulicRadius
double getHydraulicRadius()

Returns the hydraulic radius in either meters or feet.

getFroudeNumber
double getFroudeNumber()

Returns the froude number

getManningRoughness
double getManningRoughness()

Retuens the manning's roughness coefficient.

getFlowType
FlowType getFlowType()

Returns the string representation of type of flow.

getHydraulicDepth
double getHydraulicDepth()

Returns the hydraulic depth in either meter or foot.

getDischargeIntensity
double getDischargeIntensity()

Returns discharge intensity in either cubic meter per second per meter or cubic foot per second per foot.

getCriticalDepth
double getCriticalDepth()

Returns critical depth in either meters or feet.

getCriticalSlope
double getCriticalSlope()

Returns the slope of the critical flow for the channel.

isCalculationSuccessful
bool isCalculationSuccessful()

Check if an error has occurred. @return isError

getErrMessage
string getErrMessage()

Gets the error message. @return errMessage

setBedSlope
void setBedSlope(double pBedSlope)

Set the bed slope of the channel.

setDischarge
void setDischarge(double pDischarge)

Sets the discharge.

setWaterDepth
void setWaterDepth(double pWaterDepth)

Sets the water depth.

setManningRoughness
void setManningRoughness(double pManningRoughness)

Sets the manning roughness coefficient.

setUnknown
void setUnknown(Unknown u)

Sets the unknown based on the available unknowns of a specific channel type.

setUnit
void setUnit(Units u)

Sets the unit.

calculateFlowType
void calculateFlowType()

Determines the flow type based on the froude number.

isValidManning
bool isValidManning()

Manning's roughness error checking

isValidBedSlope
bool isValidBedSlope(Unknown u)

Bed slope error checking

isValidWaterDepth
bool isValidWaterDepth(Unknown u)

Water depth error checking

isValidDischarge
bool isValidDischarge(Unknown u)

Discharge error checking.

isValidInputs
bool isValidInputs(A a)

Check if all conditions are true

Meta