Community Tip - You can change your system assigned username to something more personal in your community settings. X
I'm probably doing something silly, but I can't seem to find it. I set up a while loop but it always finishes on the 2nd iteration, when I know fully well it hasn't converged. Prime 4.0 attached.
Thanks!
Solved! Go to Solution.
As you can see in the attached Screenshot, the values after the first and second iteration are identical, so the iteration stops as demanded.
But after further iterations the two matrices differ again.
You may want to check the initial values of matrix P
I suppose Mdiv and Ndiv are properly defined...
Why do you keep summing the error in the inner loop? I should assume it would suffice to assign just abs to Error, not to add it.
Check your labels! You have two 'Error's, one is a 'variable', the other is an 'automatic'.
Success!
Luc
As you can see in the attached Screenshot, the values after the first and second iteration are identical, so the iteration stops as demanded.
But after further iterations the two matrices differ again.
You may want to check the initial values of matrix P
Yep, that's it. Eta doesn't change the first time through since it's using old temperatures. So the next pressure calculation doesn't change.
Just need to move the eta calculation down in the list and she works.
Thanks.