The Equations Section

<< Click to Display Table of Contents >>

Navigation:  Problem Descriptor Reference > The Sections of a Descriptor >

The Equations Section

Previous pageReturn to chapter overviewNext page

The EQUATIONS section is used to list the partial differential equations that define the dependent variables of the problem.

There must be one equation for each dependent variable listed in the VARIABLES and GLOBAL VARIABLES sections.  

Each equation must be prefixed by variable_name: in order to associate the equation with a variable and with boundary condition declarations. (If there is only a single equation, the prefix may be omitted.)

Equations are entered into a problem descriptor in much the same way as they are written on paper.  In their simplest form they can be written using the DIV (divergence), GRAD (gradient), CURL and DEL2(Laplacian) operators.  FlexPDE will correctly expand these operators in the coordinate system specified in the COORDINATES section.  

When it is necessary to enter partial differential terms, differential operators of the form D<name> or D<name1><name2> may be used.  Here <name> represents a coordinate name, such as X, Y or Z (or other names chosen by the user in the COORDINATES section).  

In the default 2D Cartesian geometry, the operators DX, DY, DXX, DXY, DYX and DYY are defined.  

Similarly, in the default cylindrical geometries (XCYLINDER and YCYLINDER), the operators DR, DZ, DRR, DRZ, DZR and DZZ are defined.  

In 3D Cartesian geometry, the operators DZ, DZZ, DXZ, and DYZ are also defined.

 

Example:

EQUATIONS

u:  div(k*grad(u)) + u*dx(u) = 0

 

 
Complex and Vector Variables

Equations can be written using COMPLEX or VECTOR variables.  In each case, FlexPDE will expand the stated equation into the appropriate number of scalar equations for computing the components of the COMPLEX or VECTOR variable.
 

Example:

VARIABLES

 U = COMPLEX(Ur,Ui)

EQUATIONS

U:        DIV(k*GRAD(U)) + COMPLEX(-Ui,Ur) = 0

 

 

Third Order and Higher Order Derivatives

Equation definitions may contain spatial derivatives of only first or second order.  Problems such as the biharmonic equation which require the use of higher order derivatives must be rewritten using an intermediate variable and equation so that each equation contains only first or second order derivatives.