Question: Why "too many levels of recursion..."??

Heaviside2.mw

I am a new user of Maple (Dec 2014).  I am trying to calculate an integral related

to mechanical loss.  Temperature is a variable in the problem (as is time), and if

I use a sinusoidal (sine or cosine) temperature-time relationship, I think all works fine.

A difficulty is that the experiments have two-hour hold times(i.e., 7200 seconds) (followed by 22 hours of sinusoidal temperature variation.)

The experiments run for several weeks or months.

I tried using Heaviside functions to model the hold times.(Constant temperature periods)

Now I am receiving errors such as " Error, (in tools/eval_foo/do) too many levels of recursion..."

Probably the Maple code is crude and/or sloppy. Most of the code is simply the setting of constants in the problem.

I will be grateful for suggestions and comments--the file is attached.  Thank you.  John B

T__2 := 291.4:

T__f := 342.7:

B__f := 1265.:

A__0 := 0.452e-10:

`a__σ` := 1.6072:

`b__σ` := 5.6072:

mu := proc (x) options operator, arrow; .212008+0.21666e-2*x end proc:

t__age := 1800.:

`σ__app` := 3.91:

T__0 := 303.15:

D__0 := proc (x) options operator, arrow; .103172+0.633333e-2*x end proc:

A__ex := B__f*T__f/(T__f-T__2)-`a__σ`*`σ__app`^2:

C__ex := B__f*T__f/(T__f-T__2)-`b__σ`*`σ__app`:

A__00 := A__0*exp(A__ex/T__0):

NULL

NumericEventHandler(invalid_operation = `Heaviside/EventHandler`(value_at_zero = 1)):

tm := proc (t) options operator, arrow; `mod`(t, 86400) end proc:(temperature cycle repeats every 24 hours = 86,400 seconds)

T3 := proc (x) options operator, arrow; (303.15+15.+15*sin((3/2)*Pi+2*Pi*(x-7200)/79200.))*(1-Heaviside(x)+Heaviside(x-7200)) end proc:

F3 := proc (x) options operator, arrow; (Heaviside(x)-Heaviside(x-7200))*303.15 end proc:

ftemp := proc (i) options operator, arrow; evalf(T3(tm(i))+F3(tm(i))) end proc:

C := proc (x) options operator, arrow; A__0*exp(C__ex/ftemp(x)) end proc:

`τ__0` := proc (x) options operator, arrow; sqrt(A__00^2*(t__age^mu(ftemp(x)))^2+C(x)^2*x^(2*mu(ftemp(x)))) end proc:

f__0 := proc (z) options operator, arrow; int(1/`τ__0`(x), x = 0 .. z) end proc:

g__0 := proc (y) options operator, arrow; D__0(ftemp(y))*exp(f__0(y)^.333333) end proc:

ftim := proc (i) options operator, arrow; 1800.*i end proc:

`τ__0`(20);

35860.86195

(1)

f__0(20)

Error, (in tools/eval_foo/do) too many levels of recursion

 

NULL

NULL

NULL

NULL

``

 

Download Heaviside2.mwHeaviside2.mw

Please Wait...