Items tagged with pdsolve pdsolve Tagged Items Feed

Hello everyone,

i'm trying to simulate a diffusion problem. It contains two connected regions in which a species is diffusing at different speeds. In one region (zeta) one boundary is set to be constant whereas in the other region (c) there is some oscillation at the boundary.The code i try to use is as follows:

sys1 := [diff(c(x, t), t) = gDiffusion*10^5*diff(c(x, t), x$2), diff(zeta(x, t), t) = KDiffusion*10^6*diff(zeta(x, t), x$2)]

pds := pdsolve(sys1, IBC, numeric, time = t, range = 0 .. 3000, spacestep = 3)

However the main problem are my boundary conditions:

IBC := {c(0, t) = 0, c(x > 0, 0) = 0, zeta(0, t) = .4, zeta(x > 0, 0) = .4, (D[1](c))(3000, t) = sin((1/100)*t), (D[1](zeta))(0, t) = 0}

Like this it principally works (however it is apparently ill-posed).

Now what i do like is that the two equations are coupled at x=2000 with the condition that c(2000,t)=zeta(2000,t). This however i dont seem to be able to implement.

I appreciate your comments

Goon

how to pdsolve this ?...

June 27 2014 rit 200

why system inconsistent 

when only want to obtain a equation H

in terms of a1 , a3, b2, b3, c1, c2, x1, x2, lambda

pdsolve([
Diff(H(x1,x2,lambda), x1) = a1*x1 + a3*lambda,
Diff(H(x1,x2,lambda), x2) = b2*x2 + b3*lambda,
Diff(H(x1,x2,lambda), lambda) = c1*x1 + c2*x2
], H(x1,x2,lambda));

Hi! 

When trying to find the fundamental solution of the Heat equation using Maple (software), I get the following Error message which seems to have no documentation available (?) :

Using :

          PDE := -(diff(f(x, t), t))+(diff(f(x, t), x, x))*Di = 0

assume(epsilon > 0);

pdsys := [PDE, f(x, 0) = Dirac(x-epsilon)];

pdsolve(pdsys, build)

"Error, (in casesplit/K) this version of casesplit is not yet handling the function: Dirac"

Anybody has an idea what that is? (Using Maple 17) . How can I solve this problem ? 

 

http://en.wikipedia.org/wiki/Heat_equation

 

Thanking you on Advance, 

Erez . 

Hi,

I need your help to fix the error in this code.  many thinks
restart:
pde:=diff(u(t,x),t$2)=diff(u(t,x),x$2)-sin(u(t,x)):
f:=x->x^2:
IBC := {u(0,x)=f(x),u(t,-50)=0,D[2](u)(t, 50)=0,D[1](u)(0, x)=-diff(f(x),x)}:

pds := pdsolve(pde, IBC, numeric):

p1 := pds:-plot(t = 0);
p2 := pds:-plot(t = 1/10);
p3 := pds:-plot(t = 1/2);
p4 := pds:-plot(t = 1);
p5 := pds:-plot(t = 2);
plots[display]({p1, p2, p3, p4, p5}, title = `Sine Gordaon at t=0,0.1,0.5,1,2`);

Hi,

I try to solve this equation using pdsolve but there is no results.
restart:
with(PDEtools):
with(plots):

Eq:=diff(u(t,x), t$2) =diff(u(t,x),x$2)+sin(u(t,x));

pdsolve(Eq);

Thank you for your help.

 

I'm trying to analytically solve for a Laplace's equation in a unit square with the following BCs: u(x,0) = 0, u(y,0) = 0, u(1,y) = 0, u(x,1) = 1

The series solution to this problem is well-known, where u(x,y) is solved with separation of variables to obtain u in terms of sin and sinh series.

I try to recreate the solution with pdsolve but am stuck with it.

My attempt:

 

lap2d := diff(u(x,y), x, x) + diff(u(x,y), y, y) = 0

sol := pdsolve(lap2d, HINT = X(x)*Y(y), build)  % saw this in mapleprimes

With this I managed to get an expression for u(x,y). My trouble is with the coefficients: _C1, _C2, _C3, _C4, _c_1

_C1 .. _C4 are clearly from integrations, but I am not clear about _c_1?

To solve for the constants of integrations, I tried to set up simultaneuous equations with the BCs.

For example,

eq1 := eval( rhs(sol), x=0) = 0

Similarly, repeat for the other 3 BCs to get eq2, eq3, eq4

I tried to solve these simultaneous eqns with:

solve({eq1, eq2, eq3, eq4}, {_C1, _C2, _C3, _C4})

but Maple does not output anyting.

Need your advice if this is the right way and I just goofed up with the syntax, or there are better ways to construct the series solution of the problem. Should I use linearsolve to find the C's?

I use Maple 17.

 

Thanks in advance

 

 

Hi, everyone!

I need help.

There are a system of 2 pde's: 

diff(Y(x, t), x$2) = exp(-2*x*b)*(A(x, t)-Y(x, t)), diff(A(x, t), t) = exp(-2*x*b)*(Y(x, t)-A(x, t)) 

