FreeFEM
load "msh3"

// Parameters
int nn = 20; // Mesh quality

// Mesh
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
fespace Vh(Th, P1);
Vh u, v;

// Macro
macro Grad(u) [dx(u), dy(u), dz(u)] //

// Define the weak form and solve
solve Poisson(u, v, solver=CG)
    = int3d(Th)(
          Grad(u)' * Grad(v)
    )
    -int3d(Th)(
          1 * v
    )
    + on(1, u=0)
    ;

// Plot
plot(u, nbiso=15);

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.

Pre-built physics

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 Computing Logo 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.

Latest Articles

November 14, 2019 | Jarosław Maciej Kopiński, Jacek Tafel

The Penrose inequality for perturbations of the Schwarzschild initial data

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

Preliminary study of liquid metal stability for a fusion reactor divertor target using a capillary-porous structure

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

Numerical analysis of the thermal effects of a runaway electron event on EU DEMO plasma facing components

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.

Events

17-19 DECEMBER 2019

FreeFEM Days - Paris, France

Join us for the FreeFEM Days 2019 edition !

16-20 SEPTEMBER 2019

CIRM - Marseille, France

Workshop - Parallel Solution Methods for Systems Arising from PDEs

03-13 JULY 2019

CIMPA 2019 - Kenitra, Morocco

Scientific calculation in the context of household waste management

19-21 JUNE 2019

Rencontre Mathématiques de Rouen

Introduction to FreeFEM version 4

You are in good company

Sorbonne université INRIA ANR Genci CNRS