TWSIAM Activity Group : FreeFem++

Contact : Yao-Yu Yang
Yannick Deleuze

Finite Elements for Fluids

Instructor : Prof. Sheu









Finite Element Method with FreeFem++

FreeFem++
FreeFem++-cs
Documentation


Course PDF


March 10, 2016
March 31, 2016
April 7, 2016
May 5, 2016

Triangular finite elements

March 10, 2016




Responsive image
P0-basis function
Responsive image
P1-basis function
Responsive image
P2-basis function
Responsive image
Projection of \( f(x,y) = sin(\pi \, x) cos(\pi \, y) \) on \( \mathrm{Vh(Th,P0)} \)
Responsive image
Projection of \( f(x,y) = sin(\pi \, x) cos(\pi \, y) \) on \( \mathrm{Vh(Th,P1)} \)
Responsive image
Projection of \( f(x,y) = sin(\pi \, x) cos(\pi \, y) \) on \( \mathrm{Vh(Th,P2)} \)



Using the files triangles.dat and dof.dat produced by the FreeFem++ script basis.edp, we use GNUplot to exhibit the deegree of freedoms with this command
splot 'triangles.dat' w l notitle, 'dof.dat' t 'Deegrees of freedom' pt 6 lw 3
Responsive image
P0


Responsive image
P1


Responsive image
P1b


Responsive image
P2


Responsive image
P3


Responsive image
P4





Finite Element Mehod in FreeFem++

March 31, 2016


Order of convergence between the computed finite element solution \( u_h \) and the exact solution \( u \).
Responsive image
P2 finite elements - order 2


Responsive image
P3 finite elements - order 3




Solution \( u_h \) of the elliptic problem with Robin oundary conditions in \( \Omega=[0,1]×[0,1] \) :

\(- \nabla^2 u +c\,u= f \text{ in } \Omega \)
\( \frac{\partial u}{\partial n} +\varepsilon u = 0 \text{ on } \partial\Omega \)

Responsive image
\( f = 1 \), \(c = y \), and \( \varepsilon = 0.1 x \)


Responsive image
\( f=\cos(x)\sin(y) \), \( c=\min(x,y) \), and \( \varepsilon =0.1 \)



Convection-diffusion / Stokes equations

April 7, 2016



Convection dominant solution of the convection-diffusion equation in the unit square.

Responsive image
Solution along \( x = 0.5 \)


Responsive image
Solution along \( y = 0.5 \)




Solution of the Stokes equations in a vessel with a stenose

Responsive image
\( [u,v] \)


Responsive image
\( p \)


Responsive image
\( V = \sqrt{u^2+v^2} \)





Characteristics-Galerkin method / Navier-Stokes equations

May 5, 2016