RectangularOpenChannel

Class for the analysis of rectangular sections.

Constructors

this
this(Unknown u)

Initialize the RectangularOpenChannel with the unknown as given

Members

Functions

getBaseWidth
double getBaseWidth()

Returns the width of the channel.

setBaseWidth
void setBaseWidth(double b)

Sets the width of the base of the channel.

solve
bool solve()

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

solveForBaseWidth
bool solveForBaseWidth()

Solve for the unknown base width

solveForBedSlope
bool solveForBedSlope()

Solve for the unknown bed slope

solveForCriticalFlow
void solveForCriticalFlow()

Analysis of critical flow.

solveForDischarge
bool solveForDischarge()

Solve for the unknown discharge.

solveForWaterDepth
bool solveForWaterDepth()

Solve for the unknown water depth

Variables

availableUnknowns
Unknown[] availableUnknowns;

Available unknowns for this class.

baseWidth
double baseWidth;

Base width or the channel width for rectangular sections.

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