# Question:Extract Limiting Values from Dsolve based on Condition

September 02 2013
Maple

2

Hi All,

I am working on a soil mechanics problem that defines a Cam-Clay model via a system of ODE's and initial values. For this problem there are two parts, the elastic behaviour followed by plastic behaviour.

I have 7 ODE's all wrt to an independant variable called eq. I wish to run the elastic dsolve expresion in such a way that, at the value of eq where a dependant variable f(eq) = 0, I can extract all 7 of the parameters for use as initial values for the plastic behaviour range.

My maple dsolve expression is currently-

A:= dsolve({de1...de7, iv1...iv7}, numeric, events=[[f(eq)=0,halt]],output=listprocedure);

A(1);

elasticsoln:=A(last);

ElasticFinal:=Matrix([[A(last)[1],[A(last)[2]],...A(last)[8]]);

I have tried using an 'events' operator that halts the system once the condition is reached and followed this by picking an extreme value of eq (say eq=1) and then taking the 'last' values. It would be ideal to run the simulation from eq=0 to whatever the limiting value is in steps of say 0.001 and store this in matrix format.

My final goal is to use ODEplot to show the elastic response, connecting to the plastic response at the point of transition.

I know there must be a neater solution out there and all help is much appreciated