Question: IC and BC problems with semiclassical coupled Burgers equation

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.

restart

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

PackageTools:-Install*`\`("5137472255164416", version = 329, overwrite):`

PackageTools:-Install*`\`("5137472255164416", version = 329, overwrite):`

(1)

restart; Physics:-Version()

"C:\Users\Melvin Brown\maple\toolbox\2018\Physics Updates\lib\Physics Updates.maple", `2019, October 2, 14:20 hours, version in the MapleCloud: 597, version installed in this computer: 329.`

(2)

Start of definition of problem:

with(PDETools); with(CodeTools); with(plots)

[CanonicalCoordinates, ChangeSymmetry, CharacteristicQ, CharacteristicQInvariants, ConservedCurrentTest, ConservedCurrents, ConsistencyTest, D_Dx, DeterminingPDE, Eta_k, Euler, FromJet, FunctionFieldSolutions, InfinitesimalGenerator, Infinitesimals, IntegratingFactorTest, IntegratingFactors, InvariantEquation, InvariantSolutions, InvariantTransformation, Invariants, Laplace, Library, PDEplot, PolynomialSolutions, ReducedForm, SimilaritySolutions, SimilarityTransformation, Solve, SymmetryCommutator, SymmetryGauge, SymmetrySolutions, SymmetryTest, SymmetryTransformation, TWSolutions, ToJet, ToMissingDependentVariable, build, casesplit, charstrip, dchange, dcoeffs, declare, diff_table, difforder, dpolyform, dsubs, mapde, separability, splitstrip, splitsys, undeclare]

(3)

Start of definition of problem:

with(PDETools); with(CodeTools);with(plots);

[CanonicalCoordinates, ChangeSymmetry, CharacteristicQ, CharacteristicQInvariants, ConservedCurrentTest, ConservedCurrents, ConsistencyTest, D_Dx, DeterminingPDE, Eta_k, Euler, FromJet, FunctionFieldSolutions, InfinitesimalGenerator, Infinitesimals, IntegratingFactorTest, IntegratingFactors, InvariantEquation, InvariantSolutions, InvariantTransformation, Invariants, Laplace, Library, PDEplot, PolynomialSolutions, ReducedForm, SimilaritySolutions, SimilarityTransformation, Solve, SymmetryCommutator, SymmetryGauge, SymmetrySolutions, SymmetryTest, SymmetryTransformation, TWSolutions, ToJet, ToMissingDependentVariable, build, casesplit, charstrip, dchange, dcoeffs, declare, diff_table, difforder, dpolyform, dsubs, mapde, separability, splitstrip, splitsys, undeclare]

 

[CPUTime, DecodeName, EncodeName, GCTime, Profiling, ProgramAnalysis, RealTime, Test, ThreadSafetyCheck, Usage]

 

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, dualaxisplot, fieldplot, fieldplot3d, gradplot, gradplot3d, implicitplot, implicitplot3d, inequal, interactive, interactiveparams, intersectplot, listcontplot, listcontplot3d, listdensityplot, listplot, listplot3d, loglogplot, logplot, matrixplot, multiple, odeplot, pareto, plotcompare, pointplot, pointplot3d, polarplot, polygonplot, polygonplot3d, polyhedra_supported, polyhedraplot, rootlocus, semilogplot, setcolors, setoptions, setoptions3d, shadebetween, spacecurve, sparsematrixplot, surfdata, textplot, textplot3d, tubeplot]

(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 Fuand Fv.  Our aim is to display the profiles of u(x, t) and v(x, t) as strings on x, t 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 `ℏ` = 1

At O( `ℏ`^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;

diff(u(x, t), t)+u(x, t)*(diff(u(x, t), x)) = .2

(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 u, v 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;

diff(v(x, t), t)+u(x, t)*(diff(v(x, t), x))-(1/2)*(diff(diff(u(x, t), x), x))+v(x, t)*(diff(u(x, t), x)) = .1

(6)

By inspection of the derivatives in above two equations we now set up the ICs and BCs for u(x, t) and "v(x,t). "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 v and for u, notably a 1st derivative reflective BC term for u.

ICu:={u(x,0) = 0.1*sin(2*Pi*x)};# initial conditions for PDE pdeu

{u(x, 0) = .1*sin(2*Pi*x)}

(7)

ICv:={v(x,0) = 0.2*sin(Pi*x)};# initial conditions for PDE pdev

{v(x, 0) = .2*sin(Pi*x)}

(8)

IC := ICu union ICv;

{u(x, 0) = .1*sin(2*Pi*x), v(x, 0) = .2*sin(Pi*x)}

(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)

{u(0, t) = .5-.5*cos(2*Pi*t), (D[1](u))(1, t) = 0}

(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

{v(0, t) = .5*sin(2*Pi*t), v(1, t) = -.5*sin(2*Pi*t)}

(11)

BC := BCu union BCv;

{u(0, t) = .5-.5*cos(2*Pi*t), v(0, t) = .5*sin(2*Pi*t), v(1, t) = -.5*sin(2*Pi*t), (D[1](u))(1, t) = 0}

(12)

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

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

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

Error, (in pdsolve/numeric/process_IBCs) invalid initial/boundary condition: {u(x, 0) = .1*sin(2*Pi*x), v(x, 0) = .2*sin(Pi*x)}

 

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));

3

 

Error, `pdu` does not evaluate to a module

 

``


 

Download Semiclassical_Burgers_Eqns_-_MRB.mw

 

 

Please Wait...