1 Pages (12 items)
Reservoir Flood Routing - Example - Messages
#1 Posted: 9/2/2015 9:10:27 AM
Hi All
A reservoir flood routing program in SMath is attached. This is based on an example in the "Design of Small Dams"-3rd Ed.-page 342.
The results closely tally with the given values in the text book. The text book calculations are manually done by trial & error method in each time step. The SMath program uses a while loop for iterations for each time step.
I will be pleased to have any comments, modifications or improvements please
Regards
ndtma
Small Dams Flood Routing Ex-Program Method.sm (283 KiB) downloaded 229 time(s).
A reservoir flood routing program in SMath is attached. This is based on an example in the "Design of Small Dams"-3rd Ed.-page 342.
The results closely tally with the given values in the text book. The text book calculations are manually done by trial & error method in each time step. The SMath program uses a while loop for iterations for each time step.
I will be pleased to have any comments, modifications or improvements please
Regards
ndtma
Small Dams Flood Routing Ex-Program Method.sm (283 KiB) downloaded 229 time(s).
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
2 users liked this post
#2 Posted: 9/3/2015 1:38:03 AM
Most calculations turn red here, Why ? "Cases" keep saying "Undefined".
Will work on that tomorrow.
linterp, ainterp, cinterp don't take units.
A nice 3rd order polynomial fit will replace the Cd ,
Maybe Storage too
Just had a quick look.
Cheers Collab: Jean
Will work on that tomorrow.
linterp, ainterp, cinterp don't take units.
A nice 3rd order polynomial fit will replace the Cd ,
Maybe Storage too
Just had a quick look.
Cheers Collab: Jean
#3 Posted: 9/3/2015 1:50:56 AM
Here is Cd 3rd order function fit
A bit of abstract would help and step explanations.
Small Dams Flood Routing Ex-Program Method.sm (307 KiB) downloaded 86 time(s).
#4 Posted: 9/3/2015 3:28:39 AM
Dear Jean,
Thanks. I will study your suggestions and come back soon.
Thanks. I will study your suggestions and come back soon.
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#5 Posted: 9/3/2015 8:30:54 AM
Hi Jean,
1.The “cases” is part of the plugin “FunctionExtensions” by Davide Carpi. It is explained in SMath reference book under help menu. The “cases” handles piecewise Boolean expressions.
2.Cd is the coefficient of discharge over a spillway. It varies with the height of water (h ft) above the spillway crest. The values given in the reference text and the given example are applicable only when we use feet units. We have to use different set of values when we use SI units.
3.When h=0 Cd=0; h=1 Cd=3.2; h=2 Cd=3.4; h=3 Cd=3.6; h=4 Cd=3.7; h>4 Cd=3.7.
For any other h value between 0 & 4, the “cases” statement uses linterp function to interpolate.
For any h>4 Cd 3.8 (constant).
4.If we use 3rd order function fit(x), I don’t get the correct values for fit(0) & fit(>4).
1.The “cases” is part of the plugin “FunctionExtensions” by Davide Carpi. It is explained in SMath reference book under help menu. The “cases” handles piecewise Boolean expressions.
2.Cd is the coefficient of discharge over a spillway. It varies with the height of water (h ft) above the spillway crest. The values given in the reference text and the given example are applicable only when we use feet units. We have to use different set of values when we use SI units.
3.When h=0 Cd=0; h=1 Cd=3.2; h=2 Cd=3.4; h=3 Cd=3.6; h=4 Cd=3.7; h>4 Cd=3.7.
For any other h value between 0 & 4, the “cases” statement uses linterp function to interpolate.
For any h>4 Cd 3.8 (constant).
4.If we use 3rd order function fit(x), I don’t get the correct values for fit(0) & fit(>4).
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#6 Posted: 9/3/2015 8:38:48 AM
Hi Jean,
Ammended reply please.
1.The “cases” is part of the plugin “FunctionExtensions” by Davide Carpi. It is explained in SMath reference book under help menu. The “cases” handles piecewise Boolean expressions.
2.Cd is the coefficient of discharge over a spillway. It varies with the height of water (h ft) above the spillway crest. The values given in the reference text and the given example are applicable only when we use feet units. We have to use different set of values when we use SI units.
3.When h=0 ->Cd=0; h=1 -> Cd=3.2; h=2 -> Cd=3.4; h=3 -> Cd=3.6; h=4 -> Cd=3.7.
For any other h value between 0 & 4, the “cases” statement uses linterp function to interpolate.
For any h>4 Cd -> 3.8 (constant).
4.If we use the 3rd order function fit(x), I don’t get the correct values for fit(0) & fit(>4).
Ammended reply please.
1.The “cases” is part of the plugin “FunctionExtensions” by Davide Carpi. It is explained in SMath reference book under help menu. The “cases” handles piecewise Boolean expressions.
2.Cd is the coefficient of discharge over a spillway. It varies with the height of water (h ft) above the spillway crest. The values given in the reference text and the given example are applicable only when we use feet units. We have to use different set of values when we use SI units.
3.When h=0 ->Cd=0; h=1 -> Cd=3.2; h=2 -> Cd=3.4; h=3 -> Cd=3.6; h=4 -> Cd=3.7.
For any other h value between 0 & 4, the “cases” statement uses linterp function to interpolate.
For any h>4 Cd -> 3.8 (constant).
4.If we use the 3rd order function fit(x), I don’t get the correct values for fit(0) & fit(>4).
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#7 Posted: 9/3/2015 10:00:34 AM
Hi Jean,
Ammended reply please.
1.The “cases” is part of the plugin “FunctionExtensions” by Davide Carpi. It is explained in SMath reference book under help menu. The “cases” handles piecewise Boolean expressions.
2.Cd is the coefficient of discharge over a spillway. It varies with the height of water (h ft) above the spillway crest. The values given in the reference text and the given example are applicable only when we use feet units. We have to use different set of values when we use SI units.
3.When h=0 ->Cd=0; h=1 -> Cd=3.2; h=2 -> Cd=3.4; h=3 -> Cd=3.6; h=4 -> Cd=3.7.
For any other h value between 0 & 4, the “cases” statement uses linterp function to interpolate.
For any h>4 Cd -> 3.8 (constant).
4.If we use the 3rd order function fit(x), I don’t get the correct values for fit(0) & fit(>4).
___________________________________________
I don't have "cases" plugin. I wouldn't use anyway because I only work with fitted model functions. I agree the 3rd order does not match Cd=0 and H=0. If you really want Cd in
that low range, then the model is a sigmoidal fit. I suspect I can manage a model function.
If you want a model fit for the Inflowgraph, by inspection the first segment poly order 2
would fit, but the 2nd segment [RHS] is a decay exponential.
Please confirm if you want a two segments fit for Inflowgraph.
The Inflowgraph does not look real unless the dam is an open vessel to rain.
More likely, it would be a bell shape.
Small Dams Flood Routing Ex-Program Method.sm (321 KiB) downloaded 65 time(s).
Ammended reply please.
1.The “cases” is part of the plugin “FunctionExtensions” by Davide Carpi. It is explained in SMath reference book under help menu. The “cases” handles piecewise Boolean expressions.
2.Cd is the coefficient of discharge over a spillway. It varies with the height of water (h ft) above the spillway crest. The values given in the reference text and the given example are applicable only when we use feet units. We have to use different set of values when we use SI units.
3.When h=0 ->Cd=0; h=1 -> Cd=3.2; h=2 -> Cd=3.4; h=3 -> Cd=3.6; h=4 -> Cd=3.7.
For any other h value between 0 & 4, the “cases” statement uses linterp function to interpolate.
For any h>4 Cd -> 3.8 (constant).
4.If we use the 3rd order function fit(x), I don’t get the correct values for fit(0) & fit(>4).
___________________________________________
I don't have "cases" plugin. I wouldn't use anyway because I only work with fitted model functions. I agree the 3rd order does not match Cd=0 and H=0. If you really want Cd in
that low range, then the model is a sigmoidal fit. I suspect I can manage a model function.
If you want a model fit for the Inflowgraph, by inspection the first segment poly order 2
would fit, but the 2nd segment [RHS] is a decay exponential.
Please confirm if you want a two segments fit for Inflowgraph.
The Inflowgraph does not look real unless the dam is an open vessel to rain.
More likely, it would be a bell shape.
Small Dams Flood Routing Ex-Program Method.sm (321 KiB) downloaded 65 time(s).
#8 Posted: 9/3/2015 12:50:57 PM
Thanks for your valuable suggestions.
I am a practicing engineer and I do not have a deep knowledge in complex modelling.
The reservoir is an open vessel to rain, and the inflow hydrograph is real and usually bell shaped in all practical cases.
I am a practicing engineer and I do not have a deep knowledge in complex modelling.
The reservoir is an open vessel to rain, and the inflow hydrograph is real and usually bell shaped in all practical cases.
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#9 Posted: 9/4/2015 12:49:05 AM
Thanks for your valuable suggestions.
I am a practicing engineer and I do not have a deep knowledge in complex modelling.
The reservoir is an open vessel to rain, and the inflow hydrograph is real and usually bell shaped in all practical cases.
____________________________________
You are right: there are as many hydrographs as there are rain bassins [collecting regions].
As such, hydrographs are useless except for the look per year over years. But if you can establish
a typical hydrograph for your region or any specific region, then the most useful piece of
information you can extract is the "cumulative integral",,, in short: the accumulated rain fall.
Even with only 4 data points "Cd" does not ly, and it is not "Cd" in fluid mechanics where Cd is
strictly the SQRT Toricelli. Cd in your work sheet has only one possible relationship with the
cumulative integral. From the raw cumulative integral in the work sheet, you can populate at will
via "ainterp" with the bonus that the cumulative integral is a very powerful smoother.
Some well known bell shape PDF [Probabilty Distribution Function] have a cumulaive integral as a function. But for "odd bell shape", a function to validate their cumulative integral is an artist task. A typical use for a function is the "quantile", i.e: the inverse of the cumulative. There was such demand in the Mathsoft Collaboratory.
You must explain/explicit what is "Cd" from the reference book.
Cd = "Cumulative discharge" [Cumulative dischar"ged" from sky ?
Thanks for sharing your project, very interesting and educative.
Small Dams Flood Routing Ex-Program Method.sm (343 KiB) downloaded 88 time(s).
I am a practicing engineer and I do not have a deep knowledge in complex modelling.
The reservoir is an open vessel to rain, and the inflow hydrograph is real and usually bell shaped in all practical cases.
____________________________________
You are right: there are as many hydrographs as there are rain bassins [collecting regions].
As such, hydrographs are useless except for the look per year over years. But if you can establish
a typical hydrograph for your region or any specific region, then the most useful piece of
information you can extract is the "cumulative integral",,, in short: the accumulated rain fall.
Even with only 4 data points "Cd" does not ly, and it is not "Cd" in fluid mechanics where Cd is
strictly the SQRT Toricelli. Cd in your work sheet has only one possible relationship with the
cumulative integral. From the raw cumulative integral in the work sheet, you can populate at will
via "ainterp" with the bonus that the cumulative integral is a very powerful smoother.
Some well known bell shape PDF [Probabilty Distribution Function] have a cumulaive integral as a function. But for "odd bell shape", a function to validate their cumulative integral is an artist task. A typical use for a function is the "quantile", i.e: the inverse of the cumulative. There was such demand in the Mathsoft Collaboratory.
You must explain/explicit what is "Cd" from the reference book.
Cd = "Cumulative discharge" [Cumulative dischar"ged" from sky ?
Thanks for sharing your project, very interesting and educative.
Small Dams Flood Routing Ex-Program Method.sm (343 KiB) downloaded 88 time(s).
#10 Posted: 9/4/2015 1:51:10 AM
Thanks for sharing your views and suggestions, and look forward to have further dialogue in future.
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
#11 Posted: 9/14/2015 10:40:56 PM
Hello Collab,
Your "vlookup(value,table,col)" does not work in my Smath,
This one attached works fine for me except for the error message,
I can live with this as is, if there is no match it turns red.
Your last GVF wanted to update "dependencies" and it suggested
the list of updates, I did accept and updated ...
.... disaster !!!
it turned my Smath work sheets red [checked only few].
The updates suggested by your version of Smath are not
compatible with my installed Smath.
Sorry for that inconvenience.
Cheers Collab, wish you good.
Untitled match.sm (6 KiB) downloaded 72 time(s).
Your "vlookup(value,table,col)" does not work in my Smath,
This one attached works fine for me except for the error message,
I can live with this as is, if there is no match it turns red.
Your last GVF wanted to update "dependencies" and it suggested
the list of updates, I did accept and updated ...
.... disaster !!!
it turned my Smath work sheets red [checked only few].
The updates suggested by your version of Smath are not
compatible with my installed Smath.
Sorry for that inconvenience.
Cheers Collab, wish you good.
Untitled match.sm (6 KiB) downloaded 72 time(s).
#12 Posted: 9/15/2015 12:22:30 AM
Hi,
Thanks. I use Version 0.97(build 5581); Date 13-04-2015.
Thanks. I use Version 0.97(build 5581); Date 13-04-2015.
Look within!... The secret is inside you.
Best Regards
Eng. NDTM Amarasekera - Sri Lanka
1 Pages (12 items)
-
New Posts
-
No New Posts