Items tagged with pde

Feed

Hi Maple folks!

I am trying to solve the following PDE in maple:

pde:= diff(c(x,t),t)+c(x,t)*diff(c(x,t),x)=0

bc:=c(x,0)=piecewise(x < 0, 0, x > 0, 1)

I tried the following:

pdsolve({pde,bc}, c(x, 0))

But it gives no solution, i also tried a numeric solution, but i couldn't make it work. Please help.

Thanks! :)

 

hey... can u help me how to solve my problem using the Implicit Crank Nicolson Finite different Method. 1_ques_crank.mw..... problem in variable name A and u .. how to solve this 

 

restart

with(LinearAlgebra):

for i from 0 while i <= N+1 do u[i, 0] := 1 end do:

``

for i while i <= N do A[i, 0] := u[i-1, 0]+u[i+1, 0] end do:

 

for j from 0 while j <= N do A[0, j] := u[1, j]-.1*u[0, j]; A[10, j] := u[9, j]-.1*u[10, j] end do:

 

 

c := Matrix(10, 10, {(1, 1) = 2.1, (1, 2) = -1, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (2, 1) = -1, (2, 2) = 4, (2, 3) = -1, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (3, 1) = 0, (3, 2) = -1, (3, 3) = 4, (3, 4) = -1, (3, 5) = 0, (3, 6) = 0, (3, 7) = 0, (3, 8) = 0, (3, 9) = 0, (3, 10) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = -1, (4, 4) = 4, (4, 5) = -1, (4, 6) = 0, (4, 7) = 0, (4, 8) = 0, (4, 9) = 0, (4, 10) = 0, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = -1, (5, 5) = 4, (5, 6) = -1, (5, 7) = 0, (5, 8) = 0, (5, 9) = 0, (5, 10) = 0, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = -1, (6, 6) = 4, (6, 7) = -1, (6, 8) = 0, (6, 9) = 0, (6, 10) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = -1, (7, 7) = 4, (7, 8) = -10, (7, 9) = 0, (7, 10) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = -1, (8, 8) = 4, (8, 9) = -1, (8, 10) = 0, (9, 1) = 0, (9, 2) = 0, (9, 3) = 0, (9, 4) = 0, (9, 5) = 0, (9, 6) = 0, (9, 7) = 0, (9, 8) = -1, (9, 9) = 4, (9, 10) = -1, (10, 1) = 0, (10, 2) = 0, (10, 3) = 0, (10, 4) = 0, (10, 5) = 0, (10, 6) = 0, (10, 7) = 0, (10, 8) = 0, (10, 9) = -1, (10, 10) = 4})

C := MatrixInverse(c):

for l from 0 while l <= N+1 do Known[l] := Matrix(N+1, 1, proc (i, j) options operator, arrow; A[i-1, l] end proc) end do:

for l from 0 while l <= N+1 do Known[l+1] := evalm(abs(Typesetting:-delayDotProduct(C, Known[l]))) end do:

``

``

 


 

Download 1_ques_crank.mw

 

 

 

 

Hi

I'd like to solve analytically the PDE , where

and  

pde := I*(diff(q, t))+a*(diff(q, x$2))+b*(diff(q, t, x))+c*abs(q)^2*q = sigma*(diff(q, x$4))+alpha*(diff(q, x))^2*conjugate(q)+beta*abs(diff(q, x))^2*q+gamma*abs(q)^2*(diff(q, x$2))+lambda*q^2*(diff(conjugate(q), x$2))+delta*abs(q)^4*q

q(x,t)=P(x, t)*exp(I*(-k*x+omega*t+theta)) , and its derivatives in the pde

 

Thanks

 MaplePrimes member has sent you a message on MaplePrimes.

Member: faisal http://www.mapleprimes.com/users/faisal
E-Mail Address:

