Items tagged with pdsolve pdsolve Tagged Items Feed

I'm trying to solve a 2nd order system of pde's with couplded BC but it gives me the following error

Error, (in pdsolve/numeric) initial/boundary conditions must be defined at one or two points for each independent variable

Here is the code

> T01 := 273; T02 := 26; L1 := .1; L2 := .2; h1 := 100; h2 := 200; k1 := 1; k2 := 2; rho1 := 1000; rho2 := 2000; c1 := 0.1e6; c2 := 0.2e6; alpha1 := 1; alpha2 := 2

> PDE := {diff(T1(x, t), t) = (diff(T1(x, t), x, x))/alpha1, diff(T2(x, t), t) = (diff(T2(x, t), x, x))/alpha2}

> IBC:={k1*(D[1](T1))(L1, t) = k2*(D[1](T2))(L1, t), T1(L1, t) = T2(L1, t), T1(x, 0) = T02, T2(x, 0) = T02, (D[1](T1))(0, t) = -h1*(T1(0, t)-T01)/k1, (D[1](T2))(L1+L2, t) = h2*(T2(L1+L2, t)-T02)/k2}

> pds := pdsolve(PDE, IBC, numeric)

Its basically a 1D heat equation in a 2 layers plate with conduction BC on both sides

i use the pdsolve to find the solutions of a system of partial differential equations,

but the result contains some indefinite integrals, how to simplify it further?

thank you

code:

eq1 := {6*(diff(_xi[t](x, t, u), u))-3*(diff(_xi[x](x, t, u), u)), 12*(diff(_xi[t](x, t, u), u, u))-6*(diff(_xi[x](x, t, u), u, u)), 2*(diff(_xi[t](x, t, u), u, u, u))-(diff(_xi[x](x, t, u), u, u, u)), diff(_eta[u](x, t, u), t)+diff(_eta[u](x, t, u), x, x, x)+(diff(_eta[u](x, t, u), x))*u, 18*(diff(_xi[t](x, t, u), x, u))+3*(diff(_eta[u](x, t, u), u, u))-9*(diff(_xi[x](x, t, u), x, u)), 6*(diff(_xi[t](x, t, u), x, x))+3*(diff(_eta[u](x, t, u), x, u))-3*(diff(_xi[x](x, t, u), x, x)), 6*(diff(_xi[t](x, t, u), x, u, u))+diff(_eta[u](x, t, u), u, u, u)-3*(diff(_xi[x](x, t, u), x, u, u)), 12*(diff(_xi[t](x, t, u), u))-6*(diff(_xi[x](x, t, u), u))+6*(diff(_xi[t](x, t, u), x, x, u))-6*(diff(_xi[t](x, t, u), u))*u+3*u*(diff(_xi[x](x, t, u), u))-3*(diff(_xi[x](x, t, u), x, x, u))+3*(diff(_eta[u](x, t, u), x, u, u)), 12*(diff(_xi[t](x, t, u), x))-6*(diff(_xi[x](x, t, u), x))+2*(diff(_xi[t](x, t, u), t))+2*(diff(_xi[t](x, t, u), x, x, x))-4*(diff(_xi[t](x, t, u), x))*u+2*(diff(_xi[x](x, t, u), x))*u+_eta[u](x, t, u)-(diff(_xi[x](x, t, u), t))+3*(diff(_eta[u](x, t, u), x, x, u))-(diff(_xi[x](x, t, u), x, x, x))};

simplify(pdsolve(eq1))

 

I read in the net that the method used in pdsolve numeric is the theta method, my question: is it the most efficient with regard to rate of convergence of the numerical solution of the PDE?

If not then why is it used as the default method?

 

Thanks.

 

I am currently working on FDM ,i have 2 coupled nonlinear pde ,i need help in solving these equation using maple code.

> restart:

> alias(f=f(tau,eta), theta=theta(tau,eta));

 

>

 

> PDE1:=S*diff(f,tau,eta)=eta^2*diff(f,eta)^2+(6*eta^2-2*f*eta)*diff(f,eta)+(6*eta^3-f*eta)*diff(f,eta,eta)-eta^4*diff(f,eta,eta,eta);

 

