Eunsang

0 Reputation

One Badge

0 years, 255 days

MaplePrimes Activity


These are replies submitted by Eunsang

@acer 

First of all, i'm sorry for confusion caused by inadequate explanation and thank you for allowing me to make the correction.

0) As you pointed out in your response, I used the meaning of 'higher' incorrectly in my question. What I intended to ask would be more appropriately expressed using the word 'smaller'.

1) The space step I desire should be no larger than 1/100.

2) When I tried with a space step of 1/100 and a time step of 1/20000, it took approximately 30 minutes. I would prefer the plotting process to take less than 10 minutes.

3) When plotting sol1, it appears qualitatively incorrect due to insufficient space steps. This becomes particularly critical when i need to explain data by varying constants for different scenarios.

  * The command I used for plotting p1 has been lost. The command I used for p1 plotting was as follows:
                                              p1:=sol1:-plot(1-Theta,t=0..10,axes=boxed)

4) I simply meant that I want to obtain smooth surface data, similar to the plot of sol2.

5) I apologize. i did not fully understand that question

6) While 3.14 indeed represents pi, 0.33 is not a value obtained through coarse approximation. I used 3.14 instead of pi simply for convenience.

 

i have been working on solving a system of partial differential equations and plotting the results. However, I've encountered issues with setting the spacestep and timestep. (It took me too much time to adjust the parameters.)

 

``pd1 := diff(n(x, t), t) = D*(diff(n(x, t), x, x))-(1/4)*s*v__th*`β__0`*n(x, t)*Theta(x, t)

diff(n(x, t), t) = D*(diff(diff(n(x, t), x), x))-(1/4)*s*v__th*beta__0*n(x, t)*Theta(x, t)

(1)

pd2 := diff(Theta(x, t), t) = -(1/4)*s__0*v__th*`β__0`*n(x, t)*Theta(x, t)

diff(Theta(x, t), t) = -(1/4)*s__0*v__th*beta__0*n(x, t)*Theta(x, t)

(2)

#1st constant condition

cons1 := {D = 6*(.33/(8.28)*(2/3))*10^(-7)*sqrt(473*(8*1.38)*10^(-23)/(1.66*(3.14*323.63)*10^(-27))), s = 1.1/(7.8*10^(-8)), s__0 = 1/(2.86*10^18), v__th = sqrt(473*(8*1.38)*10^(-23)/(1.66*(3.14*323.63)*10^(-27))), `β__0` = 2*10^(-4)}

 

#2nd constant condition

cons2 := {D = 6*(.33/(8.28)*(2/3))*10^(-7)*sqrt(473*(8*1.38)*10^(-23)/(1.66*(3.14*323.63)*10^(-27))), s = 1.1/(7.8*10^(-8)), s__0 = 1/(2.86*10^18), v__th = sqrt(473*(8*1.38)*10^(-23)/(1.66*(3.14*323.63)*10^(-27))), `β__0` = 2*10^(-6)}

NULL

pde11 := subs(cons1, pd1)

pde21 := subs(cons1, pd2)

pdes1 := {pde11, pde21}

{diff(Theta(x, t), t) = -0.3075925578e-20*n(x, t)*Theta(x, t), diff(n(x, t), t) = 0.2804887499e-5*(diff(diff(n(x, t), x), x))-124062.3316*n(x, t)*Theta(x, t)}

(3)

NULL

pde12 := subs(cons2, pd1)

pde22 := subs(cons2, pd2)

pdes2 := {pde12, pde22}

{diff(Theta(x, t), t) = -0.3075925578e-22*n(x, t)*Theta(x, t), diff(n(x, t), t) = 0.2804887499e-5*(diff(diff(n(x, t), x), x))-1240.623316*n(x, t)*Theta(x, t)}

(4)

NULL

``

NULL

tmax := 20

xmax := 5*10^(-4)

tmin := 0

xmin := 0

NULL

ic1 := Theta(x, tmin) = 1

ic2 := n(x, tmin) = 0

bc1 := n(0, t) = 4*10^22

bc2 := (D[1](n))(xmax, t) = 0

NULL

ibcs := {bc1, bc2, ic1, ic2}

{Theta(x, 0) = 1, n(0, t) = 40000000000000000000000, n(x, 0) = 0, (D[1](n))(1/2000, t) = 0}

(5)

NULL

"sol1:=pdsolve(pdes1,ibcs,numeric,time=t,range=0..xmax,spacestep=(1/(51))*xmax,timestep=(1/(1300))" 
#if both spacestep is
1/100,with timestpe under "1/(10000),"an error message is displayed.
# plus, i want to plot the pde solution with higer spacestep.

_m2254346241376

(6)

sol2 := pdsolve(pdes2, ibcs, numeric, time = t, range = 0 .. xmax, spacestep = (1/100)*xmax, timestep = 1/100)

_m2254293284128

(7)

p1 := sol1:-plot3d(1-Theta, t = 0 .. 10, axes = boxed)

 

p2 := sol2:-plot3d(1-Theta, t = 0 .. 30, axes = boxed)

 

NULL

I tried to find the optimal plotting points by adjusting the timestep while maintaining the desired spacestep. However, the range of possible timesteps was very broad, and when the timestep was too large, the plotting time became excessive, sometimes resulting in no graph being displayed at all.

Could you please review my code and point out any issues? Additionally, if you have any personal tips for setting spacesteps or timesteps, I would appreciate your advice.

Download 16._PDEs_example_solve.mw

Page 1 of 1