Question: nested loop not working

Hi

I m trying to do a nested loop but for some reason maple tells me my for loop is unterminated 

I d love some feedback on my code and on how to make it work
 

NULL

restart

with(Student[Calculus1]):


#geometry [mm]

b := 250:

h := 720:

ds := 70:

d := h-ds:

As := 3000:


#concrete [MPa]

fck := 30:

fcm := fck+8;

38

(1)

Ecm := 33000;

33000

(2)

`ϵc1` := 2.2*(1/1000);

0.2200000000e-2

(3)

eta := `ϵc`/`ϵc1`;

454.5454545*`ϵc`

(4)

Ec1 := fck/`ϵc1`;

13636.36364

(5)

k := 1.05*Ecm/Ec1;

2.540999999

(6)

sigma := fcm*(-eta^2+eta*k)/(1+(k-2)*eta);

38*(-206611.5702*`ϵc`^2+1154.999999*`ϵc`)/(1+245.9090904*`ϵc`)

(7)


#steel [MPa]

Es := 200000:

fsy := 400:

fsu := 600:

`ϵy` := fsy/Es;

1/500

(8)

`ϵsh` := 0.9e-2:

`ϵsu` := 0.75e-1:

P := 4:

`ϵs` := `ϵcm`*(d-c)/c;

`ϵcm`*(650-c)/c

(9)

i := 1;

1

(10)

"for epsiloncm from 0.1/(1000) by 0.1/(1000)to (3.5)/(1000) do  print(epsiloncm);     epsilons:=(epsiloncm)/(c)*(d-c):  T[1]:=epsilons*Es*As:  T[2]:=fsy*As:  T[3]:=fsu+(fsy-fsu)*((epsilonsu-epsilons)/((epsilonsu-epsilonsh)))^(P):  T[4]:=0:  C:=(b*c)/(epsiloncm)*int(sigma,epsilonc=0..epsiloncm):  eq[1]:=T[1]=C:  epsilonl[1]:=epsilony:  eq[2]:=T[2]=C:  epsilonl[2]:=epsilonsh:  eq[3]:=T[3]=C:  a:=1          for j from 1 by 1 to 3 do          if a=1 then          cc:=max(solve(eq[j],c)):          epsilons:=subs(c=cc,epsilons):          if epsilons<=epsilonl[j] then T:=subs(c=cc,T[j]): a:=0:          end if:          end if:          end do:  M[i]:=(b*cc^(2)*fcm)/(epsiloncm^(2))*int(sigma*epsilonc,epsilonc=0..epsiloncm)*10^(-6)+T*(d-cc)*10^(-6):  phi[i]:=(epsiloncm)/(cc):  T[i]:=T:  cd[i]:=(cc)/(d):    print(M[i],epsiloncm,phi[i]);  i:=i+1:  end do:                                        "

Error, unterminated loop

"for epsiloncm from 0.1/1000 by 0.1/1000to 3.5/1000 do  print(epsiloncm);     epsilons:=epsiloncm/c*(d-c):  T[1]:=epsilons*Es*As:  T[2]:=fsy*As:  T[3]:=fsu+(fsy-fsu)*((epsilonsu-epsilons)/(epsilonsu-epsilonsh))^P:  T[4]:=0:  C:=(b*c)/epsiloncm*int(sigma,epsilonc=0..epsiloncm):  eq[1]:=T[1]=C:  epsilonl[1]:=epsilony:  eq[2]:=T[2]=C:  epsilonl[2]:=epsilonsh:  eq[3]:=T[3]=C:  a:=1         for j from 1 by 1 to 3 do          if a=1 then  cc:=max(solve(eq[j],c)):  epsilons:=subs(c=cc,epsilons):          if epsilons<=epsilonl[j] then T:=subs(c=cc,T[j]): a:=0:          end if:          end if:          end do:  M[i]:=(b*cc^2*fcm)/(epsiloncm^2)*int(sigma*epsilonc,epsilonc=0..epsiloncm)*10^(-6)+T*(d-cc)*10^(-6):  phi[i]:=epsiloncm/cc:  T[i]:=T:  cd[i]:=cc/d:  print(M[i],epsiloncm,phi[i]);  i:=i+1:  end do:                                        "

 

``

``

``

``

``

``

NULL

NULL

``

``

``

``

``

``

``

``

``

``

``

``

``

NULL

``

``

``

``

``

``

``

``

``


 

Download mathias.mw

 

Thanks in advance

Please Wait...