> PDE2:=eta^4*diff(theta,eta,eta)+2*eta^3*diff(theta,eta)-Pr*(f*eta^2*diff(theta,eta)+S*diff(theta,tau))=0;

 

hi

how pdsolve 2D couple  non linear differential equations which attached below?

thanks

2D.mw

PD1 := 12.6000000000000*(diff(U(x, theta), x, x, x, x))-7500*(diff(U(x, theta), x, x))+10.2112755389544*(diff(U(x, theta), x, x, theta, theta))+7.22165554279476*(diff(V(x, theta), x, x, x, theta))-3730.19397871630*(diff(V(x, theta), x, theta))+4.57316679658261*(diff(V(x, theta), x, theta, theta, theta))+36.0000000000000*(diff(W(x, theta), x, x, x))-9375.00*(diff(W(x, theta), x))-15.6731205946742*(diff(W(x, theta), x, theta, theta))-1947.26649812618*(diff(U(x, theta), theta, theta))+1.41357763467822*(diff(U(x, theta), theta, theta, theta, theta)):

PD2 := 3.52500000000000*(diff(V(x, theta), x, x, x, x))-3150.00*(diff(V(x, theta), x, x))+5.05278814097746*(diff(V(x, theta), theta, theta, theta, theta))-4972.65371594662*(diff(V(x, theta), theta, theta))+10.2112755389544*(diff(V(x, theta), x, x, theta, theta))+7.22165554279476*(diff(U(x, theta), x, x, x, theta))+4.57316679658261*(diff(U(x, theta), x, theta, theta, theta))-2536.53190552708*(diff(U(x, theta), x, theta))+97.2834589649212*(diff(W(x, theta), x, x, theta))+30.9917088694028*(diff(W(x, theta), theta, theta, theta))-31273.9463175575*(diff(W(x, theta), theta)):

PD3 := -0.168000000000000e-2*(diff(W(x, theta), x, x, x, x, x, x))+16.9000000000000*(diff(W(x, theta), x, x, x, x))-0.319161728473364e-2*(diff(W(x, theta), x, x, x, x, theta, theta))-37.5000000000000*(diff(W(x, theta), x, x))+796.276013656496*(diff(W(x, theta), x, x, theta, theta))-0.202111525639098e-2*(diff(W(x, theta), x, x, theta, theta, theta, theta))-36.0000000000000*(diff(U(x, theta), x, x, x))+9375.00*(diff(U(x, theta), x))+15.6731205946742*(diff(U(x, theta), x, theta, theta))-97.2834589649212*(diff(V(x, theta), x, x, theta))+31273.9463175575*(diff(V(x, theta), theta))-30.9917088694028*(diff(V(x, theta), theta, theta, theta))+2.06625000000000*10^5*W(x, theta)+313.462411893484*(diff(W(x, theta), theta, theta))+6.77715234781900*(diff(W(x, theta), theta, theta, theta, theta))-0.426628729281504e-3*(diff(W(x, theta), theta, theta, theta, theta, theta, theta))-400/((1-h3*f3(x))*ln(10-10*h3*f3(x))^2)-500/(1-h3*f3(x))^4:

BC := {D[1](U)*(0, theta) = 0, D[1](U)*(1, theta) = 0, D[1](U)*(x, 0) = 0, D[1](U)*(x, 1) = 0, D[1](V)*(0, theta) = 0, D[1](V)*(1, theta) = 0, D[1](V)*(x, 0) = 0, D[1](V)*(x, 1) = 0, D[1](W)*(0, theta) = 0, D[1](W)*(1, theta) = 0, D[1](W)*(x, 0) = 0, D[1](W)*(x, 1) = 0, D[2](W)*(0, theta) = 0, D[2](W)*(1, theta) = 0, D[2](W)*(x, 0) = 0, D[2](W)*(x, 1) = 0, U(0, theta) = 0, U(1, theta) = 0, U(x, 0) = 0, U(x, 1) = 0, V(0, theta) = 0, V(1, theta) = 0, V(x, 0) = 0, V(x, 1) = 0, W(0, theta) = 0, W(1, theta) = 0, W(x, 0) = 0, W(x, 1) = 0}

