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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Solving a thermodynamics-based system of equations

mtriayiv
1-Newbie

Solving a thermodynamics-based system of equations

Greetings,

I am trying to do a fairly straightforward optimization problem using Lagrange multipliers and have condensed my system down to a set of four equations with four unknowns. I am trying to solve for the unknowns using a Solve block and the 'Find' command, but I keep getting the error message: 'This variable is undefined. Could it be that the system has no solution, or are there some other rules for solvable equations that i am unaware of, or is it simply the case that Mathcad can't find a solution?

Thanks,

MT

4 REPLIES 4

In this case I would have to say that there doesn't appear to be a real solution.

If you replaace the Find with Minerr, then mathcad will iterate as far as it can & then return the 'best' result that it found.

The ERR internal variable is also a useful guide after the Minerr function.

Regards

Andy

I went ahead and tried using the Minerr function, but I am still getting the same error message (The variable is undefined.). Should I take this to mean that the system is not solvable at all or could there be something else going on?

StuartBruff
23-Emerald II
(To:mtriayiv)

In the first instance, I'd suspect that there isn't a suitable solution. Try increasing the value of TOL or CTOL to see if that brings any potential "near" solutions into play. You could also try plotting the equations as surfaces to see how close they approach.

Stuart

The sheet I posted did return values,

Capture.PNG

But they are all complex , which I would guess is unacceptable.

One correction I made t oyou r sheet was tha whole sheet t there were 2 given statements.

That will upset Mathcad , if you change it & the Minerr stays red, try <ctrl> <F9> to recalculate the whole sheet.

Should fix it.

Regards

Andy

Top Tags