MaplePrimes Questions

Hi! I have some problems with solving convection-diffusion equation. The liquid phase move up with velocity W. And displace vapor phase. C - molar concentration of gas. z - coordinate. w - velocity. h - height of tank. t - time.

Its not clear to me how to set moving boundary condition on bottom boundary, so C(0,t)=cs must move up with w velocity.

May be maple have some procedures to make moving boundary or adaptive mesh??? thank you!

eq1 := diff(c(z, t), t)+diff(w*c(z, t), z) = d*(diff(c(z, t), z$2));
IBC := { c(z, 0) = 0, c(0, t) = cs, (D[1](c))(h, t) = 0}

restart;
T := -S(xi)*S(xi)+mu*R(xi)-lambda;
                        2                    
                  -S(xi)  + mu R(xi) - lambda
Q := -S(xi)*R(xi);
                          -S(xi) R(xi)
u := a[0]+a[1]*S(xi)+b[1]*R(xi);
                 a[0] + a[1] S(xi) + b[1] R(xi)
diff(u, xi);
                  / d        \        / d        \
             a[1] |---- S(xi)| + b[1] |---- R(xi)|
                  \ dxi      /        \ dxi      /
Fr := Q*b[1]+T*a[1];
                         /      2                    \     
     -S(xi) R(xi) b[1] + \-S(xi)  + mu R(xi) - lambda/ a[1]
diff(Fr, xi);
       / d        \                    / d        \     
      -|---- S(xi)| R(xi) b[1] - S(xi) |---- R(xi)| b[1]
       \ dxi      /                    \ dxi      /     

           /         / d        \      / d        \\     
         + |-2 S(xi) |---- S(xi)| + mu |---- R(xi)|| a[1]
           \         \ dxi      /      \ dxi      //     
d := -T*R(xi)*b[1]-S(xi)*Q*b[1]+(-2*S(xi)*T+mu*Q)*a[1];
 /      2                    \                   2           
-\-S(xi)  + mu R(xi) - lambda/ R(xi) b[1] + S(xi)  R(xi) b[1]

     /         /      2                    \                 \   
   + \-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/ a[

  1]
diff(d, xi);
 /         / d        \      / d        \\           
-|-2 S(xi) |---- S(xi)| + mu |---- R(xi)|| R(xi) b[1]
 \         \ dxi      /      \ dxi      //           

     /      2                    \ / d        \     
   - \-S(xi)  + mu R(xi) - lambda/ |---- R(xi)| b[1]
                                   \ dxi      /     

                        / d        \        2 / d        \        /
   + 2 S(xi) R(xi) b[1] |---- S(xi)| + S(xi)  |---- R(xi)| b[1] + |
                        \ dxi      /          \ dxi      /        \
   / d        \ /      2                    \
-2 |---- S(xi)| \-S(xi)  + mu R(xi) - lambda/
   \ dxi      /                              

             /         / d        \      / d        \\
   - 2 S(xi) |-2 S(xi) |---- S(xi)| + mu |---- R(xi)||
             \         \ dxi      /      \ dxi      //

        / d        \                  / d        \\     
   - mu |---- S(xi)| R(xi) - mu S(xi) |---- R(xi)|| a[1]
        \ dxi      /                  \ dxi      //     
h := -(-2*S(xi)*T+mu*Q)*R(xi)*b[1]-(-S(xi)^2+mu*R(xi)-lambda)*Q*b[1]+2*S(xi)*R(xi)*b[1]*T+S(xi)^2*Q*b[1]+(-2*T*(-S(xi)^2+mu*R(xi)-lambda)-2*S(xi)*(-2*S(xi)*T+mu*Q)-mu*T*R(xi)-mu*S(xi)*Q)*a[1];
 /         /      2                    \                 \       
-\-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/ R(xi) 

           /      2                    \                 
  b[1] + 3 \-S(xi)  + mu R(xi) - lambda/ S(xi) R(xi) b[1]

                         /                                2         
          3              |   /      2                    \          
   - S(xi)  R(xi) b[1] + \-2 \-S(xi)  + mu R(xi) - lambda/  - 2 S(xi

    /         /      2                    \                 \
  ) \-2 S(xi) \-S(xi)  + mu R(xi) - lambda/ - mu S(xi) R(xi)/

                                                             \   
        /      2                    \                 2      |   
   - mu \-S(xi)  + mu R(xi) - lambda/ R(xi) + mu S(xi)  R(xi)/ a[

  1]
