J4James

355 Reputation

12 Badges

12 years, 317 days

MaplePrimes Activity


These are replies submitted by J4James

Thx acer,

Your approach is one of the possibilty.

I am trying to combine the follwoing two plots as a line plot

plot([subs(R3=-5,k=4,R1=0.0006,PL=1,Q=1.2,P),subs(R3=-5,k=4,R1=0.0006,PL=1,Q=2,P),

subs(R3=-5,k=4,R1=0.0006,PL=1,Q=4,P)],x=0..1,numpoints=200);

plot([subs(R3=-5,k=4,R1=0.0006,x=1,Q=1.2,P),subs(R3=-5,k=4,R1=0.0006,x=1,Q=2,P),

subs(R3=-5,k=4,R1=0.0006,x=1,Q=4,P)],PL=0..1,numpoints=200);

because, I also need to chose three different values for Q.

 

 

Thx acer,

Your approach is one of the possibilty.

I am trying to combine the follwoing two plots as a line plot

plot([subs(R3=-5,k=4,R1=0.0006,PL=1,Q=1.2,P),subs(R3=-5,k=4,R1=0.0006,PL=1,Q=2,P),

subs(R3=-5,k=4,R1=0.0006,PL=1,Q=4,P)],x=0..1,numpoints=200);

plot([subs(R3=-5,k=4,R1=0.0006,x=1,Q=1.2,P),subs(R3=-5,k=4,R1=0.0006,x=1,Q=2,P),

subs(R3=-5,k=4,R1=0.0006,x=1,Q=4,P)],PL=0..1,numpoints=200);

because, I also need to chose three different values for Q.

 

 

@Carl Love 

I tried to plot the residual but it doesnt look good

restart:with(plots):

Digits:=10:
fw:=0.1:Pe:=1:R1:=0.5:R:=0:d1:=1:n:=10:
eq1 := diff(F1(eta),`$`(eta,3))+R1*d1*(F1(eta)*diff(F1(eta),`$`(eta,2))-(diff(F1(eta),eta))^2)-diff(F1(eta),eta)=0;

eq2 := (1+4*R/3)*diff(theta(eta),`$`(eta,2))+Pe*d1*F1(eta)*diff(theta(eta),eta)=0;

bc:=F1(0)=fw,D(F1)(0)=1,D(F1)(n)=0,theta(0)=1,theta(n)=0;

A1:=dsolve({eq1,eq2,bc},numeric,output= listprocedure):

Exact:=.906216927-exp(-eta)+(1/20*(-4.749257710-4.749257710*eta))*exp(-eta)-(1/800*(-344.9967669-344.9967669*eta+22.55544879*eta^2))*exp(-eta);

Res:= eval(F1(eta), A1) - unapply(eval(Exact), eta):

plot(Res, 0..10);

 

Please have look.

Thanks

 

@Carl Love 

I tried to plot the residual but it doesnt look good

restart:with(plots):

Digits:=10:
fw:=0.1:Pe:=1:R1:=0.5:R:=0:d1:=1:n:=10:
eq1 := diff(F1(eta),`$`(eta,3))+R1*d1*(F1(eta)*diff(F1(eta),`$`(eta,2))-(diff(F1(eta),eta))^2)-diff(F1(eta),eta)=0;

eq2 := (1+4*R/3)*diff(theta(eta),`$`(eta,2))+Pe*d1*F1(eta)*diff(theta(eta),eta)=0;

bc:=F1(0)=fw,D(F1)(0)=1,D(F1)(n)=0,theta(0)=1,theta(n)=0;

A1:=dsolve({eq1,eq2,bc},numeric,output= listprocedure):

Exact:=.906216927-exp(-eta)+(1/20*(-4.749257710-4.749257710*eta))*exp(-eta)-(1/800*(-344.9967669-344.9967669*eta+22.55544879*eta^2))*exp(-eta);

Res:= eval(F1(eta), A1) - unapply(eval(Exact), eta):

plot(Res, 0..10);

 

Please have look.

Thanks

 

@Preben Alsholm

Thanks for the detailed response. I wasn't expecting it to be so complicated.

I thought maybe there is something wrong with my PC. Anyway, I have no idea how to

proceed with it.

 

 

@Preben Alsholm

Thanks for the detailed response. I wasn't expecting it to be so complicated.

I thought maybe there is something wrong with my PC. Anyway, I have no idea how to

proceed with it.

 

 

@Carl Love @acer

I have tried to plot an integral but couldn't

here is my try

restart:with(plots):
N:=1/sqrt(Pi*t)-1/(2*sqrt(Pi))*int((t-s)*sin(t-s)/(s*sqrt(s)),s=0..t)+

