## 99 Reputation

14 years, 203 days

## IC and BC problems with semiclassical co...

see below.  I am getting IC and BC errors.  The code is below/attached.  Can anyone help?

Melvin

This is a corrected version of pdeProb2.mw, in which we examine the 1-D classical burgers equation, and find an asymptotic steady state in the solution fields u, v which is not reached by a solution via numerical simulation.

NOTE:  When generating and displaying PLOTS AT HIGH RESOLUTION, do not use p1 := plot(bla, etc);  i.e. do not end with a semicolon.   Instead, end with a colon viz  p1 := plot(bla, etc): which sends the result to p1 instead of  generating an excess memory use message.  Then create the plot by executing p1; i.e. end the assigned p1 with a semicolon to display the graphics result.

 >

We load the MAPLE Physics package from the MapleCloud, in order to support solutions using pdsolve().

 >
 (1)
 >
 (2)

Start of definition of problem:

 >
 (3)

Start of definition of problem:

 > with(PDETools); with(CodeTools);with(plots);
 (4)
 >

Two 1-D coupled Burgers equations - semiclassical case O(1), O( ) : retain O(1) only for u(x,t) and O(1), O( ) for v(x,t):

In the quantum case, there are two coupled quantum Burgers equations, which each include the quantum potential terms.  As in the classical case above, we apply constant external forces and .  Our aim is to display the profiles of  and  as strings on  space.

 > #hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants
 > hBar:= 1:m:= 1:Fu:= 0.2:Fv:= 0.1: # set constant values - same as above ...consider reducing

Notice that we set

At O( ) the real quantum potential term is zero, leaving the classical expression:

 > pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu;
 (5)

As in the classical case above, the temporal and spatial derivative are each of order 1; so only one initial condition and one boundary condition are required for this part of the semiclassical equations.

On the otherhand, the imaginary quantum potential equation for v(x,t) has only O( )  terms so together the pair of equations for  are semiclassical:

 > pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x\$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv;
 (6)

By inspection of the derivatives in above two equations we now set up the ICs and BCs for  and Note that the above second order spatial derivative requires a 1st order derivative boundary condition as defined below.

The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for  and for , notably a 1st derivative reflective BC term for .

 > ICu:={u(x,0) = 0.1*sin(2*Pi*x)};# initial conditions for PDE pdeu
 (7)
 > ICv:={v(x,0) = 0.2*sin(Pi*x)};# initial conditions for PDE pdev
 (8)
 > IC := ICu union ICv;
 (9)
 > BCu := {u(0,t) = 0.5*(1-cos(2*Pi*t)),D[1](u)(1,t) = 0}; # boundary conditions for PDE pdeu: note the reflective derivative term D[1](u)
 (10)
 > BCv := {v(0,t) = 0.5*sin(2*Pi*t), v(1,t)=-0.5*sin(2*Pi*t)}; # boundary conditions for PDE pdev
 (11)
 > BC := BCu union BCv;
 (12)

This set of equations and conditions can now be solved numerically.

The above IC and BC are both  at  and thus consistent.

 > pdu := pdsolve({pdeu,pdev},{IC,BC},numeric, time = t,range = 0..1,spacestep = 1/66,timestep = .1);

Here is the 3D plot of u(x,t):

 > T := 3; p1 := pdu:-plot3d(u,t=0..T,numpoints = 2000,x=0.0..2, shading = zhue,orientation=[-146,54,0],scaling = constrained, title = print("Figure 1",u(x, t), numeric));
 >

## PDE problem... can't get solution ... pr...

Maple

I  can't seem to get a solution to the following problem.  Can anyone see where I am going wrong I thought I had correct IBC s but they may be wrong/ill-posed

Melvin

Two 1-D coupled Burgers equations - semiclassical case: remove O( ) terms for u(x,t) but retain O( ) terms for v(x,t):

In the quantum case, there are two coupled quantum Burgers equations, which each include the quantum potential terms.  As in the classical case above, we apply constant external forces and .  Our aim is to display the profiles of  and  as strings on  space.

 > #hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants
 > hBar := 1:m := 1:Fu := 0.2:Fv := 0.1: # set constant values - same as above ...consider reducing

At O( ) the real quantum potential term is zero, leaving the classical expression:

 > pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu;
 (1)

On the otherhand, the imaginary quantum potential equation for v(x,t) has only O( ) terms and so is retained as semiclassical

 > pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x\$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv;
 (2)

By inspection of the derivatives in above equations we now set up the ICs and BCs for  and

The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for  and for , notably a 1st derivative BC term for .

 > IBCu := {u(x,0) = 0.1*sin(2*Pi*x),u(0,t) = 0.5-0.5*cos(2*Pi*t),D[1](u)(0,t) = 2*Pi*0.1*cos(2*Pi*t)};# IBC for u
 (3)
 > IBCv := {v(x,0) = 0.2*sin((1/2)*Pi*x),v(0,t)=0.2-0.2*cos(2*Pi*t)};# IBC for v
 (4)
 > IBC := IBCu union IBCv;
 (5)
 > pds:=pdsolve({pdeu,pdev},IBC, time = t, range = 0..0.2,numeric);# 'numeric' solution
 (6)