collect(expand(h+3*Fr*Fr+(4*omega+3)*Fr), S(xi), R(xi));
     /      2         \      4
R(xi)\3 a[1]  - 6 a[1]/ S(xi) 

                                                  3        /  
   + R(xi)(6 R(xi) a[1] b[1] - 6 b[1] R(xi)) S(xi)  + R(xi)\3 

       2     2                  2                   
  R(xi)  b[1]  - 6 R(xi) mu a[1]  + 12 a[1] mu R(xi)

                  2                                        \ 
   + 6 lambda a[1]  - 8 a[1] lambda - 4 omega a[1] - 3 a[1]/ 

       2        /        2                       2        
  S(xi)  + R(xi)\-6 R(xi)  mu a[1] b[1] + 6 R(xi)  mu b[1]

   + 6 R(xi) lambda a[1] b[1] - 5 R(xi) lambda b[1]

                                      \              /      2   2 
   - 4 R(xi) omega b[1] - 3 b[1] R(xi)/ S(xi) + R(xi)\3 a[1]  mu  

       2            2      2         2                
  R(xi)  - 3 a[1] mu  R(xi)  - 6 a[1]  mu R(xi) lambda

   + 5 a[1] mu R(xi) lambda + 4 omega a[1] mu R(xi)

           2       2                                  2
   + 3 a[1]  lambda  + 3 a[1] mu R(xi) - 2 a[1] lambda 

                                        \
   - 4 omega a[1] lambda - 3 a[1] lambda/

Generally when I respond to questions on this site, I make sure that I tick the checkbox requesting that I get an email when updates are made to the thread.

I've just realised that I have been receiving no such updates for a week or so. Two possibilities

  1. Problem with Mapleprimes website, meaning that email updates aren't being generated/sent
  2. Problem with my ISP

Before I try investigating (2) above, I'd just like to know if anyone else has seen any issue which might be explained by (1) above

For what ever reason I found myself curious to know more about how random number generators work, rand() being one of my favourite tools in the shed to call apon when conducting one of my hobbyist number investigations. So reviewing the output from commands:

with(RandomTools[LinearCongruence]);
showstat(GetState);

 

Which was:

RandomTools:-LinearCongruence:-GetState := proc($)
                                                                      1   return LCState
                                                                            end proc

Due to my lack of understanding as to how the maple kernel is designed, I am struggling to understand how the end of parameters marker is able to be accepted alone as the parameter sequence for proc, and was unable to find a help page for "LCState". I'm in such a state of confusion on this matter, it's really difficult to present the forum with a concise question, I really only have a request for a direction to go to understand this package further more.

car_2som_opp := proc (U::list, V::list)  #construction d'un carré connaissant 2 sommets opposés 
local dist, eqCerU, eqCerV, r, sol, X, Y; 
dist := proc (M, N) sqrt(add((M[i]-N[i])^2, i = 1 .. 2)) end proc;
r := dist(U, V)/sqrt(2); 
eqCerU := (x-U[1])^2+(y-U[2])^2 = r^2; 
eqCerV := (x-V[1])^2+(y-V[2])^2 = r^2;
sol := solve([eqCerU, eqCerV], [x, y],allsolutions,explicit);  
map(allvalues,sol): 
X := [subs(op(sol[1]), x), subs(op(sol[1]), y)]; 
Y := [subs(op(sol[2]), x), subs(op(sol[2]), y)]; 
display(plot([U, X, V, Y, U],scaling = constrained, axes = none)) 
end proc:

car_2som_opp([-5,6],[7,-3]);"error
 

Hi

I have an ODE with 3 parameters
diff(B[1](t), t) = piecewise(t < 1000, kaC*(R-B[1](t))-k[d1]*B[1](t), 1000 < t, -k[d1]*B[1](t))

I'd like to make a graph that shows how its solution vary as Kac and Kd vary. This could have an axis of the form:

            | /k[d]
  B(t)  |/_ __
                t

