Student projects/Completed

From ASCEND
Jump to: navigation, search

Completed projects

These are the summaries of the projects that were undertaken during our participation in GSOC.

For current student project ideas, see student projects.

Chemical engineering domain-specific models

Quite a few domain-specific models exist in ASCEND. If you are a later-year chemical engineering student, we would like you to help us extend our current set of models and test them with some samples of well-known process flowsheets. We want to validate our models for some such cases, then make them flexible and reusable as far as possible. A key part of this will be the dependency on our current models/thermodynamics.a4l code, and possibly the need for new flash algorithms, whether externally codes (as external libraries) or not. There is the scope to compare/contrast with other open-source packages such as DWSIM, noting that ASCEND is fundamentally different due to its equation-based approach.

Windows installer

ASCEND on Windows is a bit difficult to support, because of our dependencies on Python, PyGTK, GTK, NumPy, PyCairo, PyGOBject, IPython, BLAS, LAPACK, and the various solvers that we bundle. Our current installer, trying to be small, only includes the 'core' ASCEND stuff, and then attempts to download any missing dependencies. It also expects the dependencies to be installed in 'shared' locations, with the intention that integration of ASCEND with other tools on the user's system should be possible. However, this makes maintaining ASCEND a bit difficult. Possibly we could write a new installer that bundles all the required dependencies into a single folder, as is down with the Griffith installer. The resulting package would be larger, but more robust and maintainable. Some options would need to be discussed before embarking on this project, but the goal in any case is (1) to make it easier for new users to get started with ASCEND (2) to make the Windows installer easier to maintain (3) to still provide support to Windows 'power users' if at all possible.

  • Contact: John Pye
  • Languages: Python (including DistUtils?), NSIS?
  • Difficulty: Medium
  • Priority: Medium

Ideal mixture support for FPROPS

This project needs someone with fairly well-advanced knowledge of engineering thermodynamics, probably a third or fourth-year chemical or mechanical engineering student, or a chemistry student, and also a fairly good C programmer if possible (strong Java or C++ is probably a good enough start). We want to extend FPROPS to include support for calculations of the properties of mixtures of more than one chemical species. We will start of with ideal calculations, but we would like to try to define the architecture in a way that will be flexible for non-ideal mixtures down the track. You should review the relevant theory on this, discuss with the proposed mentors, and come up with an implementation plan before the application deadline.

GUI update to GTK3 (completed)

We would like to update ASCEND to use the GTK3 graphics toolkit. Currently it is using GTK2, but eventually this toolkit will become deprecated, and eventually unsupported! Terrible! So we should find out what changes are needed in the ASCEND code to ensure we can support GTK3. Probably this will require some of our Python code to be rewritten. It is an opportunity to clean up the code and implement some better design patterns in our GUI code, a lot of which was written by a fairly inexperienced GUI programmer (speaking for myself there).

  • Contact: John Pye
  • Languages: Python
  • Difficulty: Low/Medium
  • Priority: Medium

Real-time ASCEND (more work is possible)

The core engine of ASCEND is a low-level C code compiler and set of solvers. It is conceivable that ASCEND could be incorporated into a real-time control and/or parameter estimate engine, using live data feeds for its modelling calculations. This is an open-ended project, with the hope that basic use of ASCEND for this application could be demonstrated. With such a capability it would be possible to contemplate using ASCEND to control systems that change over time, by allowing the values of system parameters to be adjusted in response to changing system behaviour.

  • Contact person: John Pye
  • Level of difficulty: medium
  • Lanaguages: C

Non-proprietary Optimisation (completed)

ASCEND is a free/open source software package licensed under the GPL. We have a number of Solvers in our software, including a wrapper for the excellent optimisation solver CONOPT. Unfortunately, however, this solver is expensive commercial software and can not be distributed freely as part of ASCEND. The lack of a good (free) optimisation solver limits the utility of ASCEND for many users.

