# Worked examples

This is a list of worked example models that were written in the spirit of experimentation while working on the functionality of ASCEND.

See also Category:Tutorials and Category:Examples.

## Contents

## Steam power station

ASCEND can model complete Rankine power cycles including regeneration and reheat. The same models work for a variety of fluids via FPROPS. See models/johnpye/fprops/rankine_fprops.a4c.

Note that the diagram below was created with Dia; we are working on a canvas-based modeller for ASCEND but it's still in early stages of development.

## Four bar linkage

This example shows a (static) system with simple geometric constraints. It is solved for a range of angles for one member, and the position of the other members is determined. Then a nice plot is built up by repeated running the ASCEND model and accumulating the results using ExtPy.

## Thermal equilibrium

models/johnpye/thermalequilibrium2.a4c

This is a simple model of thermal equilibrium between two masses of steam with a simple constant heat transfer coefficient between them. The model uses external freesteam IAPWS-IF97 steam tables and the IDA integrator.

## Simple advection equation

This model is a study of the simple advection equation, following a discussion published by Carver and Hinds in *Simulation* (1978). Just as with the explicit integration method discussed in that paper, we also see instability when using the IDA implicit BDF integrator here. The output in each case was generated by copying the contents of the Integrator tab and pasting into OpenOffice and plotting there.

## More examples

For some more detailed examples, see the page, which includes:

- Vapor-liquid equilibrium
- Calculation of sun position
- Damped response
- Conditional modelling (examples of models with IF/ELSE-style behaviour in their equations)
- Optimisation of frame geometry
- Chemical thermodynamics, mass/energy balance and more, from Krishnan Chittur.
- Combined-cycle gas turbine