fino: FINite elements Optimization

Fino: a free finite-element solver 

Fino is a free and open source tool to solve partial differential equations using the finite element method. It is particularly designed to handle complex material properties, parametric and optimization runs while solving linear elastic problems, natural frequency analysis and heat conduction but arbitrary equations may be included. The domain over which the PDE is solved (which can be either one, two or three-dimensional) should be a grid generated by Gmsh. The material properties (i.e. the coefficients of the PDE) may involve arbitrary dependence of space associated to volumetric physical entities defined in the mesh. Dirichlet, Neumann and/or Robin boundary conditions can be given as algebraic functions of space and are also associated to surface physical entities.

Fino follows, amongst others, the UNIX philosophy. Fino is a back-end aimed at advanced users. For a web-based fronted with Fino running on the cloud, see CAEplex

CAEplex: a web-based interface for finite-element analysis on the cloud

1 Quick start

If you are impatient to run Fino, open a terminal in any GNU/Linux box (may be a VirtualBox box) and run:

sudo apt-get install curl m4 make autoconf automake gcc git libgsl0-dev wget findutils
curl | sh

You might need to use a different package manager if your distribution is not Debian-based. If you are behind a proxy, make sure that both http_proxy and https_proxy are properly set. If you get any error, either

  1. See the detailed explanation in INSTALL
  2. Ask for help in the mailing list at!forum/wasora

Should you want to directly clone the repository, knock yourself out with:

git clone

If these instructions are non-sense to you, go directly to point (b) above.

2 Features

Fino uses the a finite-element formulation to solve

  • the displacement-based linear static elastic problem, or
  • the natural frequencies modal linear static elastic problem, or
  • the static heat conduction equation, or
  • any arbitrary linear partial differential equation provided the user enters the elemental stiffness matrix.

Fino uses a main input file (see below for examples), that in turn instructs Fino to read one or more mesh files in Gmsh format. Fino works on top of the wasora framework so it shares its design basis and inherits all of its features:

Output is 100% defined in the input file. If no explicit output instruction is provided, Fino remains silent (as required by the UNIX rule of silence). Besides terminal and plain-text files, post-processing files in VTK o MSH formats can be generated.

3 Examples

See the directory examples for further cases.

3.1 Tensile test

Let us consider the example input file examples/tensile-test.fin:

MESH FILE_PATH tensile-test-specimen.msh   # mesh file in Gmsh format

# uniform properties
E = 2e5   # Young modulus
nu = 0.3  # Poisson ratio

# boundary conditions (the names come from the physical entities in the mesh)
PHYSICAL_ENTITY NAME right BC tx=0.002*E*(10/13)   # traction
# PHYSICAL_ENTITY NAME right BC u=0 v=0 w=1        # displacement

# print some data
PRINT TEXT "elements                    =" %g elements
PRINT TEXT "nodes                       =" %g nodes


# results
MESH_POST FILE_PATH tensile-test.vtk sigma sigma1 sigma2 sigma3 VECTOR u v w

PRINT TEXT "maximum_diplacement   [mm]  =" %g displ_max
PRINT TEXT "stress_at_the_origin  [MPa] =" %g sigma(0,0,0)
PRINT TEXT "reaction_at_fixed_end [N]   =" %g TEXT "Rx ="  R_left_x TEXT "Ry =" R_left_y TEXT "Rz =" R_left_z
PRINT FILE_PATH tensile-sigma.dat %.0f sigma(0,0,0)

We can run it with Fino like this:

$ fino tensile-test.fin 
elements                    =   3356
nodes                       =   1178
maximum_diplacement   [mm]  =   0.30163
stress_at_the_origin  [MPa] =   399.999
reaction_at_fixed_end [N]   =   Rx =    -40000  Ry =    8.99532e-09     Rz =    -8.00355e-11

We can process the VTK output file with the free tool ParaView:

Tensile test results.
Tensile test results.

3.2 Cantilever beam with first & second order elements

DEFAULT_ARGUMENT_VALUE 1 1        # use first (1) or second (2) order elements
DEFAULT_ARGUMENT_VALUE 2 0        # use structured (1) or unstructured (0) tets


