Melvin Brown

124 Reputation

7 Badges

18 years, 303 days

Social Networks and Content at Maplesoft.com

Maple Application Center

MaplePrimes Activity


These are replies submitted by Melvin Brown

@acer 

To confirm: my PDE solutions are previously computed as plots and are saved as external image files. Each file depicts the two transients u(x,t; h) and v(x,t; h), parameterised by 0 < h <1.  I measure the entropy of these files as the ratio:

                                                          file entropy S(h) = size of gzipped file / size of the original file

Thus each file is represented as a point (h, S(h)) in the graph (h, S).  My hope is that each of the points in the graph (below) can be clicked to reveal the transients for u(x,t), v(x,t).

I will try to follow Valerie's suggestion, utilizing Embedded Components for this.  Thanks for yiour support.

Melvin

Thanks for your suggestion...will follow it up....

Melvin....in transit.

 

@acer 

Thanks for response. Yes I have a collection of animated PDE solution plots which are parameterised by (s, h) values the graph Q(s,h).....in which I would like to click the point  of the discrete points s,h to immediately bring up the plot of the corresponding preexisting transient file..can you help?..

Melvin

 

@Carl Love 

Carl,

Thanks for suggesting the test. I just ran MAPLE startup a) with and b) without connection to internet.  The start up time was the same in each case.  

MAPLE is starting and running fine now. 

Melvin

@tomleslie 

Tom, many thanks for getting me on the right track...and pointing me at MAPLE 'Help', which I completely overlooked! 

In planning to implement and solve a coupled pair of 2nd order nonlinear convection-diffusion equations, I defaulted to an online search, which took me to the extensive online help webpage (pdsolve/numeric/method) . The webpage gives examples of implementation of PDE solutions, which I printed out for ease of reading and comparison of the various methods.  But why?!...you ask....

On reflection, it seems that conceptually, I incorrectly regarded the 'Help' as separate from MAPLE software (user manual mentality), when in fact the 'Help' (with examples) is built into the top of the toolbar of the MAPLE software package.  So, yes, no need to consult separate online documentation on the internet!  

Thanks for your guidance.

Melvin

I was missing 1 BC: ux(0,t)....so will correct the code and rerun.

Melvin

@tomleslie 

Tom

I typed in

version(); kernelopts(version); interface(version); Physics:-Version();

and obtained the following running Windows 10 (recently installed in response to Microsoft claim that Windows 7 not security updates will stop after 14 Jan2020):


 User Interface: 1362973
         Kernel: 1362973
        Library: 1362973
                            1362973
  Maple 2018.2, X86 64 WINDOWS, Nov 16 2018, Build ID 1362973
    Standard Worksheet Interface, Maple 2018.2, Windows 10, 

       November 16 2018 Build ID 1362973
"C:\Users\Melvin Brown\maple\toolbox\2018\Physics Updates\lib\Physics Updates.maple", 2019, October 2, 14:20 hours, version in the MapleCloud: 535, version installed in this computer:  329.

 

However my worksheet  responds to

PackageTools:-Install("5137472255164416",version=329,overwrite);

with kernel lost.  Can you help?

 

Melvin

@vv 

Many thanks vv 6444.  I'll correct my worksheet in accordance with your findings.

Melvin

@tomleslie 

Tom

I having trouble with seeming inconsistency between the results of numerical and analytic solutions of Burgers equation.  Would you be able to shine a light on what is happening?  I attach the MAPLE 18 worksheet which gives my workings.  I have highlighted a description of the inconsistency.  

I hope you can help.

Best regards


 

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.  The inconsistency in the results of our analysis, needs to be checked by another pair of eyes!  Invite

 

NOTE:  When generating and displaying PLOTS AT HIGH RESOLUTION, do not use p1 := plot(bla, etc);  i.e. 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().

restart

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: 532, 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)

 

1-D classical Burgers single equation

Here we solve the classical (proc (`&hbar;`) options operator, arrow; 0 end proc) uncoupled single Burger's equation for u(x, t) given initial and boundary conditions, and a constant (in space-time) applied force of F = .20. Note that the second quantum momentum rate equation does not exist in the classical limit, and so there is only one classical Burgers equation.

m := 1; hBar := 1; Fu:=0.2;# constants and applied force

1

 

1

 

.2

(4)

pdeu := diff(u(x, t), t)+u(x, t)/m*(diff(u(x, t), x)) = Fu;# Burger's equation note inclusion of mass m

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

(5)

ICu := {u(x, 0) = 0.1*sin(2*Pi*x)};# initial condition

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

(6)

BCu := {u(0, t) = 0.5*(1-cos(2*Pi*t))};#(D[1](u))(0,t) = 0.5};

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

