Can someone help me to write the code?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1709371/Computed%20flow%20depths%20at%20difference%20times.jpeg)
![Variation of flow depth with time](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1709376/Variation%20of%20flow%20depth%20with%20time.jpeg)
And i have documents about lax-diffusive scheme in the pdf file below (chapter 14).
1 comentario
Steven Lord
el 5 de Jun. de 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.
Respuestas (0)
Ver también
Categorías
Más información sobre Historical Contests en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!