cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Odesolve and programming combination for a set of differential equations

PatriceBujard
1-Newbie

Odesolve and programming combination for a set of differential equations

Dear all,

I am occasionnaly using Mathcad 15. I calculate solutions of a set of 5 differential equations (one variable which is time) about diffusion. It works fine with Odesolver. To avoid any instability I need a resolution (TOL) ~10^-9.

The influence of various parameters (3) is nevertheless required and I am making it by "hand" i.e checking and register the results of the Odesolver for each parameter value.

Can some tell me if it is possible to combine Odesolver within a programm (ie "programming" option) ?. I looked at it but didn't find any way to do it.

Shall I use "Rkadapt" instead of Odesolver ? (in truth I didn't try till now).

Thank you for any recommendation

P.Bujard

2 REPLIES 2

The "command line solvers," rkfixed, Rkadapt, etc. can be manipulated by putting them inside programs and changing the input variables in the program. The vector (D) of derivatives and the initial values vector get an additional term for each variable you want to vary, the derivative of that term is identically zero. Since the output of these solvers is a matrix of values, manipulating the outputs can get challenging.

You may parameterize your solve block and turn it into a function of the three variables you wish to change.

Maybe you want to post a (probably simplified) worksheet.

See attached a simple example with parameterized amplitude and initial condition (along with the range, the equation is solved for):

ode_param.png

Top Tags