> restart; with(PDETools), with(plots);
> n := .3; Pr := 7; Da := 0.1e-4; Nb := .1; Nt := .1; tau := 5;
> Eq1 := (1-n)*(diff(f(x, y), `$`(y, 3)))+(1+x*cot(x))*f(x, y)*(diff(f(x, y), `$`(y, 2)))-(diff(f(x, y), y))/Da+(diff(f(x, y), y))^2+n*We*(diff(f(x, y), `$`(y, 2)))*(diff(f(x, y), `$`(y, 3)))+sin(x)*(theta(x, y)+phi(x, y))/x = x*((diff(f(x, y), y))*(diff(f(x, y), y, x))+(diff(f(x, y), `$`(y, 2)))*(diff(f(x, y), x)));
> Eq2 := (diff(theta(x, y), `$`(y, 2)))/Pr+Nt*(diff(theta(x, y), y))^2/Pr+Nb*(diff(phi(x, y), y))*(diff(theta(x, y), y))/Pr+(1+x*cot(x))*f(x, y)*(diff(theta(x, y), y)) = x*((diff(f(x, y), y))*(diff(theta(x, y), x))+(diff(theta(x, y), y))*(diff(f(x, y), x)));
> Eq3 := Nb*(diff(phi(x, y), `$`(y, 2)))/(tau*Pr)+Nt*(diff(theta(x, y), `$`(y, 2)))/(tau*Pr)+(1+x*cot(x))*f(x, y)*(diff(phi(x, y), y)) = x*((diff(f(x, y), y))*(diff(phi(x, y), x))+(diff(phi(x, y), y))*(diff(f(x, y), x)));
> ValWe := [0, 5, 10];
> bcs := {Nb*(D[2](phi))(x, 0)+Nt*(D[2](theta))(x, 0) = 0, f(0, y) = ((1/12)*y)^2*(6-8*((1/12)*y)+3*((1/12)*y)^2), f(x, 0) = 0, phi(0, y) = -.5*y, phi(x, 12) = 0, theta(0, y) = (1-(1/12)*y)^2, theta(x, 0) = 1, theta(x, 12) = 0, (D[2](f))(x, 0) = Da^(1/2)*(D[2, 2](f))(x, 0)+Da*(D[2, 2, 2](f))(x, 0), (D[2](f))(x, 12) = 0};
> pdsys := {Eq1, Eq2, Eq3}; for i to 3 do We := ValWe[i]; ans[i] := pdsolve(pdsys, bcs, numeric) end do;
> p1 := ans[1]:-plot(theta(x, y), x = 1, color = blue); p2 := ans[2]:-plot(theta(x, y), x = 1, color = green); p3 := ans[3]:-plot(theta(x, y), x = 1, color = black);
> plots[display]({p1, p2, p3});

 

I'm trying to solve Laplace's equation in Maple in 2-D domain. But while writing the last line "pdsolve(pdef)" (to get the final solution) and after that hitting enter, it doesn't shows anything. Please help me regaring this.

Having difficulties solving pde. Below is the problem and its not plotting. Anyone with useful informations. Please

restart;
with(PDEtools, casesplit, declare);
with(DEtools, gensys);
with(Physics);

PDE := diff(theta(x, t), x, x)+beta*theta(x, t)*(diff(theta(x, t), x, x))+beta*((diff(theta(x, t), x))^2)-M^2*theta(x, t)-S[h]*(theta(x, t)^2)+M^2*G*(1+E*theta(x, t))-P[e]*(diff(theta(x, t), x)) = diff(theta(x, t), t);
/ d  / d             \\
|--- |--- theta(x, t)||
\ dx \ dx            //

                      / d  / d             \\
   + beta theta(x, t) |--- |--- theta(x, t)||
                      \ dx \ dx            //

                           2                                     
          / d             \     2                               2
   + beta |--- theta(x, t)|  - M  theta(x, t) - S[h] theta(x, t) 
          \ dx            /                                      

      2                              / d             \    d  
   + M  G (1 + E theta(x, t)) - P[e] |--- theta(x, t)| = --- 
                                     \ dx            /    dt 

  theta(x, t)
