Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

@Oloyemike I understand your model a little better now, but things are still unclear.  At places you have Q(r, x, tau), at other places you have Q(r, tau), and yet at some other places you have just Q.  Shouldn't there always be three arguments to each Q?

Similarly, at places you have U(x,tau),  and at some other places you have just U.  Shouldn't there always be two arguments to each U?

Mathematics is a precision instrument.  Sloppiness is not acceptable.

Furthermore, based on what you have shown, I can tell you the solution of your system of PDEs, and I don't need Maple to do it.  The solution is U(x,tau) = 0 and Q(r,x,tau) = 0.  Just substitute these in the equations to verify. If this is not what you had expected, then your model needs further adjustments.  Oops, sorry, I take that back -- U(x,tau) = 0 and Q(r,x,tau) = 0 is not a solution.

 

 

 

@Carl Love Let's say we have a ball of radius R, and let r be the distance from the center of the ball.  As we move from the center to the ball's boundary, r goes from 0 to R.  Let's introduce rho = r/R.  Then as we move from the center to the boundary, rho goes from 0 to 1.  In this context, rho is called the dimensionless radius.  Similarly one defines dimensionless time, dimensionless force, etc.  The terminology is quite common in engineering and physics.

@tomleslie The equation shown is slight modification of a standard difference scheme for a parabolic PDE.  There is no "step j" and "step j+1".  The OP's equation expresses a transformation from the array a[] to the array A[], where a[] is the known solution at a certain time step, and A[] is the solution at the next time step.  One needs boundary conditions (not an initial condition) to complete the definition of that transformation  The initial condition only enters at a later stage when that transformation is applied recursively to generate the solution of the PDE.

 

I can't make sense of the phrase "compute A[j] for a[j]".  It will help if you reword.

Furthermore, what are the boundary conditions?  What is the range of the j index?

@Carl Love I haven't used Maple's PDE solver in any substantive way and I know very little about it.  I made a naive attempt, just for learning purposes, to solve a much simpler version of the OP's equations.  Specifically, let's look at Burgers equation

restart;

PDEtools:-declare(u(x,t));

pde := diff(u(x,t),t) + diff(u(x,t)^2/2,x) = 0;

ic := u(x,0) = piecewise(x<-1,-1, x < 1, x, 1);

bc := u(-5,t)= -1;

sol := pdsolve(pde, [ic, bc], [u], numeric, time=t, range=-5..5);

sol:-plot(t=0);

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

I don't know why it doesn't work.  It is straightforward to verify that the problem's exact solution for 0 < t < 4 is:

Here is how the solution evolves as a function of time:

plots:-animate(plot, [U(x,t), x=-6..6], t=0..4);

@Oloyemike I stopped responding because I just don't trust those equations, and therefore I don't want to waste my time.

If you clarify by explaining the physics behind the problem, the geomertry of the domain, and the meanings of the various variables, then I may consider taking another look.

@MDD This begins to smell like a homework assignment, so here is a hint.  Write a proc which will do the equivalent of ArrayTools:-IsZero(). Such a proc is quite short and straightforward.

The elements of a basis set should be linearly independent, by definition.  So if A, B, C, D form a basis, then you cannot express C as a linear combination of A and B.  Reformulate your question.

@Markiyan Hirnyk I have not thought at all about the existence of solutions of such an equation, or the convergence of Euler's scheme.

@Preben Alsholm I suspect that Maple's algorithm is not equipped to deal with this kind of equation, which is actually not a delay differential equation in the conventional sense, since the delay itself is unknown.  It appears that it applies an algorithm to it blindly and just by luck picks up some parts of the correct solution.  As you have noted, its "solution" extends to x = 1.0058, which is probably wrong, since all evidence suggests that the solution should break down before reaching x = 0.85.

As to the incorrect plot in the x<0 region, that's not something particular to that specific equation.   This happens even in the simplest case:

eq:=diff(y(x),x)= -y(x-1);
res:=dsolve({eq,y(0)=1},numeric);
plots:-odeplot(res,[x,y(x)],-1..10);

The graph in the x>0 region is correct, and actually corresponds to y(x)≡1 in x<0, as intended.  The graph in the x<0 region is incorrect, however, in the same way as the graph for the more complex equation that you have shown.  I have no idea how Maple comes up with that graph.

@NickB Alejandro's and my results are equivalent.  You will get his result by applying the asympt() function to mine.  Choose whichever form best suits your needs.

@Preben Alsholm The equation's variable delay is tau = x-y(x)+2, as you have noted. If we plot the delay, as in:

plots:-odeplot(res,[x,x-y(x)+2],0..1);

we see that it becomes negative after around x=0.85.  Is the solution meaningful after that point?

@Oloyemike You will have to examine your equations more closely.  As things stand right now, they don't make sense:

  1. If, as you say, Q in the first pde is Q(r,tau), then U in the first PDE will depend on r, but you have said U is a function of x and tau only.
  2. Similarly, if U in the BC is U(x, tau), then Q will depend on x.

@acer It goes to show that it's good to pay attention to existing code before embarking on its modifications.

Acer and Carl, thank you very much for your answers and discussion.  In the application which brought this up, the efficiency of pefromance is not an issue at all because the table is small and the number of lookups are few.  I will go with the assigned() test since it is simple to use and expresses the intent well.

A few minutes ago I posted a worksheet in response to a thread to which both of you had contributed:

http://www.mapleprimes.com/questions/204335-Can-Rotate-3d-Text-Like-This-Be-Done-In-Maple

Within the worksheet I use the assigned() test to tell whether a given entry is in the table.

First 90 91 92 93 94 95 96 Page 92 of 99