which could contain a surface composed of the solutions as k[d] varies. Then a series of surfaces could be put together on the same axis to show what happens as kaC varies.

Some typical values are:

kaC = 6*10^(-2),
k[d1] = 7*10^(-3),
R = 1

I'd like to graph everything  in two orders of magnitude of these values for KaC and k[d1].

Currently I think the key obstacle is making a surface of solutions to the ODE; as once I can do that I think making a sequence of them on the same axis should be quite simple with Display

 

 

 

Could you help me make this code work?

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/Matrix.mw .
 

Download Matrix.mw

 

restart;
with(LinearAlgebra);
A := 8; B := 5;
q := .4; p := .2; r := 1-p-q;
dimP := A+B+1;
P := Matrix(dimP, dimP, [0$dimP*dimP]);
P[1, 1] := 1; P[1, 2] := 0;
P[dimP, dimP] := 1; P[dimP, dimP-1] := 0;
for i from 2 to dimP-1 do P[i, i-1] := q; P[i, i] := r; P[i, i+1] := p end do;
p0 := Matrix(dimP, 1, [0$dimP]);
p0[A+1, 1] := 1;
pV[0] := p0;
PT := Transpose(P);
for n to 200 do pV[n] := PT . pV[n-1] end do;
map(proc (x) options operator, arrow; evalf(x, 3) end proc, Transpose(pV[5]));

 

Could you help me fix this code?
Thanks in advance

with(Statistics)

Wpath := proc (steps, t) local walk, i, N, ww; N := nops(steps); walk[0] := 0; for i from 0 to N-1 do walk[i+1] := walk[i]+steps[i+1]*sqrt(t/N) end do; ww := seq(plot(walk[i], t*i/N .. t*(i+1)/N), i = 0 .. N-1); plots[display]([ww]) end proc

N := 400

numbers := [random[empirical[.5, .5]](N)]

st1 := map(proc (x) options operator, arrow; 2*x-3 end proc, numbers)

list_of_k := [40, 20, 10, 5, 2, 1]

for j to nops(list_of_k) do k := list_of_k[j]; st[k] := [seq((sum(st1[p], p = i*k-k+1 .. k*i))/sqrt(k), i = 1 .. N/k)] end do

Error, (in limit/mrv/limsimpl) too many levels of recursion

 

``


 

Download Wiener_process.mw

How to calculate potential function of Maxwell equations?

is there calculation examples of strong and weak force examples too?

which library can calculate intersection numbers of familes of potential function of Maxwell equations?

is there any examples?

I know if we want calculus derivative of function use of command diff in maple. now i want know if want calculus variation of functional what we should do? is there any special command?

I am trying to use a procedure say f1 as a formal parameter for another procedure say f2 . f2 need to evaluate gradient of f1.But how can I give the coordinate for finding gradient. please see attached 

 

func.mw

hello. im new to maple when i want to plot i have this problem.

 

Hi everybody:

I have the code in Maple that when run it I see this error, how can I solve this error? 

tnx...

 

Hi

Im going to solve mixing layer boundary layer equation in maple but Its this error: "Error, (in Shoot:-shoot) invalid boundary conditions, must be given at one point"

please help me. thank you.

> restart;
> alias(U = u(x, y), V = v(x, y)); PDE := {diff(U, x)+diff(V, y) = 0, U*(diff(U, x))+V*(diff(U, y))-nu*(diff(U, `$`(y, 2))) = 0};
print(`output redirected...`); # input placeholder
    // d   \   / d   \        / d   \     / d   \      / d  / d   \\    \ 
   { |--- U| + |--- V| = 0, U |--- U| + V |--- U| - nu |--- |--- U|| = 0 }
    \\ dx  /   \ dy  /        \ dx  /     \ dy  /      \ dy \ dy  //    / 
> simsubs := eta(x, y) = y*sqrt((1/2)*u[0]/(nu*x));
print(`output redirected...`); # input placeholder
                                                  (1/2)
                                 1    (1/2) /u[0]\     
                     eta(x, y) = - y 2      |----|     
                                 2          \nu x/     
> stream := psi(x, y) = sqrt(2*nu*x*u[0])*f(eta(x, y));
print(`output redirected...`); # input placeholder
                           (1/2)            (1/2)             
              psi(x, y) = 2      (nu x u[0])      f(eta(x, y))
> Usubs := U = diff(rhs(stream), y);
print(`output redirected...`); # input placeholder
              (1/2)            (1/2)                 / d           \
         U = 2      (nu x u[0])      D(f)(eta(x, y)) |--- eta(x, y)|
                                                     \ dy          /
> Vsubs := V = -(diff(rhs(stream), x));
print(`output redirected...`); # input placeholder
               (1/2)                     
              2      f(eta(x, y)) nu u[0]
        V = - ---------------------------
                               (1/2)     
                  2 (nu x u[0])          

              (1/2)            (1/2)                 / d           \
           - 2      (nu x u[0])      D(f)(eta(x, y)) |--- eta(x, y)|
                                                     \ dx          /
> ODE := simplify(subs(Usubs, Vsubs, simsubs, PDE));
print(`output redirected...`); # input placeholder
 /                             /      /           /                 (1/2)\  /    
 |                  1          |    2 |           |1    (1/2) /u[0]\     |  |1   
 |0 = 0, - ------------------- |u[0]  |@@(D, 2)(f)|- y 2      |----|     | f|- y 
<                        (1/2) \      \           \2          \nu x/     /  \2   
 |               2 /u[0]\                                                        
 |         2 nu x  |----|                                                        
 \                 \nu x/                                                        

               (1/2)\          (1/2)  
   (1/2) /u[0]\     |    /u[0]\       
  2      |----|     | nu |----|      x
         \nu x/     /    \nu x/       

                                 /                 (1/2)\\\    \ 
                (1/2)            |1    (1/2) /u[0]\     |||    | 
   + (nu x u[0])      @@(D, 3)(f)|- y 2      |----|     ||| = 0| 
                                 \2          \nu x/     ///     >
                                                               | 
                                                               | 
                                                               / 
> simsubs2 := solve(subs(eta(x, y) = eta, simsubs), {y});
print(`output redirected...`); # input placeholder
                              /         (1/2) \ 
                              |    eta 2      | 
                              |y = -----------| 
                             <           (1/2) >
                              |    /u[0]\     | 
                              |    |----|     | 
                              \    \nu x/     / 
> ODE := simplify(subs(simsubs2, ODE), symbolic);
print(`output redirected...`); # input placeholder
      /             2                                                 \ 
      |         u[0]  (@@(D, 2)(f)(eta) f(eta) + @@(D, 3)(f)(eta))    | 
     < 0 = 0, - -------------------------------------------------- = 0 >
      |                                2 x                            | 
      \                                                               / 

> shootlib := "C:\\Users/abbas/Desktop/maple9/"; libname := shootlib, libname; with(Shoot);
print(`output redirected...`); # input placeholder
                                   [shoot]
> FNS := {f(eta), g(eta), h(eta)};
> ODE := {diff(f(eta), eta) = g(eta), diff(g(eta), eta) = h(eta), diff(h(eta), eta) = -f(eta)*h(eta)};
print(`output redirected...`); # input placeholder
 /  d                      d                      d                          \ 
{ ----- f(eta) = g(eta), ----- g(eta) = h(eta), ----- h(eta) = -f(eta) h(eta) }
 \ deta                   deta                   deta                        / 
> IC := {f(0) = 0, g(0) = 0, h(0) = beta};
print(`output redirected...`); # input placeholder
                      {f(0) = 0, g(0) = 0, h(0) = beta}
> BC := {g(-10.) = 0, g(10.) = 1, limit(eta-f(eta), eta = 10) = 0};
print(`output redirected...`); # input placeholder
                  {10 - f(10) = 0, g(-10.) = 0, g(10.) = 1}
> infolevel[shoot] := 1;
print(`output redirected...`); # input placeholder
                                      1
> S := shoot(ODE, IC, BC, FNS, beta = 0, abserr = 0.5e-6, output = listprocedure, method = taylorseries);
%;
Error, (in Shoot:-shoot) invalid boundary conditions, must be given at one point
 

Hi 

how can i solve this integral in term of x

int(d*e^(-b*x)/(((a*e^(-2*b*x)+c*e^(-4*x)))))

First 675 676 677 678 679 680 681 Last Page 677 of 2431