A high level multiphysics finite element software

load "msh3"

// Parameters
func ue = 2.*x*x + 3.*y*y
        + 4.*z*z + 5.*x*y
        + 6.*x*z + 1.;
real f = -18.;

// Mesh
mesh3 Th = readmesh3("Sphere.mesh");
int[int] Wall = [1];

// Fespace
fespace Vh(Th, P23d);
Vh u, v;

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

// Problem
problem Lap3d (u, v, solver=CG)
    = int3d(Th)(
          Grad3(v)' * Grad3(u)
    - int3d(Th)(
          f * v
    + on(Wall, u=ue)

// Solve
cout << "u min: " << u[]. min
     << " - max: " << u[].max
     << endl;

// Plot
plot(u, wait=true);

// Save
load "iovtk"
	fespace PVh(Th, P1);
	PVh uu = u;

	string DataName = "u";
	int[int] Order = [1];

	savevtk("Result.vtu", Th,
	        uu, dataname=DataName,

For non-linear multi-physics in 2D and 3D

FreeFem++ offers a fast interpolation algorithm and a language for the manipulation of data on multiple meshes.

Cpp icon

Harnessing the speed of C++. The FreeFem++ language is a C++ idiom.

Server icon

Massively parallel thanks to the popular mumps, petsc and hpddm solvers.

Atom icon

Implement your own physics modules to fit your specific needs.

Icons made by www.freepik.com from www.flaticon.com is licensed by CC 3.0 BY

Compatible with the best mesh and vizualization software : Gmsh, Mmg3d and ParaView.

Pre-defined models

Use our collection of pre-defined models, or build your own.

Airplane fluid simulation


Linear and nonlinear fluidic, bi-fluid, free surface fluids

Hook elasticity simulation


Linear and nonlinear elasticity, Mooney-Rivlin, ...

Disc thermal simulation


Diffusion, convection, radiation, ...

Magnet Electromagnetics simulation


Magnetostatic, electrostatic, ...

Multi-physics fluid-structure simulation


Fluid-structure, Thermal fluid, ...

EDP code example

Build your own

Use the FreeFem++ language to implement your own physics

Good documentation matters

Web documentation PDF documentation

Have a look at the examples, the programming language reference, and the new tutorials.

Users contributions are always welcome, feel free to submit a GitHub PR.

You are in good company

Sorbonne University Logo ANR INRIA Logo CNRS Logo Genci Logo