

Re: Solve second order ordinary differential equations with boundary conditions
Efried Oct 28, 2011 12:48 AM (in response to ValeryOchkov)Is it possible to embedd this odesolve block in another solve block?
Please find attached an axample which does not work.
any hep is highly appreciated.
thanks

test.xmcd.zip 95.3 K

Re: Solve second order ordinary differential equations with boundary conditions
VladimirN. Oct 28, 2011 1:43 AM (in response to Efried)In your document many indefinite variables (if you want to use procedure "GivenFind" for the numerical solution of the equations).

Re: Solve second order ordinary differential equations with boundary conditions
Efried Oct 28, 2011 7:12 AM (in response to VladimirN.)That would be a surprise that Mathcad needs a definition of the variables before calling the function where they appear.
Mathcad is able to solve the solve block if there is a vector asignement but fails miserably (hangs, shows wrong errors) if the same solve block ends with an assignement of the solution to a function .

Re: Solve second order ordinary differential equations with boundary conditions
AlanStevens Oct 28, 2011 8:12 AM (in response to Efried)Error disappears if you remove the units from the last assignment. You'd have to put them back after assigning individual parameters to the solution.
Alan

test2.xmcd.zip 76.4 K

Re: Solve second order ordinary differential equations with boundary conditions
Efried Oct 28, 2011 9:14 AM (in response to AlanStevens)Hello Alan,
you saved my week end it looks ugly removing alsway the unist (because this is an Mathcad's USP) and and I don't understand the trick (because the units are removed once more in the solve block where necessary), but it helps indeed!
many thanks

Re: Solve second order ordinary differential equations with boundary conditions
Efried Oct 31, 2011 12:31 PM (in response to Efried)Hello Alan,
I'm sorry the results are just random  doing this way the calculation is not made properly.
I have to find another solution or software instead of Mathcad...
best regards
Gerfried

Re: Solve second order ordinary differential equations with boundary conditions
AlanStevens Nov 1, 2011 2:01 AM (in response to Efried)Gerfried Cebrat wrote:
Hello Alan,
you saved my week end it looks ugly removing alsway the unist (because this is an Mathcad's USP) and and I don't understand the trick (because the units are removed once more in the solve block where necessary), but it helps indeed!
many thanks
The final Given ... Find solve block assigns the results to a single vector, in effect. Mathcad (prior to Prime) doesn't accept vectors whose elements have different units. Removing the units from the output arguments simply allows the block to do the final assignment.
The validity of the results is a different matter. Your problem is obviously a heat transfer one of some sort. However, you have not provided enough information to allow us to pin down the problem any further. You need to provide comments on what each part of the program is trying to achieve, give an indication of the sort of results you are expecting, and, most importantly, provide values of the many parameters used as input arguments to your solve blocks, so we can run test calculations.
Alan

Re: Solve second order ordinary differential equations with boundary conditions
Efried Nov 3, 2011 1:34 AM (in response to AlanStevens)Hello,
looking at the response from mathcad 14 like "interal error" or "bad_pattern" I get more confused but will try to create a setup where you might help me.
regards








Re: Solve second order ordinary differential equations with boundary conditions
ValeryOchkov Oct 6, 2011 5:58 PM (in response to RogeliodelasCasas)For solution of the system of odes you can use the function sbval for the finding the initial conditions (a Coushy task) and than use functions rkfixed, rkadapt odesolve etc