TclTk Quick Guide
From ASCEND
Contents |
[edit] "How To" guide for tools available in the TclTk interface for ASCEND
A good way to introduce yourself to this tool set is to look at screenshots for it. This interface comprises seven tool sets, each with its own window. This "How To" guide will point you to the approriate tool(s) that you need to use to accomplish different tasks when using the TclTk version of ASCEND.
[edit] Referencing a TclTk tool in this guide
The following is an example of how we shall reference a specific tool in this guide
Library/Find/Type by name
The interpretation is: go to the "Library" window, select the "Find" header at the top of that window and select the "Type by name" tool that drops down under that header. So remember Window/Header/Tool.
[edit] StartupInterface
Assuming that you have installed ASCEND as directed in Quick Start, start up ASCEND
- in Linux by opening a shell and typing ascend4 at the command line.
- in Windows by selecting ASCEND4 in the Start menu.
The Script and Library windows will open.
[edit] LoadModel
To load the file containing a model
- Select the tool
- Library/File/Read types from file
- Browse through the file directories in the window that opens to locate the file and select to Open it. If it seems to have disappeared from the directory you know it sits in, check that the "Files of type" filter allows you to see files of the type you are attempting to load.
[edit] CompileModel
- In the left side of the Library window, select the name for the file that you previously loaded that contains the type of model you wish to compile.
- Select the tool
- Library/Edit/Create simulation
- In the window that opens, provide a name for the simulation you are about to create and hit OK
- If the compile step works, the simulation name will appear in the bottom part of the Library window. If not, find the Console window and examine the error messages that appear there. You will now be the business of debugging the model. Good luck.
[edit] ExportToBrowser
- You have one or more compiled simulations listed at the bottom of the Library window. Select the simulation you wish to export from the Library.
- Select the tool
- Library/Export/Browser
The Browser window will open and will contain the simulation you just selected. You may now use any of the many different tools in this window to locate and examine all parts of this simulation.
[edit] ExportToSolver
- You are examining a simulation in the Browser window. To export it to the solver, select the tool
Browser/Export/Solver
- The solver window will open with this model loaded in it. If your simulation is not well-posed (i.e., does not involve exactly n equations in n unknowns) yet, you may also get a window opening to encourage you to make changes to make it well-posed.
[edit] Solve
- You have a well-posed simulation in the Solver window. Select the tool
Solver/Execute/Solve
- The solver will execute. If successful, ASCEND will tell you that the model has converged.
[edit] ReloadModel
- You have likely made some editing corrections to the file containing the model code and wish to reload and compile it. Select the tools in order
Library/Edit/Delete all types and hit Delete All Library/Edit/Create simulation Library/Export/Browser
- A simulation based on your corrected model code is now in the Browser.
[edit] FindByUnits
- You wish, for example, to find all the types that are available in the atoms.a4l file. If atoms.a4l is not already loaded (examine the left side of the Library window), load the atoms.a4l file and/or any other or your own files containing ATOM type definitions.
- Select the tool
Library/Find/ATOM by units
- In the window that opens, type in a set of units in which one might specify a value for the variable of the type of interest. For example, you could type "m" or "mile" or "in" if you are interested in an atom that can represent a distance or "atm" or "bar" for an atom that could represent pressure.
- ASCEND will now list all the types currently loaded into it that can be expressed is these units.
[edit] UnitsToolSet
- You wish to use the Units tool set available in the TclTk interface for ASCEND. This tool set allows you to change the units in which ASCEND will display variable values (in the Browser window, for example).
- Select the tool
/Script/Tools/Measuring units
- The Units window will open. There are several ways you can now change the units in which ASCEND will display variable values, as now noted.
- Do a wholesale change into SI, US Engineering or cgs. Select the tool
/Units/View/??
where ?? represents your choice.
- In the Set units line, type in the units in which you wish ASCEND to display all variables of a given type (yes, this will affect all variables expressible in these units). For example, if you wish all variables of type pressure to be displayed in "atm", type "atm" in that window. If you want pressures displayed in "kg/m/min^2", type that and so on.
- Change the units for the basic dimensions (i.e., for mass, quantity, length, etc.). Select the tool
/Units/Edit/Set basic units
and select for each dimension the units you wish for displaying it.
-
Change the units for display from those special ones available for a variable type. For example, if you want set pressure units, find on the list in the upper left a type that will have the dimensions of pressure. A window drops, and you can select from the units listed. Note the first is always called "default." If you select this one, the units will aways correspond to those set for the basic dimensions for the system. For example, pressure has dimension M/L/T^2, and the default units will be kg/m/s*2 if one were using SI units.
-

