Skip to main content
1-Visitor
Nov 30, 2014 7:04 PM UTC
Solved

Is there method fastly to solve about "condition" ?

I used "if" to my work because I need to constraint.

i.x) I have some data(CL, CD) each section "r=2.8667, 5.6....61.6333"

These data are 8.(CL1,CD1.....CL8,CD8)

when r are 2.8667,5.6 , CL1,CD1 is used.

when r is 61.6333, CL8,CD8 is used.

I used "if" to constraint so that data used each section.

But It made my work slowly.

So I want to change or improve so that it is fast.

I attaced my files. Please help me. it spend long time....

And I also want to review my work whether it is efficient about my work.

Werner_E
Werner_EAnswer
25-Diamond I
Dec 1, 2014 12:45 AM UTC

jinsuk Lee wrote:

if r=7m, I don't have a data(CL, CD)

I just have data in my excel file.

Yes, but you could use interploation here, too.

I am not sure if you need it, but her is a way how it could be done:

1.png

2.png

I also noticed that you redefined the function CL and CD inmidst of your sheet - confusing and bad behaviour.

I am not sure abou your calculation of ar and ar' via the solve blocks. In a prior post you wrote that you want to solve for both at once but this is not what you do now. Now you solve for a and hold a' constant to zero and then the other way round. i guess this is not what you inteded.

According the slowness of the sheet: Thats the integrations you are evaluating. The function th() takes a long time to calculate and is called many time by the itegral. Not sure but I don't think the if conditions are the cause for this. I can not be bothered to trace all of your function all the way back to their origin but this sure is something you should do yourself. Look how many calculation and which (interpolation, ...) Mathcad has to do to just calculate a single value of th().

Why not calcuate the integral by simple trapezoid approximation? After all you just have a bunch of points an not a continous function anyway.

13 replies

Werner_E
25-Diamond I
Nov 30, 2014 7:53 PM UTC

jinsuk Lee wrote:

I used "if" to my work because I need to constraint.

i.x) I have some data(CL, CD) each section "r=2.8667, 5.6....61.6333"

These data are 8.(CL1,CD1.....CL8,CD8)

when r are 2.8667,5.6 , CL1,CD1 is used.

when r is 61.6333, CL8,CD8 is used.

And what if r=7m ??

BTW, the Mathcad sheet you posted does not use the Excel sheet you posted but two other Excel files.

Translate
jlee-21-VisitorAuthor
1-Visitor
Nov 30, 2014 11:22 PM UTC

if r=7m, I don't have a data(CL, CD)

I just have data in my excel file.

ah.. I had a mistaken to post

I attached starnge file. i am sorry

I again attached

13.PNG

AND I have airfoil data along RNodes.

I need to read eah node to airfoil data.

it make me crazy..... I couldn't solve this problem for a long time.

Translate
Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Dec 1, 2014 12:45 AM UTC

jinsuk Lee wrote:

if r=7m, I don't have a data(CL, CD)

I just have data in my excel file.

Yes, but you could use interploation here, too.

I am not sure if you need it, but her is a way how it could be done:

1.png

2.png

I also noticed that you redefined the function CL and CD inmidst of your sheet - confusing and bad behaviour.

I am not sure abou your calculation of ar and ar' via the solve blocks. In a prior post you wrote that you want to solve for both at once but this is not what you do now. Now you solve for a and hold a' constant to zero and then the other way round. i guess this is not what you inteded.

According the slowness of the sheet: Thats the integrations you are evaluating. The function th() takes a long time to calculate and is called many time by the itegral. Not sure but I don't think the if conditions are the cause for this. I can not be bothered to trace all of your function all the way back to their origin but this sure is something you should do yourself. Look how many calculation and which (interpolation, ...) Mathcad has to do to just calculate a single value of th().

Why not calcuate the integral by simple trapezoid approximation? After all you just have a bunch of points an not a continous function anyway.

Translate