janhardo

545 Reputation

11 Badges

10 years, 306 days

MaplePrimes Activity


These are replies submitted by janhardo

@salim-barzani 
iI have already calculated a 2 lump wave and in that plot you can draw the two straight lines, from the information given
1 of the lines must then pass through the 2 lump wave?

@salim-barzani 

restart:
with(plots):

### Lump Parameters ### PROCEDURE ZONDER INITIELE POSITIE LUMPS ?
a := -1; b := -2; alpha := 1; beta := 1;
vx := -3/5; vy := 1/5;
trajectory_slope := vy/vx;  # automatisch bepaald
U := (x, y, t, a, b, alpha, beta) ->
    4*beta*((a*y - 2*alpha*t + x)*b^2 + a*(-2*beta*t + a*(a*y - 2*alpha*t + x))*b^2) /
    (-b^6*beta*y^2
    + (-4*t*y*beta^2 + (-2*a^2*y^2 + (4*alpha*t - 2*x)*a*y - 4*(alpha*t - x/2)^2)*beta + 3*a)*b^4
    + (-4*t^2*beta^3 + 4*a*t*(a*y - 2*alpha*t + x)*beta^2 - a^2*(a*y - 2*alpha*t + x)^2*beta + 6*a^3)*b^2
    + 3*a^5);

### �� Dynamische Lump-Procedure (met parameter-uitleg) �� ###
DynamicLumpPlot := proc(input::list, mode::symbol := 'tijd')
  local i, n, pos_initial, tijden, pos_shift, contour, kleuren, trajectory_plot, text_labels, U, extra_info, xmin, xmax, ymin, ymax, param_info;

  n := nops(input);
  pos_initial := [seq([200*(i-(n+1)/2), -200*(i-(n+1)/2)/3], i=1..n)];

  if mode = 'tijd' then
    tijden := input;
    for i from 1 to n do
      pos_shift[i] := [pos_initial[i][1] + vx*tijden[i], pos_initial[i][2] + vy*tijden[i]];
    end do:
    extra_info := cat(seq(sprintf("t=%.2f: (%.2f, %.2f)   ", tijden[i], pos_shift[i][1], pos_shift[i][2]), i=1..n));

  elif mode = 'positie' then
    pos_shift := input;
    for i from 1 to n do
      tijden[i] := (pos_shift[i][1] - pos_initial[i][1]) / vx;
      if abs(pos_shift[i][2] - trajectory_slope*pos_shift[i][1]) > 1e-3 then
        printf("⚠️ Lump %d ligt NIET precies op trajectory (afwijking=%.2f). Correcte positie: (%.2f, %.2f)\n",
          i, abs(pos_shift[i][2] - trajectory_slope*pos_shift[i][1]), pos_shift[i][1], trajectory_slope*pos_shift[i][1]);
      end if;
    end do:
    extra_info := cat(seq(sprintf("(%.2f, %.2f): t=%.2f   ", pos_shift[i][1], pos_shift[i][2], tijden[i]), i=1..n));

  else
    error "Kies modus 'tijd' of 'positie'";
  end if:

  xmin := min(seq(pos_shift[i][1], i=1..n)) - 50; xmax := max(seq(pos_shift[i][1], i=1..n)) + 50;
  ymin := min(seq(pos_shift[i][2], i=1..n)) - 50; ymax := max(seq(pos_shift[i][2], i=1..n)) + 50;

  xmin := min(xmin, -200): xmax := max(xmax, 200):
  ymin := min(ymin, trajectory_slope*xmin - 50): ymax := max(ymax, trajectory_slope*xmax + 50):

  U := (x, y, t, a, b, alpha, beta) ->
    4*beta*((a*y - 2*alpha*t + x)*b^2 + a*(-2*beta*t + a*(a*y - 2*alpha*t + x))*b^2) /
    (-b^6*beta*y^2
    + (-4*t*y*beta^2 + (-2*a^2*y^2 + (4*alpha*t - 2*x)*a*y - 4*(alpha*t - x/2)^2)*beta + 3*a)*b^4
    + (-4*t^2*beta^3 + 4*a*t*(a*y - 2*alpha*t + x)*beta^2 - a^2*(a*y - 2*alpha*t + x)^2*beta + 6*a^3)*b^2
    + 3*a^5);

  kleuren := [red, blue, green, orange, purple, cyan, magenta]:

  for i from 1 to n do
    contour[i] := contourplot(
      eval(U(x - pos_shift[i][1], y - pos_shift[i][2], 0, a, b, alpha, beta)),
      x = xmin..xmax, y = ymin..ymax, contours=30, color=kleuren[i mod 7 + 1],
      grid=[200,200], transparency=0.1
    );
  end do:

  trajectory_plot := implicitplot(y=trajectory_slope*x, x=xmin..xmax, y=ymin..ymax, color=black, thickness=2):

  text_labels := textplot([
    seq([pos_shift[i][1], pos_shift[i][2]+(ymax-ymin)*0.03,
         cat("t=", evalf[3](tijden[i])),
         'font'=["Arial",12,'bold'], 'color'=black], i=1..n)
  ]):

  param_info := sprintf("Lump-parameters betekenis:\n a=%.2f (richting/vormfactor), b=%.2f (breedte/hoogte-factor), α=%.2f, β=%.2f (amplitude/richting)\n → Trajectory-slope = %.2f",
                         a,b,alpha,beta,trajectory_slope);

  display(
    [seq(contour[i], i=1..n)], trajectory_plot, text_labels,
    title = cat(n, "-Lump Soliton(en) Dynamisch"),
    labels = ["x","y"], scaling = constrained,
    caption = typeset(extra_info, "\n\n", param_info)
  );
