int nn = 20; // Mesh quality
int[int] labs = [1, 2, 2, 1, 1, 2]; // Label numbering
mesh3 Th = cube(nn, nn, nn, label=labs);
// Remove the ]0.5,1[^3 domain of the cube
Th = trunc(Th, (x < 0.5) | (y < 0.5) | (z < 0.5), label=1);
fespace Vh(Th, P1);
Vh u, v;
macro Grad(u) [dx(u), dy(u), dz(u)] //
// Define the weak form and solve
solve Poisson(u, v, solver=CG)
Grad(u)' * Grad(v)
1 * v
+ on(1, u=0)
A high level multiphysics finite element software
FreeFEM offers a fast interpolation algorithm and a language for the manipulation of data on multiple meshes.
Easy to use PDE solver
FreeFEM is a popular 2D and 3D partial differential equations (PDE) solver used by thousands of researchers across the world.
It allows you to easily implement your own physics modules using the provided FreeFEM language.
FreeFEM offers a large list of finite elements, like the Lagrange, Taylor-Hood, etc., usable in the continuous and discontinuous Galerkin method framework.
- Incompressible Navier-Stokes (using the P1-P2 Taylor Hood element)
- Lamé equations (linear elasticity)
- Neo-Hookean, Mooney-Rivlin (nonlinear elasticity)
- Thermal diffusion
- Thermal convection
- Thermal radiation
- Fluid-structure interaction (FSI)
Strong mesh and parallel capabilities
FreeFEM has it own internal mesher, called BAMG, and is compatible with the best open-source mesh and visualization software like Tetgen, Gmsh, Mmg and ParaView.
Written in C++ to optimize for speed, FreeFEM is interfaced with the popular mumps, PETSc and HPDDM solvers.
HPC in the cloud integration
7 lines of python code and a Qarnot account is all you need to run a FreeFEM simulation in the cloud.
Thanks to a partnership with Qarnot's advanced HPC platform, you won't have to worry about deploying FreeFEM on the cloud, everything is automated.
Learn how to run FreeFEM with Qarnot's sustainable HPC platform on Qarnot's blog.
October 19, 2020 | Cornel Marius Murea
We present a monolithic algorithm for solving fluid-structure interaction. The Updated Lagrangian framework is used for the incompressible neo-hookean structure and Arbitrary Lagrangian Eulerian coordinate is employed for the Navier-Stokes equations. The algorithm uses a global mesh for the fluid-structure domain which is compatible with the fluid-structure interface. At each time step, a non-linear system is solved in a domain corresponding to the precedent time step. It is a semi-implicit algorithm in the sense that the velocity, the pressure are computed implicitly, but the domain is updated explicitly. Using one velocity field defined over the fluid-structure mesh, and globally continuous finite elements, the continuity of the velocity at the interface is automatically verified. The equation of the continuity of the stress at the interface does not appear in this formulation due to action and reaction principle. The stability in time is proved. A second algorithm is introduced where at each time step, only a linear system is solved in order to find the velocity and the pressure. Numerical experiments are presented.
October 15, 2020 | M.A. Badri, G. Rastiello, E. Foerster
Phase-field models are frequently adopted to simulate fracture mechanics problems in the context of the finite element method. To depict fracture, this method involves solving a coupled set of Helmholtz-like damage-field equation and augmented linear momentum balance equation. Solutions to these coupled equations are then used as descriptions of crack propagation phenomena within solids. However, this method imposes a constrain of using extremely fine meshing for properly predicting cracks. For practical problems of interest, this very often leads to linear systems with large sizes that have to be repetitively assembled and solved. As such, iterative solution procedures such as the Krylov subspace-based methods for solving these large linear systems within the framework of serial/parallel computing environments become mandatory to obtain results in a feasible time. In this work, the vectorial finite discretization for a hybrid phase-field formulation – a monolithic solving scheme – is presented. The underlying nonlinearity present in the coupled set of equations of the hybrid phase-field model is dealt through Picard iteration that helps to preserve the symmetry of the linearized system to solve. Due to the symmetric positive definite nature of the finite element linear systems obtained for this problem, the conjugate gradient method makes a standard choice of iterative solution algorithm. In this article, to improve convergence rates, consequently time to solution, of the conjugate gradient method applied to crack propagation problems, different preconditioning strategies are analyzed, tuned, and discussed. Brittle fracture benchmarks are used to measure the performance of preconditioners which are then applied to massively parallel simulations with millions of unknowns. A series of numerical experiments show that the algebraic multigrid preconditioner is well suited for solving the phase-field model for fracture, being superior to the Jacobi and the block Jacobi preconditioning in all regards: ease of solving the problem, iterations to converge, time to solution, and parallel scaling on more than a thousand processes.
October 12, 2020 | D. Martínez-Muñoz, A. Ortiz-Mora, A. Dengra, A. Sarsa-Rubio, A. Díaz-Soriano
This paper proposes a Sierpinski fractal pattern implementation as a tool to fine-tune the properties of Microstructured Optical Fibers (MOFs). It has been applied to a hexagonal-MOF photonic crystal fiber (PCF) with solid core to decrease its chromatic dispersion, nonlinear and loss properties in order to show the flexibility that these fiber designing techniques can offer when applied to existing designs. An additional study is also included to model possible fluctuations in properties design that can occur by geometrical perturbations occasioned during the manufacturing process.