1 
ahallam 
2411 

2 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
3 


% 
4 


% Copyright (c) 20032009 by University of Queensland 
5 


% Earth Systems Science Computational Center (ESSCC) 
6 


% http://www.uq.edu.au/esscc 
7 


% 
8 


% Primary Business: Queensland, Australia 
9 


% Licensed under the Open Software License version 3.0 
10 


% http://www.opensource.org/licenses/osl3.0.php 
11 


% 
12 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
13 



14 
gross 
2605 
\chapter{Introduction} 
15 


\label{CHAP INTRO} 
16 


\section{Why \esc?} 
17 
ahallam 
2775 
\esc is a scripting environment for mathematical modeling of partial differential equations (PDEs), that provides a highlevel of abstraction from the underlying numerical schemes and their implementation. By absolving the user from numerical requirements like data constructs, meshing and parallelization, the user can concentrate on the modeling aspects of their problem while still properly utilising the powerful mathematical capabilities of PDEs. 
18 
ahallam 
2411 

19 
ahallam 
2775 
\esc is built upon the interpretive programming language \pyt\footnote{see \url{www.python.org}}; a basic scripting language with many intrinsic functions and capabilities. Additionally, there are also a large number of software packages for \pyt which can be used in conjunction with \esc. These include functions and data constructs for linear algebra, statistics, visualisation, image processing and data plotting among others. Furthermore, most \esc scripts are scalable as they are able to run on single core desktop computers right through to multicore supercomputers\footnote{\esc supports distributed memory architectures with multicore processors through MPI and threading.} with no modifications to the scripts. 
20 
ahallam 
2411 

21 
ahallam 
2775 
There are many benefits to using a software platform like \esc for mathematical modeling projects. Developing upon an existing environment such as \esc is in many cases much simpler and more cost effective than building an original implementation from the ground up. Any modeling environment needs a data structure and solution algorithm which takes time to develop properly, \esc has already covered these problems and their implementation has been widely tested for bugs. While developed environments may not provide the user with the fastest algorithms for their problem, it is generally the case, that the overall time needed to implement and test an optimal algorithm will exceed the time needed to learn, implement and solve the problem with predeveloped and tested software. This is particularly true if a simulation does not need to be executed repetitively, or has relatively short lifetime. A model for a publication or thesis would be one such instance. 
22 
gross 
2605 

23 
ahallam 
2775 
When it comes to solving partial differential equations \esc is ideal, as it is especially designed for this task. Other implementations are merely an addon to a linear algebra focused system (\textit{i.e.} MATLAB). The \esc approach gives the user a cleaner environment to work with and provides better efficiency when dealing with PDE coefficients. Data structures in \esc allow the user to abstract them self from problems like the data type of these coefficients. For example; if a model has been tested with a constant PDE coefficient the unchanged script can be run with a variable coefficient set from a data base or as a function dependent variable. This capability of \esc is possible because \esc uses the language of PDEs (as opposed to linear algebra) to describe a model. As it turns out, the \esc approach can efficiently be applied in very large software projects as it leads to a clearer structure for the code by separating modeling issues from lowlevel numerical and computational performance issues. At the same time, this arrangement also allows for the implementation of complex model coupling on a higherlevel. 
24 
ahallam 
2634 

25 
ahallam 
2775 
The usage of \pyt as a development platform for \esc makes the development of models simple from a user prospective, as \pyt is intuitive and easy to learn. This simplicity does not hamper experienced users either as \pyt also provides direct access to a very large number of tools which makes it an attractive environment to work in. Best of all, \esc is released under an open software license and is available freely for download. 
26 



27 
ahallam 
2634 
\section{How to use this Cookbook} 
28 
ahallam 
2775 
This manual is written with the intention of giving new users a practical introduction to \esc. This is achieved by demonstrating how to solve a variety of simple to advanced problems. There exist many modules, dependencies and subtleties that are properly explained throughout this cookbook. It is recommended that new users work through the \textit{Introduction} (\refCh{CHAP INTRO}) and the \textit{first two sets of examples} (Chapters \ref{CHAP HEAT DIFF} and \ref{CHAP HEAT 2}) which present the necessary basic knowledge, and explain some of the more common aspects and modules of \esc. The examples are simple, but they give reference to the implementation of PDEs, data structures, how to create models and visualising the solution. 
29 
ahallam 
2634 

30 
ahallam 
2681 
Future chapters will cover more advanced topics with more complex models and methods. 
31 
ahallam 
2634 

32 
ahallam 
2775 
The examples covered in this cookbook have all been scripted and are ready to run. They are available from the \exf folder in the \esc directory. The scripts provide a basis for users to develop their own models while at the same time demonstrating the steps required to completely solve and visualise the PDE problems. 
33 
ahallam 
2634 

34 
ahallam 
2775 
All of the examples in this cookbook have been developed on a linux based operating system. Unfortunately Windows and Mac support cannot be guaranteed. However, in most cases minor modifications to the scripts will generally solve any problems. 
35 
ahallam 
2645 

36 
gross 
2605 
\input{quickstart} 
37 
ahallam 
2634 
\input{escpybas} 