end proc:

-1

 

-2

 

1

 

1

 

-3/5

 

1/5

 

-1/3

 

proc (x, y, t, a, b, alpha, beta) options operator, arrow; 4*beta*((y*a-2*alpha*t+x)*b^2+a*(-2*beta*t+a*(y*a-2*alpha*t+x))*b^2)/(-b^6*beta*y^2+(-4*t*y*beta^2+(-2*a^2*y^2+(4*alpha*t-2*x)*a*y-4*(alpha*t-(1/2)*x)^2)*beta+3*a)*b^4+(-4*t^2*beta^3+4*a*t*(y*a-2*alpha*t+x)*beta^2-a^2*(y*a-2*alpha*t+x)^2*beta+6*a^3)*b^2+3*a^5) end proc

(1)

DynamicLumpPlot([0,1,2,3,4,5,6,7,8,9,10], 'tijd');# time in sec ?

 

DynamicLumpPlot([[-150,50],[-80,80/3],[50,-50/3],[0,0]],'positie');# position

 

 

DynamicLumpPlot([[-150,50]],'positie');

 
 

 

Download dynamische_lump_procedure_GPTDEFA-_24-2-2025.mw

@salim-barzani 
your question is about the 2 lump wave ....

@salim-barzani 
"is about add to line for and 2 y finction with a[1]a[2]b[1]b[2] inside of y[1] and y[2]"
I don't know what exactly you mean by this ?
explain this more 

@salim-barzani 

I am trying to create a a procedure that can handle  a dynamic contour plot.

@salim-barzani 
What happened then?

positions of the 1 lump waves 

@salim-barzani 
I read a comment just now from the 2 lump wave function that time : t , useful to study the dynamic behaviour  
Have not looked at the 1 lump wave at the role that : t can play
There is a t in this function ??

@salim-barzani 


 

 

 

restart;
with(plots):

# Parameters
alpha := 1: beta := 1:
l3 := -1 - 2*I: l3_conj := -1 + 2*I:
l4 := -2/3 - I: l4_conj := -2/3 + I:

# Theta functions
theta := (x,y,t,l) -> x + l*y - (alpha + beta/l)*t:

# Corrected B_ij terms
B := (li, lj) -> 3*(li + lj)/(beta*(li - lj)^2):

# Construct f(x,y,t)
f := (x,y,t) -> simplify(expand(
    theta(x,y,t,l3)*theta(x,y,t,l3_conj)*theta(x,y,t,l4)*theta(x,y,t,l4_conj)
    + B(l3,l3_conj)*theta(x,y,t,l4)*theta(x,y,t,l4_conj)
    + B(l3,l4)*theta(x,y,t,l3_conj)*theta(x,y,t,l4_conj)
    + B(l3,l4_conj)*theta(x,y,t,l3_conj)*theta(x,y,t,l4)
    + B(l3_conj,l4)*theta(x,y,t,l3)*theta(x,y,t,l4_conj)
    + B(l3_conj,l4_conj)*theta(x,y,t,l3)*theta(x,y,t,l4)
    + B(l4,l4_conj)*theta(x,y,t,l3)*theta(x,y,t,l3_conj)
    + B(l3,l3_conj)*B(l4,l4_conj)
    + B(l3,l4)*B(l3_conj,l4_conj)
    + B(l3,l4_conj)*B(l3_conj,l4)
)):

# Corrected lump solution using second x-derivative
u := (x,y,t) -> 12*(diff(f(x,y,t), x$2))/(f(x,y,t))^2 - 12*(diff(f(x,y,t), x)^2)/(f(x,y,t))^3:

# Generate the contour plot
contourplot(Re(u(x,y,0)), x = -30..30, y = -30..30, contours=40, grid=[300,300],
    coloring=[blue,white,red], title="2-Lump Wave (t=0)", labels=["x","y"]);

plot3d(Re(u(x,y,0)), x=-30..30, y=-30..30, grid=[200,200], style=surface,
       shading=zhue, axes=boxed, labels=["x","y","u"],
       title="3D plot 2-Lump Wave (t=0)");

 

 

this is the example for the 2 lump wave  for example 1 information
  ... 1 lump wave
  ... 2 lump wave
becomes too difficult to express this 2 lump wave like for the 1 lump wave ?

 

 

info to add

 

 