This project would involve linking the IPOPT solver (or possibly some other suitable alternative, if any exists) to ASCEND, allowing us to run complex optimisation problems in ASCEND. Some work would be required to give ASCEND the ability to evaluate Hessian matrices (second derivatives of object functions), then tying it all together so that ASCEND can pass values and parameters etc through to the IPOPT solver.

Further work on this project could include development of a benchmarking suite using various standard sets of optimisation problems such as CUTEr.

Note that there is a fairly new repository of open-source optimisation code now available from https://software.sandia.gov/trac/acro/wiki/Overview.

  • Contact person: Ben Allan
  • Level of difficulty: medium-high.
  • Language(s): C

Adding Exact Numerical Differentiation for Second Partial Derivatives (completed)

(combined with 'Non-proprietary Optimisation')

When solving nonlinear equations, the ASCEND solver creates exact numerical derivatives to create needed jacobian matrices. This task would be to extend these capabilities to generate exact numerical second derivatives, which could then support optimization solvers. The approach one can use is <a href="/images/c/c3/PhDthesisChungExactNumDiffChapt6.pdf" class="internal" title="PhDthesisChungExactNumDiffChapt6.pdf"> in Chapter 6 (596 kB pdf)</a> of Yonsoo Chung, Solving Index and Near Index Problems in Dynamic Simulation, PhD Thesis, Dept. of Chemical Engineering, Carnegie Mellon University (1991).

Please consider submitting a response to the Differentiation Exercise if applying for this topic under GSOC.

  • Contact person: John Pye and Art Westerberg
  • Level of difficulty: medium
  • Languages: C

Renewable energy system modelling (more work is possible)

ASCEND has all the built-in capabilities needed to solve systems of equations, and historically has been used to solve some difficult modelling problems in chemical and process engineering. We would like to improve its usefulness in the field of renewable energy systems modelling, through the development of some reusable modelling 'blocks' for common system components. These would include flat-plate solar hot water collectors, sun position, weather data, photovoltaic panels, pumps, turbines, storage tanks, and so on. The goal would be to allow typical engineers to quickly produce accurate models of renewable energy systems for various locations, hopefully including prediction of their economic performance.

Much information on modelling these types of systems is available in books like Duffie and Beckman (ISBN 0471698679), Flynne (ISBN 0852964196) and elsewhere. This project would involve pulling together a coherent set of models for this task, and testing them carefully and making sure they are reusable and well-documented so that they can be of maximum use to the community.

  • Contact person: John Pye
  • Level of difficulty: low-medium
  • Languages: ASCEND, possibly some C for 'hard to converge' models if necessary.

Improved ODE/DAE support (completed)

ASCEND currently has a system for allowing users to model dynamic systems. You can specify variables that are the derivatives of other variables, and then use a special Integrator to solve for time-varying behaviour of your model. We support a number of Integrators, including IDA, LSODE and DOPRI5.

Unfortunately, however, the ASCEND syntax for dynamic models is very clumsy, and this makes it hard to write compact, readable models for such systems.

This project would involve implementing proposed LINK semantics for ASCEND (in itself a value enhancement to the ASCEND language), then, upon that, building a new ODE/DAE syntax so that dynamic models could be succinctly expressed with the ASCEND modelling language. This would require you to become familiar with the Flex and Bison tools, which are used to implement the ASCEND language parser, so that you could then extend out language grammar with the necessary additional language constructs.

Further work on this project could include enhancing the reporting from External Integrators including perhaps a live graphical plot of progress or improvements to the Data reader to allow arbitrary input data to be fed into a simulation.

  • Contact person: Ben Allan
  • Level of difficulty: high
  • Languages: C, Flex/Bison

Canvas-based modeller for ASCEND (more work is possible)

