Sequencing of Equations

<< Click to Display Table of Contents >>

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

Sequencing of Equations

Previous pageReturn to chapter overviewNext page

FlexPDE has the ability to sequence sets of equations.

The sets are defined using the THEN and FINALLY sections following the EQUATIONS section.

EQUATIONS
   <set A>
THEN
   <set B>
{ THEN
   <set C> ... }
{ FINALLY
   <set D> }

Any number of THEN equation sets may be designated and these sets along with the main EQUATIONS section will be run sequentially and repetitively (including regrids) until the solution meets the normal error criteria. Once the EQUATIONS and THEN sets are finished, the last set defined in the FINALLY section will be solved.

Each set of equations is solved for the variables defined by the equations of that set, with the other variables held constant at their current values.  Solutions of the EQUATIONS set will be held constant during the solution of the first THEN set, etc.

Each VARIABLE may be defined only once in the complete list of equations.

In time-dependent problems, the full set of equations is solved once during each timestep.  The FINALLY clause is ignored in time-dependent problems.

Note: This facility finds its greatest utility in steady-state problems and time-dependent problems with one-way coupling.  In time-dependent problems with two-way coupling, use of sequenced equations may falsify propagation speeds, or lead to instability.

 

Example:

EQUATIONS
 u:  div(grad(u)) + s = 0
THEN
 v:  div(grad(v)) + u = 0

Examples:

Samples | Usage | Sequenced_Equations | Theneq.pde
Samples | Usage | Sequenced_Equations | Theneq+time.pde