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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Solve Block, Vary initial Guess Value

jgan
1-Newbie

Solve Block, Vary initial Guess Value

Hi guys,

solve block.JPG

My objective is to find LCC as close as possible to 1.

Upon my Initial Guess Value of 1mm, it returns tcalc3 = 13.803mm

second guess value of tcalc3 = 13.803mm,  returns LCC of 0.795 and tcalc3 = 12.3mm

My question is how can I make it as iterative, so that  I dont have to keep manually changing the initial guess value (tcalc3) to find LCC close to 1

Thanks!!

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:jgan)

The normal way would be to turn the variable assignments into functions of t.calc3, so they can change when t.calc3 changes.

Then use those functions in the equation(s) of the solve block

I am still confused that we get a solution even if we use more than one equation in the solve block but obviously the equations are dependent and redundant and (the right) one of them would suffice. Didn't investigate in this , though.

Anyway - it seems you get what you are looking for

Regards

Werner

View solution in original post

7 REPLIES 7
Werner_E
24-Ruby V
(To:jgan)

You may consider posting your worksheet instead of just posting a screenshot, if possible.

RichardJ
19-Tanzanite
(To:jgan)

You should avoid numeric assignments in solve blocks. They are never necessary, and just make things confusing. In earlier versions of Mathcad it was not even allowed, and, IMO, it should have been left that way. Aside from that, which is just a cosmetic issue, you have four equations in your solve block and are only solving for one unknown. That's a problem, and the solve block is not doing what you think it is (I'm somewhat surprised it doesn't just give you an error). If the solve block is structured correctly it will give you the value of tcalc3 that makes LCC equal to 1, if such a value exists, or as close to 1 as possible if it doesn't. Please post your worksheet (in the edit dialog, click on "Use advanced editor" at the top right").

jgan
1-Newbie
(To:RichardJ)

Hi Please find the attached documents,Thanks for your help. How do I assigned the programming without using the numeric assignments?

Werner_E
24-Ruby V
(To:jgan)

The normal way would be to turn the variable assignments into functions of t.calc3, so they can change when t.calc3 changes.

Then use those functions in the equation(s) of the solve block

I am still confused that we get a solution even if we use more than one equation in the solve block but obviously the equations are dependent and redundant and (the right) one of them would suffice. Didn't investigate in this , though.

Anyway - it seems you get what you are looking for

Regards

Werner

RichardJ
19-Tanzanite
(To:Werner_E)

I am still confused that we get a solution even if we use more than one equation in the solve block but obviously the equations are dependent and redundant and (the right) one of them would suffice. Didn't investigate in this , though.

Just get rid of the first three equations. There are equivalent numeric definitions of these in the body of the worksheet. As definitions, the first is used in the third equation. The second and third are used in the fourth equation. That's why it works with four equations: they are just a sequence of dependent functions.

Ah, yes. Just like I suspected. I had not taken the time to study this in more details, though.

jgan
1-Newbie
(To:Werner_E)

Hi Werner

Thanks alot! it works by changing the alphaTC, beta etc as a function of tcalc3

Top Tags