Projects

The research projects I worked on, and what I did in each. Below, the software that came out of them and my own work; each entry links to the one it grew out of.

Research projects

European and regional R&D projects I worked on, and what I did in each.

Software

Named tools I designed and built within those projects.

  • Wave packets circling over a non-uniform mesh, discretised with finite differences

    DyCon Toolbox

    Grew out of DyCon (ERC Advanced Grant)

    A MATLAB toolbox from the ERC DyCon project for nonlinear optimal control: derivatives by automatic differentiation (CasADi), the direct method with IPOPT and the indirect one with the adjoint. Documented, with published tutorials such as discrete waves on non-uniform meshes.

    MATLAB · CasADi · IPOPT

  • HORTISIM

    Grew out of HortiMED (PRIMA (Horizon 2020))

    A Simulink library to assemble a greenhouse model from pieces: climate with energy, vapour and CO₂ balances, windows, screen, heating, fogging, tomato crop, substrate and irrigation, and aquaponic tanks.

    MATLAB · Simulink

Own work

Simulations I build on my own, in the open, with an article, code and an in-browser viewer.

  • A 3D SOFC stack with one cell highlighted and, beside it, that cell exploded: steel interconnects with channels, cathode, electrolyte and anode

    Inside a solid oxide fuel cell

    Grew out of AGRO-SOFC

    A 30-cell solid oxide fuel cell stack running on biogas, simulated in the browser: where its voltage comes from, what limits it and how much electricity and heat it delivers. Calibrated against public measurements, with its geometry in 3D.

    JavaScript · React · Three.js · Python

  • Three dogs, with their trails, push a herd of 200 sheep towards the target circle

    Herding: from a heuristic to optimal control

    Three dogs and 200 sheep as particle dynamics. The heuristic rule is compared with the trajectory obtained by minimising a cost with CasADi and IPOPT, side by side and on the same model: the optimum gets there with ten times less effort.

    Python · CasADi · IPOPT · LAMMPS

  • Inside the greenhouse in 3D: rows of tomato plants with green, orange and red tomatoes

    A greenhouse built from pieces

    Grew out of HORTISIM

    The idea behind HORTISIM in the browser: cover, air, crop and soil as energy, vapour and CO₂ balances joined by flows, in a live diagram. The model is ported and validated against the original, with HortiMED weather data.

    JavaScript · React Flow · Python

  • A staircase wave over the sine it approximates and, below, its spectrum: a tall fundamental and the eliminated harmonics at zero

    Harmonics on demand

    Grew out of CONVADP (ELKARTEK)

    Selective harmonic elimination as convex optimal control, solved in the browser, and the exact set of harmonics a staircase wave can reach. A continuation of the CONVADP line of work.

    JavaScript · Python · Optimización convexa

  • Copper nanowire snapping at the neck, with the stacking faults in amber

    Copper nanowire: from LAMMPS to the browser

    A molecular dynamics tensile test up to fracture, with the EAM potential validated before measuring anything. Python exports the trajectory to a custom binary and a three.js viewer draws it live: 5780 atoms and 80 frames in 793 KiB.

    LAMMPS · Python · three.js

  • A terracotta origami crane in 3D, fully folded, wings open, with its creases marked

    A crane, face by face

    An origami crane folded in the browser from a single sheet of 88 rigid faces, with the closure error of every step checked. It became Grullu, this site’s mascot.

    TypeScript · Three.js · Geometría

  • Atoms of a 2D crystal around a crack tip: behind it, opened and in blue; ahead of it, stressed and in amber

    A crack running through a crystal

    Brittle fracture in a 2D Lennard-Jones crystal. Before breaking anything, the elastic constants are checked against the Born formula; afterwards, the tip speed against the Rayleigh speed. A 2D canvas viewer for ten thousand atoms per frame.

    LAMMPS · Python · Canvas 2D