Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hello users of Mathcad : ), user of Mathcad Prime 10.0
Here is a picture of my problem. I am trying for days to solve it, I just don't understand why it won't work. I need it for a homework.
So, I’m working with a rectangular channel where the flow area is A = b × hn. The problem is that I don’t know either b or hn, so to make things simpler, I just assumed the cross-section is square – meaning b = hn. That way, I only have one variable to figure out.
I then rewrote the whole discharge formula so that everything (A, U, etc.) depends only on hn. All the other values like the slope and the Strickler coefficient are given.
Once I find the hn that gives me the correct flow rate Q, I can always scale it afterwards, like double hn to get b and turn it back into a rectangle if needed. The most important thing is that the flow stays the same.
So theoretically, this should work fine, but Mathcad won’t solve it, and I’m trying to figure out what’s going wrong.
Thanks for any help.
Solved! Go to Solution.
Hi,
See the following file.
It uses a paramatized solve block where the find is made a function.
Cheers
Terry
Hi,
See the following file.
It uses a paramatized solve block where the find is made a function.
Cheers
Terry
Hi,
I am using express version at the moment. Waiting on new license for Prime 11. So can't show you a solve block but can describe what to do.
This freaking worked!! Thank you so much. I didn't know that the number of equations should be equal. Because it also worked for something else. That's why I was so confused why it didn't work. Still a beginner in Mathcad, they don't teach us this. Didn't know this chat option existed, until 2 days ago.
You have three equations, but only one variable to look for. This usually can't work.
One option is to turn the first two equations into functions of hn -> A(hn):=... and U(Hn):=....
You should put these two function definitions in front of the solve block as well as the definition of the variables IS, Q and kSt.
In the solve block a guess value for hn is missing! You may use hn := 1m
At the end remove the square brackets around hn. Simply write hn := find(hn)
As you are just looking for one variable another option is to use the "root" function in one of its two flavors instead of the solve block with "find".
Here is a way how to do it. For convenience reasons I defined a function "flowrate" but you could use the expression directly in the root command as well.
BTW, a third option which I won't recommend is to use the solve block with all three equations as you had them setup.
Move the three variable definition outside the solve block and above it.
Provide guess values for all three variables hn, A and U at the top of the solve block and at the end let the Prime look for all three variables by writing
BTW, a function "flowrate" might also be useful to demonstrate the behaviour of the flowrate with respect to the value of hn
Important! For future question always attach the worksheet itself, not just a picture which does not even show which error message you get (presumably "variable not defined").
@SO_10687563 wrote:
...Once I find the hn that gives me the correct flow rate Q, I can always scale it afterwards, like double hn to get b and turn it back into a rectangle if needed.
Not sure how you would do so!??
In case you think that you only have to keep the area constant (double hn and use hn/2 for b) this would be wrong as the flowrate seems not only be dependent on the cross-sectional area.
The relationship between h and b is shown here
The green trace is the correct one and its based on an equation of fifth order.
The blue trace only lets the cross sectional area constant (so we see a simple hyperbola), but because the circumference is changing, flowrate will not be kept constant that way.
To give a numeric example. If you double hn -> h=63.238 cm, the correct value for b would be b=18.746 cm. If you simply keep the area constant, you would end up with just 15.81 cm!
The highlighted function shows how you could get the b-value for any given value of h using the "root" function.
Of course you also use "root" with a guess value or a parametrized solve block function as shown in Terry's first reply.
And sure you can also modify it to let you calculate the correct h-value for any given b.
Check the function for the flow rate! I have no experience in your field of work and only guessed from your initial posting ...
Terry has done a good job of pointing out that you need to learn how to use Mathcad.
But if I look at your picture:
Your equation doesn't balance.
And if I web search "Strickler coefficient," I can quickly find a wikipedia page, https://en.wikipedia.org/wiki/Manning_formula#Hydraulic_radius that shows this problem's math. There are two quantities that you need to address: a hydraulic radius, and the hydraulic gradient. (The hydraulic radius allows you to develop the "non-square" channel.)
The equation actually does balance!
But I made the same mistake, too and my first answer was moaning about the unit mismatch.
Then I noticed that the exponent is -2/3, not just 2/3 and edited my reply.
It was not that easy to tell from the picture. So another reason why a question should always include the attached worksheet itself, not just pictures.
Still a beginner in Mathcad : ), they sadly don't teach us how to use Mathcad, they only give us the license and we have to figure it out ourselfs. I got the equations all from the scripts of my subject. Next time I will send the file as well. First time usind the chat, didn't even know if that was possible to send the file. Also about the hydraulic radius. My equation can be either with the hydraulic radius or not (this is from my script.):
But do you mean mathematically I need the equation with the radius, to make it a "non-sqare" shape?
Thank you for the reply.
This topic has set stagnant for a few days, I will assume that any homework related deadline have past. (There's a convention in this forum: help with Mathcad , don't just give the solution.)
I started working this problem (using Express version 4) just to see if I could solve for non-square dimensions without a solve block. The answer is "not really," but if you set a width you can solve for a water depth for a given flow rate. That led to the optimum channel size for a given flow rate, and an investigation into the effects of channel shape.
Assuming that by now the homework has been turned in, attached find my ramblings.
Hello @SO_10687563,
It looks like you have some responses from our community champions. If it helped you solve your question, please mark the appropriate reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Vivek N.
Community Moderation Team.
In the 'three dots' pop-up menu (left of the translation symbol) there should be an option to mark the specific response as solution.
Success!
Luc