Power stations are large and systems of many interacting components, including turbines, boilers, pumps and controllers. Their complexity arises as optimisations are applied, to extract the maximum possible energy from the available resource. The preferred way of modelling these systems is through the use of (very expensive) canvas-based GUI software in which 'blocks' are shown connected by lines, and parameters can be adjusted by editing the data behind the various blocks in the model. Some work has already taken place within the ASCEND project to implement a GUI, using Gaphas, allowing these kinds of energy systems to be modelling using a GUI, but further work is required. It is anticipated that great progress could be made on this if someone were able to dedicate a few months to the job, and the result would be an open energy modelling system that would be much more user-friendly for those people who don't like writing text-based models.

  • Contact person: John Pye
  • Level of difficulty: low-medium
  • Languages: Python (GTK, Cairo)

Automatic recursive initialisation (completed by the ASCEND developers)

Extend ASCEND's METHODS code so that certain methods are run recursively one instantiated MODELs. This would allow simpler code for setting initial values of solver variables, and make constructing robust models easier, especially in the context of canvas-based modelling tools. Making this stuff work is probably an prerequisite for an efficient canvas-based modeller for ASCEND, because it allows 'blocks' to be initialised without the user having to explicitly request it.

  • Contact person: John Pye
  • Level of difficulty: Medium
  • Languages: C
  • Priority: Medium

Embedded solver settings (completed by the ASCEND developers)

Difficult-to-solve models often require a bit of tweaking of the solver parameters, tolerances, etc, before a model will solve as intended. Currently, this must be done either manually via the GUI(s), or else through a script that exists separately from the model. We would like a way to embed solver parameter settings directly within the model. One approach that partly does the job (although not very nicely) is solver NOTES. We have also discussed the idea of a couple of new 'solver request' keywords, such as SET and SOLVER (see Controlling the solvers from within METHODS). This project would involve leading a design discussion to work out the best possible solution to this problem, and then implementing the agreed solution, as well as thorough testing.

  • Contact person: John Pye
  • Level of difficulty: medium
  • Languages: C, Python, Tcl/Tk (if both GUIs are to be supported)
  • Priority: Medium/High

Prototype compiler

Building a whole new compiler implementation and hooking it to the existing C system is very difficult (very high quality code and testing required), and is generally unsuitable for a 3 month project. A solid contribution possible in 3 months, however, is to create the basis for a new parser infrastructure and ascend4 language migration tool. The particulars are open to negotiation, but may include development of parsers and walkers from scratch in ANTLR or the extension of an existing language (e.g. Chapel?) to support equation based programming. See also chapel.cray.com and elsewhere in this site for Ben's scribblings on new compiler design.

  • Contact person: Ben Allan
  • Level of difficulty: Low-Medium
  • Priority: Medium
  • Must know: ANTLR or other compiler development tools
  • Languages: ASCEND, probably java, optionally C, Fortran

Integration of conditional models

Dynamic models with switching behaviour are a common need in much engineering work. Examples from mechanical engineering include non-return valves, on/off valves, laminar/turbulent transitions, user demand for hot water, sunlight dropping while clouds pass, etc. The IDA solver provides support for detection of boundaries during the solution of the DAE system. These boundaries can be used to stop the solver, and to implement switching conditions, for example to switch from laminar flow to turbulent flow once the speed gets to a certain threshold. This problem requires digging deeply into the conditional modelling data structures in ASCEND and re-wiring them for use with dynamic simulations.

Leon Kwek completed large parts of this project as work towards a final-year engineering honours project at ANU. Further work is currently (Feb 2012) being done by Ksenija Bestuzheva.

Further improvements to the Canvas GUI

This project aims to take the current canvas-based modeller for ASCEND and add support for configurable streams such as chemical mixtures, so that we approach the ability to do full chemical flowsheet modelling with this prototype tool. Grivan Thapar worked on this project for GSOC2011. There is still more to be done.

RADAU5

ASCEND currently has a good supply of multi-step solvers for ODE/DAE systems, namely LSODE and IDA, but for single-step solvers, only DOPRI5 (explicit solver for non-stiff problems) is present. This project involves the addition of the RADAU5, an implicit solvers for stiff problems. RADAU5 is a mature solver, and connecting it is not expected to be overly difficult, but it will be a useful addition for a certain class of dynamic problems, and also useful for benchmarking.

  • Contact person: John Pye, Kannan Moudgalya
  • Level of difficulty: medium

