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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Struggling with large solve blocks

ptc-4390973
1-Visitor

Struggling with large solve blocks

Let me first explain what I'm trying to accomplish in M15:

I'm attempting to determine how fast an aircraft would be able to fly in level flight, based on a simplified model. To test this model I have some data from a WW2-era P-51D Mustang fighter. The data shows that this Mustang could make ~442 mph true airspeed at 26000 feet.

To find the top speed at a particular altitude, I first develop a formula for Specific Excess Power (Ps), and then look for the true airspeed at which Ps is zero.

I have tried to do this using a minimize solve block but am apparently doing it wrong because I get wildly varying values for the top speed depending on what I enter as my original "guess" values.

I have read all the tutorials I've been able to find but none of them were helpful, since what I am trying to do is not the same thing as finding the intersection between two curves.

Please help!

ACCEPTED SOLUTION

Accepted Solutions
RichardJ
19-Tanzanite
(To:ptc-4390973)

Looking at your sheet however, it looks like I was forgetting to add Vtrue as an argument on the right side of all those equations.

Yes. You had the function Ps(Vtrue) defined so that it returns a constant: 1m/s. It would always return this, no matter what the value of Vtrue is. That means minimize can't do anything, and just exits after one iteration, so the results depends on your guess value.

As an aside, you should avoid including definitions in the solve block; just include the equation(s). Later versions of Mathcad allow definitions to be included (earlier versions do not!) but they have no effect, and just make it confusing. That's why Alan moved the "Given".

View solution in original post

12 REPLIES 12

You should make all variables that are functions of Vtrue explicit functions of Vtrue. Also, shouldn't you be looking to find the value of Vtrue that makes Thrust equal Drag? I didn't attempt to understand all your equations, but, if the latter is true, then the attached might help.

Alan

Well the goal is to find the value of Vtrue that corresponds to the point where Ps = 0 because that's the strict definition. In the real world, the aircraft's mass is not a constant since it is consuming fuel and those changes are significant over long time scales. But since I've assumed mass to be constant for simplicity's sake you're right that solving for the point where excess thrust = 0 accomplishes the same thing in this case. Good catch.

Specific excess power is a measure of the aircraft's ability to increase it's energy state. There's a layer of abstraction there, and if you look at Ps you'll see it's given in units of m/s which can be visualized as the rate at which the aircraft's potential energy (including potential energy stored in kinetic energy, measured in metres) can be increased.

When Ps = 0 the aircraft is at maximum energy performance meaning it cannot accelerate in level flight, and if the pilot attempts to climb the aircraft must slow down.

Looking at your sheet however, it looks like I was forgetting to add Vtrue as an argument on the right side of all those equations.

I'll give it a try, many thanks!

Nathan Van Ymeren wrote:

Well the goal is to find the value of Vtrue that corresponds to the point where Ps = 0 because that's the strict definition...

Maybe so:

Безымянный.GIF

How about the worksheet for the lad

Mike

Sorry Vladimir,

I see you have posted only the problem area of the sheet, my mistake

Mike

Have a look at the attached. I have completed the task using both the Minimize and Given Find solve blocks and they return different answers.!!! Can anyone shed any light?

Minimize.jpg

Find.jpg

Mike

Mike,

Please attach your corrected Mathcad worksheet.

Please see attached.

Mike

Please see Richards explanation why the Minimize doesn't yield the correct result.

Message was edited by: Mike Armstrong

VladimirN. wrote:

Nathan Van Ymeren wrote:

Well the goal is to find the value of Vtrue that corresponds to the point where Ps = 0 because that's the strict definition...

Maybe so:

Безымянный.GIF

Ah yes, I see this is a problematic result when we put the constraint on Ps as opposed to Texcess. Even if I remove the initial value for Ps. Does anyone know why this is the case?

RichardJ
19-Tanzanite
(To:ptc-4390973)

Looking at your sheet however, it looks like I was forgetting to add Vtrue as an argument on the right side of all those equations.

Yes. You had the function Ps(Vtrue) defined so that it returns a constant: 1m/s. It would always return this, no matter what the value of Vtrue is. That means minimize can't do anything, and just exits after one iteration, so the results depends on your guess value.

As an aside, you should avoid including definitions in the solve block; just include the equation(s). Later versions of Mathcad allow definitions to be included (earlier versions do not!) but they have no effect, and just make it confusing. That's why Alan moved the "Given".

Richard,

Can you shed any light on the difference in the results that I posted?

Mike

Yes. You had the function Ps(Vtrue) defined so that it returns a constant: 1m/s. It would always return this, no matter what the value of Vtrue is. That means minimize can't do anything, and just exits after one iteration, so the results depends on your guess value.

I think this answers. Cheers

Message was edited by: Mike Armstrong

Yes. You had the function Ps(Vtrue) defined so that it returns a constant: 1m/s. It would always return this, no matter what the value of Vtrue is. That means minimize can't do anything, and just exits after one iteration, so the results depends on your guess value.

As an aside, you should avoid including definitions in the solve block; just include the equation(s). Later versions of Mathcad allow definitions to be included (earlier versions do not!) but they have no effect, and just make it confusing. That's why Alan moved the "Given".

Ah, I thought I had to supply a guess value for Ps() as well. Thanks.

Announcements

Top Tags