``

 

Download 2D.mw

Hello everyone!

Can somebody help me to sovle the following system numerically?

V:=5*10^(-5):
A:=2*10^(-4):
L:=0.02:
C0:=0.01:
d:=0.25:
eq1:=CL(t)*V+CR(t)*V+A*int(CS(x,t),x=0..L):
eq2:=CL(t)=eval(CS(x,t),x=0):
eq3:=CR(t)=eval(CS(x,t),x=L):
eq4:=CL(0)=C0:
eq5:=CL(10000)=C0/2:
eq6:=CL(10000)=CR(10000):
eq7:=V*(C0-CL(t))=A*d*int(eval(diff(CS(x,t),x),x=0),t=0..t1):
eq8:=V*CR(t)=A*d*int(eval(diff(CS(x,t),x),x=L),t=0..t1):
eq9:=diff(CS(x,t),t)=d*diff(CS(x,t),x,x):

Thanks!

I am trying to find a general solution to the 1D-wave equation

Eq1:=diff(u(x,t),t$2)=diff(u(x,t),x$2);

pdsolve(Eq1,HINT=f(x)*g(t)); # Hinting pdsolve gives general solution using separation of variables

pdsolve({Eq1,u(x,0)=f(x),D[2](u)(x,0)=g(x)}); # without HINT and using intial conditions, I get travelling wave solution

pdsolve({Eq1,u(x,0)=f(x),D[2](u)(x,0)=g(x)},HINT=f(x)*g(t)); # Now when I try to use hint and ICs both, pdsolve return nothing.

I want to use separation of variables to find solution to the wave equation.

Any comment?

Thanks

Hello all,

I am pretty new to Maple, but I am trying to understand something. I was able to find a numerical solution to a PDE in maple (with some community help, thanks guys!). I am trying to manipulate this data but am struggling with it. I thought if I could take this data to matlab it would be pretty easy for me to manipulate and do what I want. 

So my question is: How do I export my numerical solution (pds module) to matlab. Just taking the data is okay. I know you can evaluate the data at some points. 

 

I see there is "Matlab" command that converts code, it doesn't seem to like pds as an input though.

I also see an export matrix command. I guess it could be possible to create a matrix of plot data and convert it this way?

 

I had to do a change of coordinate system to solve the PDE because of boundary conditions. I'm trying to transform this data back to my regular x,y coordinate system to see if it matches some other simulations. 

Thanks in advance! And here is my file.


restart;
with(Physics):
Setup(mathematicalnotation = true):

V(Z, f);

If function ( varphi) is defined, use this one.

PDE1 := subs[inplace](x = xi*varphi(t), PDE1);
If function ( varphi) is defined, use this one.


PDE1 := subs[inplace](t = 2*vartheta*(1/omega), PDE1);


 

 

 

 

 

 

Thesis_Pde2_attempt.mw

would like to draw the graph of x^2-1

with below sys instead of x^2-1 

sys := {-(1/2)*(-x-1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), b))/x^2+(diff(y(a, b), a))*(diff(y(a, b), b)), (1/2)*(x+1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), a))/x^2+(x^2+x+1)/x^4, (1/2)*(x+1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), a))/x^2-(1/2)*(-x-1+sqrt(-3*x^2-2*x-3))*(diff(y(a, b), b))/x^2+(x^2+x+1)/x^4};
IBC:={x=1,y(a,3)=(3-1)*(3+1),y(0,b)=0,y(1,b)=0}:
pds:=pdsolve(sys,IBC,numeric,spacestep=140);
plots[display]([seq(pds:−plot(v,t=i10),i=0..5)]):

 

hi.i encounter error in pdsole equations with unknown parameter(N)??

please help me for solve it....thanks alotmaple_prime.mw

I have the following two PDEs:

PDE := diff(u(x, t), t) = diff(u(x, t), x, x)+sin(x+t)-cos(x+t);