Shrikanth Ranganadham (ChE Masters project) and C S Karthik (GSOC2011) from IIT-Bombay worked on this project. Partial support for RADAU5's support for integration of DAEs (of a specific kind) was added, but full testing of the resulting solver was not yet completed.

FPROPS

FPROPS is a module of code developed by John Pye to support thermodynamic property evaluations using Helmholtz correlation equations. These correlations are good, but there are many published correlations for thermodynamic data that comes in other forms, from Peng-Robinson to Benedict-Webb-Rubin and many others. This project would involve refactoring the FPROPS code so that there was support for multiple types of property correlations. We would start by adding support for ideal gases, and keep going from there. To complete this project, you will need to have a fairly solid background in thermodynamics to be able to deal with the mathematics that's involved, then you'll also need to get up to speed with C data structures.

  • Contact person: John Pye
  • Level of difficulty: medium/high
  • Must know: partial derivatives, thermodynamics
  • Languages: C
  • Priority: High

Richard Towers via GSOC2011. As of Feb 2011, a branch fprops-ideal: contains code that is working towards generalising the FPROPS data structures to support a number of different correlation types. Richard has got some interesting code for dealing with parameter input/output via XML/XSL forms. The branch code needs to be completed and integrated into trunk, and additional correlation types and fluids added. The ability to import fluid property databases from other sources would be a good addition.

QRCUDA

This project involves writing a parallelised version of QRSlv that works with CUDA GPGPUs.

  • Contact person: John Pye
  • Level of difficulty: high

Arash Sadrieh from Murdoch University, Western Australia, completed this project as part of his PhD but also current supported by GSOC2011. A paper was presented at ESCAPE conference, see our publications page. Further testing is needed by someone with a suitable GPU.

ABsolver integration

ABsolver is an interesting new kind of solver that uses a SAT solver to drive the solution to a conditional modelling problem. We would like to work together with the authors of ABsolver to connect that solver to our modelling environment, and then test it on a range of engineering problems. It's not sure yet if some tricks will be required to make the SAT problem formulation compatible with ASCEND's modelling language, so there's a bit of architecture/design required as part of this problem.

  • Contact person: John Pye, Andreas Bauer (one of the ABsolver developers)
  • Level of difficulty: not sure yet
  • Languages: C, C++
  • Priority: Low/Medium

Franc Ivankovic completed an ANU summer scholarship working on this topic, but continues working on it as a final-year engineering project (Feb 2012).

Renewable energy system modelling

A student with strong engineering thermodynamics skills is needed to work on expanding support for energy systems modelling in ASCEND (see here and here). We would like as a minimum to be able to perform annual simulations of domestic solar hot water systems of a variety of types. If time permits, we would like to move on to dynamic simulations of large-scale solar thermal power stations, including trough, dish, and tower systems. Initially, models based on correlations and equations from published journal papers are the goal. Good textbooks containing the necessary background theory would be Çengel Thermodynamics (Rankine cycles, etc) and Duffie & Beckman Solar Engineering of Thermal Processes (solar collectors, solar radiation, etc).

  • Contact person: John Pye
  • Level of difficulty: Medium
  • Priority: Medium
  • Must know: Thermodynamics, Heat transfer
  • Languages: C, ASCEND

Vikram Kadam (GSOC2011) did some limited work towards these goals, but unforunately was unable to complete the full GSOC programme. More work remains to be done.

GUI improvements & bug fixing

Aakash Goenka (GSOC2011) completed a project to add 'study' functionality to the PyGTK GUI, import the Observer functionality, added 'check for updates', improved handling of units of measurement, and fixed 6 other bugs. This was a great example of someone jumping in, learning our codebase quite broadly, and making a range of really useful small contributions that help to improve the overall use experience of ASCEND.

See also: student projects, GSOC.