The following quantum animation is in contrast with the classical case, and illustrates the delocalisation of the wave form caused by the quantum diffusion and advection terms:

 > T:=2; p1:=pds:-animate({[u, color = green, linestyle = dash], [v, color = red, linestyle = dash]},t = 0..T, gridlines = true, numpoints = 2000,x = 0..0.2):p1;
 (7)

Note that this plot also shows that there are regions in which ,  .  Below, the 3D plot of u(x,t),v(x,t) also illustrates the quantum delocalisation of features:

 > T := 3; p1 := pds:-plot3d({[u, shading = zhue], [v, color = red]}, t = 0 .. T, x = -0.1e-2 .. 2,transparency = 0.0, orientation = [-146, 54, 0], title = print("Coupled quantum solution \n u(x, t) zhue, v(x,t) red", numeric),scaling=unconstrained):p1;
 >

Here it is:

#hBar := 'hBar': m := 'm':Fu := 'Fu': Fv := 'Fv': # define constants
hBar := 1:m := 1:Fu := 0.2:Fv := 0.1: # set constant values - same as above ...consider reducing
At O(
`&hbar;`^2;
) the real quantum potential term is zero, leaving the classical expression:
pdeu := diff(u(x,t),t)+u(x,t)/m*(diff(u(x,t),x)) = Fu;
/ d         \           / d         \
pdeu := |--- u(x, t)| + u(x, t) |--- u(x, t)| = 0.2
\ dt        /           \ dx        /
On the otherhand, the imaginary quantum potential equation for v(x,t) has only O(
`&hbar;`;
) terms and so is retained as semiclassical
pdev := diff(v(x,t),t)+u(x,t)/m*(diff(v(x,t),x))-hBar*(diff(u(x,t),x\$2))/(2*m)+v(x,t)*(diff(u(x,t),x))/m = Fv;
2
/ d         \           / d         \   1  d
pdev := |--- v(x, t)| + u(x, t) |--- v(x, t)| - - ---- u(x, t)
\ dt        /           \ dx        /   2    2
dx

/ d         \
+ v(x, t) |--- u(x, t)| = 0.1
\ dx        /
By inspection of the derivatives in above equations we now set up the ICs and BCs for
u(x, t);
and
v(x,t).;
The quantum initial and boundary conditions are similar to the classical case, but also comprise additional boundary condition terms for
v;
and for
u;
, notably a 1st derivative BC term for
u;
.
IBCu := {u(x,0) = 0.1*sin(2*Pi*x),u(0,t) = 0.5-0.5*cos(2*Pi*t),D[1](u)(0,t) = 2*Pi*0.1*cos(2*Pi*t)};# IBC for u
IBCu := {u(0, t) = 0.5 - 0.5 cos(2 Pi t),

u(x, 0) = 0.1 sin(2 Pi x),

D[1](u)(0, t) = 0.6283185308 cos(2 Pi t)}
IBCv := {v(x,0) = 0.2*sin((1/2)*Pi*x),v(0,t)=0.2-0.2*cos(2*Pi*t)};# IBC for v
/
IBCv := { v(0, t) = 0.2 - 0.2 cos(2 Pi t),
\

/1     \\
v(x, 0) = 0.2 sin|- Pi x| }
\2     //
IBC := IBCu union IBCv;
/
IBC := { u(0, t) = 0.5 - 0.5 cos(2 Pi t),
\

u(x, 0) = 0.1 sin(2 Pi x), v(0, t) = 0.2 - 0.2 cos(2 Pi t),

/1     \
v(x, 0) = 0.2 sin|- Pi x|,
\2     /

\
D[1](u)(0, t) = 0.6283185308 cos(2 Pi t) }
/
pds:=pdsolve({pdeu,pdev},IBC, time = t, range = 0..0.2,numeric);# 'numeric' solution
pds := _m2606922675232
The following quantum animation is in contrast with the classical case, and illustrates the delocalisation of the wave form caused by the quantum diffusion and advection terms:
T:=2; p1:=pds:-animate({[u, color = green, linestyle = dash], [v, color = red, linestyle = dash]},t = 0..T, gridlines = true, numpoints = 2000,x = 0..0.2):p1;
T := 2
Error, (in pdsolve/numeric/animate) unable to compute solution for t>HFloat(0.0):
matrix is singular
p1

## Firewall blocking Maple 2018 after upgra...

Maple 2018

I have just upgraded my laptop from Windows 7 to Windows 10.  On starting up Maple 2018,  I receive the attached message on screen.  This is after previously loading the worksheet successfully.   Today,  I am not able to do so.  I need to permanently register my firewall to allow Maple to run; can anyone help?

Melvin

## Maple 2019 on HP Stream Laptop...

Maple 2019

Ahead of the upcoming deadline 14 jan 2020 for switching from Windows 7 to Windows 10,  I am investigating whether Maple 2019 will run on an HP Stream laptop: Celeron CPU N3060 @ 1.6GHz, RAM 2GB, 64 bit.running Windows 10.

My guess is that the above spec is too low to successfully run Maple 2019.  But if anyone has had success running Maple on a similar spec device please let me know.

Melvin

## Problem with IBCs being rejected: for t...

Maple

I am trying to solve a coupled pair of PDEs (Burgers eqns) for u(x,t) and v(x,t).  However, my ICs and BCs are being rejected at the (0,0) corner of the domain.