What Does A Script Look Like?
Previous  Top  Next

A problem description script is a readable text file. The contents of the file consist of a number of sections, each identified by a header. The fundamental sections are:

·TITLE  
– a descriptive label for the output.
·SELECT  
– user controls over the default behavior of FlexPDE.
·VARIABLES  
– here the dependent variables are named.
·DEFINITIONS  
– useful parameters, relationships or functions are defined.
·EQUATIONS  
– each variable is associated with a partial differential equation.
·BOUNDARIES  
– the geometry is described by walking the perimeter of the domain, stringing together line or arc segments to bound the figure.

·MONITORS and PLOTS  
– desired graphical output is listed, including any combination of CONTOUR, SURFACE, ELEVATION or VECTOR plots.
·END  
– completes the script.

 
[Note: There are several other optional sections for describing special aspects of the problem. Some of these will be introduced later in this document. Detailed rules for all sections are presented in the FlexPDE Problem Descriptor Reference chapter "Sections".]  

Comments can be placed anywhere in a script.
·{ Anything inside curly brackets is a comment. }  
·! from an exclamation to the end of the line is a comment.  


A simple diffusion equation on a square might look like this:

TITLE 'Simple diffusion equation'  
{ this problem lacks sources and boundary conditions }  
VARIABLES     
u  
DEFINITIONS  
k=3   { conductivity }  
EQUATIONS  
   div(k*grad(u)) =0  
BOUNDARIES  
REGION 1  
START(0,0)  
LINE TO (1,0)  
TO (1,1)  
TO (0,1)  
TO CLOSE  
PLOTS  
CONTOUR(u)  
VECTOR(k*grad(u))  
END  

Later on, we will show detailed examples of the development of a problem script.