Items tagged with boundary boundary Tagged Items Feed

Hello guys

I have a linear differentional equation which is in the 4th order. It is shown in the below:

P:=phi(x):
eq:=a11*diff(p,x,x,x,x)+a22*diff(p,x,x)+a33*p:
eq:=0:
where a11 and a22 and a33 are constant coefficients. The boundary value for this equation is:

phi(a)=sigma1 , phi(-a)=sigma1 , diff(p,x)(a)=0 , diff(p,x)=0

Now consider :

a11:=2.731e-10:
a22:=-1.651e-9:
a33:=3.09027e-10:
a:=35.714:
sigma1:=200e6:

when I use dsolve for deriving a good answer in this equation. there are four real roots .How can I solve it with these boundary condition?

I need to extract phi(x) from this equation.

Thanks

Hello,

Since I was working in Matlab with Galerkin method which implies periodic boundary conditions I was wondering how to implement this in maple.

I tried this:

restart;

pde2 := diff(u(x, t), t)+3*(diff(u(x, t)^2, x))+diff(u(x, t),x$3) = 0

IBC := {u(0, t) = u(2, t), u(x, 0) = sech(50*(x-1/2))^2+2*sech(30*(x-1))^2, (D[1](u))(0, t) = (D[1](u))(2, t), (D[2](u))(0, t) = (D[2](u))(2, t)}

pds := pdsolve(pde2, IBC, numeric, time = t, range = 0 .. 2)

But it's telling me: 

Error, (in pdsolve/numeric/process_IBCs) initial/boundary conditions can only contain derivatives which are normal to the boundary, got (D[2](u))(0, t)

So what's wrong?

> restart;
> with(plots);
> Eq1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-2*(diff(f(eta), eta))^2-M^2*(diff(f(eta), eta)) = 0;
/ d / d / d \\\ / d / d \\
|----- |----- |----- f(eta)||| + f(eta) |----- |----- f(eta)||
\ deta \ deta \ deta /// \ deta \ deta //

2
/ d \ 2 / d \
- 2 |----- f(eta)| - M |----- f(eta)| = 0
\ deta / \ deta /
> Eq2 := 1+(4/3)*R*(diff(theta(eta), eta, eta))+Pr*(f(eta)*(diff(theta(eta), eta))-(diff(f(eta), eta))*theta(eta)) = 0;
4 / d / d \\
1 + - R |----- |----- theta(eta)||
3 \ deta \ deta //

/ / d \ / d \ \
+ Pr |f(eta) |----- theta(eta)| - |----- f(eta)| theta(eta)| = 0
\ \ deta / \ deta / /
> bcs1 := f(0) = S, (D(f))(0) = 1+L*G, (D(D(f)))(0) = .1, f(6) = 0;
f(0) = S, D(f)(0) = 1 + L G, @@(D, 2)(f)(0) = 0.1, f(6) = 0
> fixedparameter := [S = .1, M = .1];
[S = 0.1, M = 0.1]
> Eq3 := eval(Eq1, fixedparameter);
/ d / d / d \\\ / d / d \\
|----- |----- |----- f(eta)||| + f(eta) |----- |----- f(eta)||
\ deta \ deta \ deta /// \ deta \ deta //

2
/ d \ / d \
- 2 |----- f(eta)| - 0.01 |----- f(eta)| = 0
\ deta / \ deta /
> fixedparameter := [R = .1, Pr = .7];
[R = 0.1, Pr = 0.7]
> Eq4 := eval(Eq2, fixedparameter);
/ d / d \\ / d \
1 + 0.1333333333 |----- |----- theta(eta)|| + 0.7 f(eta) |----- theta(eta)|
\ deta \ deta // \ deta /

/ d \
- 0.7 |----- f(eta)| theta(eta) = 0
\ deta /
> bcs2 := theta(0) = 1+T*B, (D(theta))(6) = B, theta(6) = 0;
theta(0) = 1 + T B, D(theta)(6) = B, theta(6) = 0

> T := .1; B := .1;
0.1
0.1
> L := [0., .1, .2, .3];
[0., 0.1, 0.2, 0.3]
> for k to 4 do R := dsolve(eval({Eq3, Eq4, bcs1, bcs2}, L = L[k]), [f(eta), theta(eta)], numeric, output = listprocedure); Y || k := rhs(R[2]); YL || k := rhs(R[3]) end do;
Error, (in dsolve/numeric/bvp/convertsys) too many boundary conditions: expected 6, got 7
> plot([YL || (1 .. 4)], 0 .. 6, 1 .. -.2, labels = [eta, diff(f(eta), eta)]);

 