BC := theta(x, 0) = 0, Dt(theta(0, t)) = 0, theta(1, t) = 1;
     theta(x, 0) = 0, Dt(theta(0, t)) = 0, theta(1, t) = 1
Codes := [beta = .1, M = .1, S[h] = .1, G = .1, P[e] = .1, E = .1];
S1 := pdsolve({BC, subs(Codes, PDE)});
PDEplot(S1, [[t, theta(x, t)], [x, theta(x, t)]], t = 0 .. 1, x = 0 .. 1, iterations = 2, numchar = [10, 10], stepsize = 0.5e-1, numsteps = [-5, 5]);
   PDEplot([[t, theta(x, t)], [x, theta(x, t)]], t = 0 .. 1, 

     x = 0 .. 1, iterations = 2, numchar = [10, 10], 

     stepsize = 0.05, numsteps = [-5, 5])

 

what's the problem with PDE below? tnx for help


 

restart:

PDE:=diff(u(x,t),t)=k*diff(u(x,t),x$2)-h*u(x,t);

diff(u(x, t), t) = k*(diff(diff(u(x, t), x), x))-h*u(x, t)

(1)

IBC := {u(-Pi,t)=u(Pi,t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t),u(x,0)=sin(x)};

{u(x, 0) = sin(x), u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)}

(2)

pdsolve(PDE,IBC);

Error, (in pdsolve/sys) too many arguments; some or all of the following are wrong: [{u(x, t)}, {u(x, 0) = sin(x), u(-Pi, t) = u(Pi, t), (D[1](u))(-Pi, t) = (D[1](u))(Pi, t)}]

 

 


 

Download PDE_problem.mw

Hi Everybody,

I have a simple question: Does Maple solve systems of partial differential equations with boundary conditions?

Can somebody give me an example? 

I have only found numerical solutions to this kind of systems but no symbolic example.

Thanks a lot for yor help.

 

Hello

I would like to solve the two dimensional heat equation in the square [-1,1]^2  using finite difference.

The following code  does not gives me the right answer.

  I appreciate any help

 

 

 

heat2dequation.mw

Hello

I solved a complex PDE equation in maple but I can not plot the output.

The manner was like bellow:

PDE := [diff(A(z, t), z)+(1/2)*alpha*A(z, t)+(I*beta[2]*(1/2))*(diff(A(z, t), t, t))-(I*beta[3]*(1/6))*(diff(A(z, t), t, t, t))-I*(GAMMA(omega[0]))(abs(A(z, t))^2*A(z, t)) = 0];
IBC := {(D[2](A))(z, 1), A(0, t) = -sin(2*Pi*t), A(z, 0) = sin(2*Pi*z), (D[2](A))(z, 0) = 2*z};
pds := pdsolve(PDE, IBC, type = numeric, time = t, range = 0 .. 1);
pds:-plot3d(A(z, t)*conjugate(A(z, t)), t = 0 .. 1, z = 0 .. 10, shading = zhue, axes = boxed, labels = ["x", "t", "A(z,t)"], labelfont = [TIMES, ROMAN, 20], orientation = [-120, 40]);

It is solved but there is an error like:

Error, (in pdsolve/numeric/plot3d) unable to compute solution for z>INFO["failtime"]:
unable to store 11.2781250000000+4390.00000040000*I when datatype=float[8]

could you please help me?

what is the problem?

 

 

I want to solve the system of differential equations
sys :=
  diff(x(t,s),t) = y(t,s),
  diff(y(t,s),t) + x(t,s) = 0;

subject to the initial condition
ic := x(0,s) = a(s),
      y(0,s) = b(s);

where a(s) and b(s) are given.

This looks like a system of PDEs but actually it is a system
of ODEs because there are no derivatives with respect to s.
It is easy to obtain the solution by hand:

x(t,s) = b(s)*sin(t) + a(s)*cos(t)
y(t,s) = b(s)*cos(t) - a(s)*sin(t)

I don't know how to get this in Maple, either through dsolve()
or pdsolve().

