Hello.
I would like to learn more about the convect function.
Am I right to say this uses an explicit Euler method, together with a FEM interpolation?
Where can I find, on the code, how it was implemented?
Thank you!
Hello.
I would like to learn more about the convect function.
Am I right to say this uses an explicit Euler method, together with a FEM interpolation?
Where can I find, on the code, how it was implemented?
Thank you!
The 2d command wn=convect([ux,uy],dt,w0) where w0 is a finite element function (thus a scalar function of position), dt is a real number (positive or negative), [ux,uy] a vector finite element function (thus a vector function of position, let us denote it by \mathbf{u}(x)), and wn (the result) is a finite element function (thus a scalar function of position).
Computes the solution (for each fixed position x) to
\frac{dX}{dt}(t)=\mathbf{u}(X(t)) with initial condition X(t=0)=x.
The solution to the ODE is exact up to a certain point (?).
It sets wn=w0(X(t=dt)).
The dependency in x is through the initial condition on X. The result is interpolated so that wn belongs to the finite element space it has been declared.
A main property is that for dt small, wn(x)\simeq w0(x)+dt\,\mathbf{u}(x)\cdot\nabla w0(x)
Hi François,
Sorry to unearth this discussion again, but how is it possible the solution to X’(t)=u(X(t)) be “exact up to a certain point”? What do you mean by that? In my understanding, only an approximation can be done here, something like X(dt) ~ X(0) + dt.u(X(0)) (explicit Euler). Is this the case?
Lucas
Tue solution is exact is the field [U1,U2] is constant by triangle so the approximate characteristics
scheme is:
compute the characteristics in on triangle by setting U when we enter in the triangle then find the characteristic exit edge with constant velocity , change of triangle and restart.
The only difficulty is when the characteristics arrive on a vertex.