Convergence Methods
From SysCAD Documentation
Navigation: User Guide -> Convergence Methods
SysCAD user an equation based solver, it builds its solution by writing a set of simultaneous equations and solves them by the inverse matrix method. In handling recycle streams, SysCAD builds Tear Blocks. The concept of tearing has evolved in connection with modular flowsheeting codes to solve material and energy balances. Tearing involves decoupling the interconnections between the modules so that sequential information flow takes place. Tearing is required because of loops of information created by recycle streams. What you do in tearing is to provide guesses for values of some of the unknowns (the tear variables), usually the recycle streams, and then calculate the values of the tear variables from the modular subroutines. These calculated values form new guesses, and so on, until the differences between the guessed values and the calculated values are sufficiently small (within the tear tolerance).
The convergence of these tear blocks can be resolved by using one of the following methods:
Direct Substitution, Adaptive Direct Substitution or Wegstein Acceleration.
A range of information about the solver can be viewed from these Access Windows:
Plant Model, ProBal Info / ProBal Setup, Tolerances, Tear Blocks and Change Stats.
Contents |
Damping factors
Below is an extract from the C++ code for the damping factors used in Convergence methods; these methods are selected in the ProBal Setup dialog box and/or the Tear Blocks Access Window.
Direct Substitution Method
For each iteration:
- DFMin = Max(Damping, DampingRqd);
- DampFactor=DFMin
- X0 = (DampFactor*X1) + (1.0-DampFactor)*Y0
- ...
- apply output X0
- ...
- Y3=Y2, Y2=Y1, Y1=Y0, Y0=next input
- X3=X2, X2=X1, X1=X0, X0=next output
Comments: Y0 will be your current value, X0 calculated will be the new value. This will continue until the difference between X0 & Y0 is within the tolerance set.
Adaptive Direct Substitution Method
For each iteration:
- Damp.Growth=0.25 //user configurable, default value is 0.25
- Damp.Decay=0.05 //user configurable, default value is 0.05
- if (Y1-Y2 != 0.0) then
- YRatio = (Y0-Y1)/(Y1-Y2)
- if (YRatio<-0.3) //Oscillatory Damp More
- EstimatedDampFactor = EstimatedDampFactor + (1.0-EstimatedDampFactor)*Damp.Growth
- else if (YRatio>0.3) //Damp Less
- EstimatedDampFactor = EstimatedDampFactor/(1.0+Damp.Decay)
- else // Don't Change Damping
- EstimatedDampFactor = EstimatedDampFactor
- else
- YRatio = 0.0
- EstimatedDampFactor = EstimatedDampFactor/(1.0+Damp.Decay)
- endif
- DFMin = Max(Damping, DampingRqd);
- EstimatedDampFactor = Range(DFMin, EstimatedDampFactor, 1.0)
- if (DampAsGroup)
- DampFactor = GrpDampFactor
- else
- DampFactor = EstimatedDampFactor
- DampFactor = Max(Damping, DampFactor)
- X0 = (DampFactor*X1) + (1.0-DampFactor)*Y0
- ...
- apply output X0
- ...
- Y3=Y2, Y2=Y1, Y1=Y0, Y0=next input
- X3=X2, X2=X1, X1=X0, X0=next output
Comments: Y0 will be your current value, X0 calculated will be the new value. This will continue until the difference between X0 & Y0 is within the tolerance set.
The damping factor is adjusted based on the growth and decay factors. These factors can be user specified. See Menu Command View | Tear Blocks.
Wegstein Acceleration Method
For each iteration:
- WA_Delay = 5
- WA_Bound = -3.0
- Use DirectSubs for first WA_Delay iterations
- S = (X1-X2)/(X2-X3)
- Q = Range(WA_Bound, S/(S-1.0), 0.0)
- X0 = (Q*X1) + (1.0-Q)*Y0
- ...
- apply output X0
- ...
- Y3=Y2, Y2=Y1, Y1=Y0, Y0=next input
- X3=X2, X2=X1, X1=X0, X0=next output
Comments: Y0 will be your current value, X0 calculated will be the new value. This will continue until the difference between X0 & Y0 is within the tolerance set.
The damping factor is adjusted based on the Delay and Bound factors. These factors can be user specified. See Menu Command View | Tear Blocks.
See Tolerance Testing for an explanation of how SysCAD tests for convergence.
Dynamic Solving to Steady State
Select View - Dynamic Configuration - SS_Monitor
The variables have the following meanings:
SS.Test: Either Off or Network. The Network option means that steadystate will be tested by looking at the conditions in the network. Off means no tests will be performed (Other options may be added later). For the Network option the pressure and flowrate at all inlets and outlets are tested for change.
SS.StopCount: The number of continuous iterations that the network must be steady before SysCAD will stop.
SS.MaxIters: The solver will stop after MaxIters – regardless of if any tests have been satisfied.
SS.Iteration: The number of iterations to date.
SS.Steady: The number of consecutive iterations that the ‘Steady State’ criteria have been satisfied.
SS.MaxChange: The largest change during the last iteration.
SS.MaxChangeTag: An indicator showing where the largest change during the last iteration took place.
SS.P.Abs: Absolute tolerance on change of pressure.
SS.P.Rel: Relative tolerance on change of pressure.
SS.Qm.Abs: Absolute tolerance on change of massflow.
SS.Qm.Rel: Relative tolerance on change of massflow.
Select View - Dynamic Configuration - Network
When solving the piping network to determine the estimated flows, the individual pipes need to be converged due to non linearity’s and Link_Eps_Abs & Link_Eps_Rel are the tolerances used during this step.
