Equation of state
- April 25, 2013
- 2 replies
- 1653 views
Hi,
I am trying to program an equation of state for a mixture and want to make mathcad loop from an initial guess of the concentration to the solution (by updating the guess each time). I have a file which has a the calculations working if I manually update the initial guess (this section is right at the bottom highlighted by the red comment at the start) to get to a solution. Above this section I have tried to create a while loop to automate the process for me, but MathCAD doesn't like the polyroots part where the euqation of state is solved for the three roots. For the example I have two roots are imaginary numbers but this will not always be the case depending on the conditions therefore this needs to be part of the loop. What is the method one is supposed to use for this type of problem? Any help would be much appreciated. File is attached.
Andrew

