cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Problem in AdamsBDF, getting error as not enough memory for this operation

vveeran
4-Participant

Problem in AdamsBDF, getting error as not enough memory for this operation

Hi all,

I have some problem in computing ODE in AdamsBDF.

I want to use AdamsBDF function as below,

S = AdamsBDF(initial, 0, 10^6, 10^10, D)

But, when I try to use 'S' as above, I am getting an error as not enough memory for this operation.

Is there any other way to increase the sampling interval.


I attached my code below.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:vveeran)

> I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.

THIS should be no problem with decent sized (just a few millions) vectors.

I don't think you can create a vector that big as 10^10 elements and even if this would be possible (Prime should not face those memory limits), Mathcad probably would refuse to plot that many points.

View solution in original post

11 REPLIES 11
Werner_E
25-Diamond I
(To:vveeran)

The problem is not the sampling interval up to 10^6 but the number of steps you demand.

See no simple way to get a precision of 10^10 time steps. Even if AdamBDF would be capable to do so, you would get the "can't plot tham many points" error when trying to plot.

Do you really need result vectors with 10^10 elements??

vveeran
4-Participant
(To:Werner_E)

Dear Werner Exinger,

Thanks for your reply.

Yes, I need vectors with 10^10 elements and I need to plot those vectors.


I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.

If I add some more parameters to D(t,x), and in the sampling interval if I type 10^10

S = AdamsBDF(initial, 0, 10^6, 10^10, D)

If I try to plot for S, then the mathcad shows the error as not enough memory for this operation.

Is it possible to do AdamsBDF with more vector elements more than 10^10.

Werner_E
25-Diamond I
(To:vveeran)

> I need to plot for different initial conditions like, 0.2,0.3...1 in the same single plot.

THIS should be no problem with decent sized (just a few millions) vectors.

I don't think you can create a vector that big as 10^10 elements and even if this would be possible (Prime should not face those memory limits), Mathcad probably would refuse to plot that many points.

You've peaked my curiosity, what application needs 10^10 resolution?

Several possibilities suggest:

  • A coarse resolution over your total interval followed by a detailed "inspection" of a particular "region of interest"
  • A sequential approach--break the problem into 10^3 pieces, solve each at 10^7 steps using the end conditions of one as the initial conditions of the next.  (Port the results to another program; as Werner says, you aren't going to plot all those points in Mathcad!)
  • Re-evaluate your problem.
vveeran
4-Participant
(To:vveeran)

Dear all,

Thank you very for your replies.

I will try to follow your suggestions.

VladimirN
24-Ruby II
(To:vveeran)

vetri veeran wrote:

... I am getting an error as not enough memory for this operation....

Interestingly, in what Mathcad service release there is such an error? In Mathcad 15 F000 and M045 I have an error "This value must be a positive integer". And how others? Can anyone test the solution in Mathcad Prime 4.0 version?

Werner_E
25-Diamond I
(To:VladimirN)

Strange.

This is what I get in Mathcad 15.0 (M045 [MC15_M045_20151202])

I set 10^10.

Werner_E
25-Diamond I
(To:VladimirN)

VladimirN. wrote:

I set 10^10.

Bingo!

Werner,

And now convert this document into Prime file format and see what error we will get this time .

I'm wondering what result will give version 4.0 .

Werner_E
25-Diamond I
(To:VladimirN)

VladimirN. wrote:

Werner,

And now convert this document into Prime file format and see what error we will get this time .

I'm wondering what result will give version 4.0 .

Sorry, I'm too lazy and have far too little interest in Prime.

Have not even bothered installing Prime 4 on the machine I am currently working. Its not worth the time doing.

Announcements

Top Tags