mehdi jafari

764 Reputation

13 Badges

11 years, 230 days

MaplePrimes Activity


These are replies submitted by mehdi jafari

@mehdi jafari your problem is that you can not do this part (X.Dtau.P)  in this line of your code :


interface(rtablesize = 2*r+1); J := Vector([L, `$`((1/2)*L, 2*r)]); E := DiagonalMatrix(J); X := Vector[row](2*r+1, symbol = a); U := Vector[row](2*r+1, symbol = b); X0 := Vector[row](2*r+1, [1]); G := Vector[row](2*r+1, [1]); C := simplify(X-X0-G.Z-X.Dtau.P+X.Dtau.Z-U.P);

thus please change your matrix bounds so that this multiplication can be done . 

@upaska after uploading,please download your uploaded file so that be sure it is downloadable

@victormath19 i think my maple solver is going to deep sleep when going to solve this long system, how much time it gets you for your system to be solved? 

@victormath19 please uplaod,other wise nobody can help you on the errors without having the original code,tnx

@victormath19  in the last erorr, temps initial and tempsfinal should be numeric numbers, but please upladu your full code,including your system of equations,every thing if you want your problem to be solved, i wonder why every body are avoiding uploading full code,but they do want the answer !

please uplaod your worksheet or right dowb your equations, if u load the page , the picture is not uplaoded correctly and u yourself can not see the image, tnx

@upaska please reupload your worksheet again since it is not downloadable . tnx

please upload your worksheet here,tnx

when u avoid uploading your question here,actually you lose many other solutions or ideas which can made by all of members here,anyway. good luck

what do u mean by ode architect solver? has it any deifference from ode solver ?

@sarra i will request a help from an expert,and i hope he can help us. good luck !

@alfarunner ?dsolve will tel u what to do,

dsolve - solve ordinary differential equations (ODEs)

Calling Sequence
dsolve(ODE)
dsolve(ODE, y(x), options)
dsolve({ODE, ICs}, y(x), options)

 

Parameters :

ODE: ordinary differential equation, or a set or list of ODEs

Y(x) : any indeterminate function of one variable, or a set or list of them, representing the unknowns of the ODE problem

ICs: initial conditions of the form y(a)=b, D(y)(c)=d, ..., where {a, b, c, d} are constants with respect to the independent variable

options : (optional) depends on the type of ODE problem and method used, for example, series or method=laplace. (See the Examples section.)

 

@sarra i changed the output from matrix to list, and i just plot your list , and i do not know whether it is correct or not,or it is what you wanted or not. good luck !

restart:

f:=(x,y)->x*(x-1)*y*(y-1);

g:=(x,y)->0;

analytical_sol:=proc(dx,dy,dt,Tf)

local Ft, Fx,Fy,x,y, c1,c2,c,j,k,i,u,NN;

Ft := floor(Tf/dt)+1;c:=1/2;

Fx := floor(1/dx)+1;

Fy := floor(1/dy)+1;

x:=[seq(0..1,dx)]:

y:=[seq(0..1,dy)]:

c1 := (c*dt/dx)^2;

c2 := (c*dt/dy)^2;

#Initial position

for j from  1 to Fx do  

   for k from 1 to Fy do

  u[j,k,1] := f(-dx + j*dx, -dy + k*dy) -dt*g(-dx+j*dx, -dy + k*dy);

   u[j,k,2] := f(-dx + j*dx, -dy +k*dy);

end do;

end do;

 

# Boundary values j=1

for i from  1 to Ft +1 do

      for k from 1 to Fy do

         u[1,k,i] := 0;

      end do;

      for k from 1 to Fy do

         u[Fx,k,i] := 0;

      end do;

 

     for j from 1 to Fx do

         u[j,1,i] := 0;

      end do;

   

   for j from 1 to Fx do

         u[j,Fy,i] := 0;

      end do;

end do;

 

for i from 3 to Ft + 1 do

  for j from 2 to Fx-1 do

    for k from 2 to Fy-1 do

u[j, k, i] := 2*u[j,k,i-1] - u[j,k,i-2] + c1*(u[j+1,k,i-1]-2*u[j,k,i-1]+u[j-1,k,i-1]) + c2*(u[j,k+1,i-1] - 2*u[j, k, i-1] + u[j,k-1, i-1]);

end do;

end do;

end do;

return (seq(seq(seq(u[i,j,k],i=1..Fx),j=1..Fy),k=1..Ft)):
#return Matrix([seq([seq([seq(u[i,j,k],i=1..Fx)],j=1..Fy)],k=1..Ft)]):

end proc:

 

proc (x, y) options operator, arrow; x*(x-1)*y*(y-1) end proc

 

proc (x, y) options operator, arrow; 0 end proc

(1)

f:=(x, y) -> x *(x - 1)* y* (y - 1);

g:=(x, y) -> 0;

V:=evalf([analytical_sol(1/10,1/10,1/10,2)]):

proc (x, y) options operator, arrow; x*(x-1)*y*(y-1) end proc

 

proc (x, y) options operator, arrow; 0 end proc

(2)

nops(V);

2541

(3)

plots:-pointplot([seq](i,i=1..nops(V)),[seq](V[i],i=1..nops(V)));

 

plots:-pointplot([seq](i,i=1..201),[seq](V[i],i=1..nops(V)));

 

``


Download matrix.mw

@nismits please re-upload the file again,,tnx

First 12 13 14 15 16 17 18 Last Page 14 of 23