TclTk screenshots

(Redirected from TcltkScreenshots)
Jump to: navigation, search

We show screenshots here for the Tcl/Tk interface, which is the original interface for ASCEND (there now is a newer, but less stable Python/PyGTK interface under more active development). Seven tool sets exist, and each has its own display window

  • SCRIPT: for running scripts
  • LIBRARY: for loading, compiling and displaying model code
  • BROWSER: for browsing the model, resetting values and flags, finding what variables are fixed
  • SOLVER: for solving and for debugging when the model will not converge
  • PROBE: for displaying the values of different arbitrarily defined collections of variables
  • UNITS: for selecting the units in which to display variable values (UNITS)
  • DISPLAY: a display service for several of these tool sets

Each set includes from 10 to 40 different tools to aid in running ASCEND models. Along with examples for the windows for these tool sets, we also show examples of auxiliary windows that support individual tools. And finally we also show the following screenshots.

  • Whole Screen Shot: showing several windows open at the same time
  • Plotting: typical plotting using this interface
  • UNITS: dealing with units of measurement in ASCEND.


ASCEND supports the use of scripts written in Tcl to "run" a model automatically. ASCEND can capture a script by tracking a session the user carries out manually. Executions of a script is by highlighting the lines one wishes to execute, as shown here.



The Library toolset has over 30 tools, which are for loading or unloading text files containing ascend model code, for compiling one or more of the models, for displaying the code or the part/whole structure for the models loaded, for discovering all variable types whose value could be expressed in a particular set of units (e.g., all variables that could be expressed in the units ft/s), etc.



While in the LIBRARY window, we can ask to DISPLAY the code for one of the loaded models.


or to DISPLAY the hierarchical "refinement" structure of the loaded models. Note, for example, that test_controller is a refinement of controller (which means it has all the attributes of a controller and then some).



After compiling an instance tc of the test_controller model, we can examine its contents within the BROWSER. Here we are looking inside tc, where we find a part called fs (of type flowsheet), to peer inside one of its parts fl1 (of type flash). We can select any variable or flag and reset its value. From within the BROWSER, we can also run METHODS that can give values to different sets variables and flags.


We can ask to reset the value for any variable in any set of consistent units or reset any flag in the model instance. The small lock symbol for this window indicates that one has to release it before ASCEND will allow you to continue - either by hitting OK or cancel.


We can also ask to see all the variables within a given part of the model, or within the whole model, which we have fixed.


ASCEND allows one to "merge" compatible parts, and we can ask for a list of the different names (aliases) that result for a part. Here we see that the input called "feed" for the flash fl1 is also the output called "out" for the reactor r1. Listing aliases gives a nice way to check if a model is "wired" up as desired.



After preparing the model for solving by picking which variables we wish to be fixed and providing values for them, we can export the entire compiled instance from the BROWSER tool set to the SOLVER tool set. If we have selected either the wrong number of variables to fix (too few or too many) or based on an analysis of the equations a set that leaves a subset of equations with too few variables among them, either of two following windows will pop up asking us to select one of the variables on the list to be fixed or released, as appropriate. These windows will keep reappearing until the model is square or we cancel the analysis.




After "squaring the model," the solver window appears, and in it we can choose which solver to use and solve.


If all goes well, we will see a window telling us that the model converged, here to three parts in 10 to the eleventh.


We can ask numerous questions about the attempt to solve, such as if the model is behaving as it it is singular, either numerically or structurally, or if some of the variables in it are hitting their bounds, or if some of the variables are badly scaled. Additionally, we can ask to see the incidence matrix for the problem, which for small problems is extremely valuable.


This matrix is "hot" in that one can select an incidence in it as see to which equation and variable it belongs. The QRSlv solver solves by partitioning the variables into blocks of equations that must be solved simultaneously, and one can explore each such block - asking what are the equation residuals and/or the variable values at this time, for example. Either or both sets may be sent to the probe, where they can be displayed as a collected set at any time in the future. These tools are extremely useful while debugging a model.

Each solver in ASCEND has its own set of parameters that the user can set. All are defaulted to what we have found to be good values. Here we show some of the parameters for our QRSlv solver.



The PROBE is a tool set for managing the display of many different collected sets of variables. One can ask for all the variables belonging to a part of the model to be sent to the PROBE to be displayed collectively, or one can send all the fixed variables to the PROBE. One can put pointers to the models themselves into the PROBE so each can be quickly selected for observation in the BROWSER. Here we show the collected set of variables from the entire model, tc.


Whole Screen Shot

When using this interface, one is likely to have several of the windows open at the same time and to move among them quickly. Yes, this looks cluttered when several are open, as shown here, but one does quickly decide where to place the windows and when to hide them. ASCEND can remember placement and font selections for each window.



ASCEND uses xgraph for plotting. A tool exists in the BROWSER that allows one to select any part of a model that is a type that can be plotted and plot it. We show here two sample plots that one generates when solving a distillation column. The first shows the temperature profile and the second the relative volatilities for a methanol/water column simulation.



As noted earlier, ASCEND really does know about dimensionality (length/time) and units of measurement in which that dimensionality may be expressed (ft/s, m/hr). The UNITS tool allows one to select among using SI, cgs, or 'british' units or to set up whatever unit combinations one wishes for displaying variable values.


ASCEND has conversions for virtually everything, as seen in part here.