IBC:= D[1](u)(0,t)=-sin(t),
D[1](u)(1,t)=-sin(1+t),
u(x,0)=cos(x);

pds := pdsolve( PDE, [IBC], numeric, time = t, range = 0 .. 1,
spacestep = 1/32, timestep = 1/32,
errorest=true
)

 

PDE2 := diff(v(x, t), t) = diff(v(x, t), x, x);
IBC2:= D[1](v)(0,t)=0,
D[1](v)(1,t)=-0.000065*v(1, t)^4,
v(x,0)=1;

pds1 := pdsolve( PDE2, [IBC2], numeric, time = t, range = 0 .. 1,
spacestep = 1/32, timestep = 1/32,
errorest=true
);

 

Now, what I want to do with these two PDEs is the following:

 

For each h=timestep=spacestep  = 1/16 , 1/32 , 1/64 , 1/128 , 1/256

Calculate the error norm ||E||_h = sqrt(sum_{j=0}^{1/h} h* |u(j*h,tval)-v(j*h,tval)|^2)

where tval is some chosen point between 0 and 1 (this value is fixed for each spacestep chosen).

 

And then plot the graph of log ||E||_h vs. log h above.

 

What I don't know is how to extract each time the spacestep and its PDE's two solutions, does someone have a suggested script to use here?

 

 

hello everyone

can any one tell me what is this anti reduction method. In the paper of serdal palmuk,the link is given bellow

http://www.hindawi.com/journals/mpe/2009/202307/

in this paper question #4 is first solved by anti reduction method for  exact solution.

but i dont understand this method,

if anybody know this then please also tell me how to solve this,

and in the next  (6 & 7 ) examples "in the pourus media equation" they first find its particular exact solution.i also dont understand this,so please tell me

actually i know how to solve ODE to find its exact solution but  i dont know how we find exact solutions of partial differtial equations,

so please help me to solve this problem

thanks

 

Hi,

    i meet  a partial differential equation seems not complicated

with(PDEtools):

PDE := (diff(f(x__1, x__2, p__1, p__2), x__1))*p__1/m-(diff(f(x__1, x__2, p__1, p__2), p__1))*(2*k*x__1-k*x__2)+(diff(f(x__1, x__2, p__1, p__2), x__2))*p__2/m-(diff(f(x__1, x__2, p__1, p__2), p__2))*(-k*x__1+2*k*x__2);

when i use

     pdsolve(PDE);

i get nothing,but i sure

    f=c*(p__1^2/m+p__2^2/m+4*p__1*p__2/m+6*k*x__1*x__2) 

is the one solution of the differential equation .

how i can get solutions about of the above equation.

thanks .

 

restart;

with(DETools, diff_table);

kB := 0.138064852e-22;

R := 287.058;

T := 293;

p := 101325;

rho := 0.1e-2*p/(R*T);

vr := diff_table(v_r(r, z));

vz := diff_table(v_z(r, z));

eq_r := 0 = 0;

eq_p := (vr[z]-vz[r])*vr[] = (vr[]*(vr[r, z]-vz[r, r])+vz[]*(vr[z, z]-vz[z, r]))*r;

eq_z := 0 = 0;

eq_m := r*vr[r]+r*vz[z]+vr[] = 0;

pde := {eq_m, eq_p};

IBC := {v_r(1, z) = 0, v_r(r, 0) = 0, v_z(1, z) = 0, v_z(r, 0) = r^2-1};

sol := pdsolve(pde, IBC, numeric, time = z, range = 0 .. 1);

 

what am I doing wrong?

it's telling me: Error, (in pdsolve/numeric/par_hyp) Incorrect number of boundary conditions, expected 3, got 2
but i did just as in the example :-/

Are there any examples of network solutions such as mine systems in Maple.
I wrote in the Maple system of partial differential equations describing the process of filtration combustion.
I'm a novice. I do not quite understand how to solve it.
Online a lot of "simple" examples. I need something very similar to my case.

Model03.mw

1 2 3 4 5 6 7 Page 1 of 8