Actually both dsolve({sys}) and pdsolve({sys}) do return
the correct general solution, however dsolve({sys, ic})
or pdsolve({sys, ic}) produce no output.  Is there a trick
to make the latter work?

 

hi
I want to solve a pde equation:
 

equa1 := diff(u(x,y), x, x)-y(1+x) = 0;

# with codition:

con:=u(0,y) = 0, (D(u[x]))(0,y) = 0;

the anwer must be :    u(x,y)= y(x2/2  + x3/6)
How can i solve that with maple?

Please excuse my bad English
thanks

I am looking for a numerical solver for a parabolic PDE (up to 2nd order derivatives but no mixed ones) on the spatio-temporal domain [X x Y x T], either as an external package or as MAPLE code.  

I have coded the method of lines on the domain [X x T] and indeed also used pdsolve as a check for that case. However, pdsolve (numerical) cannot solve the PDEs on the domain [X x Y x T].  The run times and memory requirements for the latter case would of course be significantly greater.  

I am about to code up the method of lines (in MAPLE) on the domain [X x Y x T], but am wondering whether there exist external FORTRAN or C code packages that would be faster if called up in MAPLE and whose results would then be post-pocessed in MAPLE.

Does anyone have any suggestions?

MRB

How to find infinitesimals of a system of pdes? I can find out for a single pde but not able able to solve for system of pdes with several dependent and independent variables. Can anyone please provide me the code for that or give some clue. Thanks


Please help me on this :

restart; with(PDETools), with(plots)

n := .3:

Eq1 := (1-n)*(diff(f(x, y), `$`(y, 3)))+(1+x*cot(x))*f(x, y)*(diff(f(x, y), `$`(y, 2)))-(diff(f(x, y), y))/Da+(diff(f(x, y), y))^2+n*We*(diff(f(x, y), `$`(y, 2)))*(diff(f(x, y), `$`(y, 3)))+sin(x)*(theta(x, y)+phi(x, y))/x = x*((diff(f(x, y), y))*(diff(f(x, y), y, x))+(diff(f(x, y), `$`(y, 2)))*(diff(f(x, y), x))):

Eq2 := (diff(theta(x, y), `$`(y, 2)))/Pr+Nt*(diff(theta(x, y), y))^2/Pr+Nb*(diff(phi(x, y), y))*(diff(theta(x, y), y))/Pr+(1+x*cot(x))*f(x, y)*(diff(theta(x, y), y)) = x*((diff(f(x, y), y))*(diff(theta(x, y), x))+(diff(theta(x, y), y))*(diff(f(x, y), x))):

Eq3 := Nb*(diff(phi(x, y), `$`(y, 2)))/(tau*Pr)+Nt*(diff(theta(x, y), `$`(y, 2)))/(tau*Pr)+(1+x*cot(x))*f(x, y)*(diff(phi(x, y), y)) = x*((diff(f(x, y), y))*(diff(phi(x, y), x))+(diff(phi(x, y), y))*(diff(f(x, y), x))):

ValWe := [0, 5, 10]:

bcs := {Nb*(D[2](phi))(x, 0)+Nt*(D[2](theta))(x, 0) = 0, f(0, y) = ((1/12)*y)^2*(6-8*((1/12)*y)+3*((1/12)*y)^2), f(x, 0) = 0, phi(0, y) = -.5*y, phi(x, 12) = 0, theta(0, y) = (1-(1/12)*y)^2, theta(x, 0) = 1, theta(x, 12) = 0, (D[2](f))(x, 0) = Da^(1/2)*(D[2, 2](f))(x, 0)+Da*(D[2, 2, 2](f))(x, 0), (D[2](f))(x, 12) = 0}:

pdsys := {Eq1, Eq2, Eq3}:

p1 := ans[1]:-plot(theta(x, y), x = 1, color = blue):

plots[display]({p1, p2, p3})

 

``


 

Download untitle_2_(1).mw

1 2 3 4 5 6 7 Last Page 1 of 14