verification example

 

 

 

 


 

Download 2_-lump_wave_plot_23-2-2025_mprimes.mw

@salim-barzani
Problem here is to keep following example 1 for the 2 lumps solution lying on different lines to compare with the approach for the 1 lumps lying on 1 line.
That approach can try to use again, but now I don't know because information is missing ? 
Is there any more information for the example 1 with a 1 lump and 2 lump and 3 lump and M lump solutions examples.

@salim-barzani 
By deriving one, two , three lumps for the example on one line   , there shows another expression his excistence ?




 

@salim-barzani
I stay all the time to the first example, all expessions are from that intended  

x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;
they number but why write like that? have any information? can be any number? 


"also in paper mention the time variable t? but in here we don't have a t? and this is you done is a new thing by my openion if i am not wrong?"

The 1 lumps are positioned along the straight line  , at time t= 0 there is no lump , but there is a velocity  for the lump ?
S = V* t 
The 3 lump positions are on the line : choosen ?

 

 

@salim-barzani 

restart;
with(plots):

a := 1;
b := 2;

# Lump posities
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Drie afzonderlijke contourplots voor elke lump, elk met een andere kleur
contour1 := contourplot(U(x - x1, y - y1, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 30, color = red, grid = [100, 100], transparency = 0.1):

contour2 := contourplot(U(x - x2, y - y2, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 30, color = blue, grid = [100, 100], transparency = 0.1):

contour3 := contourplot(U(x - x3, y - y3, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 30, color = green, grid = [100, 100], transparency = 0.1):

# Bewegingslijn
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30, color = black, thickness = 2):

# Alles samenvoegen
display(contour1, contour2, contour3, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie",
        labels = ["x", "y"], scaling = constrained, size = [1200, 800]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

 

restart;
with(plots):

a := 1;
b := 2;

# Lump posities
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Drie afzonderlijke contourplots voor elke lump
contour1 := contourplot(U(x - x1, y - y1, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 50, color = red, grid = [100, 100], transparency = 0.2):
contour2 := contourplot(U(x - x2, y - y2, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 50, color = blue, grid = [100, 100], transparency = 0.2):
contour3 := contourplot(U(x - x3, y - y3, a, b), x = -50 .. 50, y = -30 .. 30,
                        contours = 50, color = green, grid = [100, 100], transparency = 0.2):

# Bewegingslijn
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30, color = black, thickness = 2):

# Alles samenvoegen
display(contour1, contour2, contour3, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie",
        labels = ["x", "y"], scaling = constrained, size = [1200, 800]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

 

restart;
with(plots):

a := 1;
b := 2;

# Lump posities
x1 := -40; y1 := -1/3*x1 - sqrt(30)/6;
x2 := 0;   y2 := -1/3*x2 - sqrt(30)/6;
x3 := 40;  y3 := -1/3*x3 - sqrt(30)/6;

# Bewegingslijn
eq := y = -1/3*x - sqrt(30)/6;

# Lump soliton functie
U := (x, y, a, b) -> 12*(-b^4*y^2 + (a*y + x)^2*b^2 - 3*a^2) /
                     (b^4*y^2 + (a*y + x)^2*b^2 + 3*a^2)^2;

# Superpositie van alle drie lumps in ÉÉN enkele functie
U_total := (x, y) -> U(x - x1, y - y1, a, b) +
                     U(x - x2, y - y2, a, b) +
                     U(x - x3, y - y3, a, b);

# Contourplot met een aangepaste kleurenfunctie voor onderscheid
contour_lumps := contourplot(U_total(x, y),
    x = -50 .. 50, y = -30 .. 30, contours = 50,
    coloring = [red, blue, green], grid = [100, 100],
    filled = true, size = [1200, 800]
):

# Bewegingslijn toevoegen
trajectory_plot := implicitplot(eq, x = -50 .. 50, y = -30 .. 30,
                                color = black, thickness = 2):

# Weergeven van de volledige plot
display(contour_lumps, trajectory_plot,
        title = "3-Lump Soliton met Bewegings Trajectorie",
        labels = ["x", "y"], scaling = constrained, size = [1200, 800]);

1

 

2

 

-40

 

40/3-(1/6)*30^(1/2)

 

0

 

-(1/6)*30^(1/2)

 

40

 

-40/3-(1/6)*30^(1/2)

 

y = -(1/3)*x-(1/6)*30^(1/2)

 

proc (x, y, a, b) options operator, arrow; 12*(-b^4*y^2+(a*y+x)^2*b^2-3*a^2)/(b^4*y^2+(a*y+x)^2*b^2+3*a^2)^2 end proc

 

proc (x, y) options operator, arrow; U(x-x1, y-y1, a, b)+U(x-x2, y-y2, a, b)+U(x-x3, y-y3, a, b) end proc

 

 

restart;

 


 

Download 3_1_d_lumps_samen_getekend-23-2-2025_part_B_mprimes_.mw

5 6 7 8 9 10 11 Last Page 7 of 67