Description Usage Arguments Details Value Examples

View source: R/graduallyvariedflow_v2.r

Compute the gradually-varied flow profile of a prismatic channel.

1 2 | ```
compute_profile(So, n, Q, y0, Cm, g, B, SS, z0 = 0, x0 = 0, stepdist,
totaldist)
``` |

`So` |
Channel slope [ |

`n` |
Manning's roughness coefficient. |

`Q` |
Flow rate [ |

`y0` |
The water depth at the control section [ |

`Cm` |
Unit conversion coefficient for Manning's equation. For SI units, Cm = 1. |

`g` |
Gravitational acceleration [ |

`B` |
Channel bottom width [ |

`SS` |
Channel sideslope [ |

`z0` |
Elevation reference datum at control section [ |

`x0` |
Distance reference at control section [ |

`stepdist` |
The spatial interval used in the Standard step method [ |

`totaldist` |
The total distance upstream (or downstream) to compute the profile [ |

Computes the longitudinal water surface profile of a prismatic channel using the standard step method by solving the non-linear ODE

*\frac{dy}{dx} = \frac{S_0 - S_f}{1 - Fr^2}*

The standard-step method operates by stepping along the channel by a constant distance interval, starting from a cross-section where the flow depth is known (the control section). The flow depth is computed at the adjacent cross-section (target section). The computed value at the target is then used as the basis for computing flow depth at the next cross-section, i.e. the previous target section becomes the new control section for each step. A Newton-Raphson scheme is used each step to compute the flow depth and friction slope. Technically, the average friction slope of the control and target section is used to compute the flow depth at the target section.

data.frame with columns:

`x` |
Along-channel distance. |

`z` |
Elevation. |

`y` |
Flow depth. |

`v` |
Flow velocity. |

`A` |
Flow area. |

`Sf` |
Friction slope. |

`E` |
Total energy. |

`Fr` |
Froude Number. |

1 2 3 4 5 6 7 8 | ```
# example M1 profile
compute_profile(0.001, 0.045, 250, 2.7, 1.486, 32.2, 100, 0, stepdist = 10, totaldist = 3000)
# example M2 profile
compute_profile(0.001, 0.045, 250, 0.64, 1.486, 32.2, 100, 0, stepdist = 10, totaldist = 3000)
# example S2 profile
compute_profile(0.005, 0.01, 250, 2.65, 1.486, 32.2, 10, 0, stepdist = 10, totaldist = 2000)
# example S3 profile
compute_profile(0.005, 0.01, 250, 0.5, 1.486, 32.2, 10, 0, stepdist = 10, totaldist = 2000)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.