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 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.
November 14, 2019 | Jarosław Maciej Kopiński, Jacek Tafel
We show that in the conformally flat case the Penrose inequality is satisfied for the Schwarzschild initial data with a small addition of the axially symmetric traceless exterior curvature. In this class the inequality is saturated only for data related to special sections of the Schwarzschild spacetime.
November 07, 2019 | Roberto Silvestro, Fabio Subba
The issue of power exhaust in fusion reactors is currently considered as one of the potential show-stoppers on the pathway towards the realization of fusion energy. As the power of fusion devices increases (from current experiments to the foreseen demonstrator reactor DEMO), also the specific load on the divertor -the component which is responsible for exhausting the power- increases. Under such conditions, the currently envisaged baseline divertor design -based on actively cooled tungsten monoblocks- would have a lifetime of less than two operation years, forcing the fusion power plant to be shut down for maintenance for a relatively long time. For nuclear fusion electricity to be competitive, this would be unacceptable. One of the alternatives to this baseline strategy is to employ a liquid metal (LM) divertor. The working principle consists in keeping in place a thin film of liquid metal in the region where the plasma ions and electrons imping, i.e. the divertor targets. Exposing a liquid surface to the plasma would avoid issues associated with melting. Moreover, concerns about thermomechanical stresses could be relaxed. The issues of power handling and of neutron compatibility could be decoupled (the plasma-facing surface would be the molten metal, whereas the substrate on which the LM film is placed could be designed optimizing the compatibility with the high neutron fluences foreseen in the reactor). Moreover, both the LM evaporation and the interactions of the evaporated metal with the near-divertor plasma could reduce the heat to be exhausted by the component. Among the difficulties associated with the implementation of an LM divertor, we can cite issues associated with the LM surface and with the plasma response to the presence of the divertor. From the point of view of the surface, confining an LM film in an environment with extremely large magnetic fields is a challenge. It is also necessary to constantly replenish the surface to compensate for the material erosion associated with evaporation and sputtering by plasma ions. To face these challenges, it has been proposed to employ a Capillary-Porous Structure (CPS) to hold the LM in place, avoiding droplet emission and providing passive replenishment -in a similar way as it is done in heat pipes-. From the plasma physics point of view, it has been mentioned that the evaporated metal interacts beneficially with the near-divertor plasma, since it allows to exhaust part of the heat load via line radiation and Bremsstrahlung. Nevertheless, should the metal radiate in the core plasma or excessively dilute it, the fusion reactor performances would be heavily reduced. This thesis is focused on theoretically assessing, based on literature data and simple calculations, the capability of the CPS to hold the LM in place. To this aim, a detailed pressure balance for the LM in the CPS has been performed. Various terms of the balance are evaluated based on conditions expected in a fusion reactor. The simplicity of the model allows for performing fast parametric scans, thereby grasping the effect of design choices and of reactor operating conditions on the LM confinement.
November 07, 2019 | Gianluca Ragno, Fabio Subba, Laura Savoldi
An important issue in the design of tokamak divertors is to deal with high energy fluxes carried by runaway electron beams generated inside the plasma during disruption events. These beams hit the Plasma Facing Components (PFCs), first wall and divertor, which must be designed in order to withstand the consequent loads, that could otherwise cause phenomena such as erosion or melting, followed by a LOCA (Loss Of Cooling Accident). With the use of the Monte Carlo code FLUKA, the distribution profile of energy deposited by runaway electrons in PFCs has been assessed by ENEA, considering all the possible reactions derived by the collision of the particles inside the materials. The scope of the present work is to compute the temperature patterns in the EU DEMO divertor and first wall, in order to forecast the presence of one of the unwanted phenomena, starting from the energy profiles computed by ENEA. In first place, all the assumptions made and all the data used to set up the model in the FE solver Freefem++ are illustrated: the choice of the energy deposited and its duration, together with the correlations used for the heat transfer and the ones used for the thermal properties of the materials. At the end, the computed results are highlighted: the analysis has confirmed that, for both the components, large melting can occur, requiring their replacement in case of runaway electron events, but more catastrophic events (as LOCA) are not expected. This work constitutes a good starting point for the analysis of the effects of disruptions in DEMO, which could affect the design of plasma facing components, in order to minimize the maintenance costs of the reactor.