OpenChannel

The base class for all open channels.

class OpenChannel {}

Constructors

this
this()

Empty constructor. The unit is automatically set to S.I. (Metric).

Members

Enums

FlowType
enum FlowType

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

Units
enum Units

Units options

Unknown
enum Unknown

General available unknowns for open channel.

Functions

calculateFlowType
void calculateFlowType()

Determines the flow type based on the froude number.

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.

getCriticalDepth
double getCriticalDepth()

Returns critical depth in either meters or feet.

getCriticalSlope
double getCriticalSlope()

Returns the slope of the critical flow for the channel.

getDischarge
double getDischarge()

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

getDischargeIntensity
double getDischargeIntensity()

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

getErrMessage
string getErrMessage()

Gets the error message. @return errMessage

getFlowType
FlowType getFlowType()

Returns the string representation of type of flow.

getFroudeNumber
double getFroudeNumber()

Returns the froude number

getHydraulicDepth
double getHydraulicDepth()

Returns the hydraulic depth in either meter or foot.

getHydraulicRadius
double getHydraulicRadius()

Returns the hydraulic radius in either meters or feet.

getManningRoughness
double getManningRoughness()

Retuens the manning's roughness coefficient.

getWaterDepth
double getWaterDepth()

Returns the water depth in either meter or feet.

getWettedArea
double getWettedArea()

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

getWettedPerimeter
double getWettedPerimeter()

Returns the wet perimeter in either meter of feet.

intialize
void intialize()

Put all the initializations here.

isCalculationSuccessful
bool isCalculationSuccessful()

Check if an error has occurred. @return isError

isValidBedSlope
bool isValidBedSlope(Unknown u)

Bed slope error checking

isValidDischarge
bool isValidDischarge(Unknown u)

Discharge error checking.

isValidInputs
bool isValidInputs(A a)

Check if all conditions are true

isValidManning
bool isValidManning()

Manning's roughness error checking

isValidWaterDepth
bool isValidWaterDepth(Unknown u)

Water depth error checking

setBedSlope
void setBedSlope(double pBedSlope)

Set the bed slope of the channel.

setDischarge
void setDischarge(double pDischarge)

Sets the discharge.

setManningRoughness
void setManningRoughness(double pManningRoughness)

Sets the manning roughness coefficient.

setUnit
void setUnit(Units u)

Sets the unit.

setUnknown
void setUnknown(Unknown u)

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

setWaterDepth
void setWaterDepth(double pWaterDepth)

Sets the water depth.

Variables

ERROR
auto ERROR;

Trial error max to 0.01%

GRAVITY_METRIC
auto GRAVITY_METRIC;

Gravitational acceleration in metric.

availableUnknowns
Unknown[] availableUnknowns;

Available unknowns

averageVelocity
double averageVelocity;

Average velocity over the whole cross section of the channel.

bedSlope
double bedSlope;

Rise over run of the channel.

criticalDepth
double criticalDepth;

Depth of flow that will give critical flow.

criticalSlope
double criticalSlope;

Bed slope that will give critical flow.

discharge
double discharge;

Discharge (Flow Rate)

dischargeIntensity
double dischargeIntensity;

Discharge intensity. Discharge divided by the top channel width.

errorMessage
string errorMessage;

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

flowType
FlowType flowType;

Flow type reconned from the Enum type FlowType

froudeNumber
float froudeNumber;

Froude number.

hydraulicDepth
double hydraulicDepth;

Hydraulic depth

hydraulicRadius
double hydraulicRadius;

wettedArea / wettedPerimeter

isCalculationSuccess
bool isCalculationSuccess;

Variable that tells if the calculation has no error.

manningRoughness
float manningRoughness;

Manning's roughness coefficient.

unit
Units unit;

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

unknown
Unknown unknown;

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

waterDepth
double waterDepth;

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

wettedArea
double wettedArea;

Total area of the channel section covered with water.

wettedPerimeter
double wettedPerimeter;

Total length of the channel section covered with water.

Meta