Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I have a problem with a Solve Block. I wish to solve a system on nonlinear equations for the Stokes Wave Equation using "given" and "find" notation.
My first attempt at what seems to be a straight forward problem comes up with an "undefined variable" which I cannot seem to rectify. Experienced users will I am sure pick the error at light speed and help me out .
Thanks Ross
Alan, Thanks for your fast response and assistance to correct the sheet. The fact that lambda was set too high I acknowledge is a problem which I suspect I would have found if other underlying issues were not present. When you put lambda >1 in your sheet the program at least gives you a hint where the problem is in the error message.
When I set Lambda >0 in my sheet it still gives an undefined error so there are other problems.
Your solution makes all the B and C coefficients a function of "k", which I understand and clearly solves the problem, but I guess I am missing a fundamental point in that I thought the solver would take the guessed values of L and lambda and evaluate k and then the SS and CC equations followed by values for L and lambda and do this in an iterative fashion until a comnverged solution was obtained. Any comment on flaws in my logic here would be appreciated.
Cheers
ross
Your logic is basically ok, but you then have to solve for all the parameters - see attached. I felt this was unnecessarily cumbersome.
Incidentally, there is something strange about the way you've constructed B33, B35, C1 etc. I've replaced them with B.33, B.35, C.1 etc.
Alan
Alan,
Thanks again for the tuition - much appreciated. I certainly agree your solution is more elegant than mine, but for me at my current state of Mathcad knowledge getting the answer is the priority! When you state there is "something strange' about how B33 etc have been constructed, is this because I have (intentionally) used the subscript button in the text toolbar and not the matrix subscript? You have used the period or literal subscript. When I click on your subscripts a period appears (as the manual says it should). When I click on either the text toolbar subscript or the matrix subscript no perod appears. Is there a difference between the text toolbar subscript and the matrix toolbar subscript and how these are treated in the solver?
Cheers
Ross
. Is there a difference between the text toolbar subscript and the matrix toolbar subscript and how these are treated in the solver?
Cheers
Ross
Yes. Try your version. You'll find the solver doesn't like it.
Alan
Ross,
I'm investigating user problems with solve blocks. Another issue that Alan fixed, but didn't mention is that you used Ctrl= to define your variables. Alan used the definition operator, :=.
Mona
Mona,
Thanks for noting that . Subsequently Alan revised the sheet to solve the problem with the Ctrl= but made the point it was not necessary to define all the variables inside the solver.
As a learner driver in Mathcad my biggest problem is trying to eliminate the "variable undefined" error message. I waste hours trying to de-bug a sheet due to this problem and any improvements to give more information in the error message would be useful.
Thanks
Ross