(7)

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

pdu := pdsolve(pdeu,ICu union BCu, numeric, time = t, range = 0 .. 2);

_m2460648492896

(8)

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

T := 3; p1 := pdu:-plot3d(u,t=0..T,numpoints = 1000,x=-0.001..2, shading = zhue,orientation=[-146,54,0], title = print(u(x, t), numeric));

3

 

u(x, t), numeric

 

 

The above classical u -field wavefronts propagate in the x-direction as a function of time.  The wave field in x, t space is excited as a sinusoidal function of time at x = 0. The sinusoidal initial condition u(x, 0) = .1*sin(2*Pi*x) at t=0, is subsequently excited by the time dependent boundary condition  u(0, t) = .5-.5*cos(2*Pi*t) at x=0 .  The low amplitude of the initial condition is overtaken by the effects of time dependent boundary condition at x=0. resultimg in a wavefront propagation rate  ~ 1.6/2.6 = 0.6.

The asymptotic profile is very closely acheived at time T = 3,  as shown in the figure below.

T := 3; p1 := pdu:-plot(u, t = T, numpoints = 1000, color = cyan, thickness = 3, gridlines = true, title = print(u(x, t), numeric));

3

 

u(x, t), numeric

 

 

whereas the space-profile at the asymptotic time T = 4, is:

T :=4; p1 := pdu:-plot(u,t = T,numpoints = 1000, color = cyan,thickness=3, gridlines = true, title = print(u(x, t),"asymptotic momentum profile"));

 

4

 

u(x, t), "asymptotic momentum profile"

 

 

which remains the same for T > 4. Thus, in review: the plots show the effects of a constant force of F = .2to the right (in the postive x direction) as a result of the potential V(x) = -.2*x decresasing to the right. Such a force might be induced by an electric field on a charged particle or by wind.  Significantly, the intially transient spatial profile reaches a steady state for T >= 3 as illustrated above.

 

HOWEVER if we now implement an animation of the solution of the PDE pdeu as below, we find that at animation time t= 4.070352, the red profile below bear no relation to the cyan profile above.  How can we rectify this is inconsistency?

pduA := pdsolve(pdeu,ICu union BCu,numeric, time = t, range = 0 .. 2, spacestep = 1/50, timestep = .1):

Cp:=pduA:-animate(t = 30, frames = 200,numpoints=400,title = "Single classical Burgers equation solution for momentum u(x,t) \n under constant positive force 0.2 plus \n a sinusoidal boundary condition at x = 0: \n time = %f ", gridlines = true,linestyle=solid):Cp;

 

This plot demonstrates the effect of a sinusoidal boundary condition on momentum, u(0, t) at x = 0 , with m = 1, hBar = 1, for which there is also a constant applied force Fu = 0.2. Note how the higher momentum peaks catch up and swallow the low momentum troughs.  The momentum profile is positive definite for time t > .480902, and its features travel in the direction of the constant positive applied force. Close inspection of this trace shows that it has a repeated period of `&Delta;t` = .95 i.e. close to the period 1.0 of the boundary conditionx = 0. We conclude that the solution seems to be behaving as expected. BUT we do not have agreement between the animation consequent profile  u(x, t=T) and the  asymptotic profile.  

NULL


 

Download pdeProb2_CORRECTION.mw
 

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.  The inconsistency in the results of our analysis, needs to be checked by another pair of eyes!  Invite

 

NOTE:  When generating and displaying PLOTS AT HIGH RESOLUTION, do not use p1 := plot(bla, etc);  i.e. 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().

restart

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: 532, 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)

 

1-D classical Burgers single equation

Here we solve the classical (proc (`&hbar;`) options operator, arrow; 0 end proc) uncoupled single Burger's equation for u(x, t) given initial and boundary conditions, and a constant (in space-time) applied force of F = .20. Note that the second quantum momentum rate equation does not exist in the classical limit, and so there is only one classical Burgers equation.

m := 1; hBar := 1; Fu:=0.2;# constants and applied force

1

 

1

 

.2

(4)

pdeu := diff(u(x, t), t)+u(x, t)/m*(diff(u(x, t), x)) = Fu;# Burger's equation note inclusion of mass m

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

(5)

ICu := {u(x, 0) = 0.1*sin(2*Pi*x)};# initial condition

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

(6)

BCu := {u(0, t) = 0.5*(1-cos(2*Pi*t))};#(D[1](u))(0,t) = 0.5};

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

(7)

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

pdu := pdsolve(pdeu,ICu union BCu, numeric, time = t, range = 0 .. 2);

_m2460648492896

(8)

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

