Sage User’s Guide

Transcription

. . . for Solving and Optimizing Engineering ModelsSageUser’s GuideStirling, Pulse-Tube and Low-T Cooler Model ClassesDavid GedeonElectronic Version for Acrobat ReaderSage v11 EditionGedeon Associates16922 South Canaan RoadAthens, OH 45701January 4, 2016Copyright c 1999–2016 by Gedeon AssociatesTypeset with the LATEX document preparation system under pcTEX softwareHyperlinks produced with LATEX Hyperref package

ii

PrefaceCombined User’s Guide and Model ClassesThis manual combines into a single volume the Sage User’s Guide and ModelClass Reference Guide for the stirling-cycle, pulse-tube and low-T cooler modelclasses. Combining them under one cover simplifies the printing process andalso makes it easier for you to find things in one place. Note that the softwareyou are running may not contain all the model components documented in thismanual because the three model classes are licensed separately.Manual DivisionsParts I and II document the Sage software distribution files and the graphicaluser interface and general structure common to all model componentsrunning under the Sage modeling and optimization framework.Part III documents the stirling-cycle model class, which forms the basis forthe other two model classes. The stirling model class is designed to modelmost instances of what are generally known as stirling-cycle machines,whether free-piston or kinematically driven, engines or coolers.Part IV documents the pulse-tube model class, which is extends the stirlingmodel class with certain components required for modeling pulse-tubecoolers and other thermoacoustic devices containing thermal buffer tubes,orifi, valves, pumps, etc. All model components available to the stirlingcycle model class are also available to the pulse-tube model class.Part V documents the low-T cooler model class, which extends the pulse-tubemodel class with a special gas type having an equation of state designedfor accuracy at extremely low temperatures (near the working gas criticaltemperature) and some model components designed for modeling JouleThomson coolers.iii

ivPREFACENew in Version 11On the software side, the Sage user interface and model components have continued to evolve since the previous version. Changes since version 10 documentedin this manual are:Plot Solution Grid The GUI now supports plotting the computational gridof a model component or connector between components in an interactivedialog. Available as a main menu item or a popup menu item when rightclicking on the component or connector of interest. Chapter 4Solver Diagnostic Dialog Goes Graphical Non-converging solution variablescan now be examined by clicking on points of plots that filter out varioustypes of strange behavior. Chapter 5Improved Listing Functionality The model listing dialog now includes searchfunctionality, improved text formatting and more control over printed output. Print and save-to-file menu items have been moved from the mainSage form to the listing dialog. Chapter 4Pulse Tube Free Convection and Streaming In the pulse-tube model class,the free convection loss formulation has been revised to include tilt angle dependence and the suppression effect of high frequency oscillatoryflow. The wall-streaming convection loss has also been reformulated andsimilarly includes a high-frequency suppression effect. Chapter 30An exhaustive list of software improvements, starting from the earliest daysof Sage, is found in the file UpgradeHistory.pdf. This file is located in theDocs\UpgradeHistory subdirectory under your Sage installation directory (default c:\Program Files\Gedeon\Sage[x]) or may be downloaded from the Sagewebsite at www.sageofathens.com. Each software improvement documentedthere is generally associated with a revision in this reference manual.

Part IGetting Started with SageSoftware1

Chapter 1Installation1.1Computer RequirementsSage runs under the Microsoft Windows operating system, including XP andWindows 7–10, 32 and 64 bit. A high resolution ( 17 in) display monitor isconvenient for editing complex models.1.2InstallingThe correct installation procedure will update the Windows Registry and ensurethat you can easily un-install your application later. As of version 7, Sagesoftware is distributed as a single executable setup file (e.g. SageStirlx.exe).You can run the setup file using the Add/Remove Programs utility locatedin the Windows Control Panel. Or just double-click on the file in WindowsExplorer or the equivalent. Then follow the on-screen instructions.The Sage files that are installed on your computer are selected accordingto the license ID and product key you enter in the “enter license information”dialog that pops up during the installation process.1.3Un-InstallingThe automatic un-installing process will remove all installed files and update theWindows Registry. Files created by you, either knowingly (data files) or invisibly(program initialization files) will remain in place. So afterwards, you might wantto use Windows Explorer to manually delete files from the installation directoryor whatever directory you stored data files in.Removal Activate Add/Remove Programs in the Control Panel, select theSage application from the listbox and follow the prompts.3

41.4CHAPTER 1. INSTALLATIONFilesThe default installation directory is c:\Program Files\Gedeon\Sage[x]. Withinthe installation directory are a number of subdirectories. The first two listedbelow are part of the normal executable software distribution. The last two arepart of the DLL or source-code distribution, licensed separately.\Apps Contains executable program files and sample data files in subdirecties[ModelClass]\Bin and [ModelClass]\Data, where [ModelClass] refers to Stirling, Ptube, etc. You can and should store your own data files in whatever directory you choose. For example, you might use a main directory.\Sagework, with subdirectories as needed to keep things organized.\Docs contains document files (generally in Adobe Acrobat pdf format) including manual, technical notes, source-code instructions, the Sage upgradehistory, and so forth.\DLL Contains dynamic-link libraries and documentation in the [ModelClass]subdirectories.\Source Contains source code common to all Sage applications in the Dialogs,Models, and Units subdirectories and for particular model classes in theSageApps\[ModelClass] subdirectories.Each Sage application remembers from session to session such things as windowdimensions, scroll positions, disk directories. Some of this information is storedin an application-specific file named gizmo.ini, stirling.ini, etc. Some is stored ina project-specific file named something like AName.gin, AName.sin, . . . , whereAName is the name of your input file and .gin stands for ”gizmo initialization”,.sin stands for stirling initialization”, and so forth. Such files appear automatically in your Local Settings \Gedeon \Sage directory or the directory whereyour data file is stored. The application-specific file is updated whenever theprogram closes. The project-specific file when you save the data file. Both areregenerated automatically with default values if they are lost.

