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

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

$\displaystyle f(x-u1(x,y)dt , y-u2(x,y)dt)$

Recall that when

$\displaystyle \frac{\partial f}{\partial t} + u\frac{\partial f}{\partial x} + ...
...\partial y}
= lim_{dt \to 0}\frac{f(x,y,t) - f(x-u(x,y)dt,y-v(x,y)dt,t-dt)}{dt}$

Thus to solve

$\displaystyle \frac{\partial f}{\partial t} + u\frac{\partial f}{\partial x}
+ v\frac{\partial f}{\partial y} -div(\mu grad f) = g,
$

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;


next up previous contents index
Next: Global operators Up: Functions Previous: Value of a function   Contents   Index
Debian/ARM Build Daemon #4 2001-12-12