simplevn1967

0 Reputation

One Badge

1 years, 282 days

MaplePrimes Activity


These are replies submitted by simplevn1967

@acer : Exactly pointed out!

@Rouben Rostamian  : Indeed, I used Maple 17 (released 2013) :((

@Rouben Rostamian: Thanks forward, Respectable Rouben. I just downloaded your code and tried to run it on My Maple 17. Maybe, there was some problem with my platform ...

restart;

with(PDEtools):

The original PDE

pde := diff(c(z,t),t) + diff(w*c(z,t),z) = diff(c(z,t),z,z);

The space domain is the shrinking interval w*t, h.

ibc := { c(z,0)=0, c(w*t,t)=cs, D[1](c)(h,t)=0 };

Change the space variable from z to Z, where Z lives in the fixed interval 0, 1
through the transformation "z=Z*h + (1-Z)*w*t."
Then Z = 0 corresponds to z = w*t,  and Z = 1 corresponds to z = h.

change_of_vars := {z=Z*h+(1-Z)*w*t, c(z,t)=C(Z,t)};

Here is the transformed PDE

PDE := dchange(change_of_vars, pde, [C(Z,t), Z]);

and here are the transformed initial and boundary conditions:

IBC := dchange(change_of_vars, ibc, [C(Z,t), Z]);

I pick some arbitrary values for the parameters.  Change as needed.

w := 0.5: h := 1:  cs := 1:
pdsol := pdsolve(PDE, IBC, numeric, spacestep=0.01):

Here is the plot of the concentration in the Z, t variables:

p := pdsol:-plot3d(C(Z,t), Z=0..1, t=0..1, orientation=[-45,60,0]);

We apply the transformation z = Z*h+(1-Z)*w*t to obtain the plot of the
concentration in the z, t variables.

plottools:-transform((Z,t,C)->[Z*h + (1-Z)*w*t, t, C])(p):
plots:-display(%, labels=[z,t,c],
    shading=zhue, style=surfacecontour, orientation=[-45,60,0]);

Download moving_boundary_run.mw

Sorry but I can not run out successfully this beautiful code. In fact from the command pdsol I got:
> pdsol := pdsolve(PDE, IBC, numeric, spacestep=0.01):
Error, (in pdsolve/numeric/process_IBCs) initial/boundary condition does not contain the dependent variables of the PDE: c(.5*t, t) = 1
Here is the plot of the concentration in the 
                              Z, t
 variables:
> p := pdsol:-plot3d(C(Z,t), Z=0..1, t=0..1, orientation=[-45,60,0]);
Error, `pdsol` does not evaluate to a module
We apply the transformation 
                     z = Z h + (1 - Z) w t
 to obtain the plot of the
concentration in the 
                              z, t
 variables.
plottools:-transform((Z,t,C)->[Z*h + (1-Z)*w*t, t, C])(p):
plots:-display(%, labels=[z,t,c],
    shading=zhue, style=surfacecontour, orientation=[-45,60,0]);
Error, (in unknown) invalid argument
Error, (in plots:-display) expecting plot structure but received: 1

Did someone get the same problem as mine? Can someone tell me how to fix it? Thanks advance.
 

Page 1 of 1