OUTPUT_FILE geo  cantilever-$1-$2-%.2f.geo c
M4 {
 INPUT_FILE_PATH  cantilever.geo.m4
 MACRO lc     $1/c
 MACRO struct $2

SHELL "if [ ! -e cantilever-$1-$2-%.2f.msh ]; then gmsh -v 0 -3 -order $1 cantilever-$1-$2-%.2f.geo > /dev/null; fi" c c
INPUT_FILE mesh cantilever-$1-$2-%.2f.msh c


E = 200e3
nu = 0.3


PRINT %.2f 1/c c %g nodes elements %.5g displ_max sigma_max %g fino_iterations %.2f time_cpu_build time_cpu_solve %.0f memory_usage_global/1e6

OUTPUT_FILE vtk cantilever-$1-$2-%.2f.vtk c
MESH_POST FILE vtk sigma sigma1 sigma2 sigma3 VECTOR u v w
Cantilever beam displacement for different grids and element order.
Cantilever beam displacement for different grids and element order.

3.3 Thermal conduction in a piston engine

Problem taken from Simscale’s thermal tutorial:

# thermal conductivity in an engine piston as in

SHELL "if [ ! -e engine-piston.msh ]; then gmsh -v 0 -3 engine-piston.geo; fi"
MESH FILE_PATH engine-piston.msh  # the mesh is in mm

f = 1e-3   # factor to convert from m to mm
# thermal conductivity numerically in W/(m*K) set in W/(mm*K)
k = 160*f

# heat transfer coefficient in W/(m^2*K) set in W/(mm^2*K)
PHYSICAL_ENTITY NAME "top"                BC   h=450*f^2   Tref=1400
PHYSICAL_ENTITY NAME "ring 1"             BC   h=150*f^2   Tref=450
PHYSICAL_ENTITY NAME "ring 1 groove"      BC  h=1000*f^2   Tref=450
PHYSICAL_ENTITY NAME "ring 2"             BC   h=150*f^2   Tref=450
PHYSICAL_ENTITY NAME "ring 2 groove"      BC   h=400*f^2   Tref=380
PHYSICAL_ENTITY NAME "ring 3"             BC   h=150*f^2   Tref=380
PHYSICAL_ENTITY NAME "ring 3 groove"      BC   h=400*f^2   Tref=380
PHYSICAL_ENTITY NAME "interior and skirt" BC   h=650*f^2   Tref=380


MESH_POST FILE_PATH engine-piston.vtk T

# PRINT "\# cpu time [sec] = "  %.2f time_cpu_build "(build) "  %.2f time_cpu_solve "(solve)"  SEP " "
PRINT %.1f T(0,0,0)
Fino results.
Fino results.
Simscale (CalculiX) results.
Simscale (CalculiX) results.

3.4 Conic valve

Can your solver constrain your model faces to algebraically-defined surfaces such as cones? Ours can (and it is open source):

Conic valve 

SHELL "gmsh -v 0 -3 conic_valve.geo"

E = 200e3
nu = 0.3


PHYSICAL_ENTITY NAME base  BC u=0 v=1e-2 w=0
PHYSICAL_ENTITY NAME top   BC u=0 v=1e-2 w=0

# the cone equation
x1 = -4
y1 = 2

x2 = -2
y2 = 4

f(x) := (y2-y1)/(x2-x1)*(x-x1) + y1
h = f(0)
r = root(f(x), x, -10, 0) 

PHYSICAL_ENTITY NAME cone  BC implicit=((x+u)^2+(z+w)^2)/(r/h)^2-(y+v-h)^2

MESH_POST FILE_PATH conic_valve.vtk sigma VECTOR u v w dudx dvdx dwdx dudy dvdy dwdy dudz dvdz dwdz 

See the original tweet at

3.5 Thermal expansion of finite cylinders

Veeder Benchmark problem
Veeder Benchmark problem


4 Licensing

Fino is distributed under the terms of the GNU General Public License version 3 or (at your option) any later version.

5 Further information

Home page:
Mailing list and bug reports: (you need to subscribe first at
Web interface for mailing list:
Follow us: Twitter YouTube LinkedIn Bitbucket

fino is copyright (C) 2014-2017 Jeremy Theler
fino is licensed under GNU GPL version 3 or (at your option) any later version.
fino is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
See the file COPYING for copying conditions.