Skip to main content
1-Visitor
April 7, 2013
Question

Odesolve and programming combination for a set of differential equations

  • April 7, 2013
  • 2 replies
  • 1185 views

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

23-Emerald I
April 7, 2013

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.

25-Diamond I
April 7, 2013

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