next up previous contents index
Next: Global operators Up: Functions Previous: Value of a function

Special functions:dx(), dy(), convect()

     

dx(f) is the partial derivative of f with respect to x ; the result is piecewise constant when precise is set and interpolated with mass lumping as a the piecewise linear function when precise is not set.

Note that dx() is a non local operator so statements like f=dx(f) would give the wrong answer because the new value for f is place before the end of the use of the old one.

The Finite Element Method does not handle convection terms properly when they dominate the viscous terms: upwinding is necessary; convect   provides a tool for Lagrangian upwinding. By g=convect(f,u,v,dt) Gfem construct an approximation of


displaymath1874

Recall that when


displaymath1882

Thus to solve


displaymath1884

in a much more stable way that if the operator dx(.) and dy(.) were use, the following scheme can be used:

iter(n) begin
   id(f)/dt - laplace(f)*mu =g + convect(oldf,u,v,dt)/dt; 
   oldf = f
end;

Remark: Note that convect   is a nonlocal operator. The statement f = convect(f,u,v,dt) would give an incorrect result because it modifies f at some vertex where the old value is still needed later. It is necessary to do

g=convect(f,u,v,dt); 
f=g;



Christophe Prudhomme
Wed Feb 26 15:56:09 MET 1997