1/sqrt(Pi)*int((t-s)*sin(t-s)/(s*sqrt(s)),s=0..t);

plot(N,t=0..10);

THanks

@Carl Love @acer

I have tried to plot an integral but couldn't

here is my try

restart:with(plots):
N:=1/sqrt(Pi*t)-1/(2*sqrt(Pi))*int((t-s)*sin(t-s)/(s*sqrt(s)),s=0..t)+

1/sqrt(Pi)*int((t-s)*sin(t-s)/(s*sqrt(s)),s=0..t);

plot(N,t=0..10);

THanks

Thanks @Preben Alsholm

I agree with you that there is some issue with the bcs. But, I want to see the problem in more detailand 

have found the exact expression for diff(T(0,t),x) which is

N := 1/sqrt(Pi*t)+(1/2)*(int(-(t-s)*sin(-t+s)/s^(3/2), s = 0 .. t))/sqrt(Pi);

If I am not wrong the integral has finite values only for multiple of Pi?

Thanks

Thanks @Preben Alsholm

I agree with you that there is some issue with the bcs. But, I want to see the problem in more detailand 

have found the exact expression for diff(T(0,t),x) which is

N := 1/sqrt(Pi*t)+(1/2)*(int(-(t-s)*sin(-t+s)/s^(3/2), s = 0 .. t))/sqrt(Pi);

If I am not wrong the integral has finite values only for multiple of Pi?

Thanks

@Markiyan Hirnyk @Preben Alsholm

Thanks for your interest.

I have tried three different ways to find out whats going on,

 

  1. This one was suggested by Lopez for finding diff(u(eta,t),eta,eta) in one of my ealier posts

          W:=rhs(pds:-value(output=listprocedure)[4]);

           p1:=plot(W(0,t), t= 0..1,color=blue,thickness=2,legend = ["p1"]):

           I am not sure whether [4] is the position of the diff(T(eta,t)) or not

           but I thought its worth a try.

    2.   The second one was suggested by Preben

           T2Val:=op(subs(VAL,[T2(eta,t)]));

           p2:=plot(T2Val(0,t),t=0..1,legend = ["p2"]);

    3.  The third one  is the same as 2 but here I collect the values of T2Val(0,t) point by point

         for each t and then plot.

 

Here is the output I got 

pdsolveplot.mw

Thanks

Thanks @Preben Alsholm

I tried to apply your suggested approach like this

restart:with(PDEtools):with(plots):

sys := {diff(T(x, t), t) = diff(T(x, t), x, x)+(diff(u(x, t), x))^2, diff(u(x, t), t) = diff(u(x, t), x, x)};

PDE:={diff(u(x,t),t)=diff(u(x,t),x$2),diff(T(x, t), t) = diff(T2(x,t), x)+(diff(u(x, t), x))^2,diff(T(x, t), x)=T2(x,t)};

BCs := {u(0,t)=sin(t), u(10,t)=0,T(0,t)=1, T(10,t)=0,u(x,0)=0,T(x,0)=0};

pds2 := pdsolve(PDE, BCs, numeric, spacestep=1/50);

but I have a question, why we are suppose to have 3dplot instead of plot?

I just want to plot T2(x,t) vs t for x=0. Note for this plot x must be zero.

THanks

Thanks @Preben Alsholm

I tried to apply your suggested approach like this

restart:with(PDEtools):with(plots):

sys := {diff(T(x, t), t) = diff(T(x, t), x, x)+(diff(u(x, t), x))^2, diff(u(x, t), t) = diff(u(x, t), x, x)};

PDE:={diff(u(x,t),t)=diff(u(x,t),x$2),diff(T(x, t), t) = diff(T2(x,t), x)+(diff(u(x, t), x))^2,diff(T(x, t), x)=T2(x,t)};

BCs := {u(0,t)=sin(t), u(10,t)=0,T(0,t)=1, T(10,t)=0,u(x,0)=0,T(x,0)=0};

pds2 := pdsolve(PDE, BCs, numeric, spacestep=1/50);

but I have a question, why we are suppose to have 3dplot instead of plot?

I just want to plot T2(x,t) vs t for x=0. Note for this plot x must be zero.

THanks

@Carl Love 

Thanks for your kind response. Well, if we don't know the exact solution then how we can prove that the numerical scheme offers high accuracy?

@Carl Love 

Thanks for your kind response. Well, if we don't know the exact solution then how we can prove that the numerical scheme offers high accuracy?

First 12 13 14 15 16 17 18 Page 14 of 21