and initial and boundary conditions: 

A(x, 0) = 0, Y(0, t) = 0.1, (D[1](Y))(0, t) = 0. 

Goal: 
For each b = 0, 0.05, 0.1. 
1)to plot 3-d  Y(x,t): 0<=x<=20,0<=t<=7. 
2)to plot  Y(x,4). 

Are there any methods with no finite-difference mesh?


I realized the  methods such as  pds1 := pdsolve(sys, ibc, numeric, time = t, range = 0 .. 7)  can't help me:

Error, (in pdsolve/numeric/match_PDEs_BCs) cannot handle systems with multiple PDE describing the time dependence of the same dependent variable, or having no time dependence 

I found something, that can solve my system analytically: 
pds := pdsolve(sys), where sys - my system without initial and boundary conditions. At the end of the output: huge monster, consisted of symbols and numbers :) And I couldn't affiliate init-bound conditions to it.

I use Maple 13. 

Is it possible to solve (numerically or symbolically) the system of PDEs
sys:={diff(Y(x, t), x$2) = exp(-2*x*b)*(A(x, t)-Y(x, t)), diff(A(x, t), t) = exp(-2*x*b)*(Y(x, t)-A(x, t)) }
under the conditions
ibc:={A(x, 0) = 0, Y(0, t) = 0.1, D[1](Y)(0, t) = 0},
 where the parameter b takes the values 0,0.05,0.1, in Maple? The ranges are t=0..7, x=0..20.

Hi ,

I would like to resolve the Kortweg and de Devries equation :

> KDV2:= diff( u(X,T), T)+ 6*u(X,T)*diff(u(X,T),X)+ diff(u(X,T),X$3);

 

I used pdsolve but I have a problem to enter the IBC :

I want

u(infinity, t) =0
u( -infinity, t )=0

u ( x, 0 ) = 1


So I did :


> SOL:=pdsolve(diff( u(X,T), T)+ 6*u(X,T)*diff(u(X,T),X)+ diff(u(X,T),X$3)=0,{u(-10, T) = 0, u(10, T) = 0, u(X, 0) =1},numeric,time=T,range=-10..10);

 

But it doesn't work.

( I remplace infinity by 10 because then I want the graphic representation of the solution )

Could you help me please ?  

Hi

I need a temperature distribution inside a barrier during a heating process.
I will be appreciated for any help.

 

wz

How to animete BC using varying temperature in time?  How to obtain animated solution?

restart

Diffusivity coefficent...

a := 0.1e-5:

Thickness of barrier...

L := .2:

Heating curve:
Time in heating curve (in hours form exmaple)...

Time := seq(i, i = 1 .. 10):

Varying temperature in time [K]....

Temp_in_Time := [433.15, 568.15, 703.15, 838.15, 973.15, 1108.15, 1243.15, 1378.15, 1513.15, 1616.15]:

Initial temperature [K]

Tot := 298:

PDE := diff(T(x, t), t) = a*(diff(T(x, t), x, x)):

--->>>

BC1 := {T(0, t) = Temp_in_Time[2], T(L, t) = Temp_in_Time[2], T(x, 0) = Tot}:

sol := pdsolve(PDE, BC1, numeric, timestep = 50):

sol:-plot(t = 3*3600, thickness = 3, colour = red);

 

``



Download heating.mw

restart:

Eq1:=S*diff(f(x,t),x,t)+diff(f(x,t),x)^2-f(x,t)*diff(f(x,t),x$2)=diff(f(x,t),x$3);

BCs := {D[1](f)(0,t)=cos(t), f(0,t)=0,D[1](f)(L,t)=0};

ICs := {f(x,0)=0};

S:=10:L:=5:
smod3:= pdsolve(Eq1,ICs union BCs,numeric,range=0..L);

smod3:-plot(t=0,  color=red):

it seems to me that the problem is due to the mixed bcs. Any way around?

Cheers!

I  get  this  from  pdsolve as a  "solution"

 

p[42] := -Pi+.2+3.0*x+3.2*t+2*Intat(2.25*_f/sqrt(-1.5*_f*(-1.6+4.0500*_f^2+3.7125*_f)), _f = 0)

 

it does not eval to anything, what is this ?

https://drive.google.com/file/d/0B2D69u2pweEvMV92SGhtRGZONFk/edit?usp=sharing

a error and code in this attachment mw

i can pdsolve it, but numeric pdsolve it get error

> sol := pdsolve({ICS, sys1, sys2, sys3, sys4, sys5, sys6, sys7}, numeric, method = rkf45, parameters = [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p], output = listprocedure);

Error, (in pdsolve) invalid input: `pdsolve/numeric` expects its 2nd argument, IBCs, to be of type {set, list}, but received method = rkf45

 

restart;