Chapter 2Overview2.1What is SageSage is a graphical interface that supports simulation and optimization of anunderlying class of engineering models. The underlying model class representssomething like a spring-mass-damper resonant system, a stirling-cycle machine,or anything else that has been properly coded to work with Sage.The model classes of Sage are not just fixed-geometry models. Each maycontain an unlimited number of variations or instances. A model instance,or just plain model for short, is a particular collection of component buildingblocks, connected and assembled in a particular way, with particular data values,forming a complete system representing whatever it is you are trying to simulate.In other words, you don’t just add numerical data values within the confinesof a presumed geometry. You may modify the geometry too. Each particularinstance of a given model class resides in its own disk file with a unique namebut common file extension (such as .stl for stirling models).Each model class comes with its own executable file for dealing with its owninstances. The resonant-system model class (gizmo.exe) is common to all Sagedistributions. Other model classes (stirling.exe, etc.) are distribution dependent.Running a model-class executable file brings up the common Sage graphicalinterface which allows you to: create new or read existing model files enter numerical data edit model geometry specify optimization problems solve, map or optimize the model view, save or print a listingThese functions are all controlled by menu commands.5

62.2CHAPTER 2. OVERVIEWWhat are ModelsModels are more than the sum of their component building blocks. The waythe components are organized and connected together is important too.2.2.1Models as TreesWithin Sage, model components are organized logically in a hierarchical treestructure. For example, the root model-component of a stirling machine contains a number of sub-components representing pistons, heat exchangers, andthe like. These sub-components may themselves contain sub-sub-components.And so forth. The natural way to organize this in terms of child (sub) components branching off of their parent components — as trees in computer-scienceparlance — not unlike the directory structure on your hard drive.The tree-structured point of view is especially convenient for organizing amodel’s disk file or output listing. It does not tell us much, however, aboutthe boundary-interconnections among model components, which are crucial tounderstanding the functioning of the model as a whole.2.2.2Models as Interconnected SystemsAn alternate way to present models is through their boundary interconnections,which are the abstractions by which quantities like fluid flow, force, heat flux,etc., pass from one model component to another. A special form, known as theedit form, presents the model from this point of view. In the edit form, eachmodel component is represented by an icon, with sibling components (belonging to a common parent component) grouped on the same page of the form.Boundary connections among components are indicated graphically by matching numbered arrows attached to the individual model components. In thisway it is possible to understand the physical connections among components.An analogy would be this: A catalog of parts, even if tree-structured, tells uslittle about how an automobile works. We also need to know that the wheelsare connected to the engine through clutch, gearbox and differential, before webegin to understand the whole machine. So it is with Sage. To understand yourmodel you must take some time to delve through its interconnections.2.3Numerical Input and OutputModel components are self-contained entities. As such they manage their owninputs and outputs. Continuing with the automobile analogy: If you want toknow what a wheel is doing, ask the wheel.In Sage, if you want to specify input data for a model component, you do sodirectly within that model component. And if you want to find the output fora model component, you look within that same component. One ramificationof this is that output listings are organized differently than you may be used to.

2.4. SOLVING, MAPPING AND OPTIMIZING7Instead of finding all similar quantities from the whole model listed together, youfind a sequence of component sub-listings following each other in hierarchicalorder. A table of contents at the beginning makes it easy to navigate throughthe listing. Once you get the hang of it you will find it quite easy to home inon a particular component of interest and ignore the rest.2.4Solving, Mapping and OptimizingAn important thing to do with models is solve them. After you modify a model’snumerical inputs, some of its numerical outputs may no longer be valid. Thisis because models are defined in terms of implicit relationships among variableswhich must be iteratively solved. Solving is a menu activated process that bringsnumerical outputs back into sync for the whole model hierarchy simultaneously.You can also map your model, another menu-activated process available afteryou have selected a number of input variables to be automatically stepped overa range of values. The stepping sequence is that which would be produced bya nested loop structure. After each step, the model is automatically solved andselected outputs are stored in a disk file for later inspection. More details onmapping are in chapter 6.Yet another menu-activated process is optimization, which is what you do after you have specified an optimization problem — involving optimized variables,constraints and an objective function. Unlike mapping, which is an exhaustiveinvestigation of a broad area, an optimization is more like a locally-guided walkto the top of a hill. At each step of the way the model is solved and selectedoutputs are stored in a disk file. More details on optimization are in chapter 7You can find out more about what’s going on behind the scenes duringsolving and optimizing in chapter 13.

8CHAPTER 2. OVERVIEW

Chapter 3Exploring a GizmoA good way to orient yourself with Sage is to play around with a simple resonantsystem, or gizmo for short. To get started, click on the icon labeled resonantsystem modeler in the Sage program group. Once the program is loaded youmay either create a new file from scratch or modify any of the *.giz files, whichare distributed with Sage.Presuming you have some windows experience, you will already understanda good bit of the Sage interface. Go ahead and experiment.Your objective should be to put together or modify a resonant system comprising some combination of springs, dampers, reciprocating masses, which arethe basic gizmo model components. Each component comes in phasor and timering (time-grid) versions, corresponding to the type o

Combined User’s Guide and Model Classes This manual combines into a single volume the Sage User’s Guide and Model-Class Reference Guide for the stirling-cycle, pulse-tube and low-T cooler model classes. Combining them under one cover simplifies the printing process and also makes it easier for you to find things in one place. Note that the software you are running may not contain all the .