J4James

355 Reputation

12 Badges

12 years, 318 days

MaplePrimes Activity


These are replies submitted by J4James

@Preben Alsholm 

This is fantastic. You have made my day.

Thanks MAN.

I hope later, I will come up with more problems. hahaha  

@Preben Alsholm 

This is fantastic. You have made my day.

Thanks MAN.

I hope later, I will come up with more problems. hahaha  

@Preben Alsholm Thanks. But what about when the data is exported in .xls sheet.

How we can arrange and export the data in more efficient way hAving a specific order to it?

The required format has to be of the form

c=0.1

eta t=0.1 u

eta t=0.2 u

c=0.2

eta t=0.1 u

eta t=0.2 u

Thanks

  

@Preben Alsholm Thanks. But what about when the data is exported in .xls sheet.

How we can arrange and export the data in more efficient way hAving a specific order to it?

The required format has to be of the form

c=0.1

eta t=0.1 u

eta t=0.2 u

c=0.2

eta t=0.1 u

eta t=0.2 u

Thanks

  

@Carl Love 

My intended goal is to get the data in a certain format which I needed for further statistical analysis. For the moment we will leave out the analysis part. I want is to get the data in the following form

C = 0.01

eta          t             u(eta, t)   

0             0.1            .       

1                              .

.                                .

.                                .

10                              .

 

eta          t             u(eta, t)   

0             0.2            .       

1                              .

.                                .

.                                .

10                              .

till t = 2 (say).

Then repeat the same procedure for C =0.02 till C = 0.2

I can get the data using this code but its time consuming

C:=0.01:

for i from 0 to 600 do p0:=sol:-value (t =0.1):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u0[i]:=subs(A[i*0.01], u(eta,t)) od:
u0:=<<(seq(u0[i], i=0..600 ))>>;

for i from 0 to 600 do p0:=sol:-value (t =0.2):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u1[i]:=subs(A[i*0.01], u(eta,t)) od:
u1:=<<(seq(u1[i], i=0..600 ))>>;

C:=0.02:

for i from 0 to 600 do p0:=sol:-value (t =0.1):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u0[i]:=subs(A[i*0.01], u(eta,t)) od:
u0:=<<(seq(u0[i], i=0..600 ))>>;

for i from 0 to 600 do p0:=sol:-value (t =0.2):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u1[i]:=subs(A[i*0.01], u(eta,t)) od:
u1:=<<(seq(u1[i], i=0..600 ))>>;

From this, you can sense that I have to repeat these steps million times if I am looking for high accuracy. 

Is my question clear?

@Carl Love 

My intended goal is to get the data in a certain format which I needed for further statistical analysis. For the moment we will leave out the analysis part. I want is to get the data in the following form

C = 0.01

eta          t             u(eta, t)   

0             0.1            .       

1                              .

.                                .

.                                .

10                              .

 

eta          t             u(eta, t)   

0             0.2            .       

1                              .

.                                .

.                                .

10                              .

till t = 2 (say).

Then repeat the same procedure for C =0.02 till C = 0.2

I can get the data using this code but its time consuming

C:=0.01:

for i from 0 to 600 do p0:=sol:-value (t =0.1):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u0[i]:=subs(A[i*0.01], u(eta,t)) od:
u0:=<<(seq(u0[i], i=0..600 ))>>;

for i from 0 to 600 do p0:=sol:-value (t =0.2):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u1[i]:=subs(A[i*0.01], u(eta,t)) od:
u1:=<<(seq(u1[i], i=0..600 ))>>;

C:=0.02:

for i from 0 to 600 do p0:=sol:-value (t =0.1):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u0[i]:=subs(A[i*0.01], u(eta,t)) od:
u0:=<<(seq(u0[i], i=0..600 ))>>;

for i from 0 to 600 do p0:=sol:-value (t =0.2):A[i*0.01]:=p0(i*0.01) od:
for i from 0 to 600 do u1[i]:=subs(A[i*0.01], u(eta,t)) od:
u1:=<<(seq(u1[i], i=0..600 ))>>;

From this, you can sense that I have to repeat these steps million times if I am looking for high accuracy. 

Is my question clear?

@Carl Love 

Thanks for the correction. My dumb head is unable to find a way to deal with this situation.

If you have some easy way out of this then please feel free to help me out of this misery.

Thanks 

@Carl Love 

Thanks for the correction. My dumb head is unable to find a way to deal with this situation.

If you have some easy way out of this then please feel free to help me out of this misery.

Thanks 

First of all, thanks for your kind response as always.

I tried to adopt your suggestion but no luck.

loop.mw

First of all, thanks for your kind response as always.

I tried to adopt your suggestion but no luck.

loop.mw

@Carl Love @rlopez @Preben Alsholm

My second question still stand about the positioning of the various terms involved.

This time I will consider a PDE system (?pdsolve,numeric)

PDE := {diff(u(x,t),t)=-1/20*diff(v(x,t),x,x),
diff(v(x,t),t)=diff(u(x,t),x,x)}:

IBC := {u(x,0)=sin(Pi*x), u(0,t)=0, u(1,t)=0,
v(x,0)=1-x, v(0,t)=1, v(1,t)=0}:

pds := pdsolve(PDE, IBC, numeric, spacestep=1/50);

Suppose, I need to use the data diff(u(x,t),x,x)  or diff(v(x,t),x,x) at x=0.

How can I call it from pds? or How can I get it?

or how we can plot diff(v(x,t),x,x) at x=0 vs t?

Thanks

@Carl Love @rlopez @Preben Alsholm

My second question still stand about the positioning of the various terms involved.

This time I will consider a PDE system (?pdsolve,numeric)

PDE := {diff(u(x,t),t)=-1/20*diff(v(x,t),x,x),
diff(v(x,t),t)=diff(u(x,t),x,x)}:

IBC := {u(x,0)=sin(Pi*x), u(0,t)=0, u(1,t)=0,
v(x,0)=1-x, v(0,t)=1, v(1,t)=0}:

pds := pdsolve(PDE, IBC, numeric, spacestep=1/50);

Suppose, I need to use the data diff(u(x,t),x,x)  or diff(v(x,t),x,x) at x=0.

How can I call it from pds? or How can I get it?

or how we can plot diff(v(x,t),x,x) at x=0 vs t?

Thanks

@Carl Love 

I am a little confused here. 

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

In the listprocedure, its hard for me to recognize the position of the terms.

Is there an easy way to find out the position of each term (x, u(x,t), diff(u(x,t),x), diff(u(x,t),t)) in the array? Which therefore can be called as Mr Lopez did.

Thanks

@Carl Love 

I am a little confused here. 

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

In the listprocedure, its hard for me to recognize the position of the terms.

Is there an easy way to find out the position of each term (x, u(x,t), diff(u(x,t),x), diff(u(x,t),t)) in the array? Which therefore can be called as Mr Lopez did.

Thanks

Well, thx for your usefull response. Now I want to extract data from the solution

pds := pdsolve(PDE,IBC,numeric,time=t,range=0..1);

for diff(u(x,t),x) at x=0.

Any idea?

Thanks 

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