x11:=[1.05657970467127, .369307407127487, .400969917393968, .368036162749865, .280389875142339, .280523489139136, .283220960827744, .373941285224253, .378034013792196, .384412762008662, .358678988563716, .350625923673556, .852039817522304, .362240519978640, 1.03197080591829, .343650441408896, .982510654490390, .404544012440991, .422063867224247, 1.20938803285209, .455708586000668, 1.22503869712995, .388259397947667, .472188904769827, 1.31108028794286, 1.19746589728366, .572669348193002];

y11:= [.813920951682113, 10.3546712426210, 2.54581301217449, 10.2617298458172, 3.82022939508992, 3.81119683373741, 3.90918914917183, 10.5831132713329, 10.8700088489538, 11.0218056177585, 10.5857571473115, 9.89034057997145, .271497107157453, 9.77706473740146, 2.23955104698355, 4.16872072216206, .806710906391666, 11.9148193656260, 12.0521411908477, 2.52812993540440, 12.6348841508094, 2.72197067934160, 5.10891266728297, 13.3609183272238, 3.03572692234234, 1.07326033849793, 15.4268962507711];

z11:= [8.93290500985527, 8.96632856524217, 15.8861149154785, 9.16576669760908, 3.20341865536950, 3.11740291181539, 3.22328961317946, 8.71094047480794, 8.60596466961827, 9.15440788281943, 10.2935566768586, 10.5765776143026, 16.3469510439066, 9.36885507010739, 2.20434678689869, 3.88816077008078, 17.9816287534802, 10.1414228793737, 10.7356141216242, 4.00703203725441, 12.0105837616461, 3.77028605914906, 5.01411979976607, 12.7529165152417, 3.66800269682059, 21.2178824031985, 13.9148746721034];

u11 := [5.19, 5.37, 5.56, 5.46, 5.21, 5.55, 5.56, 5.61, 5.91, 5.93, 5.98, 6.28, 6.24, 6.44, 6.58, 6.75, 6.78, 6.81, 7.59, 7.73, 7.75, 7.69, 7.73, 7.79, 7.91, 7.96, 8.05];

u11 := [seq(close3(t+t3), t3=0..26)];

sys1:=Diff(a1(s,t),s) = a*a1(s,t)+ b*a2(s,t)+ c*a3(s,t)+ d*u(t);

sys2:=Diff(a2(s,t),s) = e*a1(s,t)+ f*a2(s,t)+ g*a3(s,t)+ h*u(t);

sys3:=Diff(a3(s,t),s) = i*a1(s,t)+ j*a2(s,t)+ k*a3(s,t)+ l*u(t);

sys4:=Diff(y(t),t) = m*a1(s,t)+n*a2(s,t)+ o*a3(s,t)+ p*u(t);

sys5:= Diff(a1(s,t),t) = a1(s,t);

sys6:= Diff(a2(s,t),t) = a2(s,t);

sys7:= Diff(a3(s,t),t) = a3(s,t);

sol := pdsolve([sys1, sys2, sys3,sys4,sys5,sys6,sys7]);

t2 := [seq(i, i=1..27)];

xt1 := subs(_C1=1,sol[1]); # a1(t)

xt2 := subs(_C1=1,sol[2]); # a2(t)

xt3 := subs(_C1=1,sol[3]); # a3(t)

ut1 := subs(_C1=1,sol[4]); # u(t)

tim := [seq(n, n=1..27)];

N:=nops(tim):

ICS:=a1(1)=x11[1],a2(1)=y11[1],a3(1)=z11[1],u1(1)=u11[1];

sol:=pdsolve({sys1, sys2, sys3,sys4,sys5,sys6,sys7,ICS}, numeric, method=rkf45, parameters=[ a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p],output=listprocedure);

ans(.001,.002,.003,.001,.002,.003,.001,.002,.003,.003,.003,.003,.003,.003,.003,.003);

ans:=proc(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) sol(parameters=[ a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p]);

add((xt1(tim[i])-x11[i])^2,i=1..N)+add((xt2(tim[i])-y11[i])^2,i=1..N)+add((xt3(tim[i])-z11[i])^2,i=1..N)+add((ut1(tim[i])-u11[i])^2,i=1..N);

end proc;

result1 := Optimization:-Minimize(ans,initialpoint=[.001,.002,.003,.001,.002,.003,.001,.002,.003,.003,.003,.003,.003,.003,.003,.003]);

how to pdsolve this system...

December 27 2013 rit 200

a1 := Diff(x1(s,t),s$2) = a*x1(s,t)+b*x2(s,t)+c*x3(s,t)+d*u(t);
a2 := Diff(x1(s,t),t)=x1(s,t);
b1 := Diff(x2(s,t),s$2) = e*x1(s,t)+f*x2(s,t)+g*x3(s,t)+h*u(t);
b2 := Diff(x2(s,t),t)=x2(s,t);
c1 := Diff(x3(s,t),s$2) = i*x1(s,t)+j*x2(s,t)+k*x3(s,t)+l*u(t);
c2 := Diff(x3(s,t),t)=x3(s,t);
sys := [a1, a2, b1, b2, c1, c2];
sol := pdsolve(sys);

length exceed limit

1 2 3 4 5 Page 1 of 5