Items tagged with time time Tagged Items Feed

I have a long and complicated expression (say Eq1). I have to solve the two equations (obtained by taking real and imaginary parts of Eq1) for two unknowns. Normally it take around a day on my i5 (3.1 GHz, 4 cores), 8gb ram desktop. I looked into posts related to parallel programming but couldn't get much to reduce the computation time. Is there a way to reduce the computation time ?
Many thanks in advance.

Hello Hello everybody 
   I have to solve the following differential equation numerically 


``

 

restart:with(plots):

mb:=765 : mp:=587 : Ib:=76.3*10^3 : Ip:=7.3*10^3 : l:=0.92 : d:=10: F:=490: omega:=0.43 :

eq1:=(mp+mb)*diff(x(t),t$2)+mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(theta(t),t$2)+mp*l*cos(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*sin(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*sin(alpha(t)+theta(t)))-F*sin(omega*t)=0;

1352*(diff(diff(x(t), t), t))+587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(theta(t), t), t))+540.04*cos(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*sin(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*sin(alpha(t)+theta(t))-490*sin(.43*t) = 0

(1)

eq2:=(mp+mb)*diff(z(t),t$2)-mp*d*(sin(theta(t)+alpha(t))+sin(theta(t)))*diff(theta(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(alpha(t),t$2)+mp*(d*diff(theta(t),t)^2*cos(theta(t))+l*(diff(theta(t),t)+diff(alpha(t),t))^2*cos(alpha(t)+theta(t)))+9.81*(mp+mb)-F*sin(omega*t)=0;

1352*(diff(diff(z(t), t), t))-5870*(sin(alpha(t)+theta(t))+sin(theta(t)))*(diff(diff(theta(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(alpha(t), t), t))+5870*(diff(theta(t), t))^2*cos(theta(t))+540.04*(diff(theta(t), t)+diff(alpha(t), t))^2*cos(alpha(t)+theta(t))+13263.12-490*sin(.43*t) = 0

(2)

eq3:=mp*(d*cos(theta(t))+l*cos(alpha(t)+theta(t)))*diff(x(t),t$2)-mp*(l*sin(theta(t)+alpha(t))+d*sin(theta(t)))*diff(z(t),t$2)+(Ip+Ib+mp*(d^2+l^2)+2*mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+[Ip+mp*l^2+mp*d*l*cos(alpha(t))]*diff(alpha(t),t$2)-mp*sin(alpha(t))*(l*d*diff(alpha(t),t)^2-l*d*(diff(alpha(t),t)+diff(theta(t),t))^2)+mp*9.81*l*sin(alpha(t)+theta(t))+mp*9.81*d*sin(theta(t))=0;

587*(10*cos(theta(t))+.92*cos(alpha(t)+theta(t)))*(diff(diff(x(t), t), t))-587*(.92*sin(alpha(t)+theta(t))+10*sin(theta(t)))*(diff(diff(z(t), t), t))+(142796.8368+10800.80*cos(alpha(t)))*(diff(diff(theta(t), t), t))+[7796.8368+5400.40*cos(alpha(t))]*(diff(diff(alpha(t), t), t))-587*sin(alpha(t))*(9.20*(diff(alpha(t), t))^2-9.20*(diff(theta(t), t)+diff(alpha(t), t))^2)+5297.7924*sin(alpha(t)+theta(t))+57584.70*sin(theta(t)) = 0

(3)

eq4:=mp*l*cos(alpha(t)+theta(t))*diff(x(t),t$2)-mp*l*sin(alpha(t)+theta(t))*diff(z(t),t$2)+(Ip+mp*l^2+mp*d*l*cos(alpha(t)))*diff(theta(t),t$2)+(Ip+mp*l^2)*diff(alpha(t),t$2)-mp*9.81*l*sin(alpha(t)+theta(t))+l*d*mp*diff(theta(t),t$1)^2*sin(alpha(t))=0;

540.04*cos(alpha(t)+theta(t))*(diff(diff(x(t), t), t))-540.04*sin(alpha(t)+theta(t))*(diff(diff(z(t), t), t))+(7796.8368+5400.40*cos(alpha(t)))*(diff(diff(theta(t), t), t))+7796.8368*(diff(diff(alpha(t), t), t))-5297.7924*sin(alpha(t)+theta(t))+5400.40*(diff(theta(t), t))^2*sin(alpha(t)) = 0

(4)

CI:= x(0)=0,z(0)=0,theta(0)=0,alpha(0)=0,D(x)(0)=0,D(alpha)(0)=0,D(z)(0)=0,D(theta)(0)=0;

x(0) = 0, z(0) = 0, theta(0) = 0, alpha(0) = 0, (D(x))(0) = 0, (D(alpha))(0) = 0, (D(z))(0) = 0, (D(theta))(0) = 0

(5)

solution:=dsolve([eq1,eq2,eq3,eq4, CI],numeric);

Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

 

 

I don't know why it says : Error, (in f) unable to store '[0.]/(0.17571268341557e16+[-0.25659510610770e15])' when datatype=float[8]

 

Help pleaase!

thank you !!!

Download systéme_complet.mw

 

I have a table of data arranged in the following columns: Year, Jan, Feb, Mar,..,Dec in Excel or csv

I would like to import this data into a time series in Maple so I can plot the result.

What is the simplest way of doing this?

 

Hi,

When I run two times my code, the results change.

Have you any idea, why???

 

 

Hi,

thank for any  help.

I need you help to make a movies ( animation)  according to the index k=1..10.  k is used in Vect_T[k], vector of time to make an animation of the true solution, and it's also used in Matrix(M[..,..,k]), h

True solution:ow can I make a seq of plots for different value of k. 

 

plot3d(True_solution(x,y,Vect_T[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]);

Analytic solution

plots:-matrixplot(Matrix(M[..,..,k]),axes=boxed,tickmarks= [[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],default],labels=[x,y,u],axes = boxed);

I tried, this:

S:=seq(plots:-matrixplot(Matrix(M[..,..,i]),labels=[x,y,u],axes = boxed),i=1..10):
plots:-display(S);
 But I get only one figure.

 also,

I tried

BoxTrue:=Null;
for k from 1 to 10 do
BoxTrue:=BoxTrue, plot3d(True_solution(x,y,Vector_time[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]): od:
display(BoxTrue, insequence=true);
also, no display

 

Dear all;

 

I need a help in this question.

u(x,y,t) my solution of PDE. x,y space, and t=time.

In the case without t. .i.e. u(x,y). Here is a visualization of the lattice u(x_i,y_j). i=1..3, anf j=1..3.  Please try this example, it's working. 

my question, if i would like to add a third variable t, i.e.  and get u(x_i,y_j,t_k)  on each points. I would like to show the lattice in (x,y) plan for each t_k. I Think I will get many parallel lattice. 

Please can some one, modify this code to get the parallel lattice. Thanks.


with(LinearAlgebra):
with(plots):
with(PDEtools):
interface(rtablesize=20):

Here,


L := 'L':
N := 'N':
g := 'g':
Z := i -> -L+2*L/(N+1)*i;
x[0] = Z(0),x[N+1] = Z(N+1),y[0] = Z(0),y[N+1] = Z(N+1);

 

N := 4;
L := 1;
r := L/(N+1)/4;
ngon := (n,x,y,r,phi) -> [seq([x+r*cos(2*Pi*i/n+phi), y+r*sin(2*Pi*i/n+phi)], i = 1 .. n)]:
p[1] := display([seq(polygonplot(ngon(4,Z(0),Z(j),r,Pi/2),color=magenta),j=0..N+1),

seq(polygonplot(ngon(4,Z(N+1),Z(j),r,Pi/2),color=magenta),j=0..N+1),

seq(polygonplot(ngon(4,Z(i),Z(0),r,0),color=magenta),i=1..N),

seq(polygonplot(ngon(4,Z(i),Z(N+1),r,0),color=magenta),i=1..N),

seq(seq(polygonplot(ngon(20,Z(i),Z(j),r,0),color=white),i=1..N),j=1..N),

textplot([seq(seq([Z(i+0.1),Z(j),typeset(u[i,j])],i=0..N+1),j=0..N+1)],align={above,right})],view=[Z(-1)..Z(N+2),Z(-1)..Z(N+2)],tickmarks=[[seq(Z(i)=typeset(x[i]=evalf[2](Z(i))),i=0..N+1)],[seq(Z(i)=typeset(y[i]=evalf[2](Z(i))),i=0..N+1)]],

axes=boxed,scaling=constrained,labels=[``,``]):
p[1];

 

 

 

 

 

 

Hello guys, I want maple to show me the time taken to execute the entire 500 loops shown in the code below. I read maple help and was able to come up with the code  (just part of the whole code).

st := time[real]():

for k from 1 to 500 do

  sol := LinearSolve(A, eval(b, [y[0]=y_init,z[0]=z_init])):
  y_init:=sol[9]:
  z_init:=sol[10]:
end do:


time[real]() - st;

my problem is that the time that shows varies/differs if i run it several times. I was expecting the same time interval of calculation. Am I doing something wrong?

Hi,

I'm very new to Maple and need some help.

I have a Matrix with the structure

M:= Matrix([[2013-08-13T00:29:24+0000,"text1"],[2013-08-14T00:29:24+0000,"text2"],[2013-08-15T00:29:24+0000,"text1"],[2013-08-16T00:29:24+0000,"text1"]])

 

and would like to plot this. Now problem one obviously is, it contains a timestamp. How can I use this in Maple? Second problem is, "text1" is a string, so I cannot use plotlist because it can not be converted to a float.

Hi,

Say for a 126 by 18 symbolic matrix, substituting numerical values into the matrix DD1 takes about 10 seconds (using time() );

for a 62 by 16 matrix, take just about 1/5 second.

By when the matrix is about 254 by 20, it take much longer! More than a minute!

I never actually waited how long, but I am wondering if there is something wrong? Am I using the right command?

Say the matrix is DD1 with numpar:=[x=0.3,y=0.2,z=0.98,....]

Hi,

I'm new in Maple and i've a project to do. I've to find at what time is 90% of the steady-state concentration of C achieved. And the eq is 

z'=k(1/2-z)(1/3-z), where k=0.3. 

So i had worked in Mathematica before and i know that it would look something like that in there: 

eqn1 = 0 == k (1/2 - z[t]) (1/3 - z[t])

DSolve[Evaluate[{eqn1}], z[t]].

But i have no idea how to find this 90%. I hope that someone will...

Dear Maple users

I like to use animations in Maple for different educational purposes. The other day I tried making an animation simulating a simplified Epicycle, which is a small circle with its centre running on a larger circle. The smaller one has a ball running on it with a constant velocity. I used the following code:

> with(plots);
> with(plottools);
> omega := 1; k := 5; R := 5; r := 2;
>
> plot1 := plot([R*cos(omega*t), R*sin(omega*t), t = 0 .. 2*Pi]);

I provide a code that I tried to optimize (minimize the calculation time) several times, finally I succeeded to:

######   Define global variables 
DGV:=proc() 
 global CI0P,CI1P,CK0P,CK1P,CK0G,CK1G; 

 CI0P:=Array([1,6.25,9.765625,6.781684,2.6490953,0.66227383,0.1149781,0.014665573,0.0014321849,0.11050809e-3,0.69067559e-5,0.35675392e-6,0.

Hello everyone,

 

I am coding the assumed modes method for vibration analysis on maple and I don't know why but the code takes veeery long time to execute and give results and I think it should not. There is also anoter very annoying thing. every 3 or 4 executions maple freezes completely and I am not able to find the cause...

I would be gratefull if someone could explain me if in my case it's better to working in floating point or rational values,...

Hey there,

i have an System in the form below.

I try to plot s over the angle t which is used in the functions (S,DS and DDS) but because maple uses t in the functions (s, v and a) as the time the calculated eigenfrequency doesnt fit to the System.

The eigenfrequency should be omega:=sqrt(c[0]/m[1])=1035 (over 360 degrees) but because of the angle time switch the eigefrequency is 1035 (over 1).

Has someone an idea how i can tell maple that t is an angle in degree? ...

Hi everyone,

 

Is it possible to create a continuous time wiener process in Maple?

When we create a wiener process and then a sample path, the values of the sample path are saved in a table, so if I call W(1.5) there is no answer.

How can this be solved?

 

Thanks.

1 2 3 Page 1 of 3