Filter löschen
Filter löschen

Can someone help me to write the code?

5 Ansichten (letzte 30 Tage)
Thai An
Thai An am 5 Jun. 2024
Kommentiert: Steven Lord am 5 Jun. 2024
I have a example, so i can not to caculate, can someone help me to write the code of it?
A trapezoidal channel having a bottom width of 6.1 m and side slopes of 1.5H to 1 V is carrying a flow of 126 m3/s at a flow depth of 5.79 m. The bottom slope is 0.00008, Manning n = 0.013 and the channel length is 5 km. There is constant level reservoir at the upstream end of the channel. If a sluice gate at the downstream end is suddenly closed at time t = 0, compute the transient conditions until t = 2000 s by using lax-diffusive scheme (one of the finite difference methods). Plot the computed flow depth in the channel at t = 0, 500, 1000, 1500 and 2000 s. Plot the variation of the flow depth with time at distance of 1.5, 2.5, 3 and 5 km from the reservoir.
I have the result of this example in the book (images below)
Computed flow depths at difference times
Variation of flow depth with time
And i have documents about lax-diffusive scheme in the pdf file below (chapter 14).
  1 Kommentar
Steven Lord
Steven Lord am 5 Jun. 2024
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the free MATLAB Onramp tutorial to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Historical Contests finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by