T := 3; p1 := pdu:-plot3d(u,t=0..T,numpoints = 1000,x=-0.001..2, shading = zhue,orientation=[-146,54,0], title = print(u(x, t), numeric));

3

 

u(x, t), numeric

 

 

The above classical u -field wavefronts propagate in the x-direction as a function of time.  The wave field in x, t space is excited as a sinusoidal function of time at x = 0. The sinusoidal initial condition u(x, 0) = .1*sin(2*Pi*x) at t=0, is subsequently excited by the time dependent boundary condition  u(0, t) = .5-.5*cos(2*Pi*t) at x=0 .  The low amplitude of the initial condition is overtaken by the effects of time dependent boundary condition at x=0. resultimg in a wavefront propagation rate  ~ 1.6/2.6 = 0.6.

The asymptotic profile is very closely acheived at time T = 3,  as shown in the figure below.

T := 3; p1 := pdu:-plot(u, t = T, numpoints = 1000, color = cyan, thickness = 3, gridlines = true, title = print(u(x, t), numeric));

3

 

u(x, t), numeric

 

 

whereas the space-profile at the asymptotic time T = 4, is:

T :=4; p1 := pdu:-plot(u,t = T,numpoints = 1000, color = cyan,thickness=3, gridlines = true, title = print(u(x, t),"asymptotic momentum profile"));

 

4

 

u(x, t), "asymptotic momentum profile"

 

 

which remains the same for T > 4. Thus, in review: the plots show the effects of a constant force of F = .2to the right (in the postive x direction) as a result of the potential V(x) = -.2*x decresasing to the right. Such a force might be induced by an electric field on a charged particle or by wind.  Significantly, the intially transient spatial profile reaches a steady state for T >= 3 as illustrated above.

 

HOWEVER if we now implement an animation of the solution of the PDE pdeu as below, we find that at animation time t= 4.070352, the red profile below bear no relation to the cyan profile above.  How can we rectify this is inconsistency?

pduA := pdsolve(pdeu,ICu union BCu,numeric, time = t, range = 0 .. 2, spacestep = 1/50, timestep = .1):

Cp:=pduA:-animate(t = 30, frames = 200,numpoints=400,title = "Single classical Burgers equation solution for momentum u(x,t) \n under constant positive force 0.2 plus \n a sinusoidal boundary condition at x = 0: \n time = %f ", gridlines = true,linestyle=solid):Cp;

 

This plot demonstrates the effect of a sinusoidal boundary condition on momentum, u(0, t) at x = 0 , with m = 1, hBar = 1, for which there is also a constant applied force Fu = 0.2. Note how the higher momentum peaks catch up and swallow the low momentum troughs.  The momentum profile is positive definite for time t > .480902, and its features travel in the direction of the constant positive applied force. Close inspection of this trace shows that it has a repeated period of `&Delta;t` = .95 i.e. close to the period 1.0 of the boundary conditionx = 0. We conclude that the solution seems to be behaving as expected. BUT we do not have agreement between the animation consequent profile  u(x, t=T) and the  asymptotic profile.  

NULL


 

Download pdeProb2_CORRECTION.mw

 

Melvin

@Thomas Richard 

Richard, many thanks for confirming my suspicions; I'll drop the notion of using the HP Stream for MAPLE, and have a go at loading Windows 10 onto my ACER Aspire  5742, which currently runs MAPLE 19 under Windows 7 really well. 

Melvin

@tomleslie

Tom

Your suggestion solved the problem; I just removed the {  } from IC union BC, and the solution went through as expected.  As you said, the union of two sets is already a set!

Many thanks

Melvin

@tomleslie 

Tom

Further to my earlier posting and your response, I have drafted a revised sheet, but I am still unable to find a solution.  See below link to the worksheet, which seems to parse, but does not return a solution.  Instead, it sends this message:

Error, (in pdsolve/numeric/plot) unable to compute solution for t>HFloat(0.0): matrix is singular

PDEsIntegrationMRB.mw

Let me know if you can spot an error or route to a solution.  The background to this work is an attempt to solve quantum momentum rate equations.

Melvin

 

@tomleslie 

Tom

Many thanks for checking through and cleaning up my code; and for suggesting use of 1-D input for actual code.  I am now try to get the code to work.   I'll run through some MAPLE examples, to gain familiarity with the specification and solutions of PDEs.

Melvin

@Rouben Rostamian  

Rouben

Many thanks; that is a great help.  Much appreciated.

Melvin

@tomleslie 

Tom

Success!

For my MAPLE 2018.2, I installed the maximal version 329 of the Physics Package. The Schrodinger PDE was solved sucessfully.  Many thanks for your comprehensive guidance.

Melvin 

1 2 3 4 Page 1 of 4