emrantohidi

15 Reputation

2 Badges

11 years, 93 days

MaplePrimes Activity


These are questions asked by emrantohidi

Dear Users

I have a problem for solving a system of linear equations that arise from collocation method for getting approximate solution of a coupled PDE and ODE in Food engineering problems.

When it reach to the fsolve command it takes long time!!!

I used maple 13.

If kindly is possible, please help me in this special case.

With kind regards,

Emran Tohidi.

 

> Restart;
print(`output redirected...`); # input placeholder
> h := 50; hm := 0.1e-3; rhodp := 1500; Y := 0.5e-1; T0 := 20; rhoair := 1.2041; Dair := 0.2e-8; DD := 0.85e-9; C := 3240; L := 0.4e-1; X0 := 1.5; V := .2; delta := 0.2e-2; Yair := 0.5e-1; nu := .2; Tair := 60; Hnu := 2400; rho := 1359; tt := 3;
%;
> N := 5; Digits := 20;
> X := sum(sum(a[m, n]*z^m*t^n, m = 0 .. N), n = 0 .. N); X := unapply(X, z, t); Xt := diff(X(z, t), `$`(t, 1)); Xt := unapply(Xt, z, t); Xz := diff(X(z, t), `$`(z, 1)); Xz := unapply(Xz, z, t); Xzz := diff(X(z, t), `$`(z, 2)); Xzz := unapply(Xzz, z, t); T := sum(b[n]*t^n, n = 0 .. (N+1)^2-1); T := unapply(T, t); Tt := diff(T(t), `$`(t, 1)); Tt := unapply(Tt, t); aw := exp(.914)*X(z, t)^.5639-.5*exp(1.828)*X(z, t)^(2*.5639); aw := unapply(aw, z, t); TT := 8.3036+3816.44*(1+T(t)/(46.13)+T(t)^2/46.13^2)/(46.13); TT := unapply(TT, t); pwv := 133.3*(1+TT(t)+(1/2)*TT(t)^2); pwv := unapply(pwv, t); Yi := .622*pwv(t)*aw(z, t)*(1+pwv(t)*aw(z, t)/rho+(pwv(t)*aw(z, t)/rho)^2)/rho; Yi := unapply(Yi, z, t);
%;
> S1 := {seq(seq(Xt(delta*i/N, tt*j/N)-DD*Xzz(delta*i/N, tt*j/N) = 0, i = 1 .. N-1), j = 1 .. N)};
> S2 := {seq(DD*rhodp*Xz(delta, tt*j/N)+hm*rhoair*Yi(delta, tt*j/N) = 0, j = 0 .. N)};
> S3 := {seq(Xz(0, tt*j/N) = 0, j = 0 .. N)};
> S4 := {seq(X(delta*i/N, 0) = 0, i = 1 .. N-1)};
> S5 := {seq(seq(rho*delta*C*Tt(tt*j/N)-h*(Tair-T(tt*j/N))+hm*Hnu*rhoair*(Yair-Yi(delta*i/N, tt*j/N)) = 0, j = 1 .. N), i = 0 .. N)};
print(`output redirected...`); # input placeholder
> S6 := {seq(rho*delta*C*Tt(0)-h*(Tair-T0)+hm*Hnu*rhoair*(Yair-Yi(delta*i/N, 0)) = 0, i = 0 .. N)};
%;
> SS := `union`(`union`(`union`(`union`(`union`(S1, S2), S3), S4), S5), S6);
> sol := fsolve(SS);

Dear All

Please help me for using fsolve

the fsolve command doesnt work!

> restart;
> with(LinearAlgebra); Digits := 20;
print(`output redirected...`); # input placeholder
> Z := Matrix(2); N := 3; y11 := sum(a[n]*x^n, n = 0 .. N); y12 := sum(b[n]*x^n, n = 0 .. N); y21 := sum(c[n]*x^n, n = 0 .. N); y22 := sum(d[n]*x^n, n = 0 .. N); y11 := unapply(y11, x); y12 := unapply(y12, x); y21 := unapply(y21, x); y22 := unapply(y22, x);
print(`output redirected...`); # input placeholder
> A := linalg[matrix](2, 2, [1, -1, 1, exp(x)]); B := linalg[matrix](2, 2, [-3*exp(-x)-1, 2-2*exp(-x), -3*exp(-x)-2, 1-2*cosh(x)]);
print(`output redirected...`); # input placeholder
> C := eval(B, [x = 1]);
print(`output redirected...`); # input placeholder
> Y := linalg[matrix](2, 2, [y11(x), y12(x), y21(x), y22(x)]);
print(`output redirected...`); # input placeholder
> yy11 := diff(y11(x), x); yy12 := diff(y12(x), x); yy21 := diff(y21(x), x); yy22 := diff(y22(x), x); yy11 := unapply(yy11, x); yy12 := unapply(yy12, x); yy21 := unapply(yy21, x); yy22 := unapply(yy22, x);
> YY := linalg[matrix](2, 2, [yy11(x), yy12(x), yy21(x), yy22(x)]);
print(`output redirected...`); # input placeholder
> S := {seq(eval(YY, [x = n/N])-(eval(A, [x = n/N]))*(eval(Y, [x = n/N]))-(eval(B, [x = n/N])) = Matrix(2), n = 1 .. N)};
print(`output redirected...`); # input placeholder
> S1 := {eval(Y, [x = 0]) = linalg[matrix](2, 2, [3, 0, 1, 1])};
print(??); # input placeholder
> SS := `union`(S, S1);
print(??); # input placeholder
> sol := fsolve(SS);

 

1 2 Page 2 of 2