How do I fix my model: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 16: | Line 16: | ||
* A model that does not converge may be simply a wrong model. Check that your equations all makes sense first of all. | * A model that does not converge may be simply a wrong model. Check that your equations all makes sense first of all. | ||
* Make sure you initialise your variables to have variables within the ballpark of the values you expect for their solution (see [[METHOD|METHODs]] and [[ | * Make sure you initialise your variables to have variables within the ballpark of the values you expect for their solution (see [[METHOD|METHODs]] and [[default_self]]) This can be especially important when your problem has non-smooth equations such as thermodynamic property relationship eg T(p,h). | ||
* Sometimes you may need to adjust solver parameters. For example, some models need to use the [[QRSlv]] 'RELNOMSCALE' option, instead of 'ABSOLUTE' scaliong. | * Sometimes you may need to adjust solver parameters. For example, some models need to use the [[QRSlv]] 'RELNOMSCALE' option, instead of 'ABSOLUTE' scaliong. | ||
* Try applying some manual [[scaling]] to variables far from their nominal values. | * Try applying some manual [[scaling]] to variables far from their nominal values. | ||
Revision as of 04:52, 21 May 2010
This article is incomplete or needs expanding. Please help out by adding your comments.
When you reach the stage of creating complex MODELs with ASCEND you will inevitably find that some models don't work as you would have wished. This fact can sometime present itself in the form of cryptic error messages. This page aims to clarify how some of these messages arise, what they mean, and how to fix your model in such cases.
Pivoting errors
- Pivoting errors arise when your NLA's jacobian matrix is singular. This happens as a result of multiply linearly dependent equations, which essentially means that you may have written the same equation twice, or expressions that are in some way redundant.
- Pivoting errors can also arise due to badly-initialised variables. This happens, for example, when attempting to solve for a temperature in a superheated region by varying an enthalpy value set intitialling in the saturation region: changing enthalpy causes no change in temperature, resulting in a pivoting problem.
Structural singularity errors
- Check that you don't somehow have the same equation written twice in two different ways.
- Check for redundant mass conservations and energy conservation equations. This is an especially easy mistake to make when writing equations containing flow loops.
Failure to converge
- A model that does not converge may be simply a wrong model. Check that your equations all makes sense first of all.
- Make sure you initialise your variables to have variables within the ballpark of the values you expect for their solution (see METHODs and default_self) This can be especially important when your problem has non-smooth equations such as thermodynamic property relationship eg T(p,h).
- Sometimes you may need to adjust solver parameters. For example, some models need to use the QRSlv 'RELNOMSCALE' option, instead of 'ABSOLUTE' scaliong.
- Try applying some manual scaling to variables far from their nominal values.
- Make sure you're using the right kind of solver. You should use an NLA solver for NLA problems, optimisation solvers, for optimisation problems, and so on.
- Try to write your equations in terms of multiplication operations rather than division operations. This generally improves the numerical behaviour.
- Try to write your equations in forms that are applicable over the full range of real numbers. For example, it try to use 'exp' functions instead of 'log' functions.
- Try rerranging your equations into another form.
'catch_Word_model'
- If you see this error when trying to load your model in ASCEND, it usually means you have made a serious syntax error. A good way to fix such errors is to pare your model back to basics, and then to gradually add bits back again until you see identify the cause of the problem.
- Occasionally, it seems that this error messages goes away simply by reloading your model file (ctrl-F5 in PyGTK GUI). This is probably a bug.