Hicham

5 Reputation

0 Badges

11 years, 13 days

MaplePrimes Activity


These are questions asked by Hicham

Hello,

 

I'm trying to resolve a PDE using pdsolve().

 

The equation is :

diff(n(z,t),t)+diff(n(z,t)*v(z,t),z)=0

where n is the density of particles in a container and v their velocity.

 

I assume that the density decreases linearly at t=0 : n(z,0)=n[max]*(1-z/H) where H is the height of the container.

This gives the following system : 

> sys := [diff(n(z, t), t)+(diff(n(z, t)*v(z,t), z)) = 0, n(z, 0) = k_1*(1-z/H)]

 

With a velocity of the form :

v(z,t) = (1/tau)(1/n(z,t)-1/n[max])

it works like a charm.

 

 

However, I would like to try a velocity of the form :

v(z,t) = v[max]*(1-(n(z,t)/n[max])^5)

(similar to Greenshield model).

 

pdsolve() raises an error when I try :

> sys := [diff(n(z, t), t)+k_2*(diff(n(z, t)*(1-(n(z, t)/k_1)^5), z)) = 0, n(z, 0) = k_2*(1-z/H)];

> pdsolve(sys);

"Error, (in pdsolve/BC/1st_order/_Fn/integrate) invalid input: op expects 1 or 2 arguments, but received 0"

 

op(sys) returns the expected result, so I guess the problem comes from the power.

 

Have you guys have any solution ?

 

Thanks a lot.

Page 1 of 1