i am solving 3 ODE with boundary condition.. with boundary condition

 

b.mw

Maple Worksheet - Error

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

Download b.mw

 

then i got this error

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

i dont know where i need to change.. could you help me..

 

i am solving 3 ODE question with boundary condition. when i running the programm i got this error.. any one could help me please.. :)

NULL

restart; with(plots); k := .1; E := 1.0; Pr := 7.0; Ec := 1.0; p := 2.0; blt := 11.5

Eq1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))+Gr*theta(eta)-k*(diff(f(eta), eta))+2*E*g(eta) = 0;

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))+Gr*theta(eta)-.1*(diff(f(eta), eta))+2.0*g(eta) = 0

(1)

Eq2 := diff(g(eta), eta, eta)+f(eta)*(diff(g(eta), eta))-k*g(eta)-2*E*(diff(f(eta), eta)) = 0;

diff(diff(g(eta), eta), eta)+f(eta)*(diff(g(eta), eta))-.1*g(eta)-2.0*(diff(f(eta), eta)) = 0

(2)

Eq3 := diff(theta(eta), eta, eta)+Pr*(diff(theta(eta), eta))*f(eta)+Pr*Ec*((diff(f(eta), eta, eta))^2+(diff(g(eta), eta))^2) = 0;

diff(diff(theta(eta), eta), eta)+7.0*(diff(theta(eta), eta))*f(eta)+7.00*(diff(diff(f(eta), eta), eta))^2+7.00*(diff(g(eta), eta))^2 = 0

(3)

bcs1 := f(0) = p, (D(f))(0) = 1, g(0) = 0, theta(0) = 1, theta(blt) = 0, (D(f))(blt) = 0, g(blt) = 0;

f(0) = 2.0, (D(f))(0) = 1, g(0) = 0, theta(0) = 1, theta(11.5) = 0, (D(f))(11.5) = 0, g(11.5) = 0

(4)

L := [10, 11, 12];

[10, 11, 12]

(5)

for k to 3 do R := dsolve(eval({Eq1, Eq2, Eq3, bcs1}, Gr = L[k]), [f(eta), g(eta), theta(eta)], numeric, output = listprocedure); Y || k := rhs(R[3]) end do

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

 

R

R

(6)

plot([Y || (1 .. 3)], 0 .. 10, labels = [eta, (D(f))(eta)]);

Warning, unable to evaluate the functions to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

 

NULL

NULL


Download tyera(a).mw

With your help I have a solution to a system of three equations:

(parameters are calculated on the basis of the data (for different values) - one example below)
A1=0.00002072968491, A2=0, A3=0.001946449287, A4=0.01946449287

B1=, B2=0, B3=0.0004773383613, B4=0.00004773383613

C1=, C2=0, C3=, C4=0.00009087604510

 

eqa1: = A1 * (diff (Tg (x), x, x)) + A2 * (diff (Tg (x), x)) + (A3 + A4) * tan (x) + A3 * Tg (x) + A4 * Tw (x) = 0;

eqa2: = B1 * (diff (Tw (x), x, x)) + B2 * (diff (Tw (x), x)) + (B3 + B4) * Tw (x) + B3 * Tg (x) + B4 * tan (x) = 0;

eqa3: = C1 * (diff (Tz (x), x, x)) + (C3 + C4) * Tg (x) + C3 * tan (x) + C4 * Tw (x) = 0;

 

indets ({eqa1, eqa2, eqa3}) minus {x};

res: = Dsolve (eval ({eqa1, eqa2, eqa3}) union {boundary conditions ??}, numeric);

 

for k from 0 to 20 evalf (res (k), 4); from;

c1:= 0.524:

c2:=0.05:

m: = 0;

for m from 0 to 20 and

T (m): = c1 * rhs (op (6, res (m))) + c2 * rhs (op (2, res (m))) + (1-c1-c2) * rhs (op (4, res (m))); print (m, T (m)); end to:

 

How and what type boundary conditions (I was thinking about the simplest or third type) to be able to determine the values on the y-axis on the graph. For example, the values started at -10, and ended at 10 (at a point (x, -10), (x, 10) in the coordinate system for a predetermined x, for example, from 0 to 20 which start at the point (0, -10 ) and stop at the point (20,10)). My main purpose is to collect these three solutions  to one equation T (x) = az * Tz (x) + and * Tw (x) + ag * Tg (x), and the ends of the graph, they should be in the above-mentioned points (0, -10 ) - start and (20,10) - stop.

 

Now thank you very much for the advice.

Ewa.

I'm taking my first steps with maple and pdsolve, trying to run the example in the maplesoft support page:

http://www.maplesoft.com/support/help/Maple/view.aspx?path=examples/pdsolve_boundaryconditions

which reads

>
> restart; with(PDEtools);
> U := diff_table(u(x, t));
>

and I get a solution that is different from the web page, and when i run

Im using maple 13. Any tips about what's wrong?

 

regards

hi

 

please help me :

 

 

restart; eq := diff(T(x, y), x) = a*(diff(T(x, y), `$`(y, 2)))/u(y); u := proc (y) options operator, arrow; (-1)*1.218493440*10^11*y^2+4.244913600*10^6*y+0.33e-1 end proc; eq; ICs := (D[1](T))(x, 0) = 1000, (D[1](T))(x, 0.25e-4) = 2000, T(0, y) = 0; T_sol := pdsolve({ICs, eq}, T(x, y)); T_sol

diff(T(x, y), x) = a*(diff(diff(T(x, y), y), y))/u(y)

 

proc (y) options operator, arrow; (-1)*1.218493440*100000000000*(y^2)+4.244913600*1000000*y+0.33e-1 end proc

 

diff(T(x, y), x) = a*(diff(diff(T(x, y), y), y))/(-0.1218493440e12*y^2+4244913.600*y+0.33e-1)

 

(D[1](T))(x, 0) = 1000, (D[1](T))(x, 0.25e-4) = 2000, T(0, y) = 0

 

Error, (in PDEtools:-Library:-NormalizeBoundaryConditions) unable to isolate the functions {T(0, y), (D[1](T))(x, 0), (D[1](T))(x, 0.25e-4)} in the given boundary conditions {T(0, y) = 0, (D[1](T))(x, 0) = 1000, (D[1](T))(x, 0.25e-4) = 2000}

 

T_sol

(1)

NULL

``

BC1 = diff(T(x, 0), y)=1000

BC2 = diff(T(x, 0.000025), y)=2000

IC = T(0,y)=0

where :

u(y)=-1.218493440*10^11*y^2+4.244913600*10^6*y+0.033

Download PDE_Sol.mw

Hello everyone,

i'm trying to simulate a diffusion problem. It contains two connected regions in which a species is diffusing at different speeds. In one region (zeta) one boundary is set to be constant whereas in the other region (c) there is some oscillation at the boundary.The code i try to use is as follows:

sys1 := [diff(c(x, t), t) = gDiffusion*10^5*diff(c(x, t), x$2), diff(zeta(x, t), t) = KDiffusion*10^6*diff(zeta(x, t), x$2)]

pds := pdsolve(sys1, IBC, numeric, time = t, range = 0 .. 3000, spacestep = 3)

However the main problem are my boundary conditions:

IBC := {c(0, t) = 0, c(x > 0, 0) = 0, zeta(0, t) = .4, zeta(x > 0, 0) = .4, (D[1](c))(3000, t) = sin((1/100)*t), (D[1](zeta))(0, t) = 0}

Like this it principally works (however it is apparently ill-posed).

Now what i do like is that the two equations are coupled at x=2000 with the condition that c(2000,t)=zeta(2000,t). This however i dont seem to be able to implement.

I appreciate your comments

Goon

Is it possible to solve piecewise differential equations directly instead of separating the pieces and solving them separately.

like for example if i have a two dimensional function f(t,x) whose dynamics is as follows:

dynamics:= piecewise((t,x) in D1, pde1, pde2); where D1 is some region in (t,x)-plane

now is it possible to solve this system with one pde call numerically?

pde(dynamics, boundary conditions, numeric); doesnot work

Hello guys ...

I used a numerically method to solve couple differential equation that it has some boundary conditions. My problem is that some range of answers has 50% error . Do you know things for improving our answers in maple ?

my problem is :

a*Φ''''(x)+b*Φ''(x)+c*Φ(x)+d*Ψ''(x)+e*Ψ(x):=0

d*Φ''(x)+e*Φ(x)+j*Ψ''(x)+h*Ψ(x):=0

suggestion method by preben Alsholm:

a,b,c,d,e,j,h are constants.suppose some numbers for these constants . I used this code:


VR22:=0.1178*diff(phi(x),x,x,x,x)-0.2167*diff(phi(x),x,x)+0.0156*diff(psi(x),x,x)+0.2852*phi(x)+0.0804*psi(x);
VS22:=0.3668*diff(psi(x),x,x)-0.0156*diff(phi(x),x,x)-0.8043*psi(x)-0.80400*phi(x);
bok:=evalf(dsolve({VR22=0,VS22=0}));

PHI,PSI:=op(subs(bok,[phi(x),psi(x)]));
Eqs:={eval(PHI,x=1.366)=1,eval(diff(PHI,x),x=1.366)=0,eval(PHI,x=-1.366)=1,eval(diff(PHI,x),x=-1.366)=0,
eval(PSI,x=1.366)=1,eval(PSI,x=1.366)=1};
C:=fsolve(Eqs,indets(%,name));
eval(bok,C);
SOL:=fnormal(evalc(%));


I used digits for my code at the first of writting.

please help me ... what should i do?

im solving 6 ODE which is the equations are unsteady with boundary conditions.. the program can be run when A=0 but when A=0.2 or others value .. its cannot be run... A means for unsteadiness... before this i solve for steady equations.. this is first time i solve for unsteady using maple.. anyone know where i am wrong??? thanks for helping :)

 

restart; with(plots); n := 2; Ec := 2.0; Pr := .72; N := .2; M := .1; l := 1; Nr := 1; y := 1; blt := 2.5; B := .1; a1 := 1; rho := .5

Eq1 := diff(f(eta), eta, eta, eta)+f(eta)*(diff(f(eta), eta, eta))-(diff(f(eta), eta))^2+l*B*H(eta)*(F(eta)-(diff(f(eta), eta)))-M*(diff(f(eta), eta))-A*(diff(f(eta), eta)+.5*eta*(diff(f(eta), eta, eta))) = 0;

diff(diff(diff(f(eta), eta), eta), eta)+f(eta)*(diff(diff(f(eta), eta), eta))-(diff(f(eta), eta))^2+.1*H(eta)*(F(eta)-(diff(f(eta), eta)))-.1*(diff(f(eta), eta))-A*(diff(f(eta), eta)+.5*eta*(diff(diff(f(eta), eta), eta))) = 0

(1)

Eq2 := A*(F(eta)+.5*eta*(diff(F(eta), eta)))+G(eta)*(diff(F(eta), eta))+F(eta)^2+B*(F(eta)-(diff(f(eta), eta))) = 0;

A*(F(eta)+.5*eta*(diff(F(eta), eta)))+G(eta)*(diff(F(eta), eta))+F(eta)^2+.1*F(eta)-.1*(diff(f(eta), eta)) = 0

(2)

Eq3 := .5*A*(G(eta)+.5*eta*(diff(G(eta), eta)))+G(eta)*(diff(G(eta), eta))+B*(f(eta)+G(eta)) = 0;

.5*A*(G(eta)+.5*eta*(diff(G(eta), eta)))+G(eta)*(diff(G(eta), eta))+.1*f(eta)+.1*G(eta) = 0

(3)

Eq4 := G(eta)*(diff(H(eta), eta))+H(eta)*(diff(G(eta), eta))+F(eta)*H(eta) = 0;

G(eta)*(diff(H(eta), eta))+H(eta)*(diff(G(eta), eta))+F(eta)*H(eta) = 0

(4)

Eq5 := (1+Nr)*(diff(theta(eta), eta, eta))+Pr*((diff(theta(eta), eta))*f(eta)-2*(diff(f(eta), eta))*theta(eta))+N*Pr*a1*(theta1(eta)-theta(eta))/rho+N*Pr*Ec*B*(F(eta)-(diff(f(eta), eta)))^2/rho+Pr*Ec*(diff(f(eta), eta))^2-.5*A*Pr*(4*theta(eta)+eta*(diff(theta(eta), eta))) = 0;

2*(diff(diff(theta(eta), eta), eta))+.72*(diff(theta(eta), eta))*f(eta)-1.44*(diff(f(eta), eta))*theta(eta)+.2880000000*theta1(eta)-.2880000000*theta(eta)+0.5760000000e-1*(F(eta)-(diff(f(eta), eta)))^2+1.440*(diff(f(eta), eta))^2-.360*A*(4*theta(eta)+eta*(diff(theta(eta), eta))) = 0

(5)

Eq6 := 2*F(eta)*theta1(eta)+G(eta)*(diff(theta1(eta), eta))+a1*y*(theta1(eta)-theta(eta))+.5*A*(4*theta1(eta)+eta*(diff(theta1(eta), eta))) = 0;

2*F(eta)*theta1(eta)+G(eta)*(diff(theta1(eta), eta))+theta1(eta)-theta(eta)+.5*A*(4*theta1(eta)+eta*(diff(theta1(eta), eta))) = 0

(6)

bcs1 := f(0) = 0, (D(f))(0) = 1, (D(f))(blt) = 0, F(blt) = 0, G(blt) = -f(blt), H(blt) = n, theta(0) = 1, theta(blt) = 0, theta1(blt) = 0;

f(0) = 0, (D(f))(0) = 1, (D(f))(2.5) = 0, F(2.5) = 0, G(2.5) = -f(2.5), H(2.5) = 2, theta(0) = 1, theta(2.5) = 0, theta1(2.5) = 0

(7)

L := [0., .2, .5];

[0., .2, .5]

(8)

for k to 3 do R := dsolve(eval({Eq1, Eq2, Eq3, Eq4, Eq5, Eq6, bcs1}, A = L[k]), [f(eta), F(eta), G(eta), H(eta), theta(eta), theta1(eta)], numeric, output = listprocedure); Y || k := rhs(R[3]); YP || k := rhs(R[5]); YR || k := rhs(R[6]); YQ || k := rhs(R[7]); YA || k := rhs(R[9]); YB || k := rhs(R[8]) end do

Error, (in dsolve/numeric/bvp) initial Newton iteration is not converging

 

P1 := plot([Y || (1 .. 3)], 0 .. 10, labels = [eta, (D(f))(eta)])

P2 := plot([YP || (1 .. 3)], 0 .. 10, labels = [eta, F(eta)])

plots:-display([P1, P2])

Error, (in plots:-display) expecting plot structures but received: [P1, P2]

 

``

 

Download unsteadyManjunatha.mw

How do I find the constants in a solution containing whittaker functions?

the boundary conditions are:

c(x,0)=1

c(0,y)=1

[c'(1,y),x]=0

 

 

 

Hi,

Please I need help in this subject. I would like to compare the numerical solution obtained by finite difference and pdsolve/numeric.

The equation considred is  diffusion Equation using Forward-time centered-space (FTCS) stencil
The code work well with Dirichlet boundary condition, but I want to let  x=-1  Dirichlet boundary condition but on x=1, we put a Neumann condition likeeval( diff(u(t,x),x),x=1)=1. Thank you very much to put the necessary in the attached code the changment.      
Many thinks.

Change_boundary_condition_in_procedure.mw    

Hi,

I solve laplace equation in a square. All the lines of my code is okay.

Please just look to the last part of my code titled procedure:

When I run my code without (last funciton f #f := (x,y) -> 0;) see last lines to find "f". It's runing, there is no problem. But when I put add f, there is an error. Many think  for any help.

Procedure
Using the previous suty in section stencil we can write the procedure to solve the Laplace equation in [0,1]*[0,1] with the boundary condition Neumann conditions on the vertical boundary and Dirichlet boundary condition on the horizontal baoundary. In our study we will use the same stepsize h in x and y direction.

PoissonSolve:=proc(N,_f)
local Z,i,h,y,x,sys,w,f,sol,j,u,Data;
# define basic grid parameters
Z := i -> (1/(N+1))*i;
x[0] = Z(0),x[N+1] = Z(N+1),y[0] = Z(0),y[N+1] = Z(N+1);
 h := evalf(Z(1)-Z(0));
# Fix the boundary data and the source matrix
for i from 0 to N+1 do:
    # Neumann boundary condition
     u[N+1,i] :=  u[N,i] ;    
     u[0,i] := u[1,i];
     # Dirichlet boundary condition
     u[i,0] := 0;
     u[i,N+1] := 0;
   od:
   f := Array(0..N+1,0..N+1,[seq([seq(evalf(_f(Z(i),Z(j))),i=0..N+1)],j=0..N+1)],datatype=float);
# Write down the system of equations to solve and solve them
     sys := [seq(seq(Stencil(h,i,j,u,f),i=1..N),j=1..N)];
  w := [seq(seq(u[i,j],i=1..N),j=1..N)];
  sol := LinearSolve(GenerateMatrix(sys,w));
   # parse the solution vector sol back into "matrix" form
   for i from 1 to N do:
     for j from 1 to N do:
        u[i,j] := sol[(j-1)*N+i]:
     od:
   od:
# generate a 3D plot of the solution using the surfdata command
   Data := [seq([seq([Z(i),Z(j),u[i,j]],i=0..N+1)],j=0..N+1)]:
surfdata(Data,axes=boxed,labels=[`x`,`y`,`u(x,y)`],shading=zhue,style=patchcontour);
end proc:



Here is an example of the output when the source function is set to zero
                                 f(x, y) = 0
; i.e., when  reduces down to Laplace's equation:
#f := (x,y) -> 0;
#PoissonSolve(10,f);

 

 

Question8.mw

1 2 3 4 Page 1 of 4