next up previous contents index
Next: Boundary conditions at corners Up: Solving an equation Previous: Solve()   Contents   Index

2-Systems

Before going to systems make sure that your 2 pde's are indeed coupled and that no simple iteration loop will solve it, because 2-systems are significantly more computer intensive than scalar equations.

Systems with 2 unknowns can be solved by

 
solve(u,v) 
begin 
 onbdy(..) ...dnu(u)...=.../* defines a bdy condition for u */
 onbdy(..) u =...          /* defines a bdy conditions for v */
 pde(u)  ...               /* defines PDE for u */
 onbdy(..)<v=... or ...dnu(v)...> /* defines bdy conditions for v */
 pde(v)  ...               /* defines PDE for u */
end;

The syntax for solve is the same as for scalar PDEs; so solve(u,v,1) is ok for instance. The equations above can be in any orders; several onbdy() can be used in case of multiple boundaries...

The syntax for onbdy is the same as in the scalar case; either Dirichlet or mixed-Neumann, but the later can have more than one id() and only one dnu() .

Dirichlet is treated as if it was mixed Neumann with a small coefficient. For instance u=2 is replaced by dnu(u)+1.e10*u=2.e10 , with quadrature at the vertices.

Conditions coupling u,v are allowed for mixed Neumann only, such as id(u)+id(v)+dnu(v)=1. (As said later this is an equation for v ).

In solve(u,v,i) begin .. end; when i>0 the linear system is built factorized and solved. When i<0 , it is only solved; this is useful when only the right hand side in the boundary conditions or in the equations have change. When i<0, i refers to a linear system i>0 of SAME TYPE, so that scalar systems and 2-systems have their own count.

Remark: saveall('filename',u,v) works also.

The syntax for pde() is the same as for the scalar case. Deciding which equation is an equation for u or v is important in the resolution of the linear system (which is done by Gauss block factorization) because some block may not be definite matrices if the equations are not well chosen.


next up previous contents index
Next: Boundary conditions at corners Up: Solving an equation Previous: Solve()   Contents   Index
Build Daemon 2001-10-22