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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

I got error continually. could you give advice?

jlee-2
7-Bedrock

I got error continually. could you give advice?

41.PNG

the variables below 8m/s arenot okay, but the variables more than 9m/s are okay.

After integration, I got error continually. Before integration, I got result's values.

please help me. I thoght to solve my problem for many hour, but I couldn't handle it

15 REPLIES 15
Werner_E
25-Diamond I
(To:jlee-2)

In cases like that you have to follow your calculations until you end up at the one that really throws the error. Thats quite "fun" in your sheet as your functions are hopelessly nested. CT0 call T, T calls t, t calls ..... etc.

In your specific case its the solve block for ar and a'r which throws the error when fed with the values you provide and when used with r[15 (it quite possible tha other elements of r throw an error, too; I haven't tried). If you think that you should get a solution with those values, too, you will have to recheck the equations and all functions related to that solve block.

1.png

jlee-2
7-Bedrock
(To:Werner_E)

45.PNG

I rechecked all functions related to "solve block"

But they are no problem..

And I changed CTOL 10^-2 and then I can get ar' value.

But I now can't get my CT value and I can't trust 10^-2 because 10^-3 is common.

so I need to get result's value in case of 10^-3.

Have you good idea to solve my problem?

Werner_E
25-Diamond I
(To:jlee-2)

jinsuk Lee wrote:

I rechecked all functions related to "solve block"

But they are no problem..

And I changed CTOL 10^-2 and then I can get ar' value.

But is this solution valid? Is it reliable? I meant that you will have to check the meaning of the equations in your solve block and try to get a solution for those values manually by some means so you can check the validity.

But I now can't get my CT value

So possibly even other combinations of values in the calculation of CT throw an error, too. You have to chekc all of them, I just picked the first one I came across.

so I need to get result's value in case of 10^-3.

What makes you so sure that there really exists a solution? Find it manually yourself by some means, then you can blame Prime for not doing so.

jlee-2
7-Bedrock
(To:Werner_E)

okay I will try.

Anyway I have a question.

Is it possible to integrate by using another method( for example. this picture) except for trapezoid method?

46.PNG

Werner_E
25-Diamond I
(To:jlee-2)

jinsuk Lee wrote:

okay I will try.

Anyway I have a question.

Is it possible to integrate by using another method( for example. this picture) except for trapezoid method?

Sure, but you would have to provide a continuous function which is defined over the whole range of integration.

As far as I remeber your "function" is discrete, defined only for selected values and as your current sheet shows its not defined for some of those points either because your function is based on a solve block which fails from time to time. If this happens, regular integration will fail, too. Integration is summation and you cannot sum up values which do not exist becuase they can't be calculated - no matter what method.

Then - didn't you try regular integration already in a former question with an interpolated function? And you had to give up because it would run literally endless - probably because for some combination of values your solve block will take a lot of time to evaluate.

jlee-2
7-Bedrock
(To:Werner_E)

I am sorry. I can't understand well...

Could you show some examples?

Werner_E
25-Diamond I
(To:jlee-2)

jinsuk Lee wrote:

I am sorry. I can't understand well...

Could you show some examples?

Hmm. Again. The function you try to integrate is not defined for a couple of values in the interval of integration because your solve block fails as I had shown. That means you cannot integrate that function, no matter what method.

jlee-2
7-Bedrock
(To:Werner_E)

47.PNG

Hi Werner.

I have a question. I want to restrick " a,a' " to keep 0<a<1 ,0<a'<1.

it means that inital guess is 0<a<1 ,0<a'<1.

But I can't handle it. could you help me?

Werner_E
25-Diamond I
(To:jlee-2)

jinsuk Lee wrote:

Hi Werner.

I have a question. I want to restrick " a,a' " to keep 0<a<1 ,0<a'<1.

it means that inital guess is 0<a<1 ,0<a'<1.

The initial guess? Think you mean the solution should be in this range.

You would simply have to add the two constraints 0<a<1 ,0<a'<1 in the solve block.

But if Prime can't find a solution the solve block will fail. Sometimes it may help to change the guess values.

Are you sure that your system has multiple solutions and that always one will be in the desired range?

jlee-2
7-Bedrock
(To:Werner_E)

Are you sure that your system has multiple solutions and that always one will be in the desired range?

I can't understand what it is meaning

Werner_E
25-Diamond I
(To:jlee-2)

jinsuk Lee wrote:

Are you sure that your system has multiple solutions and that always one will be in the desired range?

I can't understand what it is meaning

Your solve block looks for solutions of your system of two equations. Now you want to restrict the solutions to a certain range. This means you are not always happy with the solutions you get and look for differebt ones. My question was if you are sure (and why) that those different solutions really exist.

I guess that you are not happy with the negative solutions you get with certain parameters. The reason you don't get postive ones might be that they simply do not exist - just a thought.

jlee-2
7-Bedrock
(To:Werner_E)

Okay I understand.

I want to use "while" instead of "solve block" because I need to check another method.

But I just have a experience to get one vairable. My work have two variable(a, a')

so I don't know how I can handle it

Could you give me advice?

Werner_E
25-Diamond I
(To:jlee-2)

I want to use "while" instead of "solve block" because I need to check another method.

Why? And which algorithm do you have in mind?

I don't think that the algorithm used by Prime is the problem, but if there is no solution in the range you demand, Prime simply can't find it.

jlee-2
7-Bedrock
(To:Werner_E)

The thing that I think is that a, a' proceed to increase 0.001.

so a, a' should be positive because it do convergence in positive values.

But My result value is negative value in case of some parts.

so I wrote about my question to compare between "solve block" and "while"

Werner_E
25-Diamond I
(To:jlee-2)

jinsuk Lee wrote:

The thing that I think is that a, a' proceed to increase 0.001.

so a, a' should be positive because it do convergence in positive values.

But My result value is negative value in case of some parts

Which would mean that in those cases there IS no positive solution! a and a' may come close for some positive value, but never get equal.

If "close" is enough, you may want rewrite your conditions to read like

| a2(....) - a | < 10^-3

etc.

and also write

0 < a < 1.

Maybe this helps but I am not sure what this would